Re: [PATCH 1/5] drm/radeon: rework and fix reset detection v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 03.11.2013 13:15, schrieb Rafał Miłecki:
2013/10/29 Christian König <deathsimple@xxxxxxxxxxx>:
From: Christian König <christian.koenig@xxxxxxx>

Stop fiddling with jiffies, always wait for RADEON_FENCE_JIFFIES_TIMEOUT.
Consolidate the two wait sequence implementations into just one function.
Activate all waiters and remember if the reset was already done instead of
trying to reset from only one thread.
With this patch I can't suspend my Samsung with:
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD]
nee ATI Blackcomb [Radeon HD 6900M series] [1002:6720]
anymore.

The backlight goes off, activity LED goes off and then nothing.
Machine is still running and other lights (power, wifi, keyboard,
touchpad) are still working. Seems like a lockup to me.

Does the attached patch help?

Cheers,
Christian.
>From ae595cb2728002781c952b43bdab471be2466428 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@xxxxxxx>
Date: Mon, 4 Nov 2013 16:50:51 +0100
Subject: [PATCH] drm/radeon: fix radeon_fence_wait_empty_locked
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Don't block forever if there is nothing to wait for.

Signed-off-by: Christian König <christian.koenig@xxxxxxx>
---
 drivers/gpu/drm/radeon/radeon_fence.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index b8f68b2..281d14c 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -510,6 +510,9 @@ int radeon_fence_wait_empty_locked(struct radeon_device *rdev, int ring)
 	int r;
 
 	seq[ring] = rdev->fence_drv[ring].sync_seq[ring];
+	if (!seq[ring])
+		return 0;
+
 	r = radeon_fence_wait_seq(rdev, seq, false, false);
 	if (r) {
 		if (r == -EDEADLK)
-- 
1.8.1.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux