summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLang Yu <Lang.Yu@amd.com>2022-01-20 14:01:29 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-01-25 18:00:32 -0500
commit6a6c2ab687c8eabaec4a55a4f13eb5ee68181403 (patch)
tree0643a0e0ec84724e7a975271cc64c5e47369936c
parent828904660a2e0a31d5c8a2ce75711f7123896bd5 (diff)
downloadlinux-6a6c2ab687c8eabaec4a55a4f13eb5ee68181403.tar.gz
linux-6a6c2ab687c8eabaec4a55a4f13eb5ee68181403.tar.bz2
linux-6a6c2ab687c8eabaec4a55a4f13eb5ee68181403.zip
drm/amdgpu: enable amdgpu_dc module parameter
It doesn't work under IP discovery mode. Make it work! Signed-off-by: Lang Yu <Lang.Yu@amd.com> Reviewed-by: Alex Deucher <aleander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index e6a26b554254..8dd15a7b8dcc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -846,8 +846,14 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
{
if (adev->enable_virtual_display || amdgpu_sriov_vf(adev)) {
amdgpu_device_ip_block_add(adev, &amdgpu_vkms_ip_block);
+ return 0;
+ }
+
+ if (!amdgpu_device_has_dc_support(adev))
+ return 0;
+
#if defined(CONFIG_DRM_AMD_DC)
- } else if (adev->ip_versions[DCE_HWIP][0]) {
+ if (adev->ip_versions[DCE_HWIP][0]) {
switch (adev->ip_versions[DCE_HWIP][0]) {
case IP_VERSION(1, 0, 0):
case IP_VERSION(1, 0, 1):
@@ -882,8 +888,8 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
adev->ip_versions[DCI_HWIP][0]);
return -EINVAL;
}
-#endif
}
+#endif
return 0;
}