diff options
author | Dave Airlie <airlied@redhat.com> | 2017-11-02 00:40:12 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-11-02 00:40:12 -0400 |
commit | 9cc06965fc8b7c5592b6a1355dff2623611bfeb3 (patch) | |
tree | 4c8f030835494540580acb6e21c253b1a91a4003 | |
parent | 96ffbbf936298cad0df289ed1c09052493095b7f (diff) | |
parent | 32bec2afa525149288e6696079bc85f747fa2138 (diff) |
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
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c index 430a6b4dfac9..62cd16a23921 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | |||
@@ -93,6 +93,10 @@ static int uvd_v6_0_early_init(void *handle) | |||
93 | { | 93 | { |
94 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 94 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
95 | 95 | ||
96 | if (!(adev->flags & AMD_IS_APU) && | ||
97 | (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK)) | ||
98 | return -ENOENT; | ||
99 | |||
96 | uvd_v6_0_set_ring_funcs(adev); | 100 | uvd_v6_0_set_ring_funcs(adev); |
97 | uvd_v6_0_set_irq_funcs(adev); | 101 | uvd_v6_0_set_irq_funcs(adev); |
98 | 102 | ||
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index 90332f55cfba..cf81065e3c5a 100644 --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | |||
@@ -365,15 +365,10 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev) | |||
365 | { | 365 | { |
366 | u32 tmp; | 366 | u32 tmp; |
367 | 367 | ||
368 | /* Fiji, Stoney, Polaris10, Polaris11, Polaris12 are single pipe */ | ||
369 | if ((adev->asic_type == CHIP_FIJI) || | 368 | if ((adev->asic_type == CHIP_FIJI) || |
370 | (adev->asic_type == CHIP_STONEY) || | 369 | (adev->asic_type == CHIP_STONEY)) |
371 | (adev->asic_type == CHIP_POLARIS10) || | ||
372 | (adev->asic_type == CHIP_POLARIS11) || | ||
373 | (adev->asic_type == CHIP_POLARIS12)) | ||
374 | return AMDGPU_VCE_HARVEST_VCE1; | 370 | return AMDGPU_VCE_HARVEST_VCE1; |
375 | 371 | ||
376 | /* Tonga and CZ are dual or single pipe */ | ||
377 | if (adev->flags & AMD_IS_APU) | 372 | if (adev->flags & AMD_IS_APU) |
378 | tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) & | 373 | tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) & |
379 | VCE_HARVEST_FUSE_MACRO__MASK) >> | 374 | VCE_HARVEST_FUSE_MACRO__MASK) >> |
@@ -391,6 +386,11 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev) | |||
391 | case 3: | 386 | case 3: |
392 | return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1; | 387 | return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1; |
393 | default: | 388 | 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 | |||
394 | return 0; | 394 | return 0; |
395 | } | 395 | } |
396 | } | 396 | } |