linux/drivers/gpu/drm/mediatek
Ville Syrjälä 438b74a549 drm: Nuke fb->pixel_format
Replace uses of fb->pixel_format with fb->format->format.
Less duplicated information is a good thing.

Note that coccinelle failed to eliminate the
"/* fourcc format */" comment from drm_framebuffer.h, so I had
to do that part manually.

@@
struct drm_framebuffer *FB;
expression E;
@@
 drm_helper_mode_fill_fb_struct(...) {
	...
-	FB->pixel_format = E;
	...
 }

@@
struct drm_framebuffer *FB;
expression E;
@@
 i9xx_get_initial_plane_config(...) {
	...
-	FB->pixel_format = E;
	...
 }

@@
struct drm_framebuffer *FB;
expression E;
@@
 ironlake_get_initial_plane_config(...) {
	...
-	FB->pixel_format = E;
	...
 }

@@
struct drm_framebuffer *FB;
expression E;
@@
 skylake_get_initial_plane_config(...) {
	...
-	FB->pixel_format = E;
	...
 }

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

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

@@
struct drm_crtc *CRTC;
@@
(
- CRTC->primary->fb->pixel_format
+ CRTC->primary->fb->format->format
|
- CRTC->primary->state->fb->pixel_format
+ CRTC->primary->state->fb->format->format
)

@@
struct drm_mode_set *set;
@@
(
- set->fb->pixel_format
+ set->fb->format->format
|
- set->crtc->primary->fb->pixel_format
+ set->crtc->primary->fb->format->format
)

@@
@@
 struct drm_framebuffer {
	 ...
-	 uint32_t pixel_format;
	 ...
 };

v2: Fix commit message (Laurent)
    Rebase due to earlier removal of many fb->pixel_format uses,
    including the 'fb->format = drm_format_info(fb->format->format);'
    snafu
v3: Adjusted the semantic patch a bit and regenerated due to code
    changes

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1481751175-18463-1-git-send-email-ville.syrjala@linux.intel.com
2016-12-15 14:55:34 +02:00
..
Kconfig drm/mediatek: add ARM_SMCCC dependency 2016-08-11 08:42:01 +02:00
Makefile drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_cec.c drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_cec.h drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_disp_ovl.c drm/mediatek: fix null pointer dereference 2016-11-24 14:53:15 +08:00
mtk_disp_rdma.c drm/mediatek: set mt8173 dithering function 2016-08-11 10:52:23 +02:00
mtk_dpi_regs.h drm/mediatek: Add DPI sub driver 2016-05-06 17:47:38 +02:00
mtk_dpi.c drm/mediatek: modify the factor to make the pll_rate set in the 1G-2G range 2016-10-19 09:07:08 +08:00
mtk_drm_crtc.c Merge tag 'topic/drm-misc-2016-08-12' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-08-15 16:46:36 +10:00
mtk_drm_crtc.h Merge tag 'topic/drm-misc-2016-08-12' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-08-15 16:46:36 +10:00
mtk_drm_ddp_comp.c drm/mediatek: fix a typo of DISP_OD_CFG to OD_RELAYMODE 2016-11-24 14:53:14 +08:00
mtk_drm_ddp_comp.h drm/mediatek: set mt8173 dithering function 2016-08-11 10:52:23 +02:00
mtk_drm_ddp.c
mtk_drm_ddp.h
mtk_drm_drv.c drm/mediatek: don't use drm_put_dev 2016-12-13 18:12:43 +01:00
mtk_drm_drv.h drm/mediatek: Add DPI sub driver 2016-05-06 17:47:38 +02:00
mtk_drm_fb.c drm: Pass 'dev' to drm_helper_mode_fill_fb_struct() 2016-12-15 14:03:30 +02:00
mtk_drm_fb.h
mtk_drm_gem.c dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
mtk_drm_gem.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
mtk_drm_plane.c drm: Nuke fb->pixel_format 2016-12-15 14:55:34 +02:00
mtk_drm_plane.h drm/mediatek: Remove mtk_drm_plane 2016-08-08 14:20:00 -04:00
mtk_dsi.c Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next 2016-12-06 10:26:48 +01:00
mtk_hdmi_ddc.c drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_hdmi_regs.h drm/mediatek: enable hdmi output control bit 2016-06-16 16:30:38 +02:00
mtk_hdmi.c drm/mediatek: do mtk_hdmi_send_infoframe after HDMI clock enable 2016-10-19 09:06:41 +08:00
mtk_hdmi.h drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_mipi_tx.c drm/mediatek/mtk_mipi_tx: checking the wrong variable 2016-07-12 14:47:04 +02:00
mtk_mt8173_hdmi_phy.c drm/mediatek: enhance the HDMI driving current 2016-10-19 09:06:53 +08:00