Skip to content

Commit 5ead67b

Browse files
committed
Merge tag 'amd-drm-fixes-5.10-2020-11-25' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
amd-drm-fixes-5.10-2020-11-25: amdgpu: - Runtime pm fix - SI UVD suspend/resume fix - HDCP fix for headless cards - Sienna Cichlid golden register update Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201125151145.4263-1-alexander.deucher@amd.com
2 parents 030c5b5 + 60734bd commit 5ead67b

5 files changed

Lines changed: 17 additions & 12 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4852,7 +4852,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
48524852
if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
48534853
return -ENOTSUPP;
48544854

4855-
if (ras && ras->supported)
4855+
if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
48564856
adev->nbio.funcs->enable_doorbell_interrupt(adev, false);
48574857

48584858
return amdgpu_dpm_baco_enter(adev);
@@ -4871,7 +4871,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
48714871
if (ret)
48724872
return ret;
48734873

4874-
if (ras && ras->supported)
4874+
if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
48754875
adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
48764876

48774877
return 0;

drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ struct amdgpu_uvd {
6767
unsigned harvest_config;
6868
/* store image width to adjust nb memory state */
6969
unsigned decode_image_width;
70+
uint32_t keyselect;
7071
};
7172

7273
int amdgpu_uvd_sw_init(struct amdgpu_device *adev);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3105,6 +3105,8 @@ static const struct soc15_reg_golden golden_settings_gc_10_3[] =
31053105
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0xffffffff, 0x00000280),
31063106
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x00800000),
31073107
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_EXCEPTION_CONTROL, 0x7fff0f1f, 0x00b80000),
3108+
SOC15_REG_GOLDEN_VALUE(GC, 0 ,mmGCEA_SDP_TAG_RESERVE0, 0xffffffff, 0x10100100),
3109+
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCEA_SDP_TAG_RESERVE1, 0xffffffff, 0x17000088),
31083110
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL_Sienna_Cichlid, 0x1ff1ffff, 0x00000500),
31093111
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PC_CNTL, 0x003fffff, 0x00280400),
31103112
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,8 @@ static void uvd_v3_1_mc_resume(struct amdgpu_device *adev)
277277
*/
278278
static int uvd_v3_1_fw_validate(struct amdgpu_device *adev)
279279
{
280-
void *ptr;
281-
uint32_t ucode_len, i;
282-
uint32_t keysel;
283-
284-
ptr = adev->uvd.inst[0].cpu_addr;
285-
ptr += 192 + 16;
286-
memcpy(&ucode_len, ptr, 4);
287-
ptr += ucode_len;
288-
memcpy(&keysel, ptr, 4);
280+
int i;
281+
uint32_t keysel = adev->uvd.keyselect;
289282

290283
WREG32(mmUVD_FW_START, keysel);
291284

@@ -550,6 +543,8 @@ static int uvd_v3_1_sw_init(void *handle)
550543
struct amdgpu_ring *ring;
551544
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
552545
int r;
546+
void *ptr;
547+
uint32_t ucode_len;
553548

554549
/* UVD TRAP */
555550
r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, 124, &adev->uvd.inst->irq);
@@ -571,6 +566,13 @@ static int uvd_v3_1_sw_init(void *handle)
571566
if (r)
572567
return r;
573568

569+
/* Retrieval firmware validate key */
570+
ptr = adev->uvd.inst[0].cpu_addr;
571+
ptr += 192 + 16;
572+
memcpy(&ucode_len, ptr, 4);
573+
ptr += ucode_len;
574+
memcpy(&adev->uvd.keyselect, ptr, 4);
575+
574576
r = amdgpu_uvd_entity_init(adev);
575577

576578
return r;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
10411041
amdgpu_dm_init_color_mod();
10421042

10431043
#ifdef CONFIG_DRM_AMD_DC_HDCP
1044-
if (adev->asic_type >= CHIP_RAVEN) {
1044+
if (adev->dm.dc->caps.max_links > 0 && adev->asic_type >= CHIP_RAVEN) {
10451045
adev->dm.hdcp_workqueue = hdcp_create_workqueue(adev, &init_params.cp_psp, adev->dm.dc);
10461046

10471047
if (!adev->dm.hdcp_workqueue)

0 commit comments

Comments
 (0)