drm/amdgpu: fix SI handling in amdgpu_device_asic_has_dc_support()
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Nov 2021 03:17:50 +0000 (23:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 5 Nov 2021 18:12:53 +0000 (14:12 -0400)
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")
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 6c38dd9..b45f475 100644 (file)
@@ -3167,11 +3167,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: