Re: [PATCH 25/37] drm: Replace drm_format_plane_cpp() with fb->format->cpp[]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ville,

Thank you for the patch.

On Friday 18 Nov 2016 21:53:01 ville.syrjala@xxxxxxxxxxxxxxx wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Replace drm_format_plane_cpp(fb->pixel_format) with just
> fb->format->cpp[]. Avoids the expensive format info lookup.
> 
> @@
> struct drm_framebuffer *a;
> struct drm_framebuffer b;
> expression E;
> @@
> (
> - drm_format_plane_cpp(a->pixel_format, E)
> + a->format->cpp[E]
> 
> - drm_format_plane_cpp(b.pixel_format, E)
> + b.format->cpp[E]
> )
> 
> @@
> struct drm_plane_state *a;
> struct drm_plane_state b;
> expression E;
> @@
> (
> - drm_format_plane_cpp(a->fb->pixel_format, E)
> + a->fb->format->cpp[E]
> 
> - drm_format_plane_cpp(b.fb->pixel_format, E)
> + b.fb->format->cpp[E]
> )
> 
> @@
> struct drm_framebuffer *a;
> identifier T;
> expression E;
> @@
>   T = a->pixel_format
> <+...
> - drm_format_plane_cpp(T, E)
> + a->format->cpp[E]
> ...+>
> 
> @@
> struct drm_framebuffer b;
> identifier T;
> expression E;
> @@
>   T = b.pixel_format
> <+...
> - drm_format_plane_cpp(T, E)
> + b.format->cpp[E]
> ...+>
> 
> Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> Suggested-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/arm/hdlcd_crtc.c                |  2 +-
>  drivers/gpu/drm/armada/armada_overlay.c         |  2 +-
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c |  2 +-
>  drivers/gpu/drm/i915/intel_display.c            | 16 +++++-----
>  drivers/gpu/drm/i915/intel_pm.c                 | 42 ++++++++++------------
>  drivers/gpu/drm/i915/intel_sprite.c             |  2 +-
>  drivers/gpu/drm/imx/ipuv3-plane.c               |  6 ++--
>  drivers/gpu/drm/mediatek/mtk_drm_plane.c        |  2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c     |  4 +--
>  drivers/gpu/drm/sti/sti_gdp.c                   |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_backend.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                 |  2 +-
>  drivers/gpu/drm/zte/zx_plane.c                  |  2 +-
>  15 files changed, 45 insertions(+), 45 deletions(-)

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux