Skip to contentSkip to conversation

drm/amd/display: Fix external display detection with overlay

PATCH In review Pratik Vishwakarma 3 participants 3 messages Oct 1, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Fix external display detection with overlay

[Why]
When overlay plane is in use and external display
is connected, atomic check will fail.

[How]
Disable overlay plane on multi-monitor scenario
by tying it to single crtc.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index e8177656e083..e45c1176048a 100644
@@ -3149,7 +3149,7 @@ static int initialize_plane(struct amdgpu_display_manager *dm,
 	 */
 	possible_crtcs = 1 << plane_id;
 	if (plane_id >= dm->dc->caps.max_streams)
-		possible_crtcs = 0xff;
+		possible_crtcs = 0x01;
 
 	ret = amdgpu_dm_plane_init(dm, plane, possible_crtcs, plane_cap);
 
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw
Quoted 9 lines · Pratik Vishwakarma

[Why]
When overlay plane is in use and external display
is connected, atomic check will fail.

[How]
Disable overlay plane on multi-monitor scenario
by tying it to single crtc.

This will break overlay usage on any other CRTC other than index 1. That index is arbitrary and can vary based on board configuration. As-is this patch breaks a number of our existing IGT tests that were previously passing.

Userspace should really be made aware if possible to understand that overlays can't be left enabled after major hardware configurations - eg. enabling extra planes and CRTCs.

Regards,
Nicholas Kazlauskas

Quoted 10 lines
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index e8177656e083..e45c1176048a 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int initialize_plane(struct amdgpu_display_manager *dm, · line 3155

Quoted 8 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -3149,7 +3149,7 @@ static int initialize_plane(struct amdgpu_display_manager *dm,
  	 */
  	possible_crtcs = 1 << plane_id;
  	if (plane_id >= dm->dc->caps.max_streams)
-		possible_crtcs = 0xff;
+		possible_crtcs = 0x01;
 
  	ret = amdgpu_dm_plane_init(dm, plane, possible_crtcs, plane_cap);
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

maintainer
#2 lore raw
Quoted 9 lines · Nicholas
Quoted 8 lines · Pratik Vishwakarma

[Why]
When overlay plane is in use and external display
is connected, atomic check will fail.

[How]
Disable overlay plane on multi-monitor scenario
by tying it to single crtc.

Quoted 6 lines
Quoted 1 line

This will break overlay usage on any other CRTC other than index 1. That index is arbitrary and can vary based on board configuration. As-is this patch breaks a number of our existing IGT tests that were previously passing.

Userspace should really be made aware if possible to understand that overlays can't be left enabled after major hardware configurations - eg. enabling extra planes and CRTCs.

To elaborate a bit further on this, I suggest userspace first disables any overlay before enabling new crtcs. It may then try to re-enable the overlay afterwards (if atomic_check allows it at that point).

Harry

Quoted 17 lines

Regards,
Nicholas Kazlauskas

Quoted 14 lines

---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
index e8177656e083..e45c1176048a 100644
@@ -3149,7 +3149,7 @@ static int initialize_plane(struct 
 amdgpu_display_manager *dm,
        */
       possible_crtcs = 1 << plane_id;
       if (plane_id >= dm->dc->caps.max_streams)
-        possible_crtcs = 0xff;
Quoted 9 lines

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int initialize_plane(struct amdgpu_display_manager *dm, · line 3155

Quoted 3 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
+        possible_crtcs = 0x01;
       ret = amdgpu_dm_plane_init(dm, plane, possible_crtcs, plane_cap);
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CHARRY.WENTLAND%40amd.com%7Cc140f86a8edc48fab35a08d8660b999b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637371547300674341&amp;sdata=Q%2FGpKbjXKprDVYFqyuN62URgfLzvlG1TMiplLwqbuoA%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx