rpms/kernel/F-11 drm-radeon-cs-oops-fix.patch, NONE, 1.1 kernel.spec, 1.1654, 1.1655

Dave Airlie airlied at fedoraproject.org
Wed Jun 17 23:43:35 UTC 2009


Author: airlied

Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11045

Modified Files:
	kernel.spec 
Added Files:
	drm-radeon-cs-oops-fix.patch 
Log Message:
* Thu Jun 18 2009 Dave Airlie <airlied at redhat.com> 2.6.29.5-193
- drm-radeon-cs-oops-fix.patch: fix oops if CS path called from non-kms


drm-radeon-cs-oops-fix.patch:

--- NEW FILE drm-radeon-cs-oops-fix.patch ---
diff -up linux-2.6.29.noarch/drivers/gpu/drm/radeon/radeon_cs.c.dma linux-2.6.29.noarch/drivers/gpu/drm/radeon/radeon_cs.c
--- linux-2.6.29.noarch/drivers/gpu/drm/radeon/radeon_cs.c.dma	2009-06-18 09:36:58.000000000 +1000
+++ linux-2.6.29.noarch/drivers/gpu/drm/radeon/radeon_cs.c	2009-06-18 09:39:11.000000000 +1000
@@ -41,22 +41,28 @@ int radeon_cs_ioctl(struct drm_device *d
 	long size;
 	int r, i;
 
+	if (dev_priv == NULL) {
+		DRM_ERROR("called with no initialization\n");
+		return -EINVAL;
+	}
+
+	if (!drm_core_check_feature(dev, DRIVER_MODESET)) {
+		DRM_ERROR("CS ioctl called without modesetting\n");
+		return -EINVAL;
+	}
+
 	mutex_lock(&dev_priv->cs.cs_mutex);
 	/* set command stream id to 0 which is fake id */
 	cs_id = 0;
 	cs->cs_id = cs_id;
 
-	if (dev_priv == NULL) {
-		DRM_ERROR("called with no initialization\n");
-		mutex_unlock(&dev_priv->cs.cs_mutex);
-		return -EINVAL;
 	}
+
 	if (!cs->num_chunks) {
 		mutex_unlock(&dev_priv->cs.cs_mutex);
 		return 0;
 	}
 
-
 	chunk_array = drm_calloc(cs->num_chunks, sizeof(uint64_t), DRM_MEM_DRIVER);
 	if (!chunk_array) {
 		mutex_unlock(&dev_priv->cs.cs_mutex);


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1654
retrieving revision 1.1655
diff -u -p -r1.1654 -r1.1655
--- kernel.spec	17 Jun 2009 18:04:57 -0000	1.1654
+++ kernel.spec	17 Jun 2009 23:43:04 -0000	1.1655
@@ -727,6 +727,7 @@ Patch1842: drm-radeon-new-pciids.patch
 Patch1843: drm-dont-frob-i2c.patch
 Patch1844: drm-connector-dpms-fix.patch
 Patch1845: drm-intel-tv-fix.patch
+Patch1846: drm-radeon-cs-oops-fix.patch
 
 # kludge to make ich9 e1000 work
 Patch2000: linux-2.6-e1000-ich9.patch
@@ -1429,6 +1430,7 @@ ApplyPatch drm-radeon-new-pciids.patch
 ApplyPatch drm-dont-frob-i2c.patch
 ApplyPatch drm-connector-dpms-fix.patch
 ApplyPatch drm-intel-tv-fix.patch
+ApplyPatch drm-radeon-cs-oops-fix.patch
 
 # linux1394 git patches
 ApplyPatch linux-2.6-firewire-git-update.patch
@@ -2068,6 +2070,9 @@ fi
 # and build.
 
 %changelog
+* Thu Jun 18 2009 Dave Airlie <airlied at redhat.com> 2.6.29.5-193
+- drm-radeon-cs-oops-fix.patch: fix oops if CS path called from non-kms
+
 * Wed Jun 17 2009 Jarod Wilson <jarod at redhat.com>
 - New lirc_imon hotness:
   * support dual-interface devices with a single lirc device




More information about the fedora-extras-commits mailing list