[PATCH v2 33/37] drm: Nuke fb->pixel_format

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sat Nov 19 02:55:54 UTC 2016


Hi Ville,

Thank you for the patch.

On Friday 18 Nov 2016 21:53:09 ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> 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 vmw_framebuffer_surface *vfb;
> expression E;
> @@
> - vfb->base.base.pixel_format = E;
> 
> @@
> struct vmw_framebuffer_dmabuf *vfb;
> expression E;
> @@
> - vfb->base.base.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
> 
> @@
> 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
> 
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com> (v1)

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/dce_v10_0.c          |  4 +--
>  drivers/gpu/drm/amd/amdgpu/dce_v11_0.c          |  4 +--
>  drivers/gpu/drm/amd/amdgpu/dce_v6_0.c           |  4 +--
>  drivers/gpu/drm/amd/amdgpu/dce_v8_0.c           |  4 +--
>  drivers/gpu/drm/arc/arcpgu_crtc.c               |  2 +-
>  drivers/gpu/drm/arm/hdlcd_crtc.c                |  2 +-
>  drivers/gpu/drm/arm/malidp_planes.c             |  8 +++---
>  drivers/gpu/drm/armada/armada_crtc.c            |  2 +-
>  drivers/gpu/drm/armada/armada_overlay.c         |  2 +-
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 18 ++++++-------
>  drivers/gpu/drm/drm_atomic.c                    |  6 ++---
>  drivers/gpu/drm/drm_crtc.c                      |  4 +--
>  drivers/gpu/drm/drm_crtc_helper.c               |  4 +--
>  drivers/gpu/drm/drm_fb_cma_helper.c             |  2 +-
>  drivers/gpu/drm/drm_modeset_helper.c            |  1 -
>  drivers/gpu/drm/drm_plane.c                     |  6 ++---
>  drivers/gpu/drm/exynos/exynos5433_drm_decon.c   |  2 +-
>  drivers/gpu/drm/exynos/exynos7_drm_decon.c      |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c        |  2 +-
>  drivers/gpu/drm/exynos/exynos_mixer.c           |  8 +++---
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c     |  4 +--
>  drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c |  6 ++---
>  drivers/gpu/drm/i915/i915_debugfs.c             |  3 ++-
>  drivers/gpu/drm/i915/intel_atomic_plane.c       |  4 +--
>  drivers/gpu/drm/i915/intel_display.c            | 33 +++++++++-------------
>  drivers/gpu/drm/i915/intel_fbdev.c              |  2 +-
>  drivers/gpu/drm/i915/intel_overlay.c            |  2 +-
>  drivers/gpu/drm/i915/intel_pm.c                 | 10 ++++----
>  drivers/gpu/drm/i915/intel_sprite.c             | 12 ++++-----
>  drivers/gpu/drm/imx/ipuv3-plane.c               | 34 ++++++++++-----------
>  drivers/gpu/drm/mediatek/mtk_drm_plane.c        |  2 +-
>  drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c       |  2 +-
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c       |  2 +-
>  drivers/gpu/drm/msm/msm_fb.c                    |  2 +-
>  drivers/gpu/drm/nouveau/dispnv04/overlay.c      |  8 +++---
>  drivers/gpu/drm/nouveau/nv50_display.c          |  4 +--
>  drivers/gpu/drm/omapdrm/omap_fb.c               |  2 +-
>  drivers/gpu/drm/radeon/atombios_crtc.c          |  8 +++---
>  drivers/gpu/drm/rcar-du/rcar_du_plane.c         |  4 +--
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c           |  4 +--
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c     | 18 ++++++-------
>  drivers/gpu/drm/shmobile/shmob_drm_crtc.c       |  6 ++---
>  drivers/gpu/drm/shmobile/shmob_drm_plane.c      |  4 +--
>  drivers/gpu/drm/sti/sti_gdp.c                   |  8 +++---
>  drivers/gpu/drm/sti/sti_hqvdp.c                 |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_backend.c           |  3 ++-
>  drivers/gpu/drm/tegra/dc.c                      |  2 +-
>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c            |  2 +-
>  drivers/gpu/drm/tilcdc/tilcdc_plane.c           |  2 +-
>  drivers/gpu/drm/vc4/vc4_plane.c                 |  4 +--
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c             |  2 --
>  drivers/gpu/drm/zte/zx_plane.c                  |  2 +-
>  include/drm/drm_framebuffer.h                   |  4 ---
>  53 files changed, 143 insertions(+), 151 deletions(-)

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list