diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vega20_ih.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 11 | 
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c index 3b4eb8285943..59dfca093155 100644 --- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c @@ -340,6 +340,10 @@ static int vega20_ih_irq_init(struct amdgpu_device *adev)  		}  	} +	if (!amdgpu_sriov_vf(adev)) +		adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, +						    adev->irq.ih.doorbell_index); +  	pci_set_master(adev->pdev);  	/* enable interrupts */ @@ -385,9 +389,11 @@ static u32 vega20_ih_get_wptr(struct amdgpu_device *adev,  	u32 wptr, tmp;  	struct amdgpu_ih_regs *ih_regs; -	if (ih == &adev->irq.ih) { +	if (ih == &adev->irq.ih || ih == &adev->irq.ih_soft) {  		/* Only ring0 supports writeback. On other rings fall back  		 * to register-based code with overflow checking below. +		 * ih_soft ring doesn't have any backing hardware registers, +		 * update wptr and return.  		 */  		wptr = le32_to_cpu(*ih->wptr_cpu); @@ -461,6 +467,9 @@ static void vega20_ih_set_rptr(struct amdgpu_device *adev,  {  	struct amdgpu_ih_regs *ih_regs; +	if (ih == &adev->irq.ih_soft) +		return; +  	if (ih->use_doorbell) {  		/* XXX check if swapping is necessary on BE */  		*ih->rptr_cpu = ih->rptr;  | 
