[Freedreno] [PATCH 5/5] drm: Don't pass clip to drm_atomic_helper_check_plane_state()

Neil Armstrong narmstrong at baylibre.com
Fri Jan 26 05:23:41 UTC 2018


On 23/01/2018 18:08, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Move the plane clip rectangle handling into
> drm_atomic_helper_check_plane_state(). Drivers no longer
> have to worry about such mundane details.
> 
> v2: Convert armada, rcar, and sun4i as well
> 
> Cc: Liviu Dudau <liviu.dudau at arm.com>
> Cc: Brian Starkey <brian.starkey at arm.com>
> Cc: Mali DP Maintainers <malidp at foss.arm.com>
> Cc: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Gustavo Padovan <gustavo at padovan.org>
> Cc: Sean Paul <seanpaul at chromium.org>
> Cc: Philipp Zabel <p.zabel at pengutronix.de>
> Cc: CK Hu <ck.hu at mediatek.com>
> Cc: Neil Armstrong <narmstrong at baylibre.com>
> Cc: Rob Clark <robdclark at gmail.com>
> Cc: Ben Skeggs <bskeggs at redhat.com>
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Cc: Sandy Huang <hjc at rock-chips.com>
> Cc: "Heiko Stübner" <heiko at sntech.de>
> Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
> Cc: Thierry Reding <thierry.reding at gmail.com>
> Cc: VMware Graphics <linux-graphics-maintainer at vmware.com>
> Cc: Sinclair Yeh <syeh at vmware.com>
> Cc: Thomas Hellstrom <thellstrom at vmware.com>
> Cc: Shawn Guo <shawnguo at kernel.org>
> Cc: Archit Taneja <architt at codeaurora.org>
> Cc: linux-amlogic at lists.infradead.org
> Cc: linux-arm-msm at vger.kernel.org
> Cc: freedreno at lists.freedesktop.org
> Cc: nouveau at lists.freedesktop.org
> Cc: linux-renesas-soc at vger.kernel.org
> Cc: linux-tegra at vger.kernel.org
> Cc: Russell King <rmk+kernel at armlinux.org.uk>
> Suggested-by: Daniel Vetter <daniel at ffwll.ch>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Reviewed-by: Thierry Reding <treding at nvidia.com>
> Reviewed-by: Archit Taneja <architt at codeaurora.org> #msm
> ---
>  drivers/gpu/drm/arm/hdlcd_crtc.c            |  7 +------
>  drivers/gpu/drm/arm/malidp_planes.c         |  7 +------
>  drivers/gpu/drm/armada/armada_crtc.c        |  8 ++------
>  drivers/gpu/drm/armada/armada_overlay.c     |  8 ++------
>  drivers/gpu/drm/drm_atomic_helper.c         | 12 +++++++-----
>  drivers/gpu/drm/drm_plane_helper.c          | 11 +++--------
>  drivers/gpu/drm/drm_simple_kms_helper.c     |  6 ------
>  drivers/gpu/drm/i915/intel_display.c        | 12 ------------
>  drivers/gpu/drm/imx/ipuv3-plane.c           |  7 +------
>  drivers/gpu/drm/mediatek/mtk_drm_plane.c    |  7 +------
>  drivers/gpu/drm/meson/meson_plane.c         |  7 +------
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c   | 14 ++------------
>  drivers/gpu/drm/nouveau/nv50_display.c      | 12 ------------
>  drivers/gpu/drm/rcar-du/rcar_du_plane.c     |  7 +------
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c |  7 +------
>  drivers/gpu/drm/sun4i/sun8i_ui_layer.c      |  7 +------
>  drivers/gpu/drm/sun4i/sun8i_vi_layer.c      |  7 +------
>  drivers/gpu/drm/tegra/plane.c               |  7 +------
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c         |  7 +------
>  drivers/gpu/drm/zte/zx_plane.c              | 13 +------------
>  include/drm/drm_atomic_helper.h             |  1 -
>  include/drm/drm_plane_helper.h              |  1 -
>  22 files changed, 28 insertions(+), 147 deletions(-)
> 
[...]

> diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c
> index 3801bee1f9e6..c78a3a59f58c 100644
> --- a/drivers/gpu/drm/meson/meson_plane.c
> +++ b/drivers/gpu/drm/meson/meson_plane.c
> @@ -49,7 +49,6 @@ static int meson_plane_atomic_check(struct drm_plane *plane,
>  				    struct drm_plane_state *state)
>  {
>  	struct drm_crtc_state *crtc_state;
> -	struct drm_rect clip = { 0, };
>  
>  	if (!state->crtc)
>  		return 0;
> @@ -58,11 +57,7 @@ static int meson_plane_atomic_check(struct drm_plane *plane,
>  	if (IS_ERR(crtc_state))
>  		return PTR_ERR(crtc_state);
>  
> -	if (crtc_state->enable)
> -		drm_mode_get_hv_timing(&crtc_state->mode,
> -				       &clip.x2, &clip.y2);
> -
> -	return drm_atomic_helper_check_plane_state(state, crtc_state, &clip,
> +	return drm_atomic_helper_check_plane_state(state, crtc_state,
>  						   DRM_PLANE_HELPER_NO_SCALING,
>  						   DRM_PLANE_HELPER_NO_SCALING,
>  						   true, true);

[...]

> diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
> index 4842ee9485ce..26aaba58d6ce 100644
> --- a/include/drm/drm_atomic_helper.h
> +++ b/include/drm/drm_atomic_helper.h
> @@ -40,7 +40,6 @@ int drm_atomic_helper_check_modeset(struct drm_device *dev,
>  				struct drm_atomic_state *state);
>  int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state,
>  					const struct drm_crtc_state *crtc_state,
> -					const struct drm_rect *clip,
>  					int min_scale,
>  					int max_scale,
>  					bool can_position,
> diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
> index 8aa49c0ecd4d..28d7ce620729 100644
> --- a/include/drm/drm_plane_helper.h
> +++ b/include/drm/drm_plane_helper.h
> @@ -43,7 +43,6 @@ int drm_plane_helper_check_update(struct drm_plane *plane,
>  				  struct drm_framebuffer *fb,
>  				  struct drm_rect *src,
>  				  struct drm_rect *dest,
> -				  const struct drm_rect *clip,
>  				  unsigned int rotation,
>  				  int min_scale,
>  				  int max_scale,
> 

For meson driver,

Acked-by: Neil Armstrong <narmstrong at baylibre.com>


More information about the Freedreno mailing list