intel: initialize bufmgr.bo_mrb_exec unconditionally
PATCH 1/1 intel: initialize bufmgr.bo_mrb_exec unconditionally
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
Quoted 1 line
From
6e78a4c6c009a2dc2a11e2f05b58d20ca3c449dfMon Sep 17 00:00:00 2001
From: Albert Damen <[email protected]>
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).
--- intel/intel_bufmgr_gem.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
intel/intel_bufmgr_gem.c +1 -2
@@ -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;
Signature · 1 line
1.7.0.4
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 3 lines · Albert Damen
Attached patch against libdrm solves the problem for me. It seems safe to me to set
bo_mrb_execunconditionally asdrm_intel_gem_bo_mrb_exec2will still check if BSD and BLT rings can be used.
I had it my head that we used bo_mrb_exec in the absence of BSD|BLT. Thanks for the patch, pushed!
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre