- nouveau: post writes to pushbuf before incrementing PUT
Thu Apr 16 2009 Dave Airlie <airlied@redhat.com> 2.4.6-5 - libdrm-radeon: fix wait idle
This commit is contained in:
parent
14c5c9abae
commit
c17ecaeba2
@ -484,7 +484,7 @@ index 0000000..70f4b6b
|
|||||||
+ do {
|
+ do {
|
||||||
+ ret = drmCommandWriteRead(bo->bom->fd, DRM_RADEON_GEM_WAIT_IDLE,
|
+ ret = drmCommandWriteRead(bo->bom->fd, DRM_RADEON_GEM_WAIT_IDLE,
|
||||||
+ &args, sizeof(args));
|
+ &args, sizeof(args));
|
||||||
+ } while (ret == -EAGAIN);
|
+ } while (ret == -EBUSY);
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
11
libdrm.spec
11
libdrm.spec
@ -3,7 +3,7 @@
|
|||||||
Summary: Direct Rendering Manager runtime library
|
Summary: Direct Rendering Manager runtime library
|
||||||
Name: libdrm
|
Name: libdrm
|
||||||
Version: 2.4.6
|
Version: 2.4.6
|
||||||
Release: 4%{?dist}
|
Release: 6%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://dri.sourceforge.net
|
URL: http://dri.sourceforge.net
|
||||||
@ -30,6 +30,8 @@ Patch3: libdrm-make-dri-perms-okay.patch
|
|||||||
Patch4: libdrm-2.4.0-no-bc.patch
|
Patch4: libdrm-2.4.0-no-bc.patch
|
||||||
# radeon libdrm patches from modesetting-gem branch of upstream
|
# radeon libdrm patches from modesetting-gem branch of upstream
|
||||||
Patch8: libdrm-radeon.patch
|
Patch8: libdrm-radeon.patch
|
||||||
|
# nouveau fixes from drm.git
|
||||||
|
Patch9: nouveau-updates.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Direct Rendering Manager runtime library
|
Direct Rendering Manager runtime library
|
||||||
@ -50,6 +52,7 @@ Direct Rendering Manager development package
|
|||||||
%patch3 -p1 -b .forceperms
|
%patch3 -p1 -b .forceperms
|
||||||
%patch4 -p1 -b .no-bc
|
%patch4 -p1 -b .no-bc
|
||||||
%patch8 -p1 -b .radeon
|
%patch8 -p1 -b .radeon
|
||||||
|
%patch9 -p1 -b .nouveau
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -v --install || exit 1
|
autoreconf -v --install || exit 1
|
||||||
@ -109,6 +112,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/pkgconfig/libdrm_nouveau.pc
|
%{_libdir}/pkgconfig/libdrm_nouveau.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 17 2009 Ben Skeggs <bskeggs@redhat.com> 2.4.6-6
|
||||||
|
- nouveau: post writes to pushbuf before incrementing PUT
|
||||||
|
|
||||||
|
* Thu Apr 16 2009 Dave Airlie <airlied@redhat.com> 2.4.6-5
|
||||||
|
- libdrm-radeon: fix wait idle
|
||||||
|
|
||||||
* Sat Apr 11 2009 Dave Airlie <airlied@redhat.com> 2.4.6-4
|
* Sat Apr 11 2009 Dave Airlie <airlied@redhat.com> 2.4.6-4
|
||||||
- libdrm-2.4.7-revert-bong.patch - revert connector "speedups"
|
- libdrm-2.4.7-revert-bong.patch - revert connector "speedups"
|
||||||
|
|
||||||
|
@ -1,143 +1,26 @@
|
|||||||
diff -Nur libdrm-2.4.5.orig/libdrm/nouveau/Makefile.am libdrm-2.4.5/libdrm/nouveau/Makefile.am
|
diff --git a/libdrm/nouveau/nouveau_bo.c b/libdrm/nouveau/nouveau_bo.c
|
||||||
--- libdrm-2.4.5.orig/libdrm/nouveau/Makefile.am 2009-02-11 10:09:35.000000000 +1000
|
index 023c6be..66466e3 100644
|
||||||
+++ libdrm-2.4.5/libdrm/nouveau/Makefile.am 2009-03-25 09:06:49.000000000 +1000
|
--- a/libdrm/nouveau/nouveau_bo.c
|
||||||
@@ -19,7 +19,9 @@
|
+++ b/libdrm/nouveau/nouveau_bo.c
|
||||||
nouveau_bo.c \
|
@@ -404,7 +404,8 @@ nouveau_bo_handle_ref(struct nouveau_device *dev, uint32_t handle,
|
||||||
nouveau_resource.c \
|
nvbo->size = req.size;
|
||||||
nouveau_dma.c \
|
nvbo->handle = req.handle;
|
||||||
- nouveau_fence.c
|
|
||||||
+ nouveau_fence.c \
|
|
||||||
+ nouveau_dma.h \
|
|
||||||
+ nouveau_private.h
|
|
||||||
|
|
||||||
libdrm_nouveaucommonincludedir = ${includedir}/nouveau
|
|
||||||
libdrm_nouveaucommoninclude_HEADERS = \
|
|
||||||
diff -Nur libdrm-2.4.5.orig/libdrm/nouveau/nouveau_bo.c libdrm-2.4.5/libdrm/nouveau/nouveau_bo.c
|
|
||||||
--- libdrm-2.4.5.orig/libdrm/nouveau/nouveau_bo.c 2009-02-11 10:09:35.000000000 +1000
|
|
||||||
+++ libdrm-2.4.5/libdrm/nouveau/nouveau_bo.c 2009-03-25 09:06:20.000000000 +1000
|
|
||||||
@@ -347,24 +347,25 @@
|
|
||||||
if (!bo || !handle)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
- if (!nvdev->mm_enabled)
|
|
||||||
- return -ENODEV;
|
|
||||||
-
|
|
||||||
if (!nvbo->global_handle) {
|
|
||||||
struct drm_gem_flink req;
|
|
||||||
|
|
||||||
ret = nouveau_bo_kalloc(nvbo, NULL);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
-
|
|
||||||
- req.handle = nvbo->handle;
|
|
||||||
- ret = ioctl(nvdev->fd, DRM_IOCTL_GEM_FLINK, &req);
|
|
||||||
- if (ret) {
|
|
||||||
- nouveau_bo_kfree(nvbo);
|
|
||||||
- return ret;
|
|
||||||
+
|
|
||||||
+ if (nvdev->mm_enabled) {
|
|
||||||
+ req.handle = nvbo->handle;
|
|
||||||
+ ret = ioctl(nvdev->fd, DRM_IOCTL_GEM_FLINK, &req);
|
|
||||||
+ if (ret) {
|
|
||||||
+ nouveau_bo_kfree(nvbo);
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ nvbo->global_handle = req.name;
|
|
||||||
+ } else {
|
|
||||||
+ nvbo->global_handle = nvbo->offset;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- nvbo->global_handle = req.name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*handle = nvbo->global_handle;
|
|
||||||
@@ -412,6 +413,8 @@
|
|
||||||
{
|
|
||||||
struct nouveau_bo_priv *nvbo = priv;
|
|
||||||
|
|
||||||
+ nouveau_fence_ref(NULL, &nvbo->fence);
|
|
||||||
+ nouveau_fence_ref(NULL, &nvbo->wr_fence);
|
|
||||||
nouveau_bo_kfree(nvbo);
|
|
||||||
free(nvbo);
|
|
||||||
}
|
|
||||||
diff -Nur libdrm-2.4.5.orig/libdrm/nouveau/nouveau_device.c libdrm-2.4.5/libdrm/nouveau/nouveau_device.c
|
|
||||||
--- libdrm-2.4.5.orig/libdrm/nouveau/nouveau_device.c 2009-02-22 03:54:48.000000000 +1000
|
|
||||||
+++ libdrm-2.4.5/libdrm/nouveau/nouveau_device.c 2009-03-25 09:06:21.000000000 +1000
|
|
||||||
@@ -76,6 +76,22 @@
|
|
||||||
}
|
|
||||||
nvdev->base.vm_vram_base = value;
|
|
||||||
|
|
||||||
+ ret = nouveau_device_get_param(&nvdev->base,
|
|
||||||
+ NOUVEAU_GETPARAM_FB_SIZE, &value);
|
|
||||||
+ if (ret) {
|
|
||||||
+ nouveau_device_close((void *)&nvdev);
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+ nvdev->vram_aper_size = value;
|
|
||||||
+
|
|
||||||
+ ret = nouveau_device_get_param(&nvdev->base,
|
|
||||||
+ NOUVEAU_GETPARAM_AGP_SIZE, &value);
|
|
||||||
+ if (ret) {
|
|
||||||
+ nouveau_device_close((void *)&nvdev);
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+ nvdev->gart_aper_size = value;
|
|
||||||
+
|
|
||||||
ret = nouveau_bo_init(&nvdev->base);
|
|
||||||
if (ret) {
|
|
||||||
nouveau_device_close((void *)&nvdev);
|
|
||||||
@@ -128,7 +144,7 @@
|
|
||||||
{
|
|
||||||
struct nouveau_device_priv *nvdev;
|
|
||||||
|
|
||||||
- if (dev || !*dev)
|
|
||||||
+ if (!dev || !*dev)
|
|
||||||
return;
|
|
||||||
nvdev = nouveau_device(*dev);
|
|
||||||
*dev = NULL;
|
|
||||||
diff -Nur libdrm-2.4.5.orig/libdrm/nouveau/nouveau_drmif.h libdrm-2.4.5/libdrm/nouveau/nouveau_drmif.h
|
|
||||||
--- libdrm-2.4.5.orig/libdrm/nouveau/nouveau_drmif.h 2009-02-11 10:09:35.000000000 +1000
|
|
||||||
+++ libdrm-2.4.5/libdrm/nouveau/nouveau_drmif.h 2009-03-25 09:06:21.000000000 +1000
|
|
||||||
@@ -37,6 +37,9 @@
|
|
||||||
int needs_close;
|
|
||||||
|
|
||||||
int mm_enabled;
|
|
||||||
+/*XXX: move to nouveau_device when interface gets bumped */
|
|
||||||
+ uint64_t vram_aper_size;
|
|
||||||
+ uint64_t gart_aper_size;
|
|
||||||
};
|
|
||||||
#define nouveau_device(n) ((struct nouveau_device_priv *)(n))
|
|
||||||
|
|
||||||
diff -Nur libdrm-2.4.5.orig/libdrm/nouveau/nouveau_fence.c libdrm-2.4.5/libdrm/nouveau/nouveau_fence.c
|
|
||||||
--- libdrm-2.4.5.orig/libdrm/nouveau/nouveau_fence.c 2009-02-11 10:09:35.000000000 +1000
|
|
||||||
+++ libdrm-2.4.5/libdrm/nouveau/nouveau_fence.c 2009-03-25 09:06:21.000000000 +1000
|
|
||||||
@@ -96,22 +96,16 @@
|
|
||||||
int
|
|
||||||
nouveau_fence_ref(struct nouveau_fence *ref, struct nouveau_fence **fence)
|
|
||||||
{
|
|
||||||
- struct nouveau_fence_priv *nvfence;
|
|
||||||
-
|
-
|
||||||
if (!fence)
|
+
|
||||||
return -EINVAL;
|
+ nvbo->base.handle = nvbo->handle;
|
||||||
|
|
||||||
- if (*fence) {
|
|
||||||
- nouveau_fence_del(fence);
|
|
||||||
- *fence = NULL;
|
|
||||||
- }
|
|
||||||
+ if (ref)
|
|
||||||
+ nouveau_fence(ref)->refcount++;
|
|
||||||
|
|
||||||
- if (ref) {
|
|
||||||
- nvfence = nouveau_fence(ref);
|
|
||||||
- nvfence->refcount++;
|
|
||||||
- *fence = &nvfence->base;
|
|
||||||
- }
|
|
||||||
+ if (*fence)
|
|
||||||
+ nouveau_fence_del(fence);
|
|
||||||
|
|
||||||
+ *fence = ref;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/libdrm/nouveau/nouveau_dma.c b/libdrm/nouveau/nouveau_dma.c
|
||||||
|
index 23da64b..b084f70 100644
|
||||||
|
--- a/libdrm/nouveau/nouveau_dma.c
|
||||||
|
+++ b/libdrm/nouveau/nouveau_dma.c
|
||||||
|
@@ -41,6 +41,7 @@ WRITE_PUT(struct nouveau_channel_priv *nvchan, uint32_t val)
|
||||||
|
volatile int dum;
|
||||||
|
|
||||||
|
NOUVEAU_DMA_BARRIER;
|
||||||
|
+ dum = nvchan->pushbuf[0];
|
||||||
|
dum = READ_GET(nvchan);
|
||||||
|
|
||||||
|
*nvchan->put = put;
|
||||||
|
Loading…
Reference in New Issue
Block a user