linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] drm: More plane clipping polish
@ 2017-11-23 19:04 Ville Syrjala
  2017-11-23 19:04 ` [PATCH 09/15] drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip rectangle Ville Syrjala
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ville Syrjala @ 2017-11-23 19:04 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Archit Taneja,
	Ben Skeggs, Brian Starkey, CK Hu, Daniel Vetter,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Laurent Pinchart,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Liviu Dudau,
	Mali DP Maintainers, Mark Yao, Neil Armstrong,
	Noralf Trønnes, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	Philipp Zabel, Rob Clark, Shawn Guo, Sinclair Yeh

From: Ville Syrjälä <ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

This series first unifies all users of drm_atomic_helper_check_plane_state()
to populate the clip rectangle with drm_mode_get_hv_timing(), and once
everything is unified the clip rectangle handling is sucked into
drm_atomic_helper_check_plane_state() away from driver code.

Entire series available here:
git://github.com/vsyrjala/linux.git atomic_plane_helper_clip

Cc: Archit Taneja <architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Brian Starkey <brian.starkey-5wv7dgnIgG8@public.gmane.org>
Cc: CK Hu <ck.hu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Cc: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
Cc: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Liviu Dudau <liviu.dudau-5wv7dgnIgG8@public.gmane.org>
Cc: Mali DP Maintainers <malidp-VeJGdqYn5oNWk0Htik3J/w@public.gmane.org>
Cc: Mark Yao <mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: Noralf Trønnes <noralf-L59+Z2yzLopAfugRpC6u6w@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Sinclair Yeh <syeh-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Cc: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Thomas Hellstrom <thellstrom-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Cc: VMware Graphics <linux-graphics-maintainer-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>

Ville Syrjälä (15):
  drm/i915: Reject odd pipe source width with double wide/dual link
  drm/i915: Use drm_mode_get_hv_timing() to populate plane clip
    rectangle
  drm/arm/hdlcd: Use drm_mode_get_hv_timing() to populate plane clip
    rectangle
  drm/arm/mali-dp: Use drm_mode_get_hv_timing() to populate plane clip
    rectangle
  drm/simple_kms_helper: Use drm_mode_get_hv_timing() to populate plane
    clip rectangle
  drm/imx: Use drm_mode_get_hv_timing() to populate plane clip rectangle
  drm/mediatek: Use drm_mode_get_hv_timing() to populate plane clip
    rectangle
  drm/meson: Use drm_mode_get_hv_timing() to populate plane clip
    rectangle
  drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip
    rectangle
  drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane
    clip rectangle
  drm/rockchip: Use drm_mode_get_hv_timing() to populate plane clip
    rectangle
  drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip
    rectangle
  drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip
    rectangle
  drm/zte: Use drm_mode_get_hv_timing() to populate plane clip rectangle
  drm: Don't pass clip to drm_atomic_helper_check_plane_state()

 drivers/gpu/drm/arm/hdlcd_crtc.c            |  6 +-----
 drivers/gpu/drm/arm/malidp_planes.c         |  5 +----
 drivers/gpu/drm/armada/armada_overlay.c     |  2 +-
 drivers/gpu/drm/drm_atomic_helper.c         | 12 +++++++-----
 drivers/gpu/drm/drm_plane_helper.c          | 11 +++--------
 drivers/gpu/drm/drm_simple_kms_helper.c     |  5 -----
 drivers/gpu/drm/i915/intel_atomic_plane.c   |  8 --------
 drivers/gpu/drm/i915/intel_display.c        | 12 +++++++-----
 drivers/gpu/drm/i915/intel_drv.h            |  1 -
 drivers/gpu/drm/i915/intel_sprite.c         |  8 ++++++--
 drivers/gpu/drm/imx/ipuv3-plane.c           |  7 +------
 drivers/gpu/drm/mediatek/mtk_drm_plane.c    |  6 +-----
 drivers/gpu/drm/meson/meson_plane.c         |  6 +-----
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c   | 14 ++------------
 drivers/gpu/drm/nouveau/nv50_display.c      |  8 --------
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c |  8 +-------
 drivers/gpu/drm/tegra/dc.c                  |  8 +-------
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c         |  8 +-------
 drivers/gpu/drm/zte/zx_plane.c              | 15 +--------------
 include/drm/drm_atomic_helper.h             |  1 -
 include/drm/drm_plane_helper.h              |  1 -
 21 files changed, 35 insertions(+), 117 deletions(-)

-- 
2.13.6

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 09/15] drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip rectangle
  2017-11-23 19:04 [PATCH 00/15] drm: More plane clipping polish Ville Syrjala
@ 2017-11-23 19:04 ` Ville Syrjala
  2017-11-26 13:11   ` Archit Taneja
       [not found] ` <20171123190502.28449-1-ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  2018-01-23 16:15 ` Ville Syrjälä
  2 siblings, 1 reply; 5+ messages in thread
From: Ville Syrjala @ 2017-11-23 19:04 UTC (permalink / raw)
  To: dri-devel
  Cc: intel-gfx, Laurent Pinchart, Rob Clark, Archit Taneja,
	linux-arm-msm, freedreno

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Use drm_mode_get_hv_timing() to fill out the plane clip rectangle.

Note that this replaces crtc_state->adjusted_mode usage with
crtc_state->mode. The latter is the correct choice since that's the
mode the user provided and it matches the plane crtc coordinates
the user also provided.

Once everyone agrees on this we can move the clip handling into
drm_atomic_helper_check_plane_state().

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
index ee41423baeb7..09f758e7bb1b 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
@@ -286,7 +286,7 @@ static int mdp5_plane_atomic_check_with_state(struct drm_crtc_state *crtc_state,
 	uint32_t max_width, max_height;
 	bool out_of_bounds = false;
 	uint32_t caps = 0;
-	struct drm_rect clip;
+	struct drm_rect clip = {};
 	int min_scale, max_scale;
 	int ret;
 
@@ -320,13 +320,13 @@ static int mdp5_plane_atomic_check_with_state(struct drm_crtc_state *crtc_state,
 		return -ERANGE;
 	}
 
-	clip.x1 = 0;
-	clip.y1 = 0;
-	clip.x2 = crtc_state->adjusted_mode.hdisplay;
-	clip.y2 = crtc_state->adjusted_mode.vdisplay;
 	min_scale = FRAC_16_16(1, 8);
 	max_scale = FRAC_16_16(8, 1);
 
+	if (crtc_state->enable)
+		drm_mode_get_hv_timing(&crtc_state->mode,
+				       &clip.x2, &clip.y2);
+
 	ret = drm_atomic_helper_check_plane_state(state, crtc_state, &clip,
 						  min_scale, max_scale,
 						  true, true);
@@ -471,7 +471,7 @@ static int mdp5_plane_atomic_async_check(struct drm_plane *plane,
 {
 	struct mdp5_plane_state *mdp5_state = to_mdp5_plane_state(state);
 	struct drm_crtc_state *crtc_state;
-	struct drm_rect clip;
+	struct drm_rect clip = {};
 	int min_scale, max_scale;
 	int ret;
 
@@ -499,13 +499,13 @@ static int mdp5_plane_atomic_async_check(struct drm_plane *plane,
 	    plane->state->fb != state->fb)
 		return -EINVAL;
 
-	clip.x1 = 0;
-	clip.y1 = 0;
-	clip.x2 = crtc_state->adjusted_mode.hdisplay;
-	clip.y2 = crtc_state->adjusted_mode.vdisplay;
 	min_scale = FRAC_16_16(1, 8);
 	max_scale = FRAC_16_16(8, 1);
 
+	if (crtc_state->enable)
+		drm_mode_get_hv_timing(&crtc_state->mode,
+				       &clip.x2, &clip.y2);
+
 	ret = drm_atomic_helper_check_plane_state(state, crtc_state, &clip,
 						  min_scale, max_scale,
 						  true, true);
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 00/15] drm: More plane clipping polish
       [not found] ` <20171123190502.28449-1-ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2017-11-24 13:41   ` Thierry Reding
  0 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2017-11-24 13:41 UTC (permalink / raw)
  To: Ville Syrjala
  Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Archit Taneja,
	Ben Skeggs, Brian Starkey, CK Hu, Daniel Vetter,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Laurent Pinchart,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Liviu Dudau,
	Mali DP Maintainers, Mark Yao, Neil Armstrong,
	Noralf Trønnes, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	Philipp Zabel, Rob Clark, Shawn Guo

[-- Attachment #1: Type: text/plain, Size: 4887 bytes --]

On Thu, Nov 23, 2017 at 09:04:47PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> 
> This series first unifies all users of drm_atomic_helper_check_plane_state()
> to populate the clip rectangle with drm_mode_get_hv_timing(), and once
> everything is unified the clip rectangle handling is sucked into
> drm_atomic_helper_check_plane_state() away from driver code.
> 
> Entire series available here:
> git://github.com/vsyrjala/linux.git atomic_plane_helper_clip
> 
> Cc: Archit Taneja <architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> Cc: Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Brian Starkey <brian.starkey-5wv7dgnIgG8@public.gmane.org>
> Cc: CK Hu <ck.hu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> Cc: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
> Cc: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> Cc: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
> Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Liviu Dudau <liviu.dudau-5wv7dgnIgG8@public.gmane.org>
> Cc: Mali DP Maintainers <malidp-VeJGdqYn5oNWk0Htik3J/w@public.gmane.org>
> Cc: Mark Yao <mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> Cc: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
> Cc: Noralf Trønnes <noralf-L59+Z2yzLopAfugRpC6u6w@public.gmane.org>
> Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> Cc: Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Sinclair Yeh <syeh-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
> Cc: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Thomas Hellstrom <thellstrom-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
> Cc: VMware Graphics <linux-graphics-maintainer-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
> 
> Ville Syrjälä (15):
>   drm/i915: Reject odd pipe source width with double wide/dual link
>   drm/i915: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/arm/hdlcd: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/arm/mali-dp: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/simple_kms_helper: Use drm_mode_get_hv_timing() to populate plane
>     clip rectangle
>   drm/imx: Use drm_mode_get_hv_timing() to populate plane clip rectangle
>   drm/mediatek: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/meson: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane
>     clip rectangle
>   drm/rockchip: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/zte: Use drm_mode_get_hv_timing() to populate plane clip rectangle
>   drm: Don't pass clip to drm_atomic_helper_check_plane_state()
> 
>  drivers/gpu/drm/arm/hdlcd_crtc.c            |  6 +-----
>  drivers/gpu/drm/arm/malidp_planes.c         |  5 +----
>  drivers/gpu/drm/armada/armada_overlay.c     |  2 +-
>  drivers/gpu/drm/drm_atomic_helper.c         | 12 +++++++-----
>  drivers/gpu/drm/drm_plane_helper.c          | 11 +++--------
>  drivers/gpu/drm/drm_simple_kms_helper.c     |  5 -----
>  drivers/gpu/drm/i915/intel_atomic_plane.c   |  8 --------
>  drivers/gpu/drm/i915/intel_display.c        | 12 +++++++-----
>  drivers/gpu/drm/i915/intel_drv.h            |  1 -
>  drivers/gpu/drm/i915/intel_sprite.c         |  8 ++++++--
>  drivers/gpu/drm/imx/ipuv3-plane.c           |  7 +------
>  drivers/gpu/drm/mediatek/mtk_drm_plane.c    |  6 +-----
>  drivers/gpu/drm/meson/meson_plane.c         |  6 +-----
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c   | 14 ++------------
>  drivers/gpu/drm/nouveau/nv50_display.c      |  8 --------
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c |  8 +-------
>  drivers/gpu/drm/tegra/dc.c                  |  8 +-------
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c         |  8 +-------
>  drivers/gpu/drm/zte/zx_plane.c              | 15 +--------------
>  include/drm/drm_atomic_helper.h             |  1 -
>  include/drm/drm_plane_helper.h              |  1 -
>  21 files changed, 35 insertions(+), 117 deletions(-)

The series:

Reviewed-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 09/15] drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip rectangle
  2017-11-23 19:04 ` [PATCH 09/15] drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip rectangle Ville Syrjala
