diff options
author | Philip Yang <Philip.Yang@amd.com> | 2018-11-19 18:36:02 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-20 22:04:58 +0300 |
commit | ec3db8a63d4aeceaee726b92f85b23c475e0e255 (patch) | |
tree | 5f66df00410172850f5b46883013214c664f098d /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | bc5ab2d29b8a57493072d3ba19fde4def9b6b3b5 (diff) | |
download | linux-ec3db8a63d4aeceaee726b92f85b23c475e0e255.tar.xz |
drm/amdgpu: enable paging queue doorbell support v4
Because increase SDMA_DOORBELL_RANGE to add new SDMA doorbell for paging queue will
break SRIOV, instead we can reserve and map two doorbell pages for amdgpu, paging
queues doorbell index use same index as SDMA gfx queues index but on second page.
For Vega20, after we change doorbell layout to increase SDMA doorbell for 8 SDMA RLC
queues later, we could use new doorbell index for paging queue.
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 590588a82471..cb06e6883fad 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -534,6 +534,12 @@ static int amdgpu_device_doorbell_init(struct amdgpu_device *adev) if (adev->doorbell.num_doorbells == 0) return -EINVAL; + /* For Vega, reserve and map two pages on doorbell BAR since SDMA + * paging queue doorbell use the second page + */ + if (adev->asic_type >= CHIP_VEGA10) + adev->doorbell.num_doorbells *= 2; + adev->doorbell.ptr = ioremap(adev->doorbell.base, adev->doorbell.num_doorbells * sizeof(u32)); |