Skip to content

Commit a4294d5

Browse files
committed
Merge tag 'amd-drm-fixes-6.1-2022-10-20' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.1-2022-10-20: amdgpu: - Fix gfx9 APU regression caused by PCI AER fix Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents f046ca4 + 50b0e4d commit a4294d5

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,11 +1417,6 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)
14171417
WREG32_SDMA(i, mmSDMA0_CNTL, temp);
14181418

14191419
if (!amdgpu_sriov_vf(adev)) {
1420-
ring = &adev->sdma.instance[i].ring;
1421-
adev->nbio.funcs->sdma_doorbell_range(adev, i,
1422-
ring->use_doorbell, ring->doorbell_index,
1423-
adev->doorbell_index.sdma_doorbell_range);
1424-
14251420
/* unhalt engine */
14261421
temp = RREG32_SDMA(i, mmSDMA0_F32_CNTL);
14271422
temp = REG_SET_FIELD(temp, SDMA0_F32_CNTL, HALT, 0);

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,20 @@ static int soc15_common_sw_fini(void *handle)
12111211
return 0;
12121212
}
12131213

1214+
static void soc15_sdma_doorbell_range_init(struct amdgpu_device *adev)
1215+
{
1216+
int i;
1217+
1218+
/* sdma doorbell range is programed by hypervisor */
1219+
if (!amdgpu_sriov_vf(adev)) {
1220+
for (i = 0; i < adev->sdma.num_instances; i++) {
1221+
adev->nbio.funcs->sdma_doorbell_range(adev, i,
1222+
true, adev->doorbell_index.sdma_engine[i] << 1,
1223+
adev->doorbell_index.sdma_doorbell_range);
1224+
}
1225+
}
1226+
}
1227+
12141228
static int soc15_common_hw_init(void *handle)
12151229
{
12161230
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -1230,6 +1244,13 @@ static int soc15_common_hw_init(void *handle)
12301244

12311245
/* enable the doorbell aperture */
12321246
soc15_enable_doorbell_aperture(adev, true);
1247+
/* HW doorbell routing policy: doorbell writing not
1248+
* in SDMA/IH/MM/ACV range will be routed to CP. So
1249+
* we need to init SDMA doorbell range prior
1250+
* to CP ip block init and ring test. IH already
1251+
* happens before CP.
1252+
*/
1253+
soc15_sdma_doorbell_range_init(adev);
12331254

12341255
return 0;
12351256
}

0 commit comments

Comments
 (0)