nouveau: fix kernel pushbuf rejection
This commit is contained in:
parent
ac46dadfea
commit
5c7437531a
44
libdrm-2.4.40-nouveau-pushbuf-type.patch
Normal file
44
libdrm-2.4.40-nouveau-pushbuf-type.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 891517f5111cd82909906d5e8ee0299db0d46762 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ben Skeggs <bskeggs@redhat.com>
|
||||||
|
Date: Mon, 7 Jan 2013 13:07:13 +1000
|
||||||
|
Subject: [PATCH] nouveau: disallow pushbuf BOs in multiple memory types
|
||||||
|
|
||||||
|
Under certain circumstances it's possible for libdrm to decide to move
|
||||||
|
a GART|VRAM pushbuf to be VRAM-only. This causes the kernel to reject
|
||||||
|
the command submission on GF8 and up, due to a stricter policy where
|
||||||
|
buffers are only allowed to move to memory types that were specified
|
||||||
|
at creation time.
|
||||||
|
|
||||||
|
The simplest fix for this is to force the creation-time memory type for
|
||||||
|
the lifetime of the push buffer.
|
||||||
|
|
||||||
|
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||||
|
---
|
||||||
|
nouveau/pushbuf.c | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c
|
||||||
|
index 0e37ce3..ff8e125 100644
|
||||||
|
--- a/nouveau/pushbuf.c
|
||||||
|
+++ b/nouveau/pushbuf.c
|
||||||
|
@@ -574,13 +574,13 @@ nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan,
|
||||||
|
push->client = client;
|
||||||
|
push->channel = immediate ? chan : NULL;
|
||||||
|
push->flags = NOUVEAU_BO_RD;
|
||||||
|
- if (fifo->pushbuf & NOUVEAU_GEM_DOMAIN_VRAM) {
|
||||||
|
- push->flags |= NOUVEAU_BO_VRAM;
|
||||||
|
- nvpb->type = NOUVEAU_BO_VRAM;
|
||||||
|
- }
|
||||||
|
if (fifo->pushbuf & NOUVEAU_GEM_DOMAIN_GART) {
|
||||||
|
push->flags |= NOUVEAU_BO_GART;
|
||||||
|
nvpb->type = NOUVEAU_BO_GART;
|
||||||
|
+ } else
|
||||||
|
+ if (fifo->pushbuf & NOUVEAU_GEM_DOMAIN_VRAM) {
|
||||||
|
+ push->flags |= NOUVEAU_BO_VRAM;
|
||||||
|
+ nvpb->type = NOUVEAU_BO_VRAM;
|
||||||
|
}
|
||||||
|
nvpb->type |= NOUVEAU_BO_MAP;
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.0.1
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
Summary: Direct Rendering Manager runtime library
|
Summary: Direct Rendering Manager runtime library
|
||||||
Name: libdrm
|
Name: libdrm
|
||||||
Version: 2.4.40
|
Version: 2.4.40
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://dri.sourceforge.net
|
URL: http://dri.sourceforge.net
|
||||||
@ -32,6 +32,8 @@ Patch3: libdrm-make-dri-perms-okay.patch
|
|||||||
Patch4: libdrm-2.4.0-no-bc.patch
|
Patch4: libdrm-2.4.0-no-bc.patch
|
||||||
# make rule to print the list of test programs
|
# make rule to print the list of test programs
|
||||||
Patch5: libdrm-2.4.25-check-programs.patch
|
Patch5: libdrm-2.4.25-check-programs.patch
|
||||||
|
# nouveau: force single pushbuf memory type to prevent kernel rejections
|
||||||
|
Patch6: libdrm-2.4.40-nouveau-pushbuf-type.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Direct Rendering Manager runtime library
|
Direct Rendering Manager runtime library
|
||||||
@ -59,6 +61,7 @@ Utility programs for the kernel DRM interface. Will void your warranty.
|
|||||||
%patch3 -p1 -b .forceperms
|
%patch3 -p1 -b .forceperms
|
||||||
%patch4 -p1 -b .no-bc
|
%patch4 -p1 -b .no-bc
|
||||||
%patch5 -p1 -b .check
|
%patch5 -p1 -b .check
|
||||||
|
%patch6 -p1 -b .nvpbtype
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -v --install || exit 1
|
autoreconf -v --install || exit 1
|
||||||
@ -192,6 +195,9 @@ done
|
|||||||
%{_mandir}/man3/drm*.3*
|
%{_mandir}/man3/drm*.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 09 2013 Ben Skeggs <bskeggs@redhat.com> 2.4.40-2
|
||||||
|
- nouveau: fix bug causing kernel to reject certain command streams
|
||||||
|
|
||||||
* Tue Nov 06 2012 Dave Airlie <airlied@redhat.com> 2.4.40-1
|
* Tue Nov 06 2012 Dave Airlie <airlied@redhat.com> 2.4.40-1
|
||||||
- libdrm 2.4.40
|
- libdrm 2.4.40
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user