diff --git a/patch.sh b/patch.sh
index 0cb887a23de3a6811c0e0d2a7bb1ee2b607bb2ce..df743a3f07813bf28bb5e99a56d44ab3ace57e5a 100644
--- a/patch.sh
+++ b/patch.sh
@@ -77,6 +77,10 @@ echo "[git] testing omapdrm"
 echo "[git] pulling cma driver"
 git pull git://github.com/RobertCNelson/linux.git cma-v22_v3.3-rc4
 
+echo "adding fixes from cma-v23 (cma tree was rebased for-next v3.4)"
+git am "${DIR}/patches/drm/0001-cma-23-mm-compaction-export-some-of-the-functions.patch"
+git am "${DIR}/patches/drm/0002-cma-23-drivers-add-Contiguous-Memory-Allocator.patch"
+
 echo "[git] pulling omapdrm driver"
 git pull git://github.com/RobertCNelson/linux.git omapdrm_v3.3-rc4
 
diff --git a/patches/drm/0001-cma-23-mm-compaction-export-some-of-the-functions.patch b/patches/drm/0001-cma-23-mm-compaction-export-some-of-the-functions.patch
new file mode 100644
index 0000000000000000000000000000000000000000..e32fa7806af0ef3230f682051874954752033296
--- /dev/null
+++ b/patches/drm/0001-cma-23-mm-compaction-export-some-of-the-functions.patch
@@ -0,0 +1,26 @@
+From 59744f97e8b97ab06697b3f2bfa22f855c07034e Mon Sep 17 00:00:00 2001
+From: Robert Nelson <robertcnelson@gmail.com>
+Date: Fri, 24 Feb 2012 11:27:27 -0600
+Subject: [PATCH 1/2] cma-23 mm: compaction: export some of the functions
+
+Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
+---
+ mm/internal.h |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/mm/internal.h b/mm/internal.h
+index 55e7eed..aee4761 100644
+--- a/mm/internal.h
++++ b/mm/internal.h
+@@ -121,7 +121,7 @@ struct compact_control {
+ 	unsigned long migrate_pfn;	/* isolate_migratepages search base */
+ 	bool sync;			/* Synchronous migration */
+ 
+-	unsigned int order;		/* order a direct compactor needs */
++	int order;			/* order a direct compactor needs */
+ 	int migratetype;		/* MOVABLE, RECLAIMABLE etc */
+ 	struct zone *zone;
+ };
+-- 
+1.7.9
+
diff --git a/patches/drm/0002-cma-23-drivers-add-Contiguous-Memory-Allocator.patch b/patches/drm/0002-cma-23-drivers-add-Contiguous-Memory-Allocator.patch
new file mode 100644
index 0000000000000000000000000000000000000000..2df1772bd82413998f0d175cd768dcce7e28026a
--- /dev/null
+++ b/patches/drm/0002-cma-23-drivers-add-Contiguous-Memory-Allocator.patch
@@ -0,0 +1,26 @@
+From 7c5c6485fa04d7a1a7689aca74f6c9a6f76c78ec Mon Sep 17 00:00:00 2001
+From: Robert Nelson <robertcnelson@gmail.com>
+Date: Fri, 24 Feb 2012 11:32:19 -0600
+Subject: [PATCH 2/2] cma-23 drivers: add Contiguous Memory Allocator
+
+Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
+---
+ drivers/base/dma-contiguous.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c
+index 6130787..78efb03 100644
+--- a/drivers/base/dma-contiguous.c
++++ b/drivers/base/dma-contiguous.c
+@@ -390,7 +390,7 @@ bool dma_release_from_contiguous(struct device *dev, struct page *pages,
+ 	if (pfn < cma->base_pfn || pfn >= cma->base_pfn + cma->count)
+ 		return false;
+ 
+-	VM_BUG_ON(pfn + count > cma->base_pfn);
++	VM_BUG_ON(pfn + count > cma->base_pfn + cma->count);
+ 
+ 	mutex_lock(&cma_mutex);
+ 	bitmap_clear(cma->bitmap, pfn - cma->base_pfn, count);
+-- 
+1.7.9
+