alistair23-linux/drivers/gpu/drm/arm
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
..
hdlcd_crtc.c drm: Replace drm_format_plane_cpp() with fb->format->cpp[] 2016-12-15 14:55:31 +02:00
hdlcd_drv.c Linux 4.9-rc8 2016-12-05 17:11:48 +10:00
hdlcd_drv.h drm: hdlcd: Cleanup the atomic plane operations 2016-06-02 17:45:29 +01:00
hdlcd_regs.h drm: Add support for ARM's HDLCD controller. 2016-02-10 13:44:16 +00:00
Kconfig drm/arm: make fbdev support really optional 2016-07-18 09:11:42 +02:00
Makefile drm/arm: Add support for Mali Display Processors 2016-06-15 17:29:22 +01:00
malidp_crtc.c drm/arm: Add support for Mali Display Processors 2016-06-15 17:29:22 +01:00
malidp_drv.c Merge branch 'drm-tda998x-mali' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-next 2016-11-17 08:55:26 +10:00
malidp_drv.h drm: mali-dp: Store internal format and n_planes in plane state 2016-11-04 17:09:45 +00:00
malidp_hw.c drm: mali-dp: Clear CVAL when leaving config mode 2016-11-08 11:40:02 +00:00
malidp_hw.h drm: mali-dp: Add pitch alignment check function 2016-11-04 17:08:06 +00:00
malidp_planes.c drm: Replace drm_format_num_planes() with fb->format->num_planes 2016-12-15 14:55:31 +02:00
malidp_regs.h drm/arm: Add support for Mali Display Processors 2016-06-15 17:29:22 +01:00