[PATCH] drm/amdgpu: add judgement for dc support

Chen, Guchun Guchun.Chen at amd.com
Tue May 25 07:42:04 UTC 2021


[AMD Public Use]

Reviewed-by: Guchun Chen <guchun.chen at amd.com>

Regards,
Guchun

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Asher Song
Sent: Tuesday, May 25, 2021 12:03 PM
To: amd-gfx at lists.freedesktop.org
Cc: Gao, Likun <Likun.Gao at amd.com>; Song, Asher <Asher.Song at amd.com>
Subject: [PATCH] drm/amdgpu: add judgement for dc support

Drop DC initialization when DCN is harvested in VBIOS. The way doesn't affect virtual display ip initialization.

Signed-off-by: Likun Gao  <Likun.Gao at amd.com>
Signed-off-by: Asher Song <Asher.Song at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 8848e2b9bef9..148da7ca5d55 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3122,7 +3122,9 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
  */
 bool amdgpu_device_has_dc_support(struct amdgpu_device *adev)  {
-	if (amdgpu_sriov_vf(adev) || adev->enable_virtual_display)
+	if (amdgpu_sriov_vf(adev) || 
+	    adev->enable_virtual_display ||
+	    (adev->harvest_ip_mask & AMD_HARVEST_IP_DMU_MASK))
 		return false;
 
 	return amdgpu_device_asic_has_dc_support(adev->asic_type);
--
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cguchun.chen%40amd.com%7C5eb77a59b5464e32a9bd08d91f320d33%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637575122105724763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AfI8xHK0tGLZCKdiNF%2BBSkw7X94mkbhiSJw2JyTK61E%3D&reserved=0


More information about the amd-gfx mailing list