linux/drivers/gpu/drm/tegra
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
..
dc.c drm: Nuke fb->pixel_format 2016-12-15 14:55:34 +02:00
dc.h drm/tegra: sor: Add HDMI support 2015-08-13 13:49:37 +02:00
dpaux.c drm/tegra: dpaux: Fix error handling 2016-11-07 12:58:12 +01:00
dpaux.h drm/tegra: dpaux: Configure pads as I2C by default 2015-08-13 13:47:47 +02:00
drm.c drm: Nuke fb->bits_per_pixel 2016-12-15 14:55:34 +02:00
drm.h drm: tegra: Rely on the default ->best_encoder() behavior 2016-06-10 17:24:48 +02:00
dsi.c drm/tegra: dsi: Enhance runtime power management 2016-08-24 15:58:57 +02:00
dsi.h drm/tegra: dsi: Add Tegra210 support 2015-08-13 13:47:45 +02:00
fb.c drm: Nuke fb->depth 2016-12-15 14:55:33 +02:00
gem.c drm/tegra: Set sgt pointer in BO pin 2016-11-11 15:37:13 +01:00
gem.h drm/tegra: gem: Use more consistent data types 2014-11-13 16:18:32 +01:00
gr2d.c drm/tegra: add MODULE_DEVICE_TABLEs 2014-08-04 10:07:39 +02:00
gr2d.h drm/tegra: Use symbolic names for gr2d registers 2013-10-31 09:55:44 +01:00
gr3d.c drm/tegra: Fix error handling 2016-11-07 13:01:42 +01:00
gr3d.h drm/tegra: Add 3D support 2013-10-31 09:55:45 +01:00
hdmi.c drm/tegra: Changes for v4.8-rc1 2016-07-16 11:23:50 +10:00
hdmi.h drm/tegra: hdmi: Enable audio over HDMI 2016-07-04 11:34:31 +02:00
Kconfig gpu: Remove depends on RESET_CONTROLLER when not a provider 2016-10-19 09:26:15 +02:00
Makefile drm/tegra: Remove host1x drm_bus implementation 2014-06-05 23:14:46 +02:00
mipi-phy.c drm/tegra: dsi: Adjust D-PHY timing 2015-01-27 10:14:40 +01:00
mipi-phy.h drm/tegra: Relicense under GPL v2 2014-04-04 09:12:51 +02:00
output.c drm/tegra: Changes for v4.8-rc1 2016-07-16 11:23:50 +10:00
rgb.c drm: tegra: Rely on the default ->best_encoder() behavior 2016-06-10 17:24:48 +02:00
sor.c drm/tegra: sor: No need to free devm_ allocated memory 2016-11-07 13:03:41 +01:00
sor.h drm/tegra: sor: Do not support deep color modes 2016-07-04 11:33:21 +02:00