rpms/kernel/F-11 drm-intel-gem-use-dma32-on-pae.patch, NONE, 1.1 agp-set_memory_ucwb.patch, 1.1, 1.2 kernel.spec, 1.1614, 1.1615

Kyle McMartin kyle at fedoraproject.org
Wed May 20 13:51:38 UTC 2009


Author: kyle

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

Modified Files:
	agp-set_memory_ucwb.patch kernel.spec 
Added Files:
	drm-intel-gem-use-dma32-on-pae.patch 
Log Message:
* Tue May 19 2009 Kyle McMartin <kyle at redhat.com> 2.6.29.3-153
- drm-intel-gem-use-dma32-on-pae.patch: Force GEM allocations to be DMA32
  when using PAE. This should fix bz#493526. Leave the gfp flags for every
  other chipset (radeon, really...) unset so we don't fribble the flags.


drm-intel-gem-use-dma32-on-pae.patch:

--- NEW FILE drm-intel-gem-use-dma32-on-pae.patch ---
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 4984aa8..ae52edc 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -142,6 +142,9 @@ drm_gem_object_alloc(struct drm_device *dev, size_t size)
 		return NULL;
 	}
 
+	if (dev->gem_flags)
+		mapping_set_gfp_mask(obj->filp->f_mapping, dev->gem_flags);
+
 	kref_init(&obj->refcount);
 	kref_init(&obj->handlecount);
 	obj->size = size;
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 8161343..049fc3f 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1145,12 +1145,12 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
 	}
 
 #ifdef CONFIG_HIGHMEM64G
-	/* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
-	dev_priv->has_gem = 0;
-#else
+	/* set default allocation flags */
+	dev->gem_flags = GFP_USER | GFP_DMA32;
+#endif
+
 	/* enable GEM by default, except on I8xx */
 	dev_priv->has_gem = !IS_I8XX(dev) ? 1 : 0;
-#endif
 
 	dev->driver->get_vblank_counter = i915_get_vblank_counter;
 	if (IS_GM45(dev))
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 04fbd1e..018534b 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1043,6 +1043,7 @@ struct drm_device {
 	uint32_t gtt_total;
 	uint32_t invalidate_domains;    /* domains pending invalidation */
 	uint32_t flush_domains;         /* domains pending flush */
+	gfp_t gem_flags;		/* object allocation flags */
 	/*@} */
 };
 
diff --git a/mm/shmem.c b/mm/shmem.c
index 4103a23..515bb1b 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1226,7 +1226,7 @@ repeat:
 		 * Try to preload while we can wait, to not make a habit of
 		 * draining atomic reserves; but don't latch on to this cpu.
 		 */
-		error = radix_tree_preload(gfp & ~__GFP_HIGHMEM);
+		error = radix_tree_preload(gfp & ~(__GFP_HIGHMEM|__GFP_DMA32));
 		if (error)
 			goto failed;
 		radix_tree_preload_end();

agp-set_memory_ucwb.patch:

Index: agp-set_memory_ucwb.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/agp-set_memory_ucwb.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- agp-set_memory_ucwb.patch	27 Feb 2009 03:12:57 -0000	1.1
+++ agp-set_memory_ucwb.patch	20 May 2009 13:51:37 -0000	1.2
@@ -52,15 +52,3 @@ index 97e8b41..aeeaf68 100644
  		page = virt_to_page(addr);
  
  #ifndef CONFIG_X86
-diff -up linux-2.6.28.noarch/drivers/gpu/drm/i915/i915_dma.c.dma linux-2.6.28.noarch/drivers/gpu/drm/i915/i915_dma.c
---- linux-2.6.28.noarch/drivers/gpu/drm/i915/i915_dma.c.dma	2009-02-27 13:11:03.000000000 +1000
-+++ linux-2.6.28.noarch/drivers/gpu/drm/i915/i915_dma.c	2009-02-27 13:11:11.000000000 +1000
-@@ -1104,7 +1104,7 @@ int i915_driver_load(struct drm_device *
- 			 "performance may suffer.\n");
- 	}
- 
--#ifdef CONFIG_HIGHMEM64G
-+#if 0 /* Fedora has AGP workaround patch */
- 	/* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
- 	dev_priv->has_gem = 0;
- #else


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1614
retrieving revision 1.1615
diff -u -p -r1.1614 -r1.1615
--- kernel.spec	19 May 2009 16:53:48 -0000	1.1614
+++ kernel.spec	20 May 2009 13:51:37 -0000	1.1615
@@ -701,6 +701,7 @@ Patch1828: drm-intel-debugfs-ringbuffer.
 Patch1829: drm-edid-ignore-tiny-modes.patch
 Patch1830: linux-2.6.29.3-boot-vga.patch
 Patch1831: drm-intel-include-965gme-pci-id.patch
+Patch1832: drm-intel-gem-use-dma32-on-pae.patch
 
 # kludge to make ich9 e1000 work
 Patch2000: linux-2.6-e1000-ich9.patch
@@ -1369,6 +1370,7 @@ ApplyPatch drm-intel-debugfs-ringbuffer.
 ApplyPatch drm-edid-ignore-tiny-modes.patch
 ApplyPatch drm-intel-include-965gme-pci-id.patch
 ApplyPatch linux-2.6.29.3-boot-vga.patch
+ApplyPatch drm-intel-gem-use-dma32-on-pae.patch
 
 # linux1394 git patches
 ApplyPatch linux-2.6-firewire-git-update.patch
@@ -1993,6 +1995,13 @@ fi
 # and build.
 
 %changelog
+* Tue May 19 2009 Kyle McMartin <kyle at redhat.com> 2.6.29.3-153
+- drm-intel-gem-use-dma32-on-pae.patch: Force GEM allocations to be DMA32
+  when using PAE. This should fix bz#493526. Leave the gfp flags for every
+  other chipset (radeon, really...) unset so we don't fribble the flags.
+- agp-set_memory_ucwb.patch: comment out rejecting hunk that's no longer
+  necessary (forcing gem on with highmem64g.)
+
 * Tue May 19 2009 Kyle McMartin <kyle at redhat.com> 2.6.29.3-151
 - net-revert-forcedeth-power-down-phy-when-interface-is.patch: revert only
   hunks that powered down the phy. fixes rhbz#501249.




More information about the scm-commits mailing list