File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed
drivers/gpu/drm/amd/amdgpu Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -1417,11 +1417,6 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)
1417
1417
WREG32_SDMA (i , mmSDMA0_CNTL , temp );
1418
1418
1419
1419
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
-
1425
1420
/* unhalt engine */
1426
1421
temp = RREG32_SDMA (i , mmSDMA0_F32_CNTL );
1427
1422
temp = REG_SET_FIELD (temp , SDMA0_F32_CNTL , HALT , 0 );
Original file line number Diff line number Diff line change @@ -1211,6 +1211,20 @@ static int soc15_common_sw_fini(void *handle)
1211
1211
return 0 ;
1212
1212
}
1213
1213
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
+
1214
1228
static int soc15_common_hw_init (void * handle )
1215
1229
{
1216
1230
struct amdgpu_device * adev = (struct amdgpu_device * )handle ;
@@ -1230,6 +1244,13 @@ static int soc15_common_hw_init(void *handle)
1230
1244
1231
1245
/* enable the doorbell aperture */
1232
1246
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 );
1233
1254
1234
1255
return 0 ;
1235
1256
}
You can’t perform that action at this time.
0 commit comments