mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
drm/amdgpu: add check for xcp id
check sel_xcp_id before its use Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
055a40c32f
commit
fa1531170d
|
|
@ -576,6 +576,9 @@ static void amdgpu_xcp_gpu_sched_update(struct amdgpu_device *adev,
|
|||
{
|
||||
unsigned int *num_gpu_sched;
|
||||
|
||||
if (sel_xcp_id >= MAX_XCP || sel_xcp_id == AMDGPU_XCP_NO_PARTITION)
|
||||
return;
|
||||
|
||||
num_gpu_sched = &adev->xcp_mgr->xcp[sel_xcp_id]
|
||||
.gpu_sched[ring->funcs->type][ring->hw_prio].num_scheds;
|
||||
adev->xcp_mgr->xcp[sel_xcp_id].gpu_sched[ring->funcs->type][ring->hw_prio]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user