diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2021-08-09 19:29:56 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-10-04 22:23:01 +0300 |
commit | fe323f039db850362d3d96a377f87efc912cf866 (patch) | |
tree | 0d38d84c4cdfc2d607d6eaa51791c73b80742295 /drivers/gpu | |
parent | 5c3720be7d46581181782f5cf9585b532feed947 (diff) | |
download | linux-fe323f039db850362d3d96a377f87efc912cf866.tar.xz |
drm/amdgpu/sdma: remove manual instance setting
Handled by IP discovery now.
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 17 |
3 files changed, 0 insertions, 36 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 3219dca3e44f..cb74f8c35d0a 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c @@ -1856,23 +1856,6 @@ static int sdma_v4_0_early_init(void *handle) struct amdgpu_device *adev = (struct amdgpu_device *)handle; int r; - switch (adev->ip_versions[SDMA0_HWIP]) { - case IP_VERSION(4, 1, 0): - case IP_VERSION(4, 1, 1): - case IP_VERSION(4, 1, 2): - adev->sdma.num_instances = 1; - break; - case IP_VERSION(4, 2, 2): - adev->sdma.num_instances = 8; - break; - case IP_VERSION(4, 4, 0): - adev->sdma.num_instances = 5; - break; - default: - adev->sdma.num_instances = 2; - break; - } - r = sdma_v4_0_init_microcode(adev); if (r) { DRM_ERROR("Failed to load sdma firmware!\n"); diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c index 2ab670c58520..d3b01d2977c0 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c @@ -1295,8 +1295,6 @@ static int sdma_v5_0_early_init(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; - adev->sdma.num_instances = 2; - sdma_v5_0_set_ring_funcs(adev); sdma_v5_0_set_buffer_funcs(adev); sdma_v5_0_set_vm_pte_funcs(adev); diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c index b38d0caabdf7..3d89e7280a04 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c @@ -1217,23 +1217,6 @@ static int sdma_v5_2_early_init(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; - switch (adev->ip_versions[SDMA0_HWIP]) { - case IP_VERSION(5, 2, 0): - adev->sdma.num_instances = 4; - break; - case IP_VERSION(5, 2, 2): - case IP_VERSION(5, 2, 4): - adev->sdma.num_instances = 2; - break; - case IP_VERSION(5, 2, 1): - case IP_VERSION(5, 2, 5): - case IP_VERSION(5, 2, 3): - adev->sdma.num_instances = 1; - break; - default: - break; - } - sdma_v5_2_set_ring_funcs(adev); sdma_v5_2_set_buffer_funcs(adev); sdma_v5_2_set_vm_pte_funcs(adev); |