Commit 794c33c6 authored by Shashank Sharma's avatar Shashank Sharma Committed by Alex Deucher

drm/amdgpu: don't modify num_doorbells for mes

This patch removes the check and change in num_kernel_doorbells
for MES, which is not being used anywhere by MES code.

V2: Fixed checkpatch warnings.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Reviewed-by: default avatarChristian Koenig <christian.koenig@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarShashank Sharma <shashank.sharma@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 900af4e4
...@@ -140,25 +140,21 @@ int amdgpu_doorbell_init(struct amdgpu_device *adev) ...@@ -140,25 +140,21 @@ int amdgpu_doorbell_init(struct amdgpu_device *adev)
adev->doorbell.base = pci_resource_start(adev->pdev, 2); adev->doorbell.base = pci_resource_start(adev->pdev, 2);
adev->doorbell.size = pci_resource_len(adev->pdev, 2); adev->doorbell.size = pci_resource_len(adev->pdev, 2);
if (adev->enable_mes) { adev->doorbell.num_kernel_doorbells =
adev->doorbell.num_kernel_doorbells = min_t(u32, adev->doorbell.size / sizeof(u32),
adev->doorbell.size / sizeof(u32); adev->doorbell_index.max_assignment + 1);
} else { if (adev->doorbell.num_kernel_doorbells == 0)
adev->doorbell.num_kernel_doorbells = return -EINVAL;
min_t(u32, adev->doorbell.size / sizeof(u32),
adev->doorbell_index.max_assignment+1); /*
if (adev->doorbell.num_kernel_doorbells == 0) * For Vega, reserve and map two pages on doorbell BAR since SDMA
return -EINVAL; * paging queue doorbell use the second page. The
* AMDGPU_DOORBELL64_MAX_ASSIGNMENT definition assumes all the
/* For Vega, reserve and map two pages on doorbell BAR since SDMA * doorbells are in the first page. So with paging queue enabled,
* paging queue doorbell use the second page. The * the max num_kernel_doorbells should + 1 page (0x400 in dword)
* AMDGPU_DOORBELL64_MAX_ASSIGNMENT definition assumes all the */
* doorbells are in the first page. So with paging queue enabled, if (adev->asic_type >= CHIP_VEGA10)
* the max num_kernel_doorbells should + 1 page (0x400 in dword) adev->doorbell.num_kernel_doorbells += 0x400;
*/
if (adev->asic_type >= CHIP_VEGA10)
adev->doorbell.num_kernel_doorbells += 0x400;
}
adev->doorbell.ptr = ioremap(adev->doorbell.base, adev->doorbell.ptr = ioremap(adev->doorbell.base,
adev->doorbell.num_kernel_doorbells * adev->doorbell.num_kernel_doorbells *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment