linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: rcar-du: Set primary plane zpos immutably at initializing
@ 2020-04-01  6:11 Tomohito Esaki
  2020-04-04 18:24 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: Tomohito Esaki @ 2020-04-01  6:11 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Tomohito Esaki

According to drm_plane_create_zpos_property() function documentation,
all planes zpos range should be set if zpos property is supported.
However, the rcar-du driver didn't set primary plane zpos range. Since
the primary plane's zpos is fixed, set i immutably.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
---
 drivers/gpu/drm/rcar-du/rcar_du_plane.c | 5 ++++-
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c   | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
index c6430027169f..9a499be45c45 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
@@ -785,8 +785,11 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp)
 
 		drm_plane_create_alpha_property(&plane->plane);
 
-		if (type == DRM_PLANE_TYPE_PRIMARY)
+		if (type == DRM_PLANE_TYPE_PRIMARY) {
+			drm_plane_create_zpos_immutable_property(&plane->plane,
+								 0);
 			continue;
+		}
 
 		drm_object_attach_property(&plane->plane.base,
 					   rcdu->props.colorkey,
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index 5e4faf258c31..382b720edc09 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -392,8 +392,11 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
 		drm_plane_helper_add(&plane->plane,
 				     &rcar_du_vsp_plane_helper_funcs);
 
-		if (type == DRM_PLANE_TYPE_PRIMARY)
+		if (type == DRM_PLANE_TYPE_PRIMARY) {
+			drm_plane_create_zpos_immutable_property(&plane->plane,
+								 0);
 			continue;
+		}
 
 		drm_plane_create_alpha_property(&plane->plane);
 		drm_plane_create_zpos_property(&plane->plane, 1, 1,
-- 
2.17.1


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

* Re: [PATCH] drm: rcar-du: Set primary plane zpos immutably at initializing
  2020-04-01  6:11 [PATCH] drm: rcar-du: Set primary plane zpos immutably at initializing Tomohito Esaki
@ 2020-04-04 18:24 ` Laurent Pinchart
  2020-04-06  1:47   ` Esaki Tomohito
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2020-04-04 18:24 UTC (permalink / raw)
  To: Tomohito Esaki; +Cc: linux-renesas-soc

Hello Esaki-san,

Thank you for the patch.

On Wed, Apr 01, 2020 at 03:11:00PM +0900, Tomohito Esaki wrote:
> According to drm_plane_create_zpos_property() function documentation,
> all planes zpos range should be set if zpos property is supported.
> However, the rcar-du driver didn't set primary plane zpos range. Since
> the primary plane's zpos is fixed, set i immutably.
> 
> Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_plane.c | 5 ++++-
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c   | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> index c6430027169f..9a499be45c45 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> @@ -785,8 +785,11 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp)
>  
>  		drm_plane_create_alpha_property(&plane->plane);
>  
> -		if (type == DRM_PLANE_TYPE_PRIMARY)
> +		if (type == DRM_PLANE_TYPE_PRIMARY) {
> +			drm_plane_create_zpos_immutable_property(&plane->plane,
> +								 0);
>  			continue;
> +		}

I would prefer an if ... else ... here and below instead of a continue,
to better handle future differences between primary and overlay planes.
Apart from that,

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

I've taken the liberty to resend the patch with this change as a v2,
with the dri-devel mailing list in CC, and will include it in my next
pull request.

Would you mind CC'ing me for future patches to the R-Car DU driver ? You
can use the scripts/get_maintainer.pl script from the Linux kernel
sources to get a list of maintainers, reviewers and mailing lists for a
patch. There's no need to CC everybody on that list, but it can give you
at least the driver's maintainer and the corresponding mailing list.

>  
>  		drm_object_attach_property(&plane->plane.base,
>  					   rcdu->props.colorkey,
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> index 5e4faf258c31..382b720edc09 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -392,8 +392,11 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
>  		drm_plane_helper_add(&plane->plane,
>  				     &rcar_du_vsp_plane_helper_funcs);
>  
> -		if (type == DRM_PLANE_TYPE_PRIMARY)
> +		if (type == DRM_PLANE_TYPE_PRIMARY) {
> +			drm_plane_create_zpos_immutable_property(&plane->plane,
> +								 0);
>  			continue;
> +		}
>  
>  		drm_plane_create_alpha_property(&plane->plane);
>  		drm_plane_create_zpos_property(&plane->plane, 1, 1,

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH] drm: rcar-du: Set primary plane zpos immutably at initializing
  2020-04-04 18:24 ` Laurent Pinchart
@ 2020-04-06  1:47   ` Esaki Tomohito
  0 siblings, 0 replies; 3+ messages in thread
From: Esaki Tomohito @ 2020-04-06  1:47 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-renesas-soc

Hello Laurent-san

On 2020/04/05 3:24, Laurent Pinchart wrote:
> Hello Esaki-san,
> 
> Thank you for the patch.
> 
> On Wed, Apr 01, 2020 at 03:11:00PM +0900, Tomohito Esaki wrote:
>> According to drm_plane_create_zpos_property() function documentation,
>> all planes zpos range should be set if zpos property is supported.
>> However, the rcar-du driver didn't set primary plane zpos range. Since
>> the primary plane's zpos is fixed, set i immutably.
>>
>> Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
>> ---
>>  drivers/gpu/drm/rcar-du/rcar_du_plane.c | 5 ++++-
>>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c   | 5 ++++-
>>  2 files changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
>> index c6430027169f..9a499be45c45 100644
>> --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
>> +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
>> @@ -785,8 +785,11 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp)
>>  
>>  		drm_plane_create_alpha_property(&plane->plane);
>>  
>> -		if (type == DRM_PLANE_TYPE_PRIMARY)
>> +		if (type == DRM_PLANE_TYPE_PRIMARY) {
>> +			drm_plane_create_zpos_immutable_property(&plane->plane,
>> +								 0);
>>  			continue;
>> +		}
> 
> I would prefer an if ... else ... here and below instead of a continue,
> to better handle future differences between primary and overlay planes.
> Apart from that,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> I've taken the liberty to resend the patch with this change as a v2,
> with the dri-devel mailing list in CC, and will include it in my next
> pull request.

I agree with, thank you for updating patch.

> Would you mind CC'ing me for future patches to the R-Car DU driver ? You
> can use the scripts/get_maintainer.pl script from the Linux kernel
> sources to get a list of maintainers, reviewers and mailing lists for a
> patch. There's no need to CC everybody on that list, but it can give you
> at least the driver's maintainer and the corresponding mailing list.

Sorry, I understood.
I would like to add maintainer to CC from next time.

>>  
>>  		drm_object_attach_property(&plane->plane.base,
>>  					   rcdu->props.colorkey,
>> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
>> index 5e4faf258c31..382b720edc09 100644
>> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
>> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
>> @@ -392,8 +392,11 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
>>  		drm_plane_helper_add(&plane->plane,
>>  				     &rcar_du_vsp_plane_helper_funcs);
>>  
>> -		if (type == DRM_PLANE_TYPE_PRIMARY)
>> +		if (type == DRM_PLANE_TYPE_PRIMARY) {
>> +			drm_plane_create_zpos_immutable_property(&plane->plane,
>> +								 0);
>>  			continue;
>> +		}
>>  
>>  		drm_plane_create_alpha_property(&plane->plane);
>>  		drm_plane_create_zpos_property(&plane->plane, 1, 1,
> 

Thanks,
Esaki

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

end of thread, other threads:[~2020-04-06  1:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01  6:11 [PATCH] drm: rcar-du: Set primary plane zpos immutably at initializing Tomohito Esaki
2020-04-04 18:24 ` Laurent Pinchart
2020-04-06  1:47   ` Esaki Tomohito

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).