linux/drivers/gpu/drm/atmel-hlcdc
Ville Syrjälä bcb0b46145 drm: Replace drm_format_num_planes() with fb->format->num_planes
Replace drm_format_num_planes(fb->pixel_format) with just
fb->format->num_planes. Avoids the expensive format info lookup.

@@
struct drm_framebuffer *a;
struct drm_framebuffer b;
@@
(
- drm_format_num_planes(a->pixel_format)
+ a->format->num_planes
|
- drm_format_num_planes(b.pixel_format)
+ b.format->num_planes
)

@@
struct drm_plane_state *a;
struct drm_plane_state b;
@@
(
- drm_format_num_planes(a->fb->pixel_format)
+ a->fb->format->num_planes
|
- drm_format_num_planes(b.fb->pixel_format)
+ b.fb->format->num_planes
)

@@
struct drm_framebuffer *a;
identifier T;
@@
  T = a->pixel_format
<+...
- drm_format_num_planes(T)
+ a->format->num_planes
...+>

@@
struct drm_framebuffer b;
identifier T;
@@
  T = b.pixel_format
<+...
- drm_format_num_planes(T)
+ b.format->num_planes
...+>

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/1481751022-18015-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_num_planes() with fb->format->num_planes 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