]> Git Repo - linux.git/commitdiff
drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting
authorLeo Liu <[email protected]>
Wed, 1 Nov 2017 01:03:39 +0000 (21:03 -0400)
committerAlex Deucher <[email protected]>
Thu, 2 Nov 2017 03:37:00 +0000 (23:37 -0400)
Fixes init failures on polaris cards with harvested UVD.

Signed-off-by: Leo Liu <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c

index 430a6b4dfac972f7780e04ac3fc8b1303086878e..62cd16a23921279f8205e6f58b463f3f9bf97152 100644 (file)
@@ -93,6 +93,10 @@ static int uvd_v6_0_early_init(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       if (!(adev->flags & AMD_IS_APU) &&
+           (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK))
+               return -ENOENT;
+
        uvd_v6_0_set_ring_funcs(adev);
        uvd_v6_0_set_irq_funcs(adev);
 
This page took 0.065305 seconds and 4 git commands to generate.