linux/drivers/gpu/drm/imx
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/imx: make fbdev support really optional 2016-07-18 09:11:36 +02:00
Makefile drm: imx: imx-hdmi: move imx-hdmi to bridge/dw_hdmi 2015-01-07 18:31:56 +01:00
dw_hdmi-imx.c drm/imx: store internal bus configuration in crtc state 2016-07-12 18:24:28 +02:00
imx-drm-core.c drm/imx: Switch to drm_fb_cma_prepare_fb() helper 2016-11-15 08:25:06 +01:00
imx-drm.h drm/imx: Remove imx_drm_handle_vblank() 2016-08-08 11:44:20 +02:00
imx-ldb.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
imx-tve.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
ipuv3-crtc.c drm/imx: disable planes before DC 2016-11-09 10:35:50 +01:00
ipuv3-plane.c drm: Replace drm_format_plane_cpp() with fb->format->cpp[] 2016-12-15 14:55:31 +02:00
ipuv3-plane.h drm/imx: atomic phase 3 step 1: Use atomic configuration 2016-07-12 18:24:03 +02:00
parallel-display.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00