Skip to content

Commit a78b481

Browse files
victorlu-amdalexdeucher
authored andcommitted
drm/amdgpu: Skip PCTL0_MMHUB_DEEPSLEEP_IB write in jpegv4.0.3 under SRIOV
PCTL0_MMHUB_DEEPSLEEP_IB is blocked for VF access Signed-off-by: Victor Lu <[email protected]> Reviewed-by: Samir Dhume <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent bb61953 commit a78b481

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -654,9 +654,11 @@ static void jpeg_v4_0_3_dec_ring_set_wptr(struct amdgpu_ring *ring)
654654
*/
655655
static void jpeg_v4_0_3_dec_ring_insert_start(struct amdgpu_ring *ring)
656656
{
657-
amdgpu_ring_write(ring, PACKETJ(regUVD_JRBC_EXTERNAL_REG_INTERNAL_OFFSET,
658-
0, 0, PACKETJ_TYPE0));
659-
amdgpu_ring_write(ring, 0x62a04); /* PCTL0_MMHUB_DEEPSLEEP_IB */
657+
if (!amdgpu_sriov_vf(ring->adev)) {
658+
amdgpu_ring_write(ring, PACKETJ(regUVD_JRBC_EXTERNAL_REG_INTERNAL_OFFSET,
659+
0, 0, PACKETJ_TYPE0));
660+
amdgpu_ring_write(ring, 0x62a04); /* PCTL0_MMHUB_DEEPSLEEP_IB */
661+
}
660662

661663
amdgpu_ring_write(ring, PACKETJ(JRBC_DEC_EXTERNAL_REG_WRITE_ADDR,
662664
0, 0, PACKETJ_TYPE0));
@@ -672,9 +674,11 @@ static void jpeg_v4_0_3_dec_ring_insert_start(struct amdgpu_ring *ring)
672674
*/
673675
static void jpeg_v4_0_3_dec_ring_insert_end(struct amdgpu_ring *ring)
674676
{
675-
amdgpu_ring_write(ring, PACKETJ(regUVD_JRBC_EXTERNAL_REG_INTERNAL_OFFSET,
676-
0, 0, PACKETJ_TYPE0));
677-
amdgpu_ring_write(ring, 0x62a04);
677+
if (!amdgpu_sriov_vf(ring->adev)) {
678+
amdgpu_ring_write(ring, PACKETJ(regUVD_JRBC_EXTERNAL_REG_INTERNAL_OFFSET,
679+
0, 0, PACKETJ_TYPE0));
680+
amdgpu_ring_write(ring, 0x62a04);
681+
}
678682

679683
amdgpu_ring_write(ring, PACKETJ(JRBC_DEC_EXTERNAL_REG_WRITE_ADDR,
680684
0, 0, PACKETJ_TYPE0));

0 commit comments

Comments
 (0)