rpms/libdrm/F-12 libdrm-nouveau-restart-pushbuf.patch, NONE, 1.1 libdrm.spec, 1.89, 1.90

Ben Skeggs bskeggs at fedoraproject.org
Tue Oct 27 07:55:34 UTC 2009


Author: bskeggs

Update of /cvs/pkgs/rpms/libdrm/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15427

Modified Files:
	libdrm.spec 
Added Files:
	libdrm-nouveau-restart-pushbuf.patch 
Log Message:
* Tue Oct 27 2009 Ben Skeggs <bskeggs at redhat.com> 2.4.15-2
- nouveau: retry pushbuf ioctl if interrupted by signal



libdrm-nouveau-restart-pushbuf.patch:
 nouveau_pushbuf.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- NEW FILE libdrm-nouveau-restart-pushbuf.patch ---
>From 67628aa39dd74807989492af5451a3a5c0232e39 Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs at redhat.com>
Date: Tue, 20 Oct 2009 12:57:46 +1000
Subject: [PATCH] nouveau: retry if pushbuf ioctl interrupted by signal

Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
---
 libdrm/nouveau/nouveau_pushbuf.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libdrm/nouveau/nouveau_pushbuf.c b/libdrm/nouveau/nouveau_pushbuf.c
index 1192e22..fbcddd7 100644
--- a/libdrm/nouveau/nouveau_pushbuf.c
+++ b/libdrm/nouveau/nouveau_pushbuf.c
@@ -270,6 +270,7 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan, unsigned min)
 		if (nvpb->base.remaining > 2) /* space() will fixup if not */
 			nvpb->base.remaining -= 2;
 
+restart_cal:
 		req.channel = chan->id;
 		req.handle = nvpb->buffer[nvpb->current]->handle;
 		req.offset = nvpb->current_offset * 4;
@@ -284,12 +285,15 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan, unsigned min)
 		ret = drmCommandWriteRead(nvdev->fd,
 					  DRM_NOUVEAU_GEM_PUSHBUF_CALL,
 					  &req, sizeof(req));
+		if (ret == -EAGAIN)
+			goto restart_cal;
 		nvpb->cal_suffix0 = req.suffix0;
 		nvpb->cal_suffix1 = req.suffix1;
 		assert(ret == 0);
 	} else {
 		struct drm_nouveau_gem_pushbuf req;
 
+restart_push:
 		req.channel = chan->id;
 		req.nr_dwords = nvpb->size - nvpb->base.remaining;
 		req.dwords = (uint64_t)(unsigned long)nvpb->pushbuf;
@@ -299,6 +303,8 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan, unsigned min)
 		req.relocs = (uint64_t)(unsigned long)nvpb->relocs;
 		ret = drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GEM_PUSHBUF,
 				      &req, sizeof(req));
+		if (ret == -EAGAIN)
+			goto restart_push;
 		assert(ret == 0);
 	}
 
-- 
1.6.5.1



Index: libdrm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libdrm/F-12/libdrm.spec,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -p -r1.89 -r1.90
--- libdrm.spec	9 Oct 2009 05:40:38 -0000	1.89
+++ libdrm.spec	27 Oct 2009 07:55:34 -0000	1.90
@@ -3,7 +3,7 @@
 Summary: Direct Rendering Manager runtime library
 Name: libdrm
 Version: 2.4.15
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: MIT
 Group: System Environment/Libraries
 URL: http://dri.sourceforge.net
@@ -29,6 +29,8 @@ Patch4: libdrm-2.4.0-no-bc.patch
 
 Patch5: libdrm-page-flip.patch
 
+# nouveau: retry pushbuf ioctl if interrupted by signal
+Patch6: libdrm-nouveau-restart-pushbuf.patch
 
 %description
 Direct Rendering Manager runtime library
@@ -49,6 +51,7 @@ Direct Rendering Manager development pac
 %patch3 -p1 -b .forceperms
 %patch4 -p1 -b .no-bc
 %patch5 -p1 -b .page-flip
+%patch6 -p1 -b .nouveau-pbrestart
 
 %build
 autoreconf -v --install || exit 1
@@ -108,6 +111,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/libdrm_nouveau.pc
 
 %changelog
+* Tue Oct 27 2009 Ben Skeggs <bskeggs at redhat.com> 2.4.15-2
+- nouveau: retry pushbuf ioctl if interrupted by signal
+
 * Fri Oct 09 2009 Dave Airlie <airlied at redhat.com> 2.4.15-1
 - rebase to latest upstream release
 




More information about the scm-commits mailing list