Skip to content

Commit 7982471

Browse files
tesakiLaurent Pinchart
authored andcommitted
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 it immutably. Reported-by: Yoshihito Ogawa <[email protected]> Reported-by: Koji Matsuoka <[email protected]> Signed-off-by: Tomohito Esaki <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Daniel Stone <[email protected]> [Turn continue into if ... else ...] Signed-off-by: Laurent Pinchart <[email protected]>
1 parent 4dc5552 commit 7982471

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

drivers/gpu/drm/rcar-du/rcar_du_plane.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -785,13 +785,15 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp)
785785

786786
drm_plane_create_alpha_property(&plane->plane);
787787

788-
if (type == DRM_PLANE_TYPE_PRIMARY)
789-
continue;
790-
791-
drm_object_attach_property(&plane->plane.base,
792-
rcdu->props.colorkey,
793-
RCAR_DU_COLORKEY_NONE);
794-
drm_plane_create_zpos_property(&plane->plane, 1, 1, 7);
788+
if (type == DRM_PLANE_TYPE_PRIMARY) {
789+
drm_plane_create_zpos_immutable_property(&plane->plane,
790+
0);
791+
} else {
792+
drm_object_attach_property(&plane->plane.base,
793+
rcdu->props.colorkey,
794+
RCAR_DU_COLORKEY_NONE);
795+
drm_plane_create_zpos_property(&plane->plane, 1, 1, 7);
796+
}
795797
}
796798

797799
return 0;

drivers/gpu/drm/rcar-du/rcar_du_vsp.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,14 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
392392
drm_plane_helper_add(&plane->plane,
393393
&rcar_du_vsp_plane_helper_funcs);
394394

395-
if (type == DRM_PLANE_TYPE_PRIMARY)
396-
continue;
397-
398-
drm_plane_create_alpha_property(&plane->plane);
399-
drm_plane_create_zpos_property(&plane->plane, 1, 1,
400-
vsp->num_planes - 1);
395+
if (type == DRM_PLANE_TYPE_PRIMARY) {
396+
drm_plane_create_zpos_immutable_property(&plane->plane,
397+
0);
398+
} else {
399+
drm_plane_create_alpha_property(&plane->plane);
400+
drm_plane_create_zpos_property(&plane->plane, 1, 1,
401+
vsp->num_planes - 1);
402+
}
401403
}
402404

403405
return 0;

0 commit comments

Comments
 (0)