Skip to content

Commit 46528db

Browse files
effective-lightalexdeucher
authored andcommitted
Revert "Revert "drm/amd/display: Implement zpos property""
This reverts commit e2066eb. The problematic IGT test case (i.e. kms_atomic@plane-immutable-zpos) has been fixed as of commit cb77add45011 ("tests/kms_atomic: remove zpos < N-planes assert") to the IGT repo. So, reintroduce the reverted code. Link: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/cb77add45011b129e21f3cb2a4089a73dde56179 Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent e9dca96 commit 46528db

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,15 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
14681468
drm_plane_create_blend_mode_property(plane, blend_caps);
14691469
}
14701470

1471+
if (plane->type == DRM_PLANE_TYPE_PRIMARY) {
1472+
drm_plane_create_zpos_immutable_property(plane, 0);
1473+
} else if (plane->type == DRM_PLANE_TYPE_OVERLAY) {
1474+
unsigned int zpos = 1 + drm_plane_index(plane);
1475+
drm_plane_create_zpos_property(plane, zpos, 1, 254);
1476+
} else if (plane->type == DRM_PLANE_TYPE_CURSOR) {
1477+
drm_plane_create_zpos_immutable_property(plane, 255);
1478+
}
1479+
14711480
if (plane->type == DRM_PLANE_TYPE_PRIMARY &&
14721481
plane_cap &&
14731482
(plane_cap->pixel_format_support.nv12 ||

0 commit comments

Comments
 (0)