1
0
Fork 0
alistair23-linux/drivers/gpu/drm/tilcdc
Ville Syrjälä 353c859899 drm: Replace drm_format_plane_cpp() with fb->format->cpp[]
Replace drm_format_plane_cpp(fb->pixel_format) with just
fb->format->cpp[]. Avoids the expensive format info lookup.

@@
struct drm_framebuffer *a;
struct drm_framebuffer b;
expression E;
@@
(
- drm_format_plane_cpp(a->pixel_format, E)
+ a->format->cpp[E]
|
- drm_format_plane_cpp(b.pixel_format, E)
+ b.format->cpp[E]
)

@@
struct drm_plane_state *a;
struct drm_plane_state b;
expression E;
@@
(
- drm_format_plane_cpp(a->fb->pixel_format, E)
+ a->fb->format->cpp[E]
|
- drm_format_plane_cpp(b.fb->pixel_format, E)
+ b.fb->format->cpp[E]
)

@@
struct drm_framebuffer *a;
identifier T;
expression E;
@@
  T = a->pixel_format
<+...
- drm_format_plane_cpp(T, E)
+ a->format->cpp[E]
...+>

@@
struct drm_framebuffer b;
identifier T;
expression E;
@@
  T = b.pixel_format
<+...
- drm_format_plane_cpp(T, E)
+ b.format->cpp[E]
...+>

v2: Rerun spatch due to code changes

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1481751057-18123-1-git-send-email-ville.syrjala@linux.intel.com
2016-12-15 14:55:31 +02:00
..
Kconfig drm/tilcdc: make fbdev support really optional 2016-07-18 09:11:38 +02:00
Makefile drm/tilcdc: Add dummy primary plane implementation 2016-08-08 23:05:00 +03:00
tilcdc_crtc.c drm: Replace drm_format_plane_cpp() with fb->format->cpp[] 2016-12-15 14:55:31 +02:00
tilcdc_drv.c drm/tilcdc: fix parsing of some DT properties 2016-11-30 14:20:16 +02:00
tilcdc_drv.h drm/tilcdc: Fix tilcdc_crtc_create() return value handling 2016-11-30 14:18:53 +02:00
tilcdc_external.c drm/tilcdc: Add drm bridge support for attaching drm bridge drivers 2016-11-30 14:17:52 +02:00
tilcdc_external.h drm/tilcdc: Add drm bridge support for attaching drm bridge drivers 2016-11-30 14:17:52 +02:00
tilcdc_panel.c Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next 2016-12-06 10:26:48 +01:00
tilcdc_panel.h drm/tilcdc: add support for LCD panels (v5) 2013-02-19 17:57:45 -05:00
tilcdc_plane.c drm: Replace drm_format_plane_cpp() with fb->format->cpp[] 2016-12-15 14:55:31 +02:00
tilcdc_regs.h drm/tilcdc: Enable frame done irq and functionality for LCDC rev 1 2016-11-30 14:20:03 +02:00
tilcdc_slave_compat.c drm/tilcdc: Return directly after a failed kfree_table_init() in tilcdc_convert_slave_node() 2016-09-23 13:49:52 +03:00
tilcdc_slave_compat.dts drm/tilcdc: Add DRM_TILCDC_SLAVE_COMPAT for ti,tilcdc,slave binding support 2015-05-27 13:13:33 +03:00
tilcdc_slave_compat.h drm/tilcdc: Add DRM_TILCDC_SLAVE_COMPAT for ti,tilcdc,slave binding support 2015-05-27 13:13:33 +03:00
tilcdc_tfp410.c drm/tilcdc: Remove obsolete drm_connector_register() calls 2016-11-29 21:03:18 +02:00
tilcdc_tfp410.h drm/tilcdc: add TI LCD Controller DRM driver (v4) 2013-02-19 17:57:44 -05:00