Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] intel: initialize bufmgr.bo_mrb_exec unconditionally
@ 2010-11-07 14:54 Albert Damen
  2010-11-07 15:01 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Albert Damen @ 2010-11-07 14:54 UTC (permalink / raw)
  To: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

After upgrading xf86-video-intel to git master X didn't work anymore
(black screen, only mouse cursor visible and moving). Xorg.0.log shows
many errors:
(EE) intel(0): Failed to submit batch buffer, expect rendering
corruption or even a frozen display: No such device.

This seems to be caused by commit 'add BLT ring support' which calls
drm_intel_bo_mrb_exec instead of dri_bo_exec in intel_batch_submit.
drm_intel_bo_mrb_exec will try to call bo->bufmgr->bo_mrb_exec but this
is only set if the kernel has support for BSD and/or BLT rings. My
kernel, 2.6.33, does not have this, so drm_intel_bo_mrb_exec returns
ENODEV.

Attached patch against libdrm solves the problem for me. It seems safe
to me to set bo_mrb_exec unconditionally as drm_intel_gem_bo_mrb_exec2
will still check if BSD and BLT rings can be used.

Best regards,
Albert Damen

[-- Attachment #2: 0001-intel-initialize-bufmgr.bo_mrb_exec-unconditionally.patch --]
[-- Type: text/x-patch, Size: 1281 bytes --]

>From 6e78a4c6c009a2dc2a11e2f05b58d20ca3c449df Mon Sep 17 00:00:00 2001
From: Albert Damen <albrt@gmx.net>
Date: Sun, 7 Nov 2010 12:38:12 +0100
Subject: [PATCH] intel: initialize bufmgr.bo_mrb_exec unconditionally

If bufmgr.bo_mrb_exec is not set, drm_intel_bo_mrb_exec returns ENODEV
even though drm_intel_gem_bo_mrb_exec2 will work fine for the RENDER ring.
Fixes xf86-video-intel after commit 'add BLT ring support' (5bed685f76)
with kernels without BSD or BLT ring support (2.6.34 and before).

Signed-off-by: Albert Damen <albrt@gmx.net>
---
 intel/intel_bufmgr_gem.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 2da3a8a..2b7bd47 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2184,8 +2184,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 	/* Use the new one if available */
 	if (exec2) {
 		bufmgr_gem->bufmgr.bo_exec = drm_intel_gem_bo_exec2;
-		if (bufmgr_gem->has_bsd|bufmgr_gem->has_blt)
-			bufmgr_gem->bufmgr.bo_mrb_exec = drm_intel_gem_bo_mrb_exec2;
+		bufmgr_gem->bufmgr.bo_mrb_exec = drm_intel_gem_bo_mrb_exec2;
 	} else
 		bufmgr_gem->bufmgr.bo_exec = drm_intel_gem_bo_exec;
 	bufmgr_gem->bufmgr.bo_busy = drm_intel_gem_bo_busy;
-- 
1.7.0.4


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-07 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-07 14:54 [PATCH] intel: initialize bufmgr.bo_mrb_exec unconditionally Albert Damen
2010-11-07 15:01 ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox