Skip to contentSkip to conversation

drm/amdgpu: fix SI handling in amdgpu_device_asic_has_dc_support()

PATCH In review Alex Deucher 2 participants 2 messages Nov 4, 2021

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: fix SI handling in amdgpu_device_asic_has_dc_support()

Properly handle SI DC support when CONFIG_DRM_AMD_DC_SI is not set.

Fixes f7f12b25823c0d ("drm/amdgpu: default to true in amdgpu_device_asic_has_dc_support")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +11 -1
index 95fec36e385e..db3728a11481 100644
@@ -3166,11 +3166,21 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
 {
 	switch (asic_type) {
 #if defined(CONFIG_DRM_AMD_DC)
-#if defined(CONFIG_DRM_AMD_DC_SI)
 	case CHIP_TAHITI:
 	case CHIP_PITCAIRN:
 	case CHIP_VERDE:
 	case CHIP_OLAND:
+		/*
+		 * We have systems in the wild with these ASICs that require
+		 * LVDS and VGA support which is not supported with DC.
+		 *
+		 * Fallback to the non-DC driver here by default so as not to
+		 * cause regressions.
+		 */
+#if defined(CONFIG_DRM_AMD_DC_SI)
+		return amdgpu_dc > 0;
+#else
+		return false;
 #endif
 	case CHIP_BONAIRE:
 	case CHIP_KAVERI:
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only]

Quoted 50 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, November 4, 2021 11:26 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: fix SI handling in amdgpu_device_asic_has_dc_support()

Properly handle SI DC support when CONFIG_DRM_AMD_DC_SI is not set.

Fixes f7f12b25823c0d ("drm/amdgpu: default to true in

amdgpu_device_asic_has_dc_support")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +11 -1
index 95fec36e385e..db3728a11481 100644
@@ -3166,11 +3166,21 @@ bool
 amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
 {
 	switch (asic_type) {
 #if defined(CONFIG_DRM_AMD_DC)
-#if defined(CONFIG_DRM_AMD_DC_SI)
 	case CHIP_TAHITI:
 	case CHIP_PITCAIRN:
 	case CHIP_VERDE:
 	case CHIP_OLAND:
+		/*
+		 * We have systems in the wild with these ASICs that require
+		 * LVDS and VGA support which is not supported with DC.
+		 *
+		 * Fallback to the non-DC driver here by default so as not to
+		 * cause regressions.
+		 */
+#if defined(CONFIG_DRM_AMD_DC_SI)
+		return amdgpu_dc > 0;
+#else
+		return false;
 #endif
 	case CHIP_BONAIRE:

case CHIP_KAVERI:
--
2.31.1