summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2012-11-30 10:07:51 -0500
committerJerome Glisse <jglisse@redhat.com>2012-12-04 11:02:24 -0500
commitf402805b22e4f4f735924d59c69474b24e623a25 (patch)
treefc8fd5ddfab295f32967182ec39fc52852cddbf2 /src
parent60cd6ceaf44b506433aebf6b3a639a17604dfddd (diff)
radeon: avoid copying over itself ddx fb
In some rare case it seems that the old fb could already be the ddx fb. As copying from the same bo will trigger a ttm deadlck detection which will result in infinite kernel/userspace loop. Avoid doing any copy as anyway it's useless. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/drmmode_display.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 9b9fc831..d00e60d6 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -292,6 +292,15 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
if (!fbcon_id)
goto fallback;
+ if (fbcon_id == drmmode->fb_id) {
+ /* in some rare case there might be no fbcon and we might already
+ * be the one with the current fb to avoid a false deadlck in
+ * kernel ttm code just do nothing as anyway there is nothing
+ * to do
+ */
+ return;
+ }
+
src = create_pixmap_for_fbcon(drmmode, pScrn, fbcon_id);
if (!src)
goto fallback;