Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: error out on entity with no run queue

Disabled HW IP's entity initialized with NULL rq. We should not
process any submit request from userspace for a disabled HW IP.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Nirmoy Das and committed by
Alex Deucher
55414ad5 8eee00f6

+5
+5
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
··· 909 909 if (parser->entity && parser->entity != entity) 910 910 return -EINVAL; 911 911 912 + /* Return if there is no run queue associated with this entity. 913 + * Possibly because of disabled HW IP*/ 914 + if (entity->rq == NULL) 915 + return -EINVAL; 916 + 912 917 parser->entity = entity; 913 918 914 919 ring = to_amdgpu_ring(entity->rq->sched);