alistair23-linux/drivers/gpu/drm/sun4i
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/sun4i: add COMMON_CLK dependency 2016-05-30 08:28:33 +02:00
Makefile drm/sun4i: Add a DRC driver 2016-09-08 09:31:13 +02:00
sun4i_backend.c drm: Replace drm_format_plane_cpp() with fb->format->cpp[] 2016-12-15 14:55:31 +02:00
sun4i_backend.h drm/sun4i: Fix the high buffer address mask 2016-09-22 10:13:22 +03:00
sun4i_crtc.c Linux 4.7 2016-07-26 17:26:29 +10:00
sun4i_crtc.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_dotclock.c drm/sun4i: dotclock: Round to closest clock rate 2016-09-20 09:19:31 +02:00
sun4i_dotclock.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_drv.c Linux 4.9-rc8 2016-12-05 17:11:48 +10:00
sun4i_drv.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_framebuffer.c drm/sun4i: add missing header dependencies 2016-09-08 14:55:48 +02:00
sun4i_framebuffer.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_layer.c drm/sun4i: Add a few formats 2016-11-02 19:37:37 +01:00
sun4i_layer.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_rgb.c Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next 2016-12-06 10:26:48 +01:00
sun4i_rgb.h drm: sun4i: Add RGB output 2016-04-28 10:30:05 +02:00
sun4i_tcon.c Merge tag 'drm-misc-next-2016-11-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2016-11-17 08:02:46 +10:00
sun4i_tcon.h drm/sun4i: tcon: Move SoC specific quirks to a DT matched data structure 2016-10-20 17:58:33 +02:00
sun4i_tv.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
sun6i_drc.c Merge tag 'drm-misc-next-2016-11-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2016-11-17 08:02:46 +10:00