dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Marek Olšák" <maraeo@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/radeon: signal all fences after lockup to avoid endless waiting in GEM_WAIT
Date: Wed,  2 Oct 2013 15:35:39 +0200	[thread overview]
Message-ID: <1380720939-3903-1-git-send-email-maraeo@gmail.com> (raw)

From: Marek Olšák <marek.olsak@amd.com>

After a lockup, fences are not signalled sometimes, causing
the GEM_WAIT_IDLE ioctl to never return, which sometimes results
in an X server freeze.

This fixes only one of many deadlocks which can occur during a lockup.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
---
 drivers/gpu/drm/radeon/radeon_device.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 841d0e0..7b97baa 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1552,6 +1552,11 @@ int radeon_gpu_reset(struct radeon_device *rdev)
 	radeon_save_bios_scratch_regs(rdev);
 	/* block TTM */
 	resched = ttm_bo_lock_delayed_workqueue(&rdev->mman.bdev);
+
+	mutex_lock(&rdev->ring_lock);
+	radeon_fence_driver_force_completion(rdev);
+	mutex_unlock(&rdev->ring_lock);
+
 	radeon_pm_suspend(rdev);
 	radeon_suspend(rdev);
 
-- 
1.8.1.2

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

             reply	other threads:[~2013-10-02 13:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02 13:35 Marek Olšák [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-10-02 13:52 [PATCH] drm/radeon: signal all fences after lockup to avoid endless waiting in GEM_WAIT Christian König
2013-10-02 13:59 ` Marek Olšák
2013-10-02 14:50 Christian König
2013-10-03  0:45 ` Marek Olšák
2013-10-07 11:08   ` Christian König
2013-10-08 16:21     ` Christian König
2013-10-09 10:36       ` Marek Olšák
2013-10-09 11:09         ` Christian König
2013-10-09 12:04           ` Marek Olšák
2013-10-13 12:47             ` Christian König
2013-10-13 20:16               ` Marek Olšák
2013-10-14  9:19                 ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380720939-3903-1-git-send-email-maraeo@gmail.com \
    --to=maraeo@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).