Skip to contentSkip to conversation

Patch "drm/amdgpu: check ring being ready before using" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jul 3, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/amdgpu: check ring being ready before using

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-amdgpu-check-ring-being-ready-before-using.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Mon Jul 3 13:09:11 CEST 2017

From: Ding Pixel <[email protected]>
Date: Wed, 18 Jan 2017 17:26:38 +0800
Subject: drm/amdgpu: check ring being ready before using

From: Ding Pixel <[email protected]>

[ Upstream commit c5f21c9f878b8dcd54d0b9739c025ca73cb4c091 ]

Return success when the ring is properly initialized, otherwise return failure.

Tonga SRIOV VF doesn't have UVD and VCE engines, the initialization of these IPs is bypassed. The system crashes if application submit IB to their rings which are not ready to use. It could be a common issue if IP having ring buffer is disabled for some reason on specific ASIC, so it should check the ring being ready to use.

Bug: amdgpu_test crashes system on Tonga VF.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |    7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +7 -0
@@ -124,6 +124,13 @@ int amdgpu_cs_get_ring(struct amdgpu_dev
 		}
 		break;
 	}
+
+	if (!(*out_ring && (*out_ring)->adev)) {
+		DRM_ERROR("Ring %d is not initialized on IP %d\n",
+			  ring, ip_type);
+		return -EINVAL;
+	}
+
 	return 0;
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/drm-amdgpu-check-ring-being-ready-before-using.patch