[PATCH] drm/amdgpu: disable UVD/VCE for some polaris10 variants

Junwei Zhang Jerry.Zhang at amd.com
Mon Nov 26 03:09:23 UTC 2018


Some variants don't support UVD and VCE.

Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
Reviewed-by: Flora Cui <Flora.Cui at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index f3a4cf1f013a..16a28d20be82 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -1660,8 +1660,13 @@ int vi_set_ip_blocks(struct amdgpu_device *adev)
 			amdgpu_device_ip_block_add(adev, &dce_v11_2_ip_block);
 		amdgpu_device_ip_block_add(adev, &gfx_v8_0_ip_block);
 		amdgpu_device_ip_block_add(adev, &sdma_v3_1_ip_block);
-		amdgpu_device_ip_block_add(adev, &uvd_v6_3_ip_block);
-		amdgpu_device_ip_block_add(adev, &vce_v3_4_ip_block);
+		if ((adev->pdev->device == 0x67df) &&
+		      (adev->pdev->revision == 0xf7)) {
+			/* Some polaris10 variants don't support UVD/VCE */
+		} else {
+			amdgpu_device_ip_block_add(adev, &uvd_v6_3_ip_block);
+			amdgpu_device_ip_block_add(adev, &vce_v3_4_ip_block);
+		}
 		break;
 	case CHIP_CARRIZO:
 		amdgpu_device_ip_block_add(adev, &vi_common_ip_block);
-- 
2.17.1



More information about the amd-gfx mailing list