drm: rcar-du: Set primary plane zpos immutably at initializing
Subsystems (3)
PATCH 1/1 drm: rcar-du: Set primary plane zpos immutably at initializing
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.
--- 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(-)
drivers/gpu/drm/rcar-du/rcar_du_plane.c +4 -1
@@ -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,
drivers/gpu/drm/rcar-du/rcar_du_vsp.c +4 -1
@@ -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,
Signature · 1 line
2.17.1
Hello Esaki-san,
Thank you for the patch.
Quoted 16 lines · 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 <[email protected]>--- 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(-)drivers/gpu/drm/rcar-du/rcar_du_plane.c +0
-0
drivers/gpu/drm/rcar-du/rcar_du_plane.c int rcar_du_planes_init(struct rcar_du_group *rgrp) · line 792
Quoted 9 lines
drivers/gpu/drm/rcar-du/rcar_du_plane.c +4
-1@@ -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,
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.
Quoted 20 lines
drivers/gpu/drm/rcar-du/rcar_du_plane.c +0
-0drm_object_attach_property(&plane->plane.base, rcdu->props.colorkey,drivers/gpu/drm/rcar-du/rcar_du_vsp.c +4
-1@@ -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,
Signature · 3 lines
Regards, Laurent Pinchart
Hello Laurent-san
Quoted 35 lines · Laurent Pinchart
Hello Esaki-san,
Thank you for the patch.
Quoted 16 lines · 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 <[email protected]>--- 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(-)drivers/gpu/drm/rcar-du/rcar_du_plane.c +0
-0drivers/gpu/drm/rcar-du/rcar_du_plane.c int rcar_du_planes_init(struct rcar_du_group *rgrp) · line 792
Quoted 9 lines
drivers/gpu/drm/rcar-du/rcar_du_plane.c +4
-1@@ -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,
Quoted 5 lines
Reviewed-by Laurent Pinchart <[email protected]>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.
Quoted 5 lines
Would you mind CC'ing me for future patches to the R-Car DU driver ? You can use the
scripts/get_maintainer.plscript 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.
Quoted 18 lines
Quoted 18 lines
drivers/gpu/drm/rcar-du/rcar_du_plane.c +0
-0drm_object_attach_property(&plane->plane.base, rcdu->props.colorkey,drivers/gpu/drm/rcar-du/rcar_du_vsp.c +4
-1@@ -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 ; + }
Quoted 3 lines
drivers/gpu/drm/rcar-du/rcar_du_vsp.c int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np, · line 402
Quoted 2 lines
drivers/gpu/drm/rcar-du/rcar_du_vsp.c +0
-0drm_plane_create_alpha_property (&plane->plane); drm_plane_create_zpos_property(&plane->plane, 1, 1,
Thanks,
Esaki