stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "drm/amdgpu: check ring being ready before using" has been added to the 4.4-stable tree
@ 2017-07-03 11:16 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-03 11:16 UTC (permalink / raw)
  To: pding, Pixel.Ding, alexander.deucher, alexander.levin,
	christian.koenig, gregkh
  Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>From foo@baz Mon Jul  3 13:09:11 CEST 2017
From: Ding Pixel <pding@amd.com>
Date: Wed, 18 Jan 2017 17:26:38 +0800
Subject: drm/amdgpu: check ring being ready before using

From: Ding Pixel <pding@amd.com>


[ 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.

Signed-off-by: Ding Pixel <Pixel.Ding@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -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 pding@amd.com are

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-03 11:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 11:16 Patch "drm/amdgpu: check ring being ready before using" has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).