drm/amd/display: Make plane z-pos explicit to userspace
Subsystems (3)
PATCH 1/1 drm/amd/display: Make plane z-pos explicit to userspace
[Why]
Many userspace assumes that the DRM plane index indicates the plane z-order, with a lower index being lower depth and a higher index being higher depth. This is currently what we assume in DM.
DRM has a zpos plane property to make this explicit to userspace and there are clients that make use of this information.
[How]
Attach the immutable zpos property to the plane.
While we can technically order the planes in any manner since we virtualize them in DC we don't currently have the software support.
The z-pos could potentially become immutable later but for now just let userspace do the ordering.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
@@ -4897,6 +4897,9 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,if (res)return res; +/* Make z-pos of each plane explicit - lower ID is lower depth */ +drm_plane_create_zpos_immutable_property (plane, plane->index); +if (plane->type ==DRM_PLANE_TYPE_OVERLAY && plane_cap && plane_cap->per_pixel_alpha) { unsigned int blend_caps = BIT(DRM_MODE_BLEND_PIXEL_NONE) |
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191003144606.8550-1-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org
Harry Wentland
Reviewed-byQuoted 14 lines · Nicholas Kazlauskas
[Why]
Many userspace assumes that the DRM plane index indicates the plane z-order, with a lower index being lower depth and a higher index being higher depth. This is currently what we assume in DM.DRM has a zpos plane property to make this explicit to userspace and there are clients that make use of this information.
[How]
Attach the immutable zpos property to the plane.While we can technically order the planes in any manner since we virtualize them in DC we don't currently have the software support.
Quoted 7 lines
The z-pos could potentially become immutable later but for now just let userspace do the ordering.
Cc Leo Li <[email protected]>Cc Harry Wentland <[email protected]>Cc Rodrigo Siqueira <[email protected]>Signed-off-by Nicholas Kazlauskas <[email protected]>
Harry
Quoted 10 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, · line 4905
Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3
-0@@ -4897,6 +4897,9 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,if (res)return res; +/* Make z-pos of each plane explicit - lower ID is lower depth */ +drm_plane_create_zpos_immutable_property (plane, plane->index); +if (plane->type ==DRM_PLANE_TYPE_OVERLAY && plane_cap && plane_cap->per_pixel_alpha) { unsigned int blend_caps = BIT(DRM_MODE_BLEND_PIXEL_NONE) |
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx