diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2013-03-30 00:53:58 +0100 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2013-03-30 01:06:36 +0100 |
commit | 44706a520f6527c67e7f8b741812f11464babda2 (patch) | |
tree | ceba8de9f18d05fea9bb4d337391ed79a2bc7cf4 /patches/collateral-evolutions/drm | |
parent | 5bf870f42dc0cf3e31522e05119c0a8f993a280e (diff) |
split patches
This splits all patches into per-file patches. I've added the little
tool I wrote as well (but it's hard to use).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'patches/collateral-evolutions/drm')
88 files changed, 1171 insertions, 1171 deletions
diff --git a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch.patch b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/INFO index ae1b2cb3..cb9dd679 100644 --- a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch.patch +++ b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/INFO @@ -42,14 +42,3 @@ Date: Tue Mar 26 09:25:45 2013 -0700 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> ---- a/drivers/gpu/drm/i915/intel_fb.c -+++ b/drivers/gpu/drm/i915/intel_fb.c -@@ -151,7 +151,7 @@ static int intelfb_create(struct drm_fb_ - info->screen_size = size; - - /* This driver doesn't need a VT switch to restore the mode on resume */ -- info->skip_vt_switch = true; -+ fb_enable_skip_vt_switch(info); - - drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); - drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); diff --git a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.c b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.c new file mode 100644 index 00000000..2038f562 --- /dev/null +++ b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.c @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/i915/intel_fb.c ++++ b/drivers/gpu/drm/i915/intel_fb.c +@@ -151,7 +151,7 @@ + info->screen_size = size; + + /* This driver doesn't need a VT switch to restore the mode on resume */ +- info->skip_vt_switch = true; ++ fb_enable_skip_vt_switch(info); + + drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); + drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); diff --git a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition.patch b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition.patch deleted file mode 100644 index 3493e12b..00000000 --- a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition.patch +++ /dev/null @@ -1,41 +0,0 @@ -Assign vmap, vunmap and mmap fields in dma_buf_ops structs only -if kernel version >= 3.5.0 as they are added in 3.5. The begin_cpu_access -was added as of the original dma-buf code via 3.4. - -mcgrof@frijol ~/linux-next (git::master)$ git describe --contains fc13020e086bfedf2afb95c91c026d5af1f80107 -v3.4-rc1~57^2~3 - -Note that the dma-buf itself was added with 3.4. It is not available -on kernels < 3.4. - ---- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c -+++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c -@@ -216,10 +216,14 @@ static const struct dma_buf_ops i915_dma - .kmap_atomic = i915_gem_dmabuf_kmap_atomic, - .kunmap = i915_gem_dmabuf_kunmap, - .kunmap_atomic = i915_gem_dmabuf_kunmap_atomic, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .mmap = i915_gem_dmabuf_mmap, - .vmap = i915_gem_dmabuf_vmap, - .vunmap = i915_gem_dmabuf_vunmap, -+#endif -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - .begin_cpu_access = i915_gem_begin_cpu_access, -+#endif - }; - - struct dma_buf *i915_gem_prime_export(struct drm_device *dev, ---- a/drivers/gpu/drm/drm_prime.c -+++ b/drivers/gpu/drm/drm_prime.c -@@ -152,9 +152,11 @@ static const struct dma_buf_ops drm_gem_ - .kmap_atomic = drm_gem_dmabuf_kmap_atomic, - .kunmap = drm_gem_dmabuf_kunmap, - .kunmap_atomic = drm_gem_dmabuf_kunmap_atomic, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .mmap = drm_gem_dmabuf_mmap, - .vmap = drm_gem_dmabuf_vmap, - .vunmap = drm_gem_dmabuf_vunmap, -+#endif - }; - - /** diff --git a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/INFO b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/INFO new file mode 100644 index 00000000..d46c6b1b --- /dev/null +++ b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/INFO @@ -0,0 +1,10 @@ +Assign vmap, vunmap and mmap fields in dma_buf_ops structs only +if kernel version >= 3.5.0 as they are added in 3.5. The begin_cpu_access +was added as of the original dma-buf code via 3.4. + +mcgrof@frijol ~/linux-next (git::master)$ git describe --contains fc13020e086bfedf2afb95c91c026d5af1f80107 +v3.4-rc1~57^2~3 + +Note that the dma-buf itself was added with 3.4. It is not available +on kernels < 3.4. + diff --git a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_drm_prime.c b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_drm_prime.c new file mode 100644 index 00000000..cb332cac --- /dev/null +++ b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_drm_prime.c @@ -0,0 +1,14 @@ +--- a/drivers/gpu/drm/drm_prime.c ++++ b/drivers/gpu/drm/drm_prime.c +@@ -152,9 +152,11 @@ + .kmap_atomic = drm_gem_dmabuf_kmap_atomic, + .kunmap = drm_gem_dmabuf_kunmap, + .kunmap_atomic = drm_gem_dmabuf_kunmap_atomic, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .mmap = drm_gem_dmabuf_mmap, + .vmap = drm_gem_dmabuf_vmap, + .vunmap = drm_gem_dmabuf_vunmap, ++#endif + }; + + /** diff --git a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_i915_i915_gem_dmabuf.c b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_i915_i915_gem_dmabuf.c new file mode 100644 index 00000000..48a25377 --- /dev/null +++ b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_i915_i915_gem_dmabuf.c @@ -0,0 +1,17 @@ +--- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c ++++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c +@@ -216,10 +216,14 @@ + .kmap_atomic = i915_gem_dmabuf_kmap_atomic, + .kunmap = i915_gem_dmabuf_kunmap, + .kunmap_atomic = i915_gem_dmabuf_kunmap_atomic, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .mmap = i915_gem_dmabuf_mmap, + .vmap = i915_gem_dmabuf_vmap, + .vunmap = i915_gem_dmabuf_vunmap, ++#endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + .begin_cpu_access = i915_gem_begin_cpu_access, ++#endif + }; + + struct dma_buf *i915_gem_prime_export(struct drm_device *dev, diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap.patch b/patches/collateral-evolutions/drm/02-revert-vm_mmap.patch deleted file mode 100644 index 81fc1cc9..00000000 --- a/patches/collateral-evolutions/drm/02-revert-vm_mmap.patch +++ /dev/null @@ -1,94 +0,0 @@ -vm_mmap() and vm_munmap() were introduced in kernels >= 3.4.0. Revert -those changes for versions older than that. - -These can't be backported as they rely on non-exported symbols. - ---- a/drivers/gpu/drm/drm_bufs.c -+++ b/drivers/gpu/drm/drm_bufs.c -@@ -1541,6 +1541,20 @@ int drm_mapbufs(struct drm_device *dev, - retcode = -EINVAL; - goto done; - } -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ virtual = do_mmap(file_priv->filp, 0, map->size, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED, -+ token); -+ up_write(¤t->mm->mmap_sem); -+ } else { -+ down_write(¤t->mm->mmap_sem); -+ virtual = do_mmap(file_priv->filp, 0, dma->byte_count, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED, 0); -+ up_write(¤t->mm->mmap_sem); -+#else - virtual = vm_mmap(file_priv->filp, 0, map->size, - PROT_READ | PROT_WRITE, - MAP_SHARED, -@@ -1549,6 +1563,7 @@ int drm_mapbufs(struct drm_device *dev, - virtual = vm_mmap(file_priv->filp, 0, dma->byte_count, - PROT_READ | PROT_WRITE, - MAP_SHARED, 0); -+#endif - } - if (virtual > -1024UL) { - /* Real error */ ---- a/drivers/gpu/drm/i810/i810_dma.c -+++ b/drivers/gpu/drm/i810/i810_dma.c -@@ -135,9 +135,17 @@ static int i810_map_buffer(struct drm_bu - old_fops = file_priv->filp->f_op; - file_priv->filp->f_op = &i810_buffer_fops; - dev_priv->mmap_buffer = buf; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ buf_priv->virtual = (void *)do_mmap(file_priv->filp, 0, buf->total, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED, buf->bus_address); -+ up_write(¤t->mm->mmap_sem); -+#else - buf_priv->virtual = (void *)vm_mmap(file_priv->filp, 0, buf->total, - PROT_READ | PROT_WRITE, - MAP_SHARED, buf->bus_address); -+#endif - dev_priv->mmap_buffer = NULL; - file_priv->filp->f_op = old_fops; - if (IS_ERR(buf_priv->virtual)) { -@@ -158,9 +166,15 @@ static int i810_unmap_buffer(struct drm_ - if (buf_priv->currently_mapped != I810_BUF_MAPPED) - return -EINVAL; - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ retcode = do_munmap(current->mm, (unsigned long)buf_priv->virtual, -+ (size_t) buf->total); -+ up_write(¤t->mm->mmap_sem); -+#else - retcode = vm_munmap((unsigned long)buf_priv->virtual, - (size_t) buf->total); -- -+#endif - buf_priv->currently_mapped = I810_BUF_UNMAPPED; - buf_priv->virtual = NULL; - ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -1294,10 +1294,17 @@ i915_gem_mmap_ioctl(struct drm_device *d - drm_gem_object_unreference_unlocked(obj); - return -EINVAL; - } -- -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ addr = do_mmap(obj->filp, 0, args->size, -+ PROT_READ | PROT_WRITE, MAP_SHARED, -+ args->offset); -+ up_write(¤t->mm->mmap_sem); -+#else - addr = vm_mmap(obj->filp, 0, args->size, - PROT_READ | PROT_WRITE, MAP_SHARED, - args->offset); -+#endif - drm_gem_object_unreference_unlocked(obj); - if (IS_ERR((void *)addr)) - return addr; diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO b/patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO new file mode 100644 index 00000000..977b4b79 --- /dev/null +++ b/patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO @@ -0,0 +1,5 @@ +vm_mmap() and vm_munmap() were introduced in kernels >= 3.4.0. Revert +those changes for versions older than that. + +These can't be backported as they rely on non-exported symbols. + diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.c b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.c new file mode 100644 index 00000000..af4681c3 --- /dev/null +++ b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.c @@ -0,0 +1,31 @@ +--- a/drivers/gpu/drm/drm_bufs.c ++++ b/drivers/gpu/drm/drm_bufs.c +@@ -1541,6 +1541,20 @@ + retcode = -EINVAL; + goto done; + } ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) ++ down_write(¤t->mm->mmap_sem); ++ virtual = do_mmap(file_priv->filp, 0, map->size, ++ PROT_READ | PROT_WRITE, ++ MAP_SHARED, ++ token); ++ up_write(¤t->mm->mmap_sem); ++ } else { ++ down_write(¤t->mm->mmap_sem); ++ virtual = do_mmap(file_priv->filp, 0, dma->byte_count, ++ PROT_READ | PROT_WRITE, ++ MAP_SHARED, 0); ++ up_write(¤t->mm->mmap_sem); ++#else + virtual = vm_mmap(file_priv->filp, 0, map->size, + PROT_READ | PROT_WRITE, + MAP_SHARED, +@@ -1549,6 +1563,7 @@ + virtual = vm_mmap(file_priv->filp, 0, dma->byte_count, + PROT_READ | PROT_WRITE, + MAP_SHARED, 0); ++#endif + } + if (virtual > -1024UL) { + /* Real error */ diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.c b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.c new file mode 100644 index 00000000..c27615ef --- /dev/null +++ b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.c @@ -0,0 +1,37 @@ +--- a/drivers/gpu/drm/i810/i810_dma.c ++++ b/drivers/gpu/drm/i810/i810_dma.c +@@ -135,9 +135,17 @@ + old_fops = file_priv->filp->f_op; + file_priv->filp->f_op = &i810_buffer_fops; + dev_priv->mmap_buffer = buf; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) ++ down_write(¤t->mm->mmap_sem); ++ buf_priv->virtual = (void *)do_mmap(file_priv->filp, 0, buf->total, ++ PROT_READ | PROT_WRITE, ++ MAP_SHARED, buf->bus_address); ++ up_write(¤t->mm->mmap_sem); ++#else + buf_priv->virtual = (void *)vm_mmap(file_priv->filp, 0, buf->total, + PROT_READ | PROT_WRITE, + MAP_SHARED, buf->bus_address); ++#endif + dev_priv->mmap_buffer = NULL; + file_priv->filp->f_op = old_fops; + if (IS_ERR(buf_priv->virtual)) { +@@ -158,9 +166,15 @@ + if (buf_priv->currently_mapped != I810_BUF_MAPPED) + return -EINVAL; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) ++ down_write(¤t->mm->mmap_sem); ++ retcode = do_munmap(current->mm, (unsigned long)buf_priv->virtual, ++ (size_t) buf->total); ++ up_write(¤t->mm->mmap_sem); ++#else + retcode = vm_munmap((unsigned long)buf_priv->virtual, + (size_t) buf->total); +- ++#endif + buf_priv->currently_mapped = I810_BUF_UNMAPPED; + buf_priv->virtual = NULL; + diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i915_i915_gem.c b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i915_i915_gem.c new file mode 100644 index 00000000..d29b39b7 --- /dev/null +++ b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i915_i915_gem.c @@ -0,0 +1,21 @@ +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -1294,10 +1294,17 @@ + drm_gem_object_unreference_unlocked(obj); + return -EINVAL; + } +- ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) ++ down_write(¤t->mm->mmap_sem); ++ addr = do_mmap(obj->filp, 0, args->size, ++ PROT_READ | PROT_WRITE, MAP_SHARED, ++ args->offset); ++ up_write(¤t->mm->mmap_sem); ++#else + addr = vm_mmap(obj->filp, 0, args->size, + PROT_READ | PROT_WRITE, MAP_SHARED, + args->offset); ++#endif + drm_gem_object_unreference_unlocked(obj); + if (IS_ERR((void *)addr)) + return addr; diff --git a/patches/collateral-evolutions/drm/03-swiotlb.patch b/patches/collateral-evolutions/drm/03-swiotlb.patch deleted file mode 100644 index 8554da54..00000000 --- a/patches/collateral-evolutions/drm/03-swiotlb.patch +++ /dev/null @@ -1,83 +0,0 @@ - -swiotlb_nr_tbl() was available since 3.2 but was exported since 3.3. -Since it uses an internal global state variable, it is impossible -to backport it to compat.git. So revert the changes. - ---- a/drivers/gpu/drm/nouveau/nouveau_bo.c -+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c -@@ -1374,11 +1374,13 @@ nouveau_ttm_tt_populate(struct ttm_tt *t - } - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - return ttm_dma_populate((void *)ttm, dev->dev); - } - #endif -+#endif - - r = ttm_pool_populate(ttm); - if (r) { -@@ -1424,12 +1426,14 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt - } - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - ttm_dma_unpopulate((void *)ttm, dev->dev); - return; - } - #endif -+#endif - - for (i = 0; i < ttm->num_pages; i++) { - if (ttm_dma->dma_address[i]) { ---- a/drivers/gpu/drm/radeon/radeon_ttm.c -+++ b/drivers/gpu/drm/radeon/radeon_ttm.c -@@ -603,11 +603,13 @@ static int radeon_ttm_tt_populate(struct - } - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - return ttm_dma_populate(>t->ttm, rdev->dev); - } - #endif -+#endif - - r = ttm_pool_populate(ttm); - if (r) { -@@ -649,12 +651,14 @@ static void radeon_ttm_tt_unpopulate(str - } - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - ttm_dma_unpopulate(>t->ttm, rdev->dev); - return; - } - #endif -+#endif - - for (i = 0; i < ttm->num_pages; i++) { - if (gtt->ttm.dma_address[i]) { -@@ -877,6 +881,7 @@ static int radeon_ttm_debugfs_init(struc - radeon_mem_types_list[i].show = &ttm_page_alloc_debugfs; - radeon_mem_types_list[i].driver_features = 0; - radeon_mem_types_list[i++].data = NULL; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - sprintf(radeon_mem_types_names[i], "ttm_dma_page_pool"); -@@ -886,6 +891,7 @@ static int radeon_ttm_debugfs_init(struc - radeon_mem_types_list[i++].data = NULL; - } - #endif -+#endif - return radeon_debugfs_add_files(rdev, radeon_mem_types_list, i); - - #endif diff --git a/patches/collateral-evolutions/drm/03-swiotlb/INFO b/patches/collateral-evolutions/drm/03-swiotlb/INFO new file mode 100644 index 00000000..5b7265f0 --- /dev/null +++ b/patches/collateral-evolutions/drm/03-swiotlb/INFO @@ -0,0 +1,5 @@ + +swiotlb_nr_tbl() was available since 3.2 but was exported since 3.3. +Since it uses an internal global state variable, it is impossible +to backport it to compat.git. So revert the changes. + diff --git a/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.c b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.c new file mode 100644 index 00000000..b8dd5069 --- /dev/null +++ b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.c @@ -0,0 +1,31 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_bo.c ++++ b/drivers/gpu/drm/nouveau/nouveau_bo.c +@@ -1374,11 +1374,13 @@ + } + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + return ttm_dma_populate((void *)ttm, dev->dev); + } + #endif ++#endif + + r = ttm_pool_populate(ttm); + if (r) { +@@ -1424,12 +1426,14 @@ + } + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + ttm_dma_unpopulate((void *)ttm, dev->dev); + return; + } + #endif ++#endif + + for (i = 0; i < ttm->num_pages; i++) { + if (ttm_dma->dma_address[i]) { diff --git a/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.c b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.c new file mode 100644 index 00000000..9094dfd8 --- /dev/null +++ b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.c @@ -0,0 +1,47 @@ +--- a/drivers/gpu/drm/radeon/radeon_ttm.c ++++ b/drivers/gpu/drm/radeon/radeon_ttm.c +@@ -603,11 +603,13 @@ + } + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + return ttm_dma_populate(>t->ttm, rdev->dev); + } + #endif ++#endif + + r = ttm_pool_populate(ttm); + if (r) { +@@ -649,12 +651,14 @@ + } + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + ttm_dma_unpopulate(>t->ttm, rdev->dev); + return; + } + #endif ++#endif + + for (i = 0; i < ttm->num_pages; i++) { + if (gtt->ttm.dma_address[i]) { +@@ -877,6 +881,7 @@ + radeon_mem_types_list[i].show = &ttm_page_alloc_debugfs; + radeon_mem_types_list[i].driver_features = 0; + radeon_mem_types_list[i++].data = NULL; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + sprintf(radeon_mem_types_names[i], "ttm_dma_page_pool"); +@@ -886,6 +891,7 @@ + radeon_mem_types_list[i++].data = NULL; + } + #endif ++#endif + return radeon_debugfs_add_files(rdev, radeon_mem_types_list, i); + + #endif diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support.patch b/patches/collateral-evolutions/drm/04-revert-prime-support.patch deleted file mode 100644 index 5ceeb790..00000000 --- a/patches/collateral-evolutions/drm/04-revert-prime-support.patch +++ /dev/null @@ -1,347 +0,0 @@ -Disable PRIME support in core drm, radeon, nouveau and i915 for -kernels < 3.4.0. - -PRIME depends on dma-buf which is added to the kernel with 3.3 but -the one in 3.3 is mostly stub, e.g. it is a skeleton API which -is highly modified in 3.4. So disable PRIME for kernels < 3.4.0, -not < 3.3.0. - ---- a/drivers/gpu/drm/drm_drv.c -+++ b/drivers/gpu/drm/drm_drv.c -@@ -137,8 +137,10 @@ static struct drm_ioctl_desc drm_ioctls[ - - DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, DRM_CONTROL_ALLOW|DRM_UNLOCKED), - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_AUTH|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_AUTH|DRM_UNLOCKED), -+#endif - - DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPLANERESOURCES, drm_mode_getplane_res, DRM_CONTROL_ALLOW|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, DRM_CONTROL_ALLOW|DRM_UNLOCKED), ---- a/drivers/gpu/drm/drm_fops.c -+++ b/drivers/gpu/drm/drm_fops.c -@@ -284,8 +284,10 @@ static int drm_open_helper(struct inode - if (dev->driver->driver_features & DRIVER_GEM) - drm_gem_open(dev, priv); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (drm_core_check_feature(dev, DRIVER_PRIME)) - drm_prime_init_file_private(&priv->prime); -+#endif - - if (dev->driver->open) { - ret = dev->driver->open(dev, priv); -@@ -538,8 +540,10 @@ int drm_release(struct inode *inode, str - if (dev->driver->postclose) - dev->driver->postclose(dev, file_priv); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (drm_core_check_feature(dev, DRIVER_PRIME)) - drm_prime_destroy_file_private(&file_priv->prime); -+#endif - - put_pid(file_priv->pid); - kfree(file_priv); ---- a/drivers/gpu/drm/drm_gem.c -+++ b/drivers/gpu/drm/drm_gem.c -@@ -35,7 +35,9 @@ - #include <linux/mman.h> - #include <linux/pagemap.h> - #include <linux/shmem_fs.h> -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - #include <linux/dma-buf.h> -+#endif - #include <drm/drmP.h> - - /** @file drm_gem.c -@@ -204,6 +206,7 @@ EXPORT_SYMBOL(drm_gem_object_alloc); - static void - drm_gem_remove_prime_handles(struct drm_gem_object *obj, struct drm_file *filp) - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (obj->import_attach) { - drm_prime_remove_imported_buf_handle(&filp->prime, - obj->import_attach->dmabuf); -@@ -212,6 +215,7 @@ drm_gem_remove_prime_handles(struct drm_ - drm_prime_remove_imported_buf_handle(&filp->prime, - obj->export_dma_buf); - } -+#endif - } - - /** ---- a/drivers/gpu/drm/drm_prime.c -+++ b/drivers/gpu/drm/drm_prime.c -@@ -26,6 +26,8 @@ - * - */ - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -+ - #include <linux/export.h> - #include <linux/dma-buf.h> - #include <drm/drmP.h> -@@ -532,3 +534,4 @@ void drm_prime_remove_imported_buf_handl - mutex_unlock(&prime_fpriv->lock); - } - EXPORT_SYMBOL(drm_prime_remove_imported_buf_handle); -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ ---- a/drivers/gpu/drm/nouveau/nouveau_prime.c -+++ b/drivers/gpu/drm/nouveau/nouveau_prime.c -@@ -22,6 +22,8 @@ - * Authors: Dave Airlie - */ - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -+ - #include <drm/drmP.h> - - #include "nouveau_drm.h" -@@ -93,3 +95,4 @@ int nouveau_gem_prime_pin(struct drm_gem - - return 0; - } -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ ---- a/drivers/gpu/drm/radeon/radeon_prime.c -+++ b/drivers/gpu/drm/radeon/radeon_prime.c -@@ -23,6 +23,7 @@ - * - * Authors: Alex Deucher - */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - #include <drm/drmP.h> - - #include "radeon.h" -@@ -96,3 +97,4 @@ int radeon_gem_prime_pin(struct drm_gem_ - - return 0; - } -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ ---- a/drivers/gpu/drm/radeon/radeon_drv.c -+++ b/drivers/gpu/drm/radeon/radeon_drv.c -@@ -374,8 +374,10 @@ static const struct file_operations rade - static struct drm_driver kms_driver = { - .driver_features = - DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | -- DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_GEM | -- DRIVER_PRIME, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -+ DRIVER_PRIME | -+#endif -+ DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_GEM, - .dev_priv_size = 0, - .load = radeon_driver_load_kms, - .firstopen = radeon_driver_firstopen_kms, -@@ -410,6 +412,7 @@ static struct drm_driver kms_driver = { - .dumb_destroy = radeon_mode_dumb_destroy, - .fops = &radeon_driver_kms_fops, - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - .prime_handle_to_fd = drm_gem_prime_handle_to_fd, - .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_export = drm_gem_prime_export, -@@ -419,6 +422,7 @@ static struct drm_driver kms_driver = { - .gem_prime_import_sg_table = radeon_gem_prime_import_sg_table, - .gem_prime_vmap = radeon_gem_prime_vmap, - .gem_prime_vunmap = radeon_gem_prime_vunmap, -+#endif - - .name = DRIVER_NAME, - .desc = DRIVER_DESC, ---- a/drivers/gpu/drm/radeon/radeon_gem.c -+++ b/drivers/gpu/drm/radeon/radeon_gem.c -@@ -41,8 +41,10 @@ void radeon_gem_object_free(struct drm_g - struct radeon_bo *robj = gem_to_radeon_bo(gobj); - - if (robj) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (robj->gem_base.import_attach) - drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg); -+#endif - radeon_bo_unref(&robj); - } - } ---- a/drivers/gpu/drm/radeon/radeon_ttm.c -+++ b/drivers/gpu/drm/radeon/radeon_ttm.c -@@ -584,17 +584,21 @@ static int radeon_ttm_tt_populate(struct - struct radeon_ttm_tt *gtt = (void *)ttm; - unsigned i; - int r; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); -+#endif - - if (ttm->state != tt_unpopulated) - return 0; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (slave && ttm->sg) { - drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, - gtt->ttm.dma_address, ttm->num_pages); - ttm->state = tt_unbound; - return 0; - } -+#endif - - rdev = radeon_get_rdev(ttm->bdev); - #if __OS_HAS_AGP -@@ -638,10 +642,12 @@ static void radeon_ttm_tt_unpopulate(str - struct radeon_device *rdev; - struct radeon_ttm_tt *gtt = (void *)ttm; - unsigned i; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); - - if (slave) - return; -+#endif - - rdev = radeon_get_rdev(ttm->bdev); - #if __OS_HAS_AGP ---- a/drivers/gpu/drm/nouveau/nouveau_bo.c -+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c -@@ -1352,11 +1352,14 @@ nouveau_ttm_tt_populate(struct ttm_tt *t - struct drm_device *dev; - unsigned i; - int r; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); -+#endif - - if (ttm->state != tt_unpopulated) - return 0; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (slave && ttm->sg) { - /* make userspace faulting work */ - drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, -@@ -1364,6 +1367,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *t - ttm->state = tt_unbound; - return 0; - } -+#endif - - drm = nouveau_bdev(ttm->bdev); - dev = drm->dev; -@@ -1411,10 +1415,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt - struct nouveau_drm *drm; - struct drm_device *dev; - unsigned i; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); - - if (slave) - return; -+#endif - - drm = nouveau_bdev(ttm->bdev); - dev = drm->dev; ---- a/drivers/gpu/drm/nouveau/nouveau_drm.c -+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c -@@ -662,7 +662,10 @@ driver = { - .driver_features = - DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG | - DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | -- DRIVER_MODESET | DRIVER_PRIME, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -+ DRIVER_PRIME | -+#endif -+ DRIVER_MODESET, - - .load = nouveau_drm_load, - .unload = nouveau_drm_unload, -@@ -688,6 +691,7 @@ driver = { - .ioctls = nouveau_ioctls, - .fops = &nouveau_driver_fops, - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - .prime_handle_to_fd = drm_gem_prime_handle_to_fd, - .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_export = drm_gem_prime_export, -@@ -697,6 +701,7 @@ driver = { - .gem_prime_import_sg_table = nouveau_gem_prime_import_sg_table, - .gem_prime_vmap = nouveau_gem_prime_vmap, - .gem_prime_vunmap = nouveau_gem_prime_vunmap, -+#endif - - .gem_init_object = nouveau_gem_object_new, - .gem_free_object = nouveau_gem_object_del, ---- a/drivers/gpu/drm/nouveau/nouveau_gem.c -+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c -@@ -55,8 +55,10 @@ nouveau_gem_object_del(struct drm_gem_ob - nouveau_bo_unpin(nvbo); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (gem->import_attach) - drm_prime_gem_destroy(gem, nvbo->bo.sg); -+#endif - - ttm_bo_unref(&bo); - ---- a/drivers/gpu/drm/i915/i915_drv.c -+++ b/drivers/gpu/drm/i915/i915_drv.c -@@ -1058,7 +1058,11 @@ static struct drm_driver driver = { - */ - .driver_features = - DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR |*/ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME, -+#else -+ DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM, -+#endif - .load = i915_driver_load, - .unload = i915_driver_unload, - .open = i915_driver_open, -@@ -1081,10 +1085,12 @@ static struct drm_driver driver = { - .gem_free_object = i915_gem_free_object, - .gem_vm_ops = &i915_gem_vm_ops, - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - .prime_handle_to_fd = drm_gem_prime_handle_to_fd, - .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_export = i915_gem_prime_export, - .gem_prime_import = i915_gem_prime_import, -+#endif - - .dumb_create = i915_gem_dumb_create, - .dumb_map_offset = i915_gem_mmap_gtt, ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -34,7 +34,9 @@ - #include <linux/slab.h> - #include <linux/swap.h> - #include <linux/pci.h> -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - #include <linux/dma-buf.h> -+#endif - - static void i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj); - static void i915_gem_object_flush_cpu_write_domain(struct drm_i915_gem_object *obj); -@@ -3825,8 +3827,10 @@ void i915_gem_free_object(struct drm_gem - - BUG_ON(obj->pages); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (obj->base.import_attach) - drm_prime_gem_destroy(&obj->base, NULL); -+#endif - - drm_gem_object_release(&obj->base); - i915_gem_info_remove_obj(dev_priv, obj->base.size); ---- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c -+++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c -@@ -23,6 +23,7 @@ - * Authors: - * Dave Airlie <airlied@redhat.com> - */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - #include <drm/drmP.h> - #include "i915_drv.h" - #include <linux/dma-buf.h> -@@ -307,3 +308,4 @@ fail_detach: - dma_buf_detach(dma_buf, attach); - return ERR_PTR(ret); - } -+#endif diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/INFO b/patches/collateral-evolutions/drm/04-revert-prime-support/INFO new file mode 100644 index 00000000..94cafb7d --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/INFO @@ -0,0 +1,8 @@ +Disable PRIME support in core drm, radeon, nouveau and i915 for +kernels < 3.4.0. + +PRIME depends on dma-buf which is added to the kernel with 3.3 but +the one in 3.3 is mostly stub, e.g. it is a skeleton API which +is highly modified in 3.4. So disable PRIME for kernels < 3.4.0, +not < 3.3.0. + diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_drv.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_drv.c new file mode 100644 index 00000000..36b17301 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_drv.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/drm_drv.c ++++ b/drivers/gpu/drm/drm_drv.c +@@ -137,8 +137,10 @@ + + DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, DRM_CONTROL_ALLOW|DRM_UNLOCKED), + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_AUTH|DRM_UNLOCKED), + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_AUTH|DRM_UNLOCKED), ++#endif + + DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPLANERESOURCES, drm_mode_getplane_res, DRM_CONTROL_ALLOW|DRM_UNLOCKED), + DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, DRM_CONTROL_ALLOW|DRM_UNLOCKED), diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_fops.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_fops.c new file mode 100644 index 00000000..b847d9e6 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_fops.c @@ -0,0 +1,24 @@ +--- a/drivers/gpu/drm/drm_fops.c ++++ b/drivers/gpu/drm/drm_fops.c +@@ -284,8 +284,10 @@ + if (dev->driver->driver_features & DRIVER_GEM) + drm_gem_open(dev, priv); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (drm_core_check_feature(dev, DRIVER_PRIME)) + drm_prime_init_file_private(&priv->prime); ++#endif + + if (dev->driver->open) { + ret = dev->driver->open(dev, priv); +@@ -538,8 +540,10 @@ + if (dev->driver->postclose) + dev->driver->postclose(dev, file_priv); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (drm_core_check_feature(dev, DRIVER_PRIME)) + drm_prime_destroy_file_private(&file_priv->prime); ++#endif + + put_pid(file_priv->pid); + kfree(file_priv); diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_gem.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_gem.c new file mode 100644 index 00000000..322739c8 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_gem.c @@ -0,0 +1,28 @@ +--- a/drivers/gpu/drm/drm_gem.c ++++ b/drivers/gpu/drm/drm_gem.c +@@ -35,7 +35,9 @@ + #include <linux/mman.h> + #include <linux/pagemap.h> + #include <linux/shmem_fs.h> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + #include <linux/dma-buf.h> ++#endif + #include <drm/drmP.h> + + /** @file drm_gem.c +@@ -204,6 +206,7 @@ + static void + drm_gem_remove_prime_handles(struct drm_gem_object *obj, struct drm_file *filp) + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (obj->import_attach) { + drm_prime_remove_imported_buf_handle(&filp->prime, + obj->import_attach->dmabuf); +@@ -212,6 +215,7 @@ + drm_prime_remove_imported_buf_handle(&filp->prime, + obj->export_dma_buf); + } ++#endif + } + + /** diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_prime.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_prime.c new file mode 100644 index 00000000..f440d6de --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_prime.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/drm_prime.c ++++ b/drivers/gpu/drm/drm_prime.c +@@ -26,6 +26,8 @@ + * + */ + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ++ + #include <linux/export.h> + #include <linux/dma-buf.h> + #include <drm/drmP.h> +@@ -532,3 +534,4 @@ + mutex_unlock(&prime_fpriv->lock); + } + EXPORT_SYMBOL(drm_prime_remove_imported_buf_handle); ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_drv.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_drv.c new file mode 100644 index 00000000..6b9ae9dc --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_drv.c @@ -0,0 +1,27 @@ +--- a/drivers/gpu/drm/i915/i915_drv.c ++++ b/drivers/gpu/drm/i915/i915_drv.c +@@ -1058,7 +1058,11 @@ + */ + .driver_features = + DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR |*/ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME, ++#else ++ DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM, ++#endif + .load = i915_driver_load, + .unload = i915_driver_unload, + .open = i915_driver_open, +@@ -1081,10 +1085,12 @@ + .gem_free_object = i915_gem_free_object, + .gem_vm_ops = &i915_gem_vm_ops, + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + .prime_handle_to_fd = drm_gem_prime_handle_to_fd, + .prime_fd_to_handle = drm_gem_prime_fd_to_handle, + .gem_prime_export = i915_gem_prime_export, + .gem_prime_import = i915_gem_prime_import, ++#endif + + .dumb_create = i915_gem_dumb_create, + .dumb_map_offset = i915_gem_mmap_gtt, diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem.c new file mode 100644 index 00000000..4182342c --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem.c @@ -0,0 +1,23 @@ +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -34,7 +34,9 @@ + #include <linux/slab.h> + #include <linux/swap.h> + #include <linux/pci.h> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + #include <linux/dma-buf.h> ++#endif + + static void i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj); + static void i915_gem_object_flush_cpu_write_domain(struct drm_i915_gem_object *obj); +@@ -3825,8 +3827,10 @@ + + BUG_ON(obj->pages); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (obj->base.import_attach) + drm_prime_gem_destroy(&obj->base, NULL); ++#endif + + drm_gem_object_release(&obj->base); + i915_gem_info_remove_obj(dev_priv, obj->base.size); diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem_dmabuf.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem_dmabuf.c new file mode 100644 index 00000000..8cc6e021 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem_dmabuf.c @@ -0,0 +1,15 @@ +--- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c ++++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c +@@ -23,6 +23,7 @@ + * Authors: + * Dave Airlie <airlied@redhat.com> + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + #include <drm/drmP.h> + #include "i915_drv.h" + #include <linux/dma-buf.h> +@@ -307,3 +308,4 @@ + dma_buf_detach(dma_buf, attach); + return ERR_PTR(ret); + } ++#endif diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_bo.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_bo.c new file mode 100644 index 00000000..d4c4feeb --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_bo.c @@ -0,0 +1,38 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_bo.c ++++ b/drivers/gpu/drm/nouveau/nouveau_bo.c +@@ -1352,11 +1352,14 @@ + struct drm_device *dev; + unsigned i; + int r; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); ++#endif + + if (ttm->state != tt_unpopulated) + return 0; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (slave && ttm->sg) { + /* make userspace faulting work */ + drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, +@@ -1364,6 +1367,7 @@ + ttm->state = tt_unbound; + return 0; + } ++#endif + + drm = nouveau_bdev(ttm->bdev); + dev = drm->dev; +@@ -1411,10 +1415,12 @@ + struct nouveau_drm *drm; + struct drm_device *dev; + unsigned i; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); + + if (slave) + return; ++#endif + + drm = nouveau_bdev(ttm->bdev); + dev = drm->dev; diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_drm.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_drm.c new file mode 100644 index 00000000..c2dcb6ca --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_drm.c @@ -0,0 +1,30 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_drm.c ++++ b/drivers/gpu/drm/nouveau/nouveau_drm.c +@@ -662,7 +662,10 @@ + .driver_features = + DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG | + DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | +- DRIVER_MODESET | DRIVER_PRIME, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ++ DRIVER_PRIME | ++#endif ++ DRIVER_MODESET, + + .load = nouveau_drm_load, + .unload = nouveau_drm_unload, +@@ -688,6 +691,7 @@ + .ioctls = nouveau_ioctls, + .fops = &nouveau_driver_fops, + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + .prime_handle_to_fd = drm_gem_prime_handle_to_fd, + .prime_fd_to_handle = drm_gem_prime_fd_to_handle, + .gem_prime_export = drm_gem_prime_export, +@@ -697,6 +701,7 @@ + .gem_prime_import_sg_table = nouveau_gem_prime_import_sg_table, + .gem_prime_vmap = nouveau_gem_prime_vmap, + .gem_prime_vunmap = nouveau_gem_prime_vunmap, ++#endif + + .gem_init_object = nouveau_gem_object_new, + .gem_free_object = nouveau_gem_object_del, diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_gem.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_gem.c new file mode 100644 index 00000000..7795a120 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_gem.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_gem.c ++++ b/drivers/gpu/drm/nouveau/nouveau_gem.c +@@ -55,8 +55,10 @@ + nouveau_bo_unpin(nvbo); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (gem->import_attach) + drm_prime_gem_destroy(gem, nvbo->bo.sg); ++#endif + + ttm_bo_unref(&bo); + diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_prime.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_prime.c new file mode 100644 index 00000000..e4765b3c --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_prime.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_prime.c ++++ b/drivers/gpu/drm/nouveau/nouveau_prime.c +@@ -22,6 +22,8 @@ + * Authors: Dave Airlie + */ + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ++ + #include <drm/drmP.h> + + #include "nouveau_drm.h" +@@ -93,3 +95,4 @@ + + return 0; + } ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_drv.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_drv.c new file mode 100644 index 00000000..0ad62d61 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_drv.c @@ -0,0 +1,31 @@ +--- a/drivers/gpu/drm/radeon/radeon_drv.c ++++ b/drivers/gpu/drm/radeon/radeon_drv.c +@@ -374,8 +374,10 @@ + static struct drm_driver kms_driver = { + .driver_features = + DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | +- DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_GEM | +- DRIVER_PRIME, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ++ DRIVER_PRIME | ++#endif ++ DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_GEM, + .dev_priv_size = 0, + .load = radeon_driver_load_kms, + .firstopen = radeon_driver_firstopen_kms, +@@ -410,6 +412,7 @@ + .dumb_destroy = radeon_mode_dumb_destroy, + .fops = &radeon_driver_kms_fops, + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + .prime_handle_to_fd = drm_gem_prime_handle_to_fd, + .prime_fd_to_handle = drm_gem_prime_fd_to_handle, + .gem_prime_export = drm_gem_prime_export, +@@ -419,6 +422,7 @@ + .gem_prime_import_sg_table = radeon_gem_prime_import_sg_table, + .gem_prime_vmap = radeon_gem_prime_vmap, + .gem_prime_vunmap = radeon_gem_prime_vunmap, ++#endif + + .name = DRIVER_NAME, + .desc = DRIVER_DESC, diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_gem.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_gem.c new file mode 100644 index 00000000..457d8d21 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_gem.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/radeon/radeon_gem.c ++++ b/drivers/gpu/drm/radeon/radeon_gem.c +@@ -41,8 +41,10 @@ + struct radeon_bo *robj = gem_to_radeon_bo(gobj); + + if (robj) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (robj->gem_base.import_attach) + drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg); ++#endif + radeon_bo_unref(&robj); + } + } diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_prime.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_prime.c new file mode 100644 index 00000000..291eea65 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_prime.c @@ -0,0 +1,15 @@ +--- a/drivers/gpu/drm/radeon/radeon_prime.c ++++ b/drivers/gpu/drm/radeon/radeon_prime.c +@@ -23,6 +23,7 @@ + * + * Authors: Alex Deucher + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + #include <drm/drmP.h> + + #include "radeon.h" +@@ -96,3 +97,4 @@ + + return 0; + } ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_ttm.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_ttm.c new file mode 100644 index 00000000..4bbabe38 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_ttm.c @@ -0,0 +1,37 @@ +--- a/drivers/gpu/drm/radeon/radeon_ttm.c ++++ b/drivers/gpu/drm/radeon/radeon_ttm.c +@@ -584,17 +584,21 @@ + struct radeon_ttm_tt *gtt = (void *)ttm; + unsigned i; + int r; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); ++#endif + + if (ttm->state != tt_unpopulated) + return 0; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (slave && ttm->sg) { + drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, + gtt->ttm.dma_address, ttm->num_pages); + ttm->state = tt_unbound; + return 0; + } ++#endif + + rdev = radeon_get_rdev(ttm->bdev); + #if __OS_HAS_AGP +@@ -638,10 +642,12 @@ + struct radeon_device *rdev; + struct radeon_ttm_tt *gtt = (void *)ttm; + unsigned i; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); + + if (slave) + return; ++#endif + + rdev = radeon_get_rdev(ttm->bdev); + #if __OS_HAS_AGP diff --git a/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/INFO b/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/INFO new file mode 100644 index 00000000..ebc94292 --- /dev/null +++ b/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/INFO @@ -0,0 +1,4 @@ +The definition of ACPI_VIDEO_CLASS was moved from video.c +to video.h in 3.1. Define it here to fix build for kernels older +than 3.1. + diff --git a/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class.patch b/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/drivers_gpu_drm_i915_intel_opregion.c index cf7eb389..8cbce336 100644 --- a/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class.patch +++ b/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/drivers_gpu_drm_i915_intel_opregion.c @@ -1,10 +1,6 @@ -The definition of ACPI_VIDEO_CLASS was moved from video.c -to video.h in 3.1. Define it here to fix build for kernels older -than 3.1. - --- a/drivers/gpu/drm/i915/intel_opregion.c +++ b/drivers/gpu/drm/i915/intel_opregion.c -@@ -307,6 +307,9 @@ static int intel_opregion_video_event(st +@@ -307,6 +307,9 @@ struct acpi_bus_event *event = data; int ret = NOTIFY_OK; diff --git a/patches/collateral-evolutions/drm/06-rename-config-options.patch b/patches/collateral-evolutions/drm/06-rename-config-options.patch deleted file mode 100644 index 93397d82..00000000 --- a/patches/collateral-evolutions/drm/06-rename-config-options.patch +++ /dev/null @@ -1,207 +0,0 @@ ---- a/drivers/gpu/drm/Makefile -+++ b/drivers/gpu/drm/Makefile -@@ -15,41 +15,41 @@ drm-y := drm_auth.o drm_buffer.o d - drm_trace_points.o drm_global.o drm_prime.o - - drm-$(CONFIG_COMPAT) += drm_ioc32.o --drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o -+drm-$(CONFIG_COMPAT_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o - drm-$(CONFIG_PCI) += ati_pcigart.o - - drm-usb-y := drm_usb.o - - drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o drm_dp_helper.o --drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o --drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o -+drm_kms_helper-$(CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o -+drm_kms_helper-$(CONFIG_COMPAT_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o - --obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o -+obj-$(CONFIG_COMPAT_DRM_KMS_HELPER) += drm_kms_helper.o - - CFLAGS_drm_trace_points.o := -I$(src) - --obj-$(CONFIG_DRM) += drm.o --obj-$(CONFIG_DRM_USB) += drm_usb.o --obj-$(CONFIG_DRM_TTM) += ttm/ --obj-$(CONFIG_DRM_TDFX) += tdfx/ --obj-$(CONFIG_DRM_R128) += r128/ --obj-$(CONFIG_DRM_RADEON)+= radeon/ --obj-$(CONFIG_DRM_MGA) += mga/ --obj-$(CONFIG_DRM_I810) += i810/ --obj-$(CONFIG_DRM_I915) += i915/ --obj-$(CONFIG_DRM_MGAG200) += mgag200/ --obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/ --obj-$(CONFIG_DRM_SIS) += sis/ --obj-$(CONFIG_DRM_SAVAGE)+= savage/ --obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/ --obj-$(CONFIG_DRM_VIA) +=via/ --obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/ --obj-$(CONFIG_DRM_EXYNOS) +=exynos/ --obj-$(CONFIG_DRM_GMA500) += gma500/ --obj-$(CONFIG_DRM_UDL) += udl/ --obj-$(CONFIG_DRM_AST) += ast/ --obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/ --obj-$(CONFIG_DRM_TEGRA) += tegra/ --obj-$(CONFIG_DRM_OMAP) += omapdrm/ --obj-$(CONFIG_DRM_TILCDC) += tilcdc/ -+obj-$(CONFIG_COMPAT_DRM) += drm.o -+obj-$(CONFIG_COMPAT_DRM_USB) += drm_usb.o -+obj-$(CONFIG_COMPAT_DRM_TTM) += ttm/ -+obj-$(CONFIG_COMPAT_DRM_TDFX) += tdfx/ -+obj-$(CONFIG_COMPAT_DRM_R128) += r128/ -+obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon/ -+obj-$(CONFIG_COMPAT_DRM_MGA) += mga/ -+obj-$(CONFIG_COMPAT_DRM_I810) += i810/ -+obj-$(CONFIG_COMPAT_DRM_I915) += i915/ -+obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200/ -+obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus/ -+obj-$(CONFIG_COMPAT_DRM_SIS) += sis/ -+obj-$(CONFIG_COMPAT_DRM_SAVAGE)+= savage/ -+obj-$(CONFIG_COMPAT_DRM_VMWGFX)+= vmwgfx/ -+obj-$(CONFIG_COMPAT_DRM_VIA) +=via/ -+obj-$(CONFIG_COMPAT_DRM_NOUVEAU) +=nouveau/ -+obj-$(CONFIG_COMPAT_DRM_EXYNOS) +=exynos/ -+obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500/ -+obj-$(CONFIG_COMPAT_DRM_UDL) += udl/ -+obj-$(CONFIG_COMPAT_DRM_AST) += ast/ -+obj-$(CONFIG_COMPAT_DRM_SHMOBILE) +=shmobile/ -+obj-$(CONFIG_COMPAT_DRM_TEGRA) += tegra/ -+obj-$(CONFIG_COMPAT_DRM_OMAP) += omapdrm/ -+obj-$(CONFIG_COMPAT_DRM_TILCDC) += tilcdc/ - obj-y += i2c/ ---- a/drivers/gpu/drm/ast/Makefile -+++ b/drivers/gpu/drm/ast/Makefile -@@ -6,4 +6,4 @@ ccflags-y := -Iinclude/drm - - ast-y := ast_drv.o ast_main.o ast_mode.o ast_fb.o ast_ttm.o ast_post.o - --obj-$(CONFIG_DRM_AST) := ast.o -\ No newline at end of file -+obj-$(CONFIG_COMPAT_DRM_AST) := ast.o ---- a/drivers/gpu/drm/cirrus/Makefile -+++ b/drivers/gpu/drm/cirrus/Makefile -@@ -2,4 +2,4 @@ ccflags-y := -Iinclude/drm - cirrus-y := cirrus_main.o cirrus_mode.o \ - cirrus_drv.o cirrus_fbdev.o cirrus_ttm.o - --obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus.o -+obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus.o ---- a/drivers/gpu/drm/drm_crtc_helper.c -+++ b/drivers/gpu/drm/drm_crtc_helper.c -@@ -152,7 +152,7 @@ int drm_helper_probe_single_connector_mo - goto prune; - } - --#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE -+#ifdef CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE - count = drm_load_edid_firmware(connector); - if (count == 0) - #endif ---- a/drivers/gpu/drm/gma500/Makefile -+++ b/drivers/gpu/drm/gma500/Makefile -@@ -49,4 +49,4 @@ gma500_gfx-$(CONFIG_DRM_MEDFIELD) += mdf - mdfld_tmd_vid.o \ - tc35876x-dsi-lvds.o - --obj-$(CONFIG_DRM_GMA500) += gma500_gfx.o -+obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500_gfx.o ---- a/drivers/gpu/drm/i2c/Makefile -+++ b/drivers/gpu/drm/i2c/Makefile -@@ -1,10 +1,10 @@ - ccflags-y := -Iinclude/drm - - ch7006-y := ch7006_drv.o ch7006_mode.o --obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o -+obj-$(CONFIG_COMPAT_DRM_I2C_CH7006) += ch7006.o - - sil164-y := sil164_drv.o --obj-$(CONFIG_DRM_I2C_SIL164) += sil164.o -+obj-$(CONFIG_COMPAT_DRM_I2C_SIL164) += sil164.o - - tda998x-y := tda998x_drv.o --obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o -+obj-$(CONFIG_COMPAT_DRM_I2C_NXP_TDA998X) += tda998x.o ---- a/drivers/gpu/drm/i810/Makefile -+++ b/drivers/gpu/drm/i810/Makefile -@@ -5,4 +5,4 @@ - ccflags-y := -Iinclude/drm - i810-y := i810_drv.o i810_dma.o - --obj-$(CONFIG_DRM_I810) += i810.o -+obj-$(CONFIG_COMPAT_DRM_I810) += i810.o ---- a/drivers/gpu/drm/i915/Makefile -+++ b/drivers/gpu/drm/i915/Makefile -@@ -48,6 +48,6 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o - - i915-$(CONFIG_ACPI) += intel_acpi.o - --obj-$(CONFIG_DRM_I915) += i915.o -+obj-$(CONFIG_COMPAT_DRM_I915) += i915.o - - CFLAGS_i915_trace_points.o := -I$(src) ---- a/drivers/gpu/drm/mgag200/Makefile -+++ b/drivers/gpu/drm/mgag200/Makefile -@@ -2,4 +2,4 @@ ccflags-y := -Iinclude/drm - mgag200-y := mgag200_main.o mgag200_mode.o \ - mgag200_drv.o mgag200_fb.o mgag200_i2c.o mgag200_ttm.o - --obj-$(CONFIG_DRM_MGAG200) += mgag200.o -+obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200.o ---- a/drivers/gpu/drm/nouveau/Makefile -+++ b/drivers/gpu/drm/nouveau/Makefile -@@ -241,7 +241,7 @@ nouveau-$(CONFIG_COMPAT) += nouveau_ioc3 - ifdef CONFIG_X86 - nouveau-$(CONFIG_ACPI) += nouveau_acpi.o - endif --nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o -+nouveau-$(CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o - nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o - --obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o -+obj-$(CONFIG_COMPAT_DRM_NOUVEAU)+= nouveau.o ---- a/drivers/gpu/drm/nouveau/nouveau_display.h -+++ b/drivers/gpu/drm/nouveau/nouveau_display.h -@@ -73,7 +73,7 @@ int nouveau_display_dumb_destroy(struct - - void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *); - --#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT -+#ifdef CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT - extern int nouveau_backlight_init(struct drm_device *); - extern void nouveau_backlight_exit(struct drm_device *); - #else ---- a/drivers/gpu/drm/radeon/Makefile -+++ b/drivers/gpu/drm/radeon/Makefile -@@ -82,6 +82,6 @@ radeon-$(CONFIG_COMPAT) += radeon_ioc32. - radeon-$(CONFIG_VGA_SWITCHEROO) += radeon_atpx_handler.o - radeon-$(CONFIG_ACPI) += radeon_acpi.o - --obj-$(CONFIG_DRM_RADEON)+= radeon.o -+obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon.o - - CFLAGS_radeon_trace_points.o := -I$(src) ---- a/drivers/gpu/drm/ttm/Makefile -+++ b/drivers/gpu/drm/ttm/Makefile -@@ -11,4 +11,4 @@ ifeq ($(CONFIG_SWIOTLB),y) - ttm-y += ttm_page_alloc_dma.o - endif - --obj-$(CONFIG_DRM_TTM) += ttm.o -+obj-$(CONFIG_COMPAT_DRM_TTM) += ttm.o ---- a/drivers/gpu/drm/via/Makefile -+++ b/drivers/gpu/drm/via/Makefile -@@ -5,4 +5,4 @@ - ccflags-y := -Iinclude/drm - via-y := via_irq.o via_drv.o via_map.o via_mm.o via_dma.o via_verifier.o via_video.o via_dmablit.o - --obj-$(CONFIG_DRM_VIA) +=via.o -+obj-$(CONFIG_COMPAT_DRM_VIA) +=via.o ---- a/drivers/gpu/drm/vmwgfx/Makefile -+++ b/drivers/gpu/drm/vmwgfx/Makefile -@@ -8,4 +8,4 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr. - vmwgfx_fence.o vmwgfx_dmabuf.o vmwgfx_scrn.o vmwgfx_context.o \ - vmwgfx_surface.o - --obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o -+obj-$(CONFIG_COMPAT_DRM_VMWGFX) := vmwgfx.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_Makefile new file mode 100644 index 00000000..e319947d --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_Makefile @@ -0,0 +1,72 @@ +--- a/drivers/gpu/drm/Makefile ++++ b/drivers/gpu/drm/Makefile +@@ -15,41 +15,41 @@ + drm_trace_points.o drm_global.o drm_prime.o + + drm-$(CONFIG_COMPAT) += drm_ioc32.o +-drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o ++drm-$(CONFIG_COMPAT_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o + drm-$(CONFIG_PCI) += ati_pcigart.o + + drm-usb-y := drm_usb.o + + drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o drm_dp_helper.o +-drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o +-drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o ++drm_kms_helper-$(CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o ++drm_kms_helper-$(CONFIG_COMPAT_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o + +-obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o ++obj-$(CONFIG_COMPAT_DRM_KMS_HELPER) += drm_kms_helper.o + + CFLAGS_drm_trace_points.o := -I$(src) + +-obj-$(CONFIG_DRM) += drm.o +-obj-$(CONFIG_DRM_USB) += drm_usb.o +-obj-$(CONFIG_DRM_TTM) += ttm/ +-obj-$(CONFIG_DRM_TDFX) += tdfx/ +-obj-$(CONFIG_DRM_R128) += r128/ +-obj-$(CONFIG_DRM_RADEON)+= radeon/ +-obj-$(CONFIG_DRM_MGA) += mga/ +-obj-$(CONFIG_DRM_I810) += i810/ +-obj-$(CONFIG_DRM_I915) += i915/ +-obj-$(CONFIG_DRM_MGAG200) += mgag200/ +-obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/ +-obj-$(CONFIG_DRM_SIS) += sis/ +-obj-$(CONFIG_DRM_SAVAGE)+= savage/ +-obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/ +-obj-$(CONFIG_DRM_VIA) +=via/ +-obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/ +-obj-$(CONFIG_DRM_EXYNOS) +=exynos/ +-obj-$(CONFIG_DRM_GMA500) += gma500/ +-obj-$(CONFIG_DRM_UDL) += udl/ +-obj-$(CONFIG_DRM_AST) += ast/ +-obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/ +-obj-$(CONFIG_DRM_TEGRA) += tegra/ +-obj-$(CONFIG_DRM_OMAP) += omapdrm/ +-obj-$(CONFIG_DRM_TILCDC) += tilcdc/ ++obj-$(CONFIG_COMPAT_DRM) += drm.o ++obj-$(CONFIG_COMPAT_DRM_USB) += drm_usb.o ++obj-$(CONFIG_COMPAT_DRM_TTM) += ttm/ ++obj-$(CONFIG_COMPAT_DRM_TDFX) += tdfx/ ++obj-$(CONFIG_COMPAT_DRM_R128) += r128/ ++obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon/ ++obj-$(CONFIG_COMPAT_DRM_MGA) += mga/ ++obj-$(CONFIG_COMPAT_DRM_I810) += i810/ ++obj-$(CONFIG_COMPAT_DRM_I915) += i915/ ++obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200/ ++obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus/ ++obj-$(CONFIG_COMPAT_DRM_SIS) += sis/ ++obj-$(CONFIG_COMPAT_DRM_SAVAGE)+= savage/ ++obj-$(CONFIG_COMPAT_DRM_VMWGFX)+= vmwgfx/ ++obj-$(CONFIG_COMPAT_DRM_VIA) +=via/ ++obj-$(CONFIG_COMPAT_DRM_NOUVEAU) +=nouveau/ ++obj-$(CONFIG_COMPAT_DRM_EXYNOS) +=exynos/ ++obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500/ ++obj-$(CONFIG_COMPAT_DRM_UDL) += udl/ ++obj-$(CONFIG_COMPAT_DRM_AST) += ast/ ++obj-$(CONFIG_COMPAT_DRM_SHMOBILE) +=shmobile/ ++obj-$(CONFIG_COMPAT_DRM_TEGRA) += tegra/ ++obj-$(CONFIG_COMPAT_DRM_OMAP) += omapdrm/ ++obj-$(CONFIG_COMPAT_DRM_TILCDC) += tilcdc/ + obj-y += i2c/ diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ast_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ast_Makefile new file mode 100644 index 00000000..cac1b9ef --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ast_Makefile @@ -0,0 +1,9 @@ +--- a/drivers/gpu/drm/ast/Makefile ++++ b/drivers/gpu/drm/ast/Makefile +@@ -6,4 +6,4 @@ + + ast-y := ast_drv.o ast_main.o ast_mode.o ast_fb.o ast_ttm.o ast_post.o + +-obj-$(CONFIG_DRM_AST) := ast.o +\ No newline at end of file ++obj-$(CONFIG_COMPAT_DRM_AST) := ast.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_cirrus_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_cirrus_Makefile new file mode 100644 index 00000000..44b17124 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_cirrus_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/cirrus/Makefile ++++ b/drivers/gpu/drm/cirrus/Makefile +@@ -2,4 +2,4 @@ + cirrus-y := cirrus_main.o cirrus_mode.o \ + cirrus_drv.o cirrus_fbdev.o cirrus_ttm.o + +-obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus.o ++obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_drm_crtc_helper.c b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_drm_crtc_helper.c new file mode 100644 index 00000000..f64e4758 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_drm_crtc_helper.c @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/drm_crtc_helper.c ++++ b/drivers/gpu/drm/drm_crtc_helper.c +@@ -152,7 +152,7 @@ + goto prune; + } + +-#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE ++#ifdef CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE + count = drm_load_edid_firmware(connector); + if (count == 0) + #endif diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_gma500_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_gma500_Makefile new file mode 100644 index 00000000..77355a01 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_gma500_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/gma500/Makefile ++++ b/drivers/gpu/drm/gma500/Makefile +@@ -49,4 +49,4 @@ + mdfld_tmd_vid.o \ + tc35876x-dsi-lvds.o + +-obj-$(CONFIG_DRM_GMA500) += gma500_gfx.o ++obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500_gfx.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i2c_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i2c_Makefile new file mode 100644 index 00000000..ae6689fb --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i2c_Makefile @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/i2c/Makefile ++++ b/drivers/gpu/drm/i2c/Makefile +@@ -1,10 +1,10 @@ + ccflags-y := -Iinclude/drm + + ch7006-y := ch7006_drv.o ch7006_mode.o +-obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o ++obj-$(CONFIG_COMPAT_DRM_I2C_CH7006) += ch7006.o + + sil164-y := sil164_drv.o +-obj-$(CONFIG_DRM_I2C_SIL164) += sil164.o ++obj-$(CONFIG_COMPAT_DRM_I2C_SIL164) += sil164.o + + tda998x-y := tda998x_drv.o +-obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o ++obj-$(CONFIG_COMPAT_DRM_I2C_NXP_TDA998X) += tda998x.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i810_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i810_Makefile new file mode 100644 index 00000000..e6b76370 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i810_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/i810/Makefile ++++ b/drivers/gpu/drm/i810/Makefile +@@ -5,4 +5,4 @@ + ccflags-y := -Iinclude/drm + i810-y := i810_drv.o i810_dma.o + +-obj-$(CONFIG_DRM_I810) += i810.o ++obj-$(CONFIG_COMPAT_DRM_I810) += i810.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i915_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i915_Makefile new file mode 100644 index 00000000..ea86130b --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i915_Makefile @@ -0,0 +1,10 @@ +--- a/drivers/gpu/drm/i915/Makefile ++++ b/drivers/gpu/drm/i915/Makefile +@@ -48,6 +48,6 @@ + + i915-$(CONFIG_ACPI) += intel_acpi.o + +-obj-$(CONFIG_DRM_I915) += i915.o ++obj-$(CONFIG_COMPAT_DRM_I915) += i915.o + + CFLAGS_i915_trace_points.o := -I$(src) diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_mgag200_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_mgag200_Makefile new file mode 100644 index 00000000..0f9b190f --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_mgag200_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/mgag200/Makefile ++++ b/drivers/gpu/drm/mgag200/Makefile +@@ -2,4 +2,4 @@ + mgag200-y := mgag200_main.o mgag200_mode.o \ + mgag200_drv.o mgag200_fb.o mgag200_i2c.o mgag200_ttm.o + +-obj-$(CONFIG_DRM_MGAG200) += mgag200.o ++obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_Makefile new file mode 100644 index 00000000..317701d0 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_Makefile @@ -0,0 +1,12 @@ +--- a/drivers/gpu/drm/nouveau/Makefile ++++ b/drivers/gpu/drm/nouveau/Makefile +@@ -241,7 +241,7 @@ + ifdef CONFIG_X86 + nouveau-$(CONFIG_ACPI) += nouveau_acpi.o + endif +-nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o ++nouveau-$(CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o + nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o + +-obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o ++obj-$(CONFIG_COMPAT_DRM_NOUVEAU)+= nouveau.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_nouveau_display.h b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_nouveau_display.h new file mode 100644 index 00000000..6a2a2a32 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_nouveau_display.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_display.h ++++ b/drivers/gpu/drm/nouveau/nouveau_display.h +@@ -73,7 +73,7 @@ + + void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *); + +-#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT ++#ifdef CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT + extern int nouveau_backlight_init(struct drm_device *); + extern void nouveau_backlight_exit(struct drm_device *); + #else diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_radeon_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_radeon_Makefile new file mode 100644 index 00000000..bcf711c9 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_radeon_Makefile @@ -0,0 +1,10 @@ +--- a/drivers/gpu/drm/radeon/Makefile ++++ b/drivers/gpu/drm/radeon/Makefile +@@ -82,6 +82,6 @@ + radeon-$(CONFIG_VGA_SWITCHEROO) += radeon_atpx_handler.o + radeon-$(CONFIG_ACPI) += radeon_acpi.o + +-obj-$(CONFIG_DRM_RADEON)+= radeon.o ++obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon.o + + CFLAGS_radeon_trace_points.o := -I$(src) diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ttm_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ttm_Makefile new file mode 100644 index 00000000..cf29ee97 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ttm_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/ttm/Makefile ++++ b/drivers/gpu/drm/ttm/Makefile +@@ -11,4 +11,4 @@ + ttm-y += ttm_page_alloc_dma.o + endif + +-obj-$(CONFIG_DRM_TTM) += ttm.o ++obj-$(CONFIG_COMPAT_DRM_TTM) += ttm.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_via_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_via_Makefile new file mode 100644 index 00000000..ec53bbc9 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_via_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/via/Makefile ++++ b/drivers/gpu/drm/via/Makefile +@@ -5,4 +5,4 @@ + ccflags-y := -Iinclude/drm + via-y := via_irq.o via_drv.o via_map.o via_mm.o via_dma.o via_verifier.o via_video.o via_dmablit.o + +-obj-$(CONFIG_DRM_VIA) +=via.o ++obj-$(CONFIG_COMPAT_DRM_VIA) +=via.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_vmwgfx_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_vmwgfx_Makefile new file mode 100644 index 00000000..182dd995 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_vmwgfx_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/vmwgfx/Makefile ++++ b/drivers/gpu/drm/vmwgfx/Makefile +@@ -8,4 +8,4 @@ + vmwgfx_fence.o vmwgfx_dmabuf.o vmwgfx_scrn.o vmwgfx_context.o \ + vmwgfx_surface.o + +-obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o ++obj-$(CONFIG_COMPAT_DRM_VMWGFX) := vmwgfx.o diff --git a/patches/collateral-evolutions/drm/07-intel-gtt.patch b/patches/collateral-evolutions/drm/07-intel-gtt/INFO index c9e461d8..427fcb7f 100644 --- a/patches/collateral-evolutions/drm/07-intel-gtt.patch +++ b/patches/collateral-evolutions/drm/07-intel-gtt/INFO @@ -22,21 +22,3 @@ Date: Thu Jun 7 15:56:03 2012 +0200 Reviewed-by: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -3997,9 +3997,14 @@ i915_gem_init_hw(struct drm_device *dev) - drm_i915_private_t *dev_priv = dev->dev_private; - int ret; - -- if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt()) -+ if (INTEL_INFO(dev)->gen < 6) - return -EIO; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) -+ if (!intel_enable_gtt()) -+ return -EIO; -+#endif -+ - if (IS_HASWELL(dev) && (I915_READ(0x120010) == 1)) - I915_WRITE(0x9008, I915_READ(0x9008) | 0xf0000); - diff --git a/patches/collateral-evolutions/drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.c b/patches/collateral-evolutions/drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.c new file mode 100644 index 00000000..c4cc8a02 --- /dev/null +++ b/patches/collateral-evolutions/drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.c @@ -0,0 +1,18 @@ +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -3997,9 +3997,14 @@ + drm_i915_private_t *dev_priv = dev->dev_private; + int ret; + +- if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt()) ++ if (INTEL_INFO(dev)->gen < 6) + return -EIO; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) ++ if (!intel_enable_gtt()) ++ return -EIO; ++#endif ++ + if (IS_HASWELL(dev) && (I915_READ(0x120010) == 1)) + I915_WRITE(0x9008, I915_READ(0x9008) | 0xf0000); + diff --git a/patches/collateral-evolutions/drm/08-shmem_truncate_range.patch b/patches/collateral-evolutions/drm/08-shmem_truncate_range/INFO index 5112bf63..3b27ff43 100644 --- a/patches/collateral-evolutions/drm/08-shmem_truncate_range.patch +++ b/patches/collateral-evolutions/drm/08-shmem_truncate_range/INFO @@ -25,19 +25,3 @@ Date: Mon Jun 27 16:18:19 2011 -0700 Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -1620,7 +1620,13 @@ i915_gem_object_truncate(struct drm_i915 - * backing pages, *now*. - */ - inode = file_inode(obj->base.filp); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)) - shmem_truncate_range(inode, 0, (loff_t)-1); -+#else -+ truncate_inode_pages(inode->i_mapping, 0); -+ if (inode->i_op->truncate_range) -+ inode->i_op->truncate_range(inode, 0, (loff_t)-1); -+#endif - - obj->madv = __I915_MADV_PURGED; - } diff --git a/patches/collateral-evolutions/drm/08-shmem_truncate_range/drivers_gpu_drm_i915_i915_gem.c b/patches/collateral-evolutions/drm/08-shmem_truncate_range/drivers_gpu_drm_i915_i915_gem.c new file mode 100644 index 00000000..cf4c3943 --- /dev/null +++ b/patches/collateral-evolutions/drm/08-shmem_truncate_range/drivers_gpu_drm_i915_i915_gem.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -1620,7 +1620,13 @@ + * backing pages, *now*. + */ + inode = file_inode(obj->base.filp); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)) + shmem_truncate_range(inode, 0, (loff_t)-1); ++#else ++ truncate_inode_pages(inode->i_mapping, 0); ++ if (inode->i_op->truncate_range) ++ inode->i_op->truncate_range(inode, 0, (loff_t)-1); ++#endif + + obj->madv = __I915_MADV_PURGED; + } diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars.patch b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars.patch deleted file mode 100644 index 29c77194..00000000 --- a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars.patch +++ /dev/null @@ -1,153 +0,0 @@ -Rename CONFIG_NOUVEAU_DEBUG and CONFIG_NOUVEAU_DEBUG_DEFAULT to -CONFIG_COMPAT_*. - ---- a/drivers/gpu/drm/nouveau/core/core/option.c -+++ b/drivers/gpu/drm/nouveau/core/core/option.c -@@ -86,7 +86,7 @@ nouveau_boolopt(const char *optstr, cons - int - nouveau_dbgopt(const char *optstr, const char *sub) - { -- int mode = 1, level = CONFIG_NOUVEAU_DEBUG_DEFAULT; -+ int mode = 1, level = CONFIG_COMPAT_NOUVEAU_DEBUG_DEFAULT; - - while (optstr) { - int len = strcspn(optstr, ",="); ---- a/drivers/gpu/drm/nouveau/core/include/core/client.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/client.h -@@ -15,7 +15,7 @@ struct nouveau_client { - static inline struct nouveau_client * - nv_client(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_CLIENT_CLASS))) - nv_assert("BAD CAST -> NvClient, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/device.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/device.h -@@ -97,7 +97,7 @@ nv_device(void *obj) - if (device->parent) - device = device->parent; - --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(device, NV_SUBDEV_CLASS) || - (nv_hclass(device) & 0xff) != NVDEV_SUBDEV_DEVICE)) { - nv_assert("BAD CAST -> NvDevice, 0x%08x 0x%08x", ---- a/drivers/gpu/drm/nouveau/core/include/core/engctx.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/engctx.h -@@ -20,7 +20,7 @@ struct nouveau_engctx { - static inline struct nouveau_engctx * - nv_engctx(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_ENGCTX_CLASS))) - nv_assert("BAD CAST -> NvEngCtx, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/engine.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/engine.h -@@ -22,7 +22,7 @@ struct nouveau_engine { - static inline struct nouveau_engine * - nv_engine(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_ENGINE_CLASS))) - nv_assert("BAD CAST -> NvEngine, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h -@@ -27,7 +27,7 @@ struct nouveau_gpuobj { - static inline struct nouveau_gpuobj * - nv_gpuobj(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_GPUOBJ_CLASS))) - nv_assert("BAD CAST -> NvGpuObj, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/namedb.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/namedb.h -@@ -14,7 +14,7 @@ struct nouveau_namedb { - static inline struct nouveau_namedb * - nv_namedb(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_NAMEDB_CLASS))) - nv_assert("BAD CAST -> NvNameDB, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/object.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/object.h -@@ -20,7 +20,7 @@ struct nouveau_object { - struct nouveau_object *engine; - atomic_t refcount; - atomic_t usecount; --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - #define NOUVEAU_OBJECT_MAGIC 0x75ef0bad - struct list_head list; - u32 _magic; -@@ -30,7 +30,7 @@ struct nouveau_object { - static inline struct nouveau_object * - nv_object(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (likely(obj)) { - struct nouveau_object *object = obj; - if (unlikely(object->_magic != NOUVEAU_OBJECT_MAGIC)) ---- a/drivers/gpu/drm/nouveau/core/include/core/parent.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/parent.h -@@ -29,7 +29,7 @@ struct nouveau_parent { - static inline struct nouveau_parent * - nv_parent(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!(nv_iclass(obj, NV_PARENT_CLASS)))) - nv_assert("BAD CAST -> NvParent, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/printk.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/printk.h -@@ -19,7 +19,7 @@ void __printf(4, 5) - nv_printk_(struct nouveau_object *, const char *, int, const char *, ...); - - #define nv_printk(o,l,f,a...) do { \ -- if (NV_DBG_##l <= CONFIG_NOUVEAU_DEBUG) \ -+ if (NV_DBG_##l <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ - nv_printk_(nv_object(o), NV_PRINTK_##l, NV_DBG_##l, f, ##a); \ - } while(0) - -@@ -32,7 +32,7 @@ nv_printk_(struct nouveau_object *, cons - #define nv_spam(o,f,a...) nv_printk((o), SPAM, f, ##a) - - #define nv_assert(f,a...) do { \ -- if (NV_DBG_FATAL <= CONFIG_NOUVEAU_DEBUG) \ -+ if (NV_DBG_FATAL <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ - nv_printk_(NULL, NV_PRINTK_FATAL, NV_DBG_FATAL, f "\n", ##a); \ - BUG_ON(1); \ - } while(0) ---- a/drivers/gpu/drm/nouveau/core/include/core/subdev.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/subdev.h -@@ -20,7 +20,7 @@ struct nouveau_subdev { - static inline struct nouveau_subdev * - nv_subdev(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_SUBDEV_CLASS))) - nv_assert("BAD CAST -> NvSubDev, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h -+++ b/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h -@@ -16,7 +16,7 @@ struct nouveau_instobj { - static inline struct nouveau_instobj * - nv_memobj(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_MEMOBJ_CLASS))) - nv_assert("BAD CAST -> NvMemObj, %08x", nv_hclass(obj)); - #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/INFO b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/INFO new file mode 100644 index 00000000..d533c9c8 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/INFO @@ -0,0 +1,3 @@ +Rename CONFIG_NOUVEAU_DEBUG and CONFIG_NOUVEAU_DEBUG_DEFAULT to +CONFIG_COMPAT_*. + diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_core_option.c b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_core_option.c new file mode 100644 index 00000000..f47d37ee --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_core_option.c @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/core/option.c ++++ b/drivers/gpu/drm/nouveau/core/core/option.c +@@ -86,7 +86,7 @@ + int + nouveau_dbgopt(const char *optstr, const char *sub) + { +- int mode = 1, level = CONFIG_NOUVEAU_DEBUG_DEFAULT; ++ int mode = 1, level = CONFIG_COMPAT_NOUVEAU_DEBUG_DEFAULT; + + while (optstr) { + int len = strcspn(optstr, ",="); diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_client.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_client.h new file mode 100644 index 00000000..243fc8a3 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_client.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/client.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/client.h +@@ -15,7 +15,7 @@ + static inline struct nouveau_client * + nv_client(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_CLIENT_CLASS))) + nv_assert("BAD CAST -> NvClient, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_device.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_device.h new file mode 100644 index 00000000..111f8bd7 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_device.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/device.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/device.h +@@ -97,7 +97,7 @@ + if (device->parent) + device = device->parent; + +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(device, NV_SUBDEV_CLASS) || + (nv_hclass(device) & 0xff) != NVDEV_SUBDEV_DEVICE)) { + nv_assert("BAD CAST -> NvDevice, 0x%08x 0x%08x", diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engctx.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engctx.h new file mode 100644 index 00000000..ff605576 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engctx.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/engctx.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/engctx.h +@@ -20,7 +20,7 @@ + static inline struct nouveau_engctx * + nv_engctx(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_ENGCTX_CLASS))) + nv_assert("BAD CAST -> NvEngCtx, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engine.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engine.h new file mode 100644 index 00000000..86f12477 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engine.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/engine.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/engine.h +@@ -22,7 +22,7 @@ + static inline struct nouveau_engine * + nv_engine(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_ENGINE_CLASS))) + nv_assert("BAD CAST -> NvEngine, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_gpuobj.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_gpuobj.h new file mode 100644 index 00000000..e664d523 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_gpuobj.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h +@@ -27,7 +27,7 @@ + static inline struct nouveau_gpuobj * + nv_gpuobj(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_GPUOBJ_CLASS))) + nv_assert("BAD CAST -> NvGpuObj, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_namedb.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_namedb.h new file mode 100644 index 00000000..91faab0d --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_namedb.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/namedb.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/namedb.h +@@ -14,7 +14,7 @@ + static inline struct nouveau_namedb * + nv_namedb(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_NAMEDB_CLASS))) + nv_assert("BAD CAST -> NvNameDB, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_object.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_object.h new file mode 100644 index 00000000..ede1ddac --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_object.h @@ -0,0 +1,20 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/object.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/object.h +@@ -20,7 +20,7 @@ + struct nouveau_object *engine; + atomic_t refcount; + atomic_t usecount; +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + #define NOUVEAU_OBJECT_MAGIC 0x75ef0bad + struct list_head list; + u32 _magic; +@@ -30,7 +30,7 @@ + static inline struct nouveau_object * + nv_object(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (likely(obj)) { + struct nouveau_object *object = obj; + if (unlikely(object->_magic != NOUVEAU_OBJECT_MAGIC)) diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_parent.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_parent.h new file mode 100644 index 00000000..087aead6 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_parent.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/parent.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/parent.h +@@ -29,7 +29,7 @@ + static inline struct nouveau_parent * + nv_parent(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!(nv_iclass(obj, NV_PARENT_CLASS)))) + nv_assert("BAD CAST -> NvParent, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_printk.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_printk.h new file mode 100644 index 00000000..037b31cf --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_printk.h @@ -0,0 +1,20 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/printk.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/printk.h +@@ -19,7 +19,7 @@ + nv_printk_(struct nouveau_object *, const char *, int, const char *, ...); + + #define nv_printk(o,l,f,a...) do { \ +- if (NV_DBG_##l <= CONFIG_NOUVEAU_DEBUG) \ ++ if (NV_DBG_##l <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ + nv_printk_(nv_object(o), NV_PRINTK_##l, NV_DBG_##l, f, ##a); \ + } while(0) + +@@ -32,7 +32,7 @@ + #define nv_spam(o,f,a...) nv_printk((o), SPAM, f, ##a) + + #define nv_assert(f,a...) do { \ +- if (NV_DBG_FATAL <= CONFIG_NOUVEAU_DEBUG) \ ++ if (NV_DBG_FATAL <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ + nv_printk_(NULL, NV_PRINTK_FATAL, NV_DBG_FATAL, f "\n", ##a); \ + BUG_ON(1); \ + } while(0) diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_subdev.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_subdev.h new file mode 100644 index 00000000..c773d020 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_subdev.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/subdev.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/subdev.h +@@ -20,7 +20,7 @@ + static inline struct nouveau_subdev * + nv_subdev(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_SUBDEV_CLASS))) + nv_assert("BAD CAST -> NvSubDev, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_subdev_instmem.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_subdev_instmem.h new file mode 100644 index 00000000..30b68202 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_subdev_instmem.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h ++++ b/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h +@@ -16,7 +16,7 @@ + static inline struct nouveau_instobj * + nv_memobj(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_MEMOBJ_CLASS))) + nv_assert("BAD CAST -> NvMemObj, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO new file mode 100644 index 00000000..28db5d28 --- /dev/null +++ b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO @@ -0,0 +1,3 @@ +acpi_get_table_with_size() was exported with kernels >= 3.6. Revert the +size checking for kernels < 3.6. + diff --git a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check.patch b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.c index 8adaeb35..1bca6e82 100644 --- a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check.patch +++ b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.c @@ -1,9 +1,6 @@ -acpi_get_table_with_size() was exported with kernels >= 3.6. Revert the -size checking for kernels < 3.6. - --- a/drivers/gpu/drm/radeon/radeon_bios.c +++ b/drivers/gpu/drm/radeon/radeon_bios.c -@@ -554,12 +554,21 @@ static bool radeon_acpi_vfct_bios(struct +@@ -554,12 +554,21 @@ { bool ret = false; struct acpi_table_header *hdr; diff --git a/patches/collateral-evolutions/drm/11-videomode-includes.patch b/patches/collateral-evolutions/drm/11-videomode-includes/drivers_gpu_drm_drm_modes.c index 1858cc31..1858cc31 100644 --- a/patches/collateral-evolutions/drm/11-videomode-includes.patch +++ b/patches/collateral-evolutions/drm/11-videomode-includes/drivers_gpu_drm_drm_modes.c diff --git a/patches/collateral-evolutions/drm/98-pr_fmt.patch b/patches/collateral-evolutions/drm/98-pr_fmt.patch deleted file mode 100644 index 3c922450..00000000 --- a/patches/collateral-evolutions/drm/98-pr_fmt.patch +++ /dev/null @@ -1,189 +0,0 @@ - -Undef/define/include printk.h for fixing redefinition warnings -during build. - -Patch adapted from compat-wireless tree. - ---- a/drivers/gpu/drm/drm_fb_helper.c -+++ b/drivers/gpu/drm/drm_fb_helper.c -@@ -27,9 +27,11 @@ - * Dave Airlie <airlied@linux.ie> - * Jesse Barnes <jesse.barnes@intel.com> - */ -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include <linux/kernel.h> -+#include <linux/printk.h> - #include <linux/sysrq.h> - #include <linux/slab.h> - #include <linux/fb.h> ---- a/drivers/gpu/drm/ttm/ttm_agp_backend.c -+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c -@@ -29,8 +29,10 @@ - * Keith Packard. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include <linux/printk.h> - #include <drm/ttm/ttm_module.h> - #include <drm/ttm/ttm_bo_driver.h> - #include <drm/ttm/ttm_page_alloc.h> ---- a/drivers/gpu/drm/ttm/ttm_bo.c -+++ b/drivers/gpu/drm/ttm/ttm_bo.c -@@ -28,11 +28,13 @@ - * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - - #include <drm/ttm/ttm_module.h> - #include <drm/ttm/ttm_bo_driver.h> - #include <drm/ttm/ttm_placement.h> -+#include <linux/printk.h> - #include <linux/jiffies.h> - #include <linux/slab.h> - #include <linux/sched.h> ---- a/drivers/gpu/drm/ttm/ttm_bo_vm.c -+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c -@@ -28,8 +28,10 @@ - * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include <linux/printk.h> - #include <ttm/ttm_module.h> - #include <ttm/ttm_bo_driver.h> - #include <ttm/ttm_placement.h> ---- a/drivers/gpu/drm/ttm/ttm_memory.c -+++ b/drivers/gpu/drm/ttm/ttm_memory.c -@@ -25,11 +25,13 @@ - * - **************************************************************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - - #include <drm/ttm/ttm_memory.h> - #include <drm/ttm/ttm_module.h> - #include <drm/ttm/ttm_page_alloc.h> -+#include <linux/printk.h> - #include <linux/spinlock.h> - #include <linux/sched.h> - #include <linux/wait.h> ---- a/drivers/gpu/drm/ttm/ttm_object.c -+++ b/drivers/gpu/drm/ttm/ttm_object.c -@@ -49,10 +49,12 @@ - * for fast lookup of ref objects given a base object. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - - #include <drm/ttm/ttm_object.h> - #include <drm/ttm/ttm_module.h> -+#include <linux/printk.h> - #include <linux/list.h> - #include <linux/spinlock.h> - #include <linux/slab.h> ---- a/drivers/gpu/drm/ttm/ttm_page_alloc.c -+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c -@@ -31,8 +31,10 @@ - * - doesn't track currently in use pages - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include <linux/printk.h> - #include <linux/list.h> - #include <linux/spinlock.h> - #include <linux/highmem.h> ---- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c -+++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c -@@ -33,8 +33,10 @@ - * when freed). - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include <linux/printk.h> - #include <linux/dma-mapping.h> - #include <linux/list.h> - #include <linux/seq_file.h> /* for seq_printf */ ---- a/drivers/gpu/drm/ttm/ttm_tt.c -+++ b/drivers/gpu/drm/ttm/ttm_tt.c -@@ -28,8 +28,10 @@ - * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include <linux/printk.h> - #include <linux/sched.h> - #include <linux/highmem.h> - #include <linux/pagemap.h> ---- a/drivers/gpu/drm/i915/i915_dma.c -+++ b/drivers/gpu/drm/i915/i915_dma.c -@@ -26,6 +26,7 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include <drm/drmP.h> -@@ -35,6 +36,7 @@ - #include <drm/i915_drm.h> - #include "i915_drv.h" - #include "i915_trace.h" -+#include <linux/printk.h> - #include <linux/pci.h> - #include <linux/vgaarb.h> - #include <linux/acpi.h> ---- a/drivers/gpu/drm/i915/i915_irq.c -+++ b/drivers/gpu/drm/i915/i915_irq.c -@@ -26,8 +26,10 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include <linux/printk.h> - #include <linux/sysrq.h> - #include <linux/slab.h> - #include <drm/drmP.h> ---- a/drivers/gpu/drm/i915/intel_opregion.c -+++ b/drivers/gpu/drm/i915/intel_opregion.c -@@ -25,8 +25,10 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include <linux/printk.h> - #include <linux/acpi.h> - #include <linux/acpi_io.h> - #include <acpi/video.h> ---- a/drivers/gpu/drm/i915/intel_panel.c -+++ b/drivers/gpu/drm/i915/intel_panel.c -@@ -28,8 +28,10 @@ - * Chris Wilson <chris@chris-wilson.co.uk> - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include <linux/printk.h> - #include <linux/moduleparam.h> - #include "intel_drv.h" - diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/INFO b/patches/collateral-evolutions/drm/98-pr_fmt/INFO new file mode 100644 index 00000000..d7895f41 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/INFO @@ -0,0 +1,6 @@ + +Undef/define/include printk.h for fixing redefinition warnings +during build. + +Patch adapted from compat-wireless tree. + diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_drm_fb_helper.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_drm_fb_helper.c new file mode 100644 index 00000000..49af9e73 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_drm_fb_helper.c @@ -0,0 +1,14 @@ +--- a/drivers/gpu/drm/drm_fb_helper.c ++++ b/drivers/gpu/drm/drm_fb_helper.c +@@ -27,9 +27,11 @@ + * Dave Airlie <airlied@linux.ie> + * Jesse Barnes <jesse.barnes@intel.com> + */ ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include <linux/kernel.h> ++#include <linux/printk.h> + #include <linux/sysrq.h> + #include <linux/slab.h> + #include <linux/fb.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_dma.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_dma.c new file mode 100644 index 00000000..df64c810 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_dma.c @@ -0,0 +1,18 @@ +--- a/drivers/gpu/drm/i915/i915_dma.c ++++ b/drivers/gpu/drm/i915/i915_dma.c +@@ -26,6 +26,7 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include <drm/drmP.h> +@@ -35,6 +36,7 @@ + #include <drm/i915_drm.h> + #include "i915_drv.h" + #include "i915_trace.h" ++#include <linux/printk.h> + #include <linux/pci.h> + #include <linux/vgaarb.h> + #include <linux/acpi.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_irq.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_irq.c new file mode 100644 index 00000000..923a8b49 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_irq.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/i915/i915_irq.c ++++ b/drivers/gpu/drm/i915/i915_irq.c +@@ -26,8 +26,10 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include <linux/printk.h> + #include <linux/sysrq.h> + #include <linux/slab.h> + #include <drm/drmP.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_opregion.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_opregion.c new file mode 100644 index 00000000..8279c93b --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_opregion.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/i915/intel_opregion.c ++++ b/drivers/gpu/drm/i915/intel_opregion.c +@@ -25,8 +25,10 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include <linux/printk.h> + #include <linux/acpi.h> + #include <linux/acpi_io.h> + #include <acpi/video.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_panel.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_panel.c new file mode 100644 index 00000000..3a87d9f7 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_panel.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/i915/intel_panel.c ++++ b/drivers/gpu/drm/i915/intel_panel.c +@@ -28,8 +28,10 @@ + * Chris Wilson <chris@chris-wilson.co.uk> + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include <linux/printk.h> + #include <linux/moduleparam.h> + #include "intel_drv.h" + diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_agp_backend.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_agp_backend.c new file mode 100644 index 00000000..d4a791e4 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_agp_backend.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c ++++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c +@@ -29,8 +29,10 @@ + * Keith Packard. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include <linux/printk.h> + #include <drm/ttm/ttm_module.h> + #include <drm/ttm/ttm_bo_driver.h> + #include <drm/ttm/ttm_page_alloc.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo.c new file mode 100644 index 00000000..ac5cb1d6 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/ttm/ttm_bo.c ++++ b/drivers/gpu/drm/ttm/ttm_bo.c +@@ -28,11 +28,13 @@ + * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + + #include <drm/ttm/ttm_module.h> + #include <drm/ttm/ttm_bo_driver.h> + #include <drm/ttm/ttm_placement.h> ++#include <linux/printk.h> + #include <linux/jiffies.h> + #include <linux/slab.h> + #include <linux/sched.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo_vm.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo_vm.c new file mode 100644 index 00000000..45c5f053 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo_vm.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c ++++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c +@@ -28,8 +28,10 @@ + * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include <linux/printk.h> + #include <ttm/ttm_module.h> + #include <ttm/ttm_bo_driver.h> + #include <ttm/ttm_placement.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_memory.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_memory.c new file mode 100644 index 00000000..ce492cb5 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_memory.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/ttm/ttm_memory.c ++++ b/drivers/gpu/drm/ttm/ttm_memory.c +@@ -25,11 +25,13 @@ + * + **************************************************************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + + #include <drm/ttm/ttm_memory.h> + #include <drm/ttm/ttm_module.h> + #include <drm/ttm/ttm_page_alloc.h> ++#include <linux/printk.h> + #include <linux/spinlock.h> + #include <linux/sched.h> + #include <linux/wait.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_object.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_object.c new file mode 100644 index 00000000..7c8ed998 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_object.c @@ -0,0 +1,15 @@ +--- a/drivers/gpu/drm/ttm/ttm_object.c ++++ b/drivers/gpu/drm/ttm/ttm_object.c +@@ -49,10 +49,12 @@ + * for fast lookup of ref objects given a base object. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + + #include <drm/ttm/ttm_object.h> + #include <drm/ttm/ttm_module.h> ++#include <linux/printk.h> + #include <linux/list.h> + #include <linux/spinlock.h> + #include <linux/slab.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc.c new file mode 100644 index 00000000..35565383 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c ++++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c +@@ -31,8 +31,10 @@ + * - doesn't track currently in use pages + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include <linux/printk.h> + #include <linux/list.h> + #include <linux/spinlock.h> + #include <linux/highmem.h> diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc_dma.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc_dma.c new file mode 100644 index 00000000..a2c700a1 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc_dma.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c ++++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +@@ -33,8 +33,10 @@ + * when freed). + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include <linux/printk.h> + #include <linux/dma-mapping.h> + #include <linux/list.h> + #include <linux/seq_file.h> /* for seq_printf */ diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_tt.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_tt.c new file mode 100644 index 00000000..2925d7db --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_tt.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_tt.c ++++ b/drivers/gpu/drm/ttm/ttm_tt.c +@@ -28,8 +28,10 @@ + * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include <linux/printk.h> + #include <linux/sched.h> + #include <linux/highmem.h> + #include <linux/pagemap.h> diff --git a/patches/collateral-evolutions/drm/99-change-makefile/INFO b/patches/collateral-evolutions/drm/99-change-makefile/INFO new file mode 100644 index 00000000..e64c528b --- /dev/null +++ b/patches/collateral-evolutions/drm/99-change-makefile/INFO @@ -0,0 +1,2 @@ +Remove drivers that we do not want to build from gpu/drm/Makefile + diff --git a/patches/collateral-evolutions/drm/99-change-makefile.patch b/patches/collateral-evolutions/drm/99-change-makefile/drivers_gpu_drm_Makefile index 00fa2be6..527c8572 100644 --- a/patches/collateral-evolutions/drm/99-change-makefile.patch +++ b/patches/collateral-evolutions/drm/99-change-makefile/drivers_gpu_drm_Makefile @@ -1,8 +1,6 @@ -Remove drivers that we do not want to build from gpu/drm/Makefile - --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile -@@ -31,25 +31,14 @@ CFLAGS_drm_trace_points.o := -I$(src) +@@ -31,25 +31,14 @@ obj-$(CONFIG_COMPAT_DRM) += drm.o obj-$(CONFIG_COMPAT_DRM_USB) += drm_usb.o obj-$(CONFIG_COMPAT_DRM_TTM) += ttm/ |