linux/drivers/gpu/drm/atmel-hlcdc
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
..
atmel_hlcdc_crtc.c drm/atmel-hlcdc: Make ->reset() implementation static 2016-09-06 14:46:16 +02:00
atmel_hlcdc_dc.c drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
atmel_hlcdc_dc.h drm: atmel-hlcdc: route DMA accesses through AHB interfaces 2016-04-14 09:17:28 +02:00
atmel_hlcdc_layer.c drm: Replace drm_format_num_planes() with fb->format->num_planes 2016-12-15 14:55:31 +02:00
atmel_hlcdc_layer.h drm: atmel-hlcdc: Atomic mode-setting conversion 2015-02-22 21:00:06 +01:00
atmel_hlcdc_output.c Linux 4.7-rc5 2016-07-02 15:56:01 +10:00
atmel_hlcdc_plane.c drm: Replace drm_format_plane_cpp() with fb->format->cpp[] 2016-12-15 14:55:31 +02:00
Kconfig drm/atmel-hlcdc: make fbdev support really optional 2016-07-15 10:28:33 -04:00
Makefile drm: add Atmel HLCDC Display Controller support 2015-01-21 09:46:02 +01:00