All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Renesas R-Car Gen3 DU alpha and z-order support
@ 2016-04-21  1:14 ` Laurent Pinchart
  0 siblings, 0 replies; 11+ messages in thread
From: Laurent Pinchart @ 2016-04-21  1:14 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, David Airlie

Hello,

This patch series implement support for alpha and z-order configuration in the
R-Car DU driver for the Gen3 SoCs family.

The Gen3 SoCs delegate composition to an external IP core called VSP,
supported by a V4L2 driver. The DU driver interfaces with the VSP driver using
direct function calls. Alpha and z-order configuration is implemented in the
VSP driver, the DU driver thus just needs to pass the values using the VSP
API.

This series depends on a large VSP series that has been merged in the Linux
media git tree for v4.7. Dave, instead of merging the media tree in your tree
to pull the dependency in, it would be easier to get those two patches
upstream through the media tree. I don't expect any conflict related to the
DU driver for v4.7. If you're fine with that, could you ack the patches ?

Laurent Pinchart (2):
  drm: rcar-du: Add Z-order support for VSP planes
  drm: rcar-du: Add alpha support for VSP planes

 drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 16 ++++++++++++----
 drivers/gpu/drm/rcar-du/rcar_du_vsp.h |  2 ++
 2 files changed, 14 insertions(+), 4 deletions(-)

-- 
Regards,

Laurent Pinchart


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

* [PATCH 0/2] Renesas R-Car Gen3 DU alpha and z-order support
@ 2016-04-21  1:14 ` Laurent Pinchart
  0 siblings, 0 replies; 11+ messages in thread
From: Laurent Pinchart @ 2016-04-21  1:14 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-renesas-soc, linux-media

Hello,

This patch series implement support for alpha and z-order configuration in the
R-Car DU driver for the Gen3 SoCs family.

The Gen3 SoCs delegate composition to an external IP core called VSP,
supported by a V4L2 driver. The DU driver interfaces with the VSP driver using
direct function calls. Alpha and z-order configuration is implemented in the
VSP driver, the DU driver thus just needs to pass the values using the VSP
API.

This series depends on a large VSP series that has been merged in the Linux
media git tree for v4.7. Dave, instead of merging the media tree in your tree
to pull the dependency in, it would be easier to get those two patches
upstream through the media tree. I don't expect any conflict related to the
DU driver for v4.7. If you're fine with that, could you ack the patches ?

Laurent Pinchart (2):
  drm: rcar-du: Add Z-order support for VSP planes
  drm: rcar-du: Add alpha support for VSP planes

 drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 16 ++++++++++++----
 drivers/gpu/drm/rcar-du/rcar_du_vsp.h |  2 ++
 2 files changed, 14 insertions(+), 4 deletions(-)

-- 
Regards,

Laurent Pinchart

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

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

* [PATCH 1/2] drm: rcar-du: Add Z-order support for VSP planes
  2016-04-21  1:14 ` Laurent Pinchart
  (?)
@ 2016-04-21  1:14 ` Laurent Pinchart
  2016-04-21 16:10     ` Daniel Vetter
  -1 siblings, 1 reply; 11+ messages in thread
From: Laurent Pinchart @ 2016-04-21  1:14 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, David Airlie

Make the Z-order of VSP planes configurable through the zpos property,
exactly as for the native DU planes.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 16 ++++++++++++----
 drivers/gpu/drm/rcar-du/rcar_du_vsp.h |  2 ++
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index de7ef041182b..62e9619eaea4 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -180,8 +180,9 @@ static void rcar_du_vsp_plane_setup(struct rcar_du_vsp_plane *plane)
 
 	WARN_ON(!pixelformat);
 
-	vsp1_du_atomic_update(plane->vsp->vsp, plane->index, pixelformat,
-			      fb->pitches[0], paddr, &src, &dst);
+	vsp1_du_atomic_update_zpos(plane->vsp->vsp, plane->index, pixelformat,
+				   fb->pitches[0], paddr, &src, &dst,
+				   state->zpos);
 }
 
 static int rcar_du_vsp_plane_atomic_check(struct drm_plane *plane,
@@ -220,8 +221,8 @@ static void rcar_du_vsp_plane_atomic_update(struct drm_plane *plane,
 	if (plane->state->crtc)
 		rcar_du_vsp_plane_setup(rplane);
 	else
-		vsp1_du_atomic_update(rplane->vsp->vsp, rplane->index, 0, 0, 0,
-				      NULL, NULL);
+		vsp1_du_atomic_update_zpos(rplane->vsp->vsp, rplane->index,
+					   0, 0, 0, NULL, NULL, 0);
 }
 
 static const struct drm_plane_helper_funcs rcar_du_vsp_plane_helper_funcs = {
@@ -269,6 +270,7 @@ static void rcar_du_vsp_plane_reset(struct drm_plane *plane)
 		return;
 
 	state->alpha = 255;
+	state->zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1;
 
 	plane->state = &state->state;
 	plane->state->plane = plane;
@@ -283,6 +285,8 @@ static int rcar_du_vsp_plane_atomic_set_property(struct drm_plane *plane,
 
 	if (property == rcdu->props.alpha)
 		rstate->alpha = val;
+	else if (property == rcdu->props.zpos)
+		rstate->zpos = val;
 	else
 		return -EINVAL;
 
@@ -299,6 +303,8 @@ static int rcar_du_vsp_plane_atomic_get_property(struct drm_plane *plane,
 
 	if (property == rcdu->props.alpha)
 		*val = rstate->alpha;
+	else if (property == rcdu->props.zpos)
+		*val = rstate->zpos;
 	else
 		return -EINVAL;
 
@@ -378,6 +384,8 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp)
 
 		drm_object_attach_property(&plane->plane.base,
 					   rcdu->props.alpha, 255);
+		drm_object_attach_property(&plane->plane.base,
+					   rcdu->props.zpos, 1);
 	}
 
 	return 0;
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
index df3bf3805c69..510dcc9c6816 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
@@ -44,6 +44,7 @@ static inline struct rcar_du_vsp_plane *to_rcar_vsp_plane(struct drm_plane *p)
  * @state: base DRM plane state
  * @format: information about the pixel format used by the plane
  * @alpha: value of the plane alpha property
+ * @zpos: value of the plane zpos property
  */
 struct rcar_du_vsp_plane_state {
 	struct drm_plane_state state;
@@ -51,6 +52,7 @@ struct rcar_du_vsp_plane_state {
 	const struct rcar_du_format_info *format;
 
 	unsigned int alpha;
+	unsigned int zpos;
 };
 
 static inline struct rcar_du_vsp_plane_state *
-- 
2.7.3


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

* [PATCH 2/2] drm: rcar-du: Add alpha support for VSP planes
  2016-04-21  1:14 ` Laurent Pinchart
@ 2016-04-21  1:14   ` Laurent Pinchart
  -1 siblings, 0 replies; 11+ messages in thread
From: Laurent Pinchart @ 2016-04-21  1:14 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, David Airlie

Make the global alpha multiplier of VSP planes configurable through the
alpha property, exactly as for the native DU planes.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index 62e9619eaea4..7a588f1f6d69 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -180,9 +180,9 @@ static void rcar_du_vsp_plane_setup(struct rcar_du_vsp_plane *plane)
 
 	WARN_ON(!pixelformat);
 
-	vsp1_du_atomic_update_zpos(plane->vsp->vsp, plane->index, pixelformat,
-				   fb->pitches[0], paddr, &src, &dst,
-				   state->zpos);
+	vsp1_du_atomic_update_ext(plane->vsp->vsp, plane->index, pixelformat,
+				  fb->pitches[0], paddr, &src, &dst,
+				  state->alpha, state->zpos);
 }
 
 static int rcar_du_vsp_plane_atomic_check(struct drm_plane *plane,
@@ -221,8 +221,8 @@ static void rcar_du_vsp_plane_atomic_update(struct drm_plane *plane,
 	if (plane->state->crtc)
 		rcar_du_vsp_plane_setup(rplane);
 	else
-		vsp1_du_atomic_update_zpos(rplane->vsp->vsp, rplane->index,
-					   0, 0, 0, NULL, NULL, 0);
+		vsp1_du_atomic_update_ext(rplane->vsp->vsp, rplane->index,
+					  0, 0, 0, NULL, NULL, 0, 0);
 }
 
 static const struct drm_plane_helper_funcs rcar_du_vsp_plane_helper_funcs = {
-- 
2.7.3


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

* [PATCH 2/2] drm: rcar-du: Add alpha support for VSP planes
@ 2016-04-21  1:14   ` Laurent Pinchart
  0 siblings, 0 replies; 11+ messages in thread
