Skip to contentSkip to conversation

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

PATCH RESEND In review Nirmoy Das 2 participants 2 messages Jan 14, 2020

Subsystems (2)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH RESEND 1/1 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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5 -0
index 614919f265b9..943e6075bdf9 100644
@@ -913,6 +913,11 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,
 		if (parser->entity && parser->entity != entity)
 			return -EINVAL;
 
+		/* Return if there is no run queue associated with this entity.
+		 * Possibly because of disabled HW IP*/
+		if (entity->rq == NULL)
+			return -EINVAL;
+
 		parser->entity = entity;
 
 		ring = to_amdgpu_ring(entity->rq->sched);
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer Reviewed-by on v1 1/1
#1 lore raw

Am 14.01.20 um 10:50 schrieb :

Quoted 4 lines

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

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0 -0
index 614919f265b9..943e6075bdf9 100644
@@ -913,6 +913,11 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,
  		if (parser->entity && parser->entity != entity)

drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_ib_fill(struct amdgpu_device *adev, · line 923

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5 -0
  			return -EINVAL;
 
+		/* Return if there is no run queue associated with this entity.
+		 * Possibly because of disabled HW IP*/
+		if (entity->rq == NULL)
+			return -EINVAL;
+
  		parser->entity = entity;
 
  		ring = to_amdgpu_ring(entity->rq->sched);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx