File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
drivers/gpu/drm/amd/amdgpu Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -409,9 +409,11 @@ static u32 navi10_ih_get_wptr(struct amdgpu_device *adev,
409
409
u32 wptr , tmp ;
410
410
struct amdgpu_ih_regs * ih_regs ;
411
411
412
- if (ih == & adev -> irq .ih ) {
412
+ if (ih == & adev -> irq .ih || ih == & adev -> irq . ih_soft ) {
413
413
/* Only ring0 supports writeback. On other rings fall back
414
414
* to register-based code with overflow checking below.
415
+ * ih_soft ring doesn't have any backing hardware registers,
416
+ * update wptr and return.
415
417
*/
416
418
wptr = le32_to_cpu (* ih -> wptr_cpu );
417
419
@@ -483,6 +485,9 @@ static void navi10_ih_set_rptr(struct amdgpu_device *adev,
483
485
{
484
486
struct amdgpu_ih_regs * ih_regs ;
485
487
488
+ if (ih == & adev -> irq .ih_soft )
489
+ return ;
490
+
486
491
if (ih -> use_doorbell ) {
487
492
/* XXX check if swapping is necessary on BE */
488
493
* ih -> rptr_cpu = ih -> rptr ;
Original file line number Diff line number Diff line change @@ -334,9 +334,11 @@ static u32 vega10_ih_get_wptr(struct amdgpu_device *adev,
334
334
u32 wptr , tmp ;
335
335
struct amdgpu_ih_regs * ih_regs ;
336
336
337
- if (ih == & adev -> irq .ih ) {
337
+ if (ih == & adev -> irq .ih || ih == & adev -> irq . ih_soft ) {
338
338
/* Only ring0 supports writeback. On other rings fall back
339
339
* to register-based code with overflow checking below.
340
+ * ih_soft ring doesn't have any backing hardware registers,
341
+ * update wptr and return.
340
342
*/
341
343
wptr = le32_to_cpu (* ih -> wptr_cpu );
342
344
@@ -409,6 +411,9 @@ static void vega10_ih_set_rptr(struct amdgpu_device *adev,
409
411
{
410
412
struct amdgpu_ih_regs * ih_regs ;
411
413
414
+ if (ih == & adev -> irq .ih_soft )
415
+ return ;
416
+
412
417
if (ih -> use_doorbell ) {
413
418
/* XXX check if swapping is necessary on BE */
414
419
* ih -> rptr_cpu = ih -> rptr ;
Original file line number Diff line number Diff line change @@ -385,9 +385,11 @@ static u32 vega20_ih_get_wptr(struct amdgpu_device *adev,
385
385
u32 wptr , tmp ;
386
386
struct amdgpu_ih_regs * ih_regs ;
387
387
388
- if (ih == & adev -> irq .ih ) {
388
+ if (ih == & adev -> irq .ih || ih == & adev -> irq . ih_soft ) {
389
389
/* Only ring0 supports writeback. On other rings fall back
390
390
* to register-based code with overflow checking below.
391
+ * ih_soft ring doesn't have any backing hardware registers,
392
+ * update wptr and return.
391
393
*/
392
394
wptr = le32_to_cpu (* ih -> wptr_cpu );
393
395
@@ -461,6 +463,9 @@ static void vega20_ih_set_rptr(struct amdgpu_device *adev,
461
463
{
462
464
struct amdgpu_ih_regs * ih_regs ;
463
465
466
+ if (ih == & adev -> irq .ih_soft )
467
+ return ;
468
+
464
469
if (ih -> use_doorbell ) {
465
470
/* XXX check if swapping is necessary on BE */
466
471
* ih -> rptr_cpu = ih -> rptr ;
You can’t perform that action at this time.
0 commit comments