mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm/amdgpu/mes: add compatibility checks for set_hw_resource_1
Seems some older MES firmware versions do not properly support
this packet. Add back some the compatibility checks.
v2: switch to fw version check (Shaoyun)
Fixes: f81cd79311
("drm/amd/amdgpu: Fix MES init sequence")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4295
Cc: Shaoyun Liu <shaoyun.liu@amd.com>
Reviewed-by: shaoyun.liu <shaoyun.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
99808926d0
commit
0180e0a5dd
2 changed files with 8 additions and 5 deletions
|
@ -1630,10 +1630,12 @@ static int mes_v11_0_hw_init(struct amdgpu_ip_block *ip_block)
|
||||||
if (r)
|
if (r)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
r = mes_v11_0_set_hw_resources_1(&adev->mes);
|
if ((adev->mes.sched_version & AMDGPU_MES_VERSION_MASK) >= 0x50) {
|
||||||
if (r) {
|
r = mes_v11_0_set_hw_resources_1(&adev->mes);
|
||||||
DRM_ERROR("failed mes_v11_0_set_hw_resources_1, r=%d\n", r);
|
if (r) {
|
||||||
goto failure;
|
DRM_ERROR("failed mes_v11_0_set_hw_resources_1, r=%d\n", r);
|
||||||
|
goto failure;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
r = mes_v11_0_query_sched_status(&adev->mes);
|
r = mes_v11_0_query_sched_status(&adev->mes);
|
||||||
|
|
|
@ -1742,7 +1742,8 @@ static int mes_v12_0_hw_init(struct amdgpu_ip_block *ip_block)
|
||||||
if (r)
|
if (r)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
mes_v12_0_set_hw_resources_1(&adev->mes, AMDGPU_MES_SCHED_PIPE);
|
if ((adev->mes.sched_version & AMDGPU_MES_VERSION_MASK) >= 0x4b)
|
||||||
|
mes_v12_0_set_hw_resources_1(&adev->mes, AMDGPU_MES_SCHED_PIPE);
|
||||||
|
|
||||||
mes_v12_0_init_aggregated_doorbell(&adev->mes);
|
mes_v12_0_init_aggregated_doorbell(&adev->mes);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue