linux/drivers/gpu/drm/fsl-dcu
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
..
fsl_dcu_drm_crtc.c drm/fsl-dcu: disable planes before disabling CRTC 2016-11-08 17:14:08 -08:00
fsl_dcu_drm_crtc.h
fsl_dcu_drm_drv.c drm/fsl: don't use drm_put_dev 2016-12-13 22:25:46 +01:00
fsl_dcu_drm_drv.h drm/fsl-dcu: remove separate compilation unit for fbdev emulation 2016-11-28 17:33:52 -08:00
fsl_dcu_drm_kms.c drm/fsl-dcu: rework codes to support of_graph dt binding for panel 2016-07-15 18:06:28 -07:00
fsl_dcu_drm_output.h drm/fsl-dcu: rework codes to support of_graph dt binding for panel 2016-07-15 18:06:28 -07:00
fsl_dcu_drm_plane.c drm: Nuke fb->pixel_format 2016-12-15 14:55:34 +02:00
fsl_dcu_drm_plane.h drm/fsl-dcu: move layer initialization to plane file 2016-06-18 18:34:22 -07:00
fsl_dcu_drm_rgb.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
fsl_tcon.c drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code 2016-09-05 12:15:41 -07:00
fsl_tcon.h drm/fsl-dcu: add TCON driver 2016-04-25 20:27:18 -07:00
Kconfig drm/fsl-dcu: make fbdev support really optional 2016-07-18 09:11:39 +02:00
Makefile drm/fsl-dcu: remove separate compilation unit for fbdev emulation 2016-11-28 17:33:52 -08:00