Skip to content

Commit 9cc0696

Browse files
committed
Merge branch 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Just two small patches for stable to fix the driver failing to load on polaris cards with harvested VCE or UVD blocks. * 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: allow harvesting check for Polaris VCE drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting
2 parents 96ffbbf + 32bec2a commit 9cc0696

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ static int uvd_v6_0_early_init(void *handle)
9393
{
9494
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
9595

96+
if (!(adev->flags & AMD_IS_APU) &&
97+
(RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK))
98+
return -ENOENT;
99+
96100
uvd_v6_0_set_ring_funcs(adev);
97101
uvd_v6_0_set_irq_funcs(adev);
98102

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,15 +365,10 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
365365
{
366366
u32 tmp;
367367

368-
/* Fiji, Stoney, Polaris10, Polaris11, Polaris12 are single pipe */
369368
if ((adev->asic_type == CHIP_FIJI) ||
370-
(adev->asic_type == CHIP_STONEY) ||
371-
(adev->asic_type == CHIP_POLARIS10) ||
372-
(adev->asic_type == CHIP_POLARIS11) ||
373-
(adev->asic_type == CHIP_POLARIS12))
369+
(adev->asic_type == CHIP_STONEY))
374370
return AMDGPU_VCE_HARVEST_VCE1;
375371

376-
/* Tonga and CZ are dual or single pipe */
377372
if (adev->flags & AMD_IS_APU)
378373
tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) &
379374
VCE_HARVEST_FUSE_MACRO__MASK) >>
@@ -391,6 +386,11 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
391386
case 3:
392387
return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1;
393388
default:
389+
if ((adev->asic_type == CHIP_POLARIS10) ||
390+
(adev->asic_type == CHIP_POLARIS11) ||
391+
(adev->asic_type == CHIP_POLARIS12))
392+
return AMDGPU_VCE_HARVEST_VCE1;
393+
394394
return 0;
395395
}
396396
}

0 commit comments

Comments
 (0)