@ 2017-11-26 13:11   ` Archit Taneja
  0 siblings, 0 replies; 5+ messages in thread
From: Archit Taneja @ 2017-11-26 13:11 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel
  Cc: intel-gfx, freedreno, Laurent Pinchart, linux-arm-msm



On 11/24/2017 12:34 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Use drm_mode_get_hv_timing() to fill out the plane clip rectangle.
> 
> Note that this replaces crtc_state->adjusted_mode usage with
> crtc_state->mode. The latter is the correct choice since that's the
> mode the user provided and it matches the plane crtc coordinates
> the user also provided.
> 
> Once everyone agrees on this we can move the clip handling into
> drm_atomic_helper_check_plane_state().

For this and the msm change in patch # 15/15:

Reviewed-by: Archit Taneja <architt@codeaurora.org>

Thanks,
Archit

> 
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Archit Taneja <architt@codeaurora.org>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 20 ++++++++++----------
>   1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
> index ee41423baeb7..09f758e7bb1b 100644
> --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
> +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
> @@ -286,7 +286,7 @@ static int mdp5_plane_atomic_check_with_state(struct drm_crtc_state *crtc_state,
>   	uint32_t max_width, max_height;
>   	bool out_of_bounds = false;
>   	uint32_t caps = 0;
> -	struct drm_rect clip;
> +	struct drm_rect clip = {};
>   	int min_scale, max_scale;
>   	int ret;
>   
> @@ -320,13 +320,13 @@ static int mdp5_plane_atomic_check_with_state(struct drm_crtc_state *crtc_state,
>   		return -ERANGE;
>   	}
>   
> -	clip.x1 = 0;
> -	clip.y1 = 0;
> -	clip.x2 = crtc_state->adjusted_mode.hdisplay;
> -	clip.y2 = crtc_state->adjusted_mode.vdisplay;
>   	min_scale = FRAC_16_16(1, 8);
>   	max_scale = FRAC_16_16(8, 1);
>   
> +	if (crtc_state->enable)
> +		drm_mode_get_hv_timing(&crtc_state->mode,
> +				       &clip.x2, &clip.y2);
> +
>   	ret = drm_atomic_helper_check_plane_state(state, crtc_state, &clip,
>   						  min_scale, max_scale,
>   						  true, true);
> @@ -471,7 +471,7 @@ static int mdp5_plane_atomic_async_check(struct drm_plane *plane,
>   {
>   	struct mdp5_plane_state *mdp5_state = to_mdp5_plane_state(state);
>   	struct drm_crtc_state *crtc_state;
> -	struct drm_rect clip;
> +	struct drm_rect clip = {};
>   	int min_scale, max_scale;
>   	int ret;
>   
> @@ -499,13 +499,13 @@ static int mdp5_plane_atomic_async_check(struct drm_plane *plane,
>   	    plane->state->fb != state->fb)
>   		return -EINVAL;
>   
> -	clip.x1 = 0;
> -	clip.y1 = 0;
> -	clip.x2 = crtc_state->adjusted_mode.hdisplay;
> -	clip.y2 = crtc_state->adjusted_mode.vdisplay;
>   	min_scale = FRAC_16_16(1, 8);
>   	max_scale = FRAC_16_16(8, 1);
>   
> +	if (crtc_state->enable)
> +		drm_mode_get_hv_timing(&crtc_state->mode,
> +				       &clip.x2, &clip.y2);
> +
>   	ret = drm_atomic_helper_check_plane_state(state, crtc_state, &clip,
>   						  min_scale, max_scale,
>   						  true, true);
> 

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 00/15] drm: More plane clipping polish
  2017-11-23 19:04 [PATCH 00/15] drm: More plane clipping polish Ville Syrjala
  2017-11-23 19:04 ` [PATCH 09/15] drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip rectangle Ville Syrjala
       [not found] ` <20171123190502.28449-1-ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2018-01-23 16:15 ` Ville Syrjälä
  2 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2018-01-23 16:15 UTC (permalink / raw)
  To: dri-devel
  Cc: intel-gfx, Archit Taneja, Ben Skeggs, Brian Starkey, CK Hu,
	Daniel Vetter, freedreno, Laurent Pinchart, linux-amlogic,
	linux-arm-msm, linux-tegra, Liviu Dudau, Mali DP Maintainers,
	Mark Yao, Neil Armstrong, Noralf Trønnes, nouveau,
	Philipp Zabel, Rob Clark, Shawn Guo, Sinclair Yeh

On Thu, Nov 23, 2017 at 09:04:47PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> This series first unifies all users of drm_atomic_helper_check_plane_state()
> to populate the clip rectangle with drm_mode_get_hv_timing(), and once
> everything is unified the clip rectangle handling is sucked into
> drm_atomic_helper_check_plane_state() away from driver code.
> 
> Entire series available here:
> git://github.com/vsyrjala/linux.git atomic_plane_helper_clip
> 
> Cc: Archit Taneja <architt@codeaurora.org>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Cc: CK Hu <ck.hu@mediatek.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: freedreno@lists.freedesktop.org
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-tegra@vger.kernel.org
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: Mark Yao <mark.yao@rock-chips.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Cc: nouveau@lists.freedesktop.org
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sinclair Yeh <syeh@vmware.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Thomas Hellstrom <thellstrom@vmware.com>
> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
> 
> Ville Syrjälä (15):
>   drm/i915: Reject odd pipe source width with double wide/dual link
>   drm/i915: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/arm/hdlcd: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/arm/mali-dp: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/simple_kms_helper: Use drm_mode_get_hv_timing() to populate plane
>     clip rectangle
>   drm/imx: Use drm_mode_get_hv_timing() to populate plane clip rectangle
>   drm/mediatek: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/meson: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane
>     clip rectangle
>   drm/rockchip: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip
>     rectangle
>   drm/zte: Use drm_mode_get_hv_timing() to populate plane clip rectangle

Everything up to here pushed to drm-misc-next. Thanks for the reviews.

There have been a few new users of the clip helper so I'll have to
take care of those and respin the final patch.

Also armada looks broken to me since it has started to use the
atomic version of the helper without actually being an atomic
driver. So I'll have to figure out what's going on there as well.

>   drm: Don't pass clip to drm_atomic_helper_check_plane_state()
> 
>  drivers/gpu/drm/arm/hdlcd_crtc.c            |  6 +-----
>  drivers/gpu/drm/arm/malidp_planes.c         |  5 +----
>  drivers/gpu/drm/armada/armada_overlay.c     |  2 +-
>  drivers/gpu/drm/drm_atomic_helper.c         | 12 +++++++-----
>  drivers/gpu/drm/drm_plane_helper.c          | 11 +++--------
>  drivers/gpu/drm/drm_simple_kms_helper.c     |  5 -----
>  drivers/gpu/drm/i915/intel_atomic_plane.c   |  8 --------
>  drivers/gpu/drm/i915/intel_display.c        | 12 +++++++-----
>  drivers/gpu/drm/i915/intel_drv.h            |  1 -
>  drivers/gpu/drm/i915/intel_sprite.c         |  8 ++++++--
>  drivers/gpu/drm/imx/ipuv3-plane.c           |  7 +------
>  drivers/gpu/drm/mediatek/mtk_drm_plane.c    |  6 +-----
>  drivers/gpu/drm/meson/meson_plane.c         |  6 +-----
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c   | 14 ++------------
>  drivers/gpu/drm/nouveau/nv50_display.c      |  8 --------
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c |  8 +-------
>  drivers/gpu/drm/tegra/dc.c                  |  8 +-------
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c         |  8 +-------
>  drivers/gpu/drm/zte/zx_plane.c              | 15 +--------------
>  include/drm/drm_atomic_helper.h             |  1 -
>  include/drm/drm_plane_helper.h              |  1 -
>  21 files changed, 35 insertions(+), 117 deletions(-)
> 
> -- 
> 2.13.6

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-23 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-23 19:04 [PATCH 00/15] drm: More plane clipping polish Ville Syrjala
2017-11-23 19:04 ` [PATCH 09/15] drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip rectangle Ville Syrjala
2017-11-26 13:11   ` Archit Taneja
     [not found] ` <20171123190502.28449-1-ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-11-24 13:41   ` [PATCH 00/15] drm: More plane clipping polish Thierry Reding
2018-01-23 16:15 ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).