[PATCH 32/32] drm: Nuke fb->pixel_format

Alex Deucher alexdeucher at gmail.com
Thu Nov 17 17:37:14 UTC 2016


On Thu, Nov 17, 2016 at 11:14 AM,  <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Replace uses of fb->bits_per_pixel 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 *fb;
> @@
> - fb->pixel_format
> + fb->format->format
>
> @@
> struct intel_framebuffer *fb;
> @@
> - fb->base.pixel_format
> + fb->base.format->format
>
> @@
> struct drm_plane_state *state;
> @@
> - state->fb->pixel_format
> + state->fb->format->format
>
> @@
> struct drm_plane_state state;
> @@
> - state.fb->pixel_format
> + state.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
>
> @@
> struct drm_mode_set *set;
> @@
> - set->crtc->primary->fb->pixel_format
> + set->crtc->primary->fb->format->format
>
> @@
> @@
>  struct drm_framebuffer {
>          ...
> -        uint32_t pixel_format;
>          ...
>  };
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Patches 13, 18, 19, 22, 28, 30, 31, 32 are:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>


More information about the dri-devel mailing list