alistair23-linux/drivers/gpu/drm/sti
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/sti: remove stih415-416 platform support 2016-09-20 15:03:33 +02:00
Makefile drm/sti: remove stih415-416 platform support 2016-09-20 15:03:33 +02:00
NOTES drm: sti: add bindings for DRM driver 2014-07-30 18:11:53 +02:00
sti_awg_utils.c drm/sti: adjust delay for AWG 2016-06-27 10:18:25 +02:00
sti_awg_utils.h drm: sti: add DVO output connector 2014-12-30 15:08:16 +01:00
sti_compositor.c drm/sti: remove stih415-416 platform support 2016-09-20 15:03:33 +02:00
sti_compositor.h drm/sti: fix compositor debugfs creation 2016-09-20 11:32:07 +02:00
sti_crtc.c drm/sti: fix compositor debugfs creation 2016-09-20 11:32:07 +02:00
sti_crtc.h drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
sti_cursor.c drm/sti: fix atomic_disable check 2016-09-20 11:32:05 +02:00
sti_cursor.h drm/sti: atomic crtc/plane update 2015-08-03 14:26:05 +02:00
sti_drv.c Merge tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-11-11 09:28:44 +10:00
sti_drv.h drm: sti: rework init sequence 2016-06-21 21:32:52 +02:00
sti_dvo.c drm/sti: Fix sparse warnings 2016-09-20 11:32:04 +02:00
sti_gdp.c drm: Replace drm_format_plane_cpp() with fb->format->cpp[] 2016-12-15 14:55:31 +02:00
sti_gdp.h drm/sti: atomic crtc/plane update 2015-08-03 14:26:05 +02:00
sti_hda.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
sti_hdmi.c drm/sti: remove stih415-416 platform support 2016-09-20 15:03:33 +02:00
sti_hdmi.h drm: sti: Add ASoC generic hdmi codec support. 2016-07-01 09:12:49 +02:00
sti_hdmi_tx3g4c28phy.c drm: sti: add HDMI driver 2014-07-30 19:24:55 +02:00
sti_hdmi_tx3g4c28phy.h drm: sti: add HDMI driver 2014-07-30 19:24:55 +02:00
sti_hqvdp.c drm/sti: use valid video mode 2016-09-20 11:32:06 +02:00
sti_hqvdp_lut.h drm: sti: add HQVDP plane 2014-12-11 14:00:13 +01:00
sti_mixer.c drm/sti: remove stih415-416 platform support 2016-09-20 15:03:33 +02:00
sti_mixer.h drm: sti: use late_register and early_unregister callbacks 2016-06-21 21:32:52 +02:00
sti_plane.c drm: sti: use generic zpos for plane 2016-07-29 10:02:51 +02:00
sti_plane.h drm: sti: use generic zpos for plane 2016-07-29 10:02:51 +02:00
sti_tvout.c drm/sti: remove stih415-416 platform support 2016-09-20 15:03:33 +02:00
sti_vid.c drm/sti: use valid video mode 2016-09-20 11:32:06 +02:00
sti_vid.h drm: sti: use late_register and early_unregister callbacks 2016-06-21 21:32:52 +02:00
sti_vtac.c drm/sti: Fix sparse warnings 2016-09-20 11:32:04 +02:00
sti_vtg.c drm/sti: Fix sparse warnings 2016-09-20 11:32:04 +02:00
sti_vtg.h drm/sti: update VTG timing programming 2016-02-26 10:03:57 +01:00