Skip to contentSkip to conversation

drm/amdgpu: report DC not supported if virtual display is enabled

PATCH In review Alex Deucher 3 participants 3 messages Aug 25, 2020

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

PATCH 1/1 drm/amdgpu: report DC not supported if virtual display is enabled

virtual display is non-atomic so report false to avoid checking atomic state and other atomic things at runtime.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
index 5a948edcc93c..19f1e8449986 100644
@@ -2864,6 +2864,9 @@ bool amdgpu_device_has_dc_support(struct amdgpu_device *adev)
 	if (amdgpu_sriov_vf(adev))
 		return false;
 
+	if (adev->enable_virtual_display)
+		return false;
+
 	return amdgpu_device_asic_has_dc_support(adev->asic_type);
 }
 
Signature · 6 lines
2.25.4

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

[AMD Public Use]

Why not merging it to the same line of SRIOV check?

if (amdgpu_sriov_vf(adev) || adev->enable_virtual_display )

	return false;

Regards,
Guchun

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, August 25, 2020 9:45 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: report DC not supported if virtual display is enabled

virtual display is non-atomic so report false to avoid checking atomic state and other atomic things at runtime.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
index 5a948edcc93c..19f1e8449986 100644
@@ -2864,6 +2864,9 @@ bool amdgpu_device_has_dc_support(struct amdgpu_device *adev)
 	if (amdgpu_sriov_vf(adev))
 		return false;
 
+	if (adev->enable_virtual_display)
+		return false;
+
 	return amdgpu_device_asic_has_dc_support(adev->asic_type);
 }
 

--
2.25.4

_______________________________________________
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%7Cguchun.chen%40amd.com%7C6679ea962a8a4b5715cf08d848fd2469%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637339599368934081&amp;sdata=WMMrhLJ2qXKEr6gHMn0ydF2%2B3jxzUEZ3azRsjkgOXZI%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw

[AMD Public Use]

I can do that.

Alex

________________________________
From: Chen, Guchun <[email protected]>
Sent: Tuesday, August 25, 2020 10:13 AM
To: Alex Deucher <[email protected]>; [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: report DC not supported if virtual display is enabled

[AMD Public Use]

Why not merging it to the same line of SRIOV check?

if (amdgpu_sriov_vf(adev) || adev->enable_virtual_display )

        return false;

Regards,
Guchun

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, August 25, 2020 9:45 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: report DC not supported if virtual display is enabled

virtual display is non-atomic so report false to avoid checking atomic state and other atomic things at runtime.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
index 5a948edcc93c..19f1e8449986 100644
@@ -2864,6 +2864,9 @@ bool amdgpu_device_has_dc_support(struct amdgpu_device *adev)
         if (amdgpu_sriov_vf(adev))
                 return false;
 
+       if (adev->enable_virtual_display)
+               return false;
+
         return amdgpu_device_asic_has_dc_support(adev->asic_type);
 }
 

--
2.25.4

_______________________________________________
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%7Cguchun.chen%40amd.com%7C6679ea962a8a4b5715cf08d848fd2469%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637339599368934081&amp;sdata=WMMrhLJ2qXKEr6gHMn0ydF2%2B3jxzUEZ3azRsjkgOXZI%3D&amp;reserved=0

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