From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert Damen Subject: [PATCH] intel: initialize bufmgr.bo_mrb_exec unconditionally Date: Sun, 07 Nov 2010 15:54:32 +0100 Message-ID: <1289141672.2487.37.camel@vaio.lan> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-yWpIHpvs1U36wlSm+OhV" Return-path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by gabe.freedesktop.org (Postfix) with SMTP id 6140D9E782 for ; Sun, 7 Nov 2010 06:54:36 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --=-yWpIHpvs1U36wlSm+OhV Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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 --=-yWpIHpvs1U36wlSm+OhV Content-Disposition: attachment; filename*0=0001-intel-initialize-bufmgr.bo_mrb_exec-unconditionally.patc; filename*1=h Content-Type: text/x-patch; name="0001-intel-initialize-bufmgr.bo_mrb_exec-unconditionally.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit >>From 6e78a4c6c009a2dc2a11e2f05b58d20ca3c449df Mon Sep 17 00:00:00 2001 From: Albert Damen 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 --- 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 --=-yWpIHpvs1U36wlSm+OhV Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --=-yWpIHpvs1U36wlSm+OhV--