From: Laurent Pinchart @ 2016-04-21  1:14 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-renesas-soc, linux-media

Make the global alpha multiplier of VSP planes configurable through the
alpha property, exactly as for the native DU planes.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index 62e9619eaea4..7a588f1f6d69 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -180,9 +180,9 @@ static void rcar_du_vsp_plane_setup(struct rcar_du_vsp_plane *plane)
 
 	WARN_ON(!pixelformat);
 
-	vsp1_du_atomic_update_zpos(plane->vsp->vsp, plane->index, pixelformat,
-				   fb->pitches[0], paddr, &src, &dst,
-				   state->zpos);
+	vsp1_du_atomic_update_ext(plane->vsp->vsp, plane->index, pixelformat,
+				  fb->pitches[0], paddr, &src, &dst,
+				  state->alpha, state->zpos);
 }
 
 static int rcar_du_vsp_plane_atomic_check(struct drm_plane *plane,
@@ -221,8 +221,8 @@ static void rcar_du_vsp_plane_atomic_update(struct drm_plane *plane,
 	if (plane->state->crtc)
 		rcar_du_vsp_plane_setup(rplane);
 	else
-		vsp1_du_atomic_update_zpos(rplane->vsp->vsp, rplane->index,
-					   0, 0, 0, NULL, NULL, 0);
+		vsp1_du_atomic_update_ext(rplane->vsp->vsp, rplane->index,
+					  0, 0, 0, NULL, NULL, 0, 0);
 }
 
 static const struct drm_plane_helper_funcs rcar_du_vsp_plane_helper_funcs = {
-- 
2.7.3

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

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

* Re: [PATCH 1/2] drm: rcar-du: Add Z-order support for VSP planes
  2016-04-21  1:14 ` [PATCH 1/2] drm: rcar-du: Add Z-order support for VSP planes Laurent Pinchart
@ 2016-04-21 16:10     ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2016-04-21 16:10 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: dri-devel, linux-renesas-soc, linux-media

On Thu, Apr 21, 2016 at 04:14:12AM +0300, Laurent Pinchart wrote:
> Make the Z-order of VSP planes configurable through the zpos property,
> exactly as for the native DU planes.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 16 ++++++++++++----
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.h |  2 ++
>  2 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> index de7ef041182b..62e9619eaea4 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -180,8 +180,9 @@ static void rcar_du_vsp_plane_setup(struct rcar_du_vsp_plane *plane)
>  
>  	WARN_ON(!pixelformat);
>  
> -	vsp1_du_atomic_update(plane->vsp->vsp, plane->index, pixelformat,
> -			      fb->pitches[0], paddr, &src, &dst);
> +	vsp1_du_atomic_update_zpos(plane->vsp->vsp, plane->index, pixelformat,
> +				   fb->pitches[0], paddr, &src, &dst,
> +				   state->zpos);
>  }
>  
>  static int rcar_du_vsp_plane_atomic_check(struct drm_plane *plane,
> @@ -220,8 +221,8 @@ static void rcar_du_vsp_plane_atomic_update(struct drm_plane *plane,
>  	if (plane->state->crtc)
>  		rcar_du_vsp_plane_setup(rplane);
>  	else
> -		vsp1_du_atomic_update(rplane->vsp->vsp, rplane->index, 0, 0, 0,
> -				      NULL, NULL);
> +		vsp1_du_atomic_update_zpos(rplane->vsp->vsp, rplane->index,
> +					   0, 0, 0, NULL, NULL, 0);
>  }
>  
>  static const struct drm_plane_helper_funcs rcar_du_vsp_plane_helper_funcs = {
> @@ -269,6 +270,7 @@ static void rcar_du_vsp_plane_reset(struct drm_plane *plane)
>  		return;
>  
>  	state->alpha = 255;
> +	state->zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1;
>  
>  	plane->state = &state->state;
>  	plane->state->plane = plane;
> @@ -283,6 +285,8 @@ static int rcar_du_vsp_plane_atomic_set_property(struct drm_plane *plane,
>  
>  	if (property == rcdu->props.alpha)
>  		rstate->alpha = val;
> +	else if (property == rcdu->props.zpos)
> +		rstate->zpos = val;
>  	else
>  		return -EINVAL;
>  
> @@ -299,6 +303,8 @@ static int rcar_du_vsp_plane_atomic_get_property(struct drm_plane *plane,
>  
>  	if (property == rcdu->props.alpha)
>  		*val = rstate->alpha;
> +	else if (property == rcdu->props.zpos)
> +		*val = rstate->zpos;
>  	else
>  		return -EINVAL;
>  
> @@ -378,6 +384,8 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp)
>  
>  		drm_object_attach_property(&plane->plane.base,
>  					   rcdu->props.alpha, 255);
> +		drm_object_attach_property(&plane->plane.base,
> +					   rcdu->props.zpos, 1);
>  	}
>  
>  	return 0;
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> index df3bf3805c69..510dcc9c6816 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> @@ -44,6 +44,7 @@ static inline struct rcar_du_vsp_plane *to_rcar_vsp_plane(struct drm_plane *p)
>   * @state: base DRM plane state
>   * @format: information about the pixel format used by the plane
>   * @alpha: value of the plane alpha property
> + * @zpos: value of the plane zpos property
>   */
>  struct rcar_du_vsp_plane_state {
>  	struct drm_plane_state state;
> @@ -51,6 +52,7 @@ struct rcar_du_vsp_plane_state {
>  	const struct rcar_du_format_info *format;
>  
>  	unsigned int alpha;
> +	unsigned int zpos;

There's lots of effort by various people to create a generic zpos/blending
set of properties. Care to jump onto that effort and making it finally
happen for real? I kinda don't want to have a propliferation of slightly
diffferent zpos/blending props across all the drivers ...
-Daniel

>  };
>  
>  static inline struct rcar_du_vsp_plane_state *
> -- 
> 2.7.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH 1/2] drm: rcar-du: Add Z-order support for VSP planes
@ 2016-04-21 16:10     ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2016-04-21 16:10 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-renesas-soc, dri-devel, linux-media

On Thu, Apr 21, 2016 at 04:14:12AM +0300, Laurent Pinchart wrote:
> Make the Z-order of VSP planes configurable through the zpos property,
> exactly as for the native DU planes.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 16 ++++++++++++----
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.h |  2 ++
>  2 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> index de7ef041182b..62e9619eaea4 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -180,8 +180,9 @@ static void rcar_du_vsp_plane_setup(struct rcar_du_vsp_plane *plane)
>  
>  	WARN_ON(!pixelformat);
>  
> -	vsp1_du_atomic_update(plane->vsp->vsp, plane->index, pixelformat,
> -			      fb->pitches[0], paddr, &src, &dst);
> +	vsp1_du_atomic_update_zpos(plane->vsp->vsp, plane->index, pixelformat,
> +				   fb->pitches[0], paddr, &src, &dst,
> +				   state->zpos);
>  }
>  
>  static int rcar_du_vsp_plane_atomic_check(struct drm_plane *plane,
> @@ -220,8 +221,8 @@ static void rcar_du_vsp_plane_atomic_update(struct drm_plane *plane,
>  	if (plane->state->crtc)
>  		rcar_du_vsp_plane_setup(rplane);
>  	else
> -		vsp1_du_atomic_update(rplane->vsp->vsp, rplane->index, 0, 0, 0,
> -				      NULL, NULL);
> +		vsp1_du_atomic_update_zpos(rplane->vsp->vsp, rplane->index,
> +					   0, 0, 0, NULL, NULL, 0);
>  }
>  
>  static const struct drm_plane_helper_funcs rcar_du_vsp_plane_helper_funcs = {
> @@ -269,6 +270,7 @@ static void rcar_du_vsp_plane_reset(struct drm_plane *plane)
>  		return;
>  
>  	state->alpha = 255;
> +	state->zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1;
>  
>  	plane->state = &state->state;
>  	plane->state->plane = plane;
> @@ -283,6 +285,8 @@ static int rcar_du_vsp_plane_atomic_set_property(struct drm_plane *plane,
>  
>  	if (property == rcdu->props.alpha)
>  		rstate->alpha = val;
> +	else if (property == rcdu->props.zpos)
> +		rstate->zpos = val;
>  	else
>  		return -EINVAL;
>  
> @@ -299,6 +303,8 @@ static int rcar_du_vsp_plane_atomic_get_property(struct drm_plane *plane,
>  
>  	if (property == rcdu->props.alpha)
>  		*val = rstate->alpha;
> +	else if (property == rcdu->props.zpos)
> +		*val = rstate->zpos;
>  	else
>  		return -EINVAL;
>  
> @@ -378,6 +384,8 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp)
>  
>  		drm_object_attach_property(&plane->plane.base,
>  					   rcdu->props.alpha, 255);
> +		drm_object_attach_property(&plane->plane.base,
> +					   rcdu->props.zpos, 1);
>  	}
>  
>  	return 0;
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> index df3bf3805c69..510dcc9c6816 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> @@ -44,6 +44,7 @@ static inline struct rcar_du_vsp_plane *to_rcar_vsp_plane(struct drm_plane *p)
>   * @state: base DRM plane state
>   * @format: information about the pixel format used by the plane
>   * @alpha: value of the plane alpha property
> + * @zpos: value of the plane zpos property
>   */
>  struct rcar_du_vsp_plane_state {
>  	struct drm_plane_state state;
> @@ -51,6 +52,7 @@ struct rcar_du_vsp_plane_state {
>  	const struct rcar_du_format_info *format;
>  
>  	unsigned int alpha;
> +	unsigned int zpos;

There's lots of effort by various people to create a generic zpos/blending
set of properties. Care to jump onto that effort and making it finally
happen for real? I kinda don't want to have a propliferation of slightly
diffferent zpos/blending props across all the drivers ...
-Daniel

>  };
>  
>  static inline struct rcar_du_vsp_plane_state *
> -- 
> 2.7.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 0/2] Renesas R-Car Gen3 DU alpha and z-order support
  2016-04-21  1:14 ` Laurent Pinchart
@ 2016-04-21 19:45   ` Dave Airlie
  -1 siblings, 0 replies; 11+ messages in thread
From: Dave Airlie @ 2016-04-21 19:45 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: dri-devel, linux-renesas-soc, Linux Media Mailing List

On 21 April 2016 at 11:14, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Hello,
>
> This patch series implement support for alpha and z-order configuration in the
> R-Car DU driver for the Gen3 SoCs family.
>
> The Gen3 SoCs delegate composition to an external IP core called VSP,
> supported by a V4L2 driver. The DU driver interfaces with the VSP driver using
> direct function calls. Alpha and z-order configuration is implemented in the
> VSP driver, the DU driver thus just needs to pass the values using the VSP
> API.
>
> This series depends on a large VSP series that has been merged in the Linux
> media git tree for v4.7. Dave, instead of merging the media tree in your tree
> to pull the dependency in, it would be easier to get those two patches
> upstream through the media tree. I don't expect any conflict related to the
> DU driver for v4.7. If you're fine with that, could you ack the patches ?
>
> Laurent Pinchart (2):
>   drm: rcar-du: Add Z-order support for VSP planes
>   drm: rcar-du: Add alpha support for VSP planes
>

Seems fine,

Acked-by: Dave AIrlie <airlied@redhat.com>

for inclusion via media.

Dave.

>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 16 ++++++++++++----
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.h |  2 ++
>  2 files changed, 14 insertions(+), 4 deletions(-)
>
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 0/2] Renesas R-Car Gen3 DU alpha and z-order support
@ 2016-04-21 19:45   ` Dave Airlie
  0 siblings, 0 replies; 11+ messages in thread
From: Dave Airlie @ 2016-04-21 19:45 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-renesas-soc, dri-devel, Linux Media Mailing List

On 21 April 2016 at 11:14, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Hello,
>
> This patch series implement support for alpha and z-order configuration in the
> R-Car DU driver for the Gen3 SoCs family.
>
> The Gen3 SoCs delegate composition to an external IP core called VSP,
> supported by a V4L2 driver. The DU driver interfaces with the VSP driver using
> direct function calls. Alpha and z-order configuration is implemented in the
> VSP driver, the DU driver thus just needs to pass the values using the VSP
> API.
>
> This series depends on a large VSP series that has been merged in the Linux
> media git tree for v4.7. Dave, instead of merging the media tree in your tree
> to pull the dependency in, it would be easier to get those two patches
> upstream through the media tree. I don't expect any conflict related to the
> DU driver for v4.7. If you're fine with that, could you ack the patches ?
>
> Laurent Pinchart (2):
>   drm: rcar-du: Add Z-order support for VSP planes
>   drm: rcar-du: Add alpha support for VSP planes
>

Seems fine,

Acked-by: Dave AIrlie <airlied@redhat.com>

for inclusion via media.

Dave.

>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 16 ++++++++++++----
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.h |  2 ++
>  2 files changed, 14 insertions(+), 4 deletions(-)
>
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] drm: rcar-du: Add Z-order support for VSP planes
  2016-04-21 16:10     ` Daniel Vetter
  (?)
@ 2016-04-21 21:00     ` Laurent Pinchart
  2016-04-22  8:29       ` Daniel Vetter
  -1 siblings, 1 reply; 11+ messages in thread
From: Laurent Pinchart @ 2016-04-21 21:00 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Laurent Pinchart, dri-devel, linux-renesas-soc, linux-media

Hi Daniel,

On Thursday 21 Apr 2016 18:10:25 Daniel Vetter wrote:
> On Thu, Apr 21, 2016 at 04:14:12AM +0300, Laurent Pinchart wrote:
> > Make the Z-order of VSP planes configurable through the zpos property,
> > exactly as for the native DU planes.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >  drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 16 ++++++++++++----
> >  drivers/gpu/drm/rcar-du/rcar_du_vsp.h |  2 ++
> >  2 files changed, 14 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> > b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index de7ef041182b..62e9619eaea4
> > 100644
> > --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> > +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> > @@ -180,8 +180,9 @@ static void rcar_du_vsp_plane_setup(struct
> > rcar_du_vsp_plane *plane)> 
> >  	WARN_ON(!pixelformat);
> > 
> > -	vsp1_du_atomic_update(plane->vsp->vsp, plane->index, pixelformat,
> > -			      fb->pitches[0], paddr, &src, &dst);
> > +	vsp1_du_atomic_update_zpos(plane->vsp->vsp, plane->index, pixelformat,
> > +				   fb->pitches[0], paddr, &src, &dst,
> > +				   state->zpos);
> > 
> >  }
> >  
> >  static int rcar_du_vsp_plane_atomic_check(struct drm_plane *plane,
> > 
> > @@ -220,8 +221,8 @@ static void rcar_du_vsp_plane_atomic_update(struct
> > drm_plane *plane,> 
> >  	if (plane->state->crtc)
> >  	
> >  		rcar_du_vsp_plane_setup(rplane);
> >  	
> >  	else
> > 
> > -		vsp1_du_atomic_update(rplane->vsp->vsp, rplane->index, 0, 0, 0,
> > -				      NULL, NULL);
> > +		vsp1_du_atomic_update_zpos(rplane->vsp->vsp, rplane->index,
> > +					   0, 0, 0, NULL, NULL, 0);
> > 
> >  }
> >  
> >  static const struct drm_plane_helper_funcs rcar_du_vsp_plane_helper_funcs
> >  = {> 
> > @@ -269,6 +270,7 @@ static void rcar_du_vsp_plane_reset(struct drm_plane
> > *plane)> 
> >  		return;
> >  	
> >  	state->alpha = 255;
> > 
> > +	state->zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1;
> > 
> >  	plane->state = &state->state;
> >  	plane->state->plane = plane;
> > 
> > @@ -283,6 +285,8 @@ static int
> > rcar_du_vsp_plane_atomic_set_property(struct drm_plane *plane,> 
> >  	if (property == rcdu->props.alpha)
> >  	
> >  		rstate->alpha = val;
> > 
> > +	else if (property == rcdu->props.zpos)
> > +		rstate->zpos = val;
> > 
> >  	else
> >  	
> >  		return -EINVAL;
> > 
> > @@ -299,6 +303,8 @@ static int
> > rcar_du_vsp_plane_atomic_get_property(struct drm_plane *plane,> 
> >  	if (property == rcdu->props.alpha)
> >  	
> >  		*val = rstate->alpha;
> > 
> > +	else if (property == rcdu->props.zpos)
> > +		*val = rstate->zpos;
> > 
> >  	else
> >  	
> >  		return -EINVAL;
> > 
> > @@ -378,6 +384,8 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp)
> > 
> >  		drm_object_attach_property(&plane->plane.base,
> >  		
> >  					   rcdu->props.alpha, 255);
> > 
> > +		drm_object_attach_property(&plane->plane.base,
> > +					   rcdu->props.zpos, 1);
> > 
> >  	}
> >  	
> >  	return 0;
> > 
> > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> > b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h index df3bf3805c69..510dcc9c6816
> > 100644
> > --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> > +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> > @@ -44,6 +44,7 @@ static inline struct rcar_du_vsp_plane
> > *to_rcar_vsp_plane(struct drm_plane *p)> 
> >   * @state: base DRM plane state
> >   * @format: information about the pixel format used by the plane
> >   * @alpha: value of the plane alpha property
> > 
> > + * @zpos: value of the plane zpos property
> > 
> >   */
> >  
> >  struct rcar_du_vsp_plane_state {
> >  
> >  	struct drm_plane_state state;
> > 
> > @@ -51,6 +52,7 @@ struct rcar_du_vsp_plane_state {
> > 
> >  	const struct rcar_du_format_info *format;
> >  	
> >  	unsigned int alpha;
> > 
> > +	unsigned int zpos;
> 
> There's lots of effort by various people to create a generic zpos/blending
> set of properties. Care to jump onto that effort and making it finally
> happen for real? I kinda don't want to have a propliferation of slightly
> diffferent zpos/blending props across all the drivers ...

OK, I'll try to. Would you mind if we got these patches merged first for v4.7, 
and then switched to a generic property for v4.8 ? The reason is that this 
series depends on a large patch series queued in the linux-media tree for 
v4.7, and it would be easier to handle the dependency by merging these two 
patches in linux-media. A rework of the zpos and alpha properties would need 
to be merged through the drm tree.

> >  };
> >  
> >  static inline struct rcar_du_vsp_plane_state *

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH 1/2] drm: rcar-du: Add Z-order support for VSP planes
  2016-04-21 21:00     ` Laurent Pinchart
@ 2016-04-22  8:29       ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2016-04-22  8:29 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Daniel Vetter, Laurent Pinchart, dri-devel, linux-renesas-soc,
	linux-media

On Fri, Apr 22, 2016 at 12:00:39AM +0300, Laurent Pinchart wrote:
> Hi Daniel,
> 
> On Thursday 21 Apr 2016 18:10:25 Daniel Vetter wrote:
> > On Thu, Apr 21, 2016 at 04:14:12AM +0300, Laurent Pinchart wrote:
> > > Make the Z-order of VSP planes configurable through the zpos property,
> > > exactly as for the native DU planes.
> > > 
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> > > ---
> > > 
> > >  drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 16 ++++++++++++----
> > >  drivers/gpu/drm/rcar-du/rcar_du_vsp.h |  2 ++
> > >  2 files changed, 14 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> > > b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index de7ef041182b..62e9619eaea4
> > > 100644
> > > --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> > > +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> > > @@ -180,8 +180,9 @@ static void rcar_du_vsp_plane_setup(struct
> > > rcar_du_vsp_plane *plane)> 
> > >  	WARN_ON(!pixelformat);
> > > 
> > > -	vsp1_du_atomic_update(plane->vsp->vsp, plane->index, pixelformat,
> > > -			      fb->pitches[0], paddr, &src, &dst);
> > > +	vsp1_du_atomic_update_zpos(plane->vsp->vsp, plane->index, pixelformat,
> > > +				   fb->pitches[0], paddr, &src, &dst,
> > > +				   state->zpos);
> > > 
> > >  }
> > >  
> > >  static int rcar_du_vsp_plane_atomic_check(struct drm_plane *plane,
> > > 
> > > @@ -220,8 +221,8 @@ static void rcar_du_vsp_plane_atomic_update(struct
> > > drm_plane *plane,> 
> > >  	if (plane->state->crtc)
> > >  	
> > >  		rcar_du_vsp_plane_setup(rplane);
> > >  	
> > >  	else
> > > 
> > > -		vsp1_du_atomic_update(rplane->vsp->vsp, rplane->index, 0, 0, 0,
> > > -				      NULL, NULL);
> > > +		vsp1_du_atomic_update_zpos(rplane->vsp->vsp, rplane->index,
> > > +					   0, 0, 0, NULL, NULL, 0);
> > > 
> > >  }
> > >  
> > >  static const struct drm_plane_helper_funcs rcar_du_vsp_plane_helper_funcs
> > >  = {> 
> > > @@ -269,6 +270,7 @@ static void rcar_du_vsp_plane_reset(struct drm_plane
> > > *plane)> 
> > >  		return;
> > >  	
> > >  	state->alpha = 255;
> > > 
> > > +	state->zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1;
> > > 
> > >  	plane->state = &state->state;
> > >  	plane->state->plane = plane;
> > > 
> > > @@ -283,6 +285,8 @@ static int
> > > rcar_du_vsp_plane_atomic_set_property(struct drm_plane *plane,> 
> > >  	if (property == rcdu->props.alpha)
> > >  	
> > >  		rstate->alpha = val;
> > > 
> > > +	else if (property == rcdu->props.zpos)
> > > +		rstate->zpos = val;
> > > 
> > >  	else
> > >  	
> > >  		return -EINVAL;
> > > 
> > > @@ -299,6 +303,8 @@ static int
> > > rcar_du_vsp_plane_atomic_get_property(struct drm_plane *plane,> 
> > >  	if (property == rcdu->props.alpha)
> > >  	
> > >  		*val = rstate->alpha;
> > > 
> > > +	else if (property == rcdu->props.zpos)
> > > +		*val = rstate->zpos;
> > > 
> > >  	else
> > >  	
> > >  		return -EINVAL;
> > > 
> > > @@ -378,6 +384,8 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp)
> > > 
> > >  		drm_object_attach_property(&plane->plane.base,
> > >  		
> > >  					   rcdu->props.alpha, 255);
> > > 
> > > +		drm_object_attach_property(&plane->plane.base,
> > > +					   rcdu->props.zpos, 1);
> > > 
> > >  	}
> > >  	
> > >  	return 0;
> > > 
> > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> > > b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h index df3bf3805c69..510dcc9c6816
> > > 100644
> > > --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> > > +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> > > @@ -44,6 +44,7 @@ static inline struct rcar_du_vsp_plane
> > > *to_rcar_vsp_plane(struct drm_plane *p)> 
> > >   * @state: base DRM plane state
> > >   * @format: information about the pixel format used by the plane
> > >   * @alpha: value of the plane alpha property
> > > 
> > > + * @zpos: value of the plane zpos property
> > > 
> > >   */
> > >  
> > >  struct rcar_du_vsp_plane_state {
> > >  
> > >  	struct drm_plane_state state;
> > > 
> > > @@ -51,6 +52,7 @@ struct rcar_du_vsp_plane_state {
> > > 
> > >  	const struct rcar_du_format_info *format;
> > >  	
> > >  	unsigned int alpha;
> > > 
> > > +	unsigned int zpos;
> > 
> > There's lots of effort by various people to create a generic zpos/blending
> > set of properties. Care to jump onto that effort and making it finally
> > happen for real? I kinda don't want to have a propliferation of slightly
> > diffferent zpos/blending props across all the drivers ...
> 
> OK, I'll try to. Would you mind if we got these patches merged first for v4.7, 
> and then switched to a generic property for v4.8 ? The reason is that this 
> series depends on a large patch series queued in the linux-media tree for 
> v4.7, and it would be easier to handle the dependency by merging these two 
> patches in linux-media. A rework of the zpos and alpha properties would need 
> to be merged through the drm tree.

I'd just love to see some real push to generic props for this entire area
happen for real. If you volunteer I'm more than happy enough already, 4.8
is perfectly fine.

Might be good to dig through older versions of this, we have iirc
conversions for most drivers. Also I highly recommend to do one series per
property, to avoid stalls due to bikesheds. And maybe start with zpos,
that one seems simplest ;-)

Thanks a lot for volunteering!

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

end of thread, other threads:[~2016-04-22  8:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-21  1:14 [PATCH 0/2] Renesas R-Car Gen3 DU alpha and z-order support Laurent Pinchart
2016-04-21  1:14 ` Laurent Pinchart
2016-04-21  1:14 ` [PATCH 1/2] drm: rcar-du: Add Z-order support for VSP planes Laurent Pinchart
2016-04-21 16:10   ` Daniel Vetter
2016-04-21 16:10     ` Daniel Vetter
2016-04-21 21:00     ` Laurent Pinchart
2016-04-22  8:29       ` Daniel Vetter
2016-04-21  1:14 ` [PATCH 2/2] drm: rcar-du: Add alpha " Laurent Pinchart
2016-04-21  1:14   ` Laurent Pinchart
2016-04-21 19:45 ` [PATCH 0/2] Renesas R-Car Gen3 DU alpha and z-order support Dave Airlie
2016-04-21 19:45   ` Dave Airlie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.