[kernel/f15] nouveau: ttm fixes for rhbz#699551
Ben Skeggs
bskeggs at fedoraproject.org
Wed Aug 24 23:03:30 UTC 2011
commit a22cd81f847ce028bda2bdcc0259925ba4d252d9
Author: Ben Skeggs <bskeggs at redhat.com>
Date: Thu Aug 25 09:02:16 2011 +1000
nouveau: ttm fixes for rhbz#699551
drm-ttm-nouveau-oops-fix.patch | 40 ++++++++++++++++++++++++++++++++++++++++
kernel.spec | 4 ++++
2 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/drm-ttm-nouveau-oops-fix.patch b/drm-ttm-nouveau-oops-fix.patch
new file mode 100644
index 0000000..e65259e
--- /dev/null
+++ b/drm-ttm-nouveau-oops-fix.patch
@@ -0,0 +1,40 @@
+diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
+index 2e618b5..9095b5b 100644
+--- a/drivers/gpu/drm/ttm/ttm_bo.c
++++ b/drivers/gpu/drm/ttm/ttm_bo.c
+@@ -390,10 +390,12 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
+ * Create and bind a ttm if required.
+ */
+
+- if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED) && (bo->ttm == NULL)) {
+- ret = ttm_bo_add_ttm(bo, false);
+- if (ret)
+- goto out_err;
++ if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED)) {
++ if (bo->ttm == NULL) {
++ ret = ttm_bo_add_ttm(bo, false);
++ if (ret)
++ goto out_err;
++ }
+
+ ret = ttm_tt_set_placement_caching(bo->ttm, mem->placement);
+ if (ret)
+diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
+index 77dbf40..ae3c6f5 100644
+--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
++++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
+@@ -635,13 +635,13 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
+ if (ret)
+ return ret;
+
+- ttm_bo_free_old_node(bo);
+ if ((man->flags & TTM_MEMTYPE_FLAG_FIXED) &&
+ (bo->ttm != NULL)) {
+ ttm_tt_unbind(bo->ttm);
+ ttm_tt_destroy(bo->ttm);
+ bo->ttm = NULL;
+ }
++ ttm_bo_free_old_node(bo);
+ } else {
+ /**
+ * This should help pipeline ordinary buffer moves.
diff --git a/kernel.spec b/kernel.spec
index 419093b..4010266 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1161,6 +1161,7 @@ ApplyPatch fix_xen_guest_on_old_EC2.patch
ApplyPatch xen-blkfront-name-adjust.patch
# DRM core
+ApplyPatch drm-ttm-nouveau-oops-fix.patch
# Nouveau DRM
ApplyOptionalPatch drm-nouveau-updates.patch
@@ -1826,6 +1827,9 @@ fi
# and build.
%changelog
+* Thu Aug 25 2011 Ben Skeggs <bskeggs at redhat.com>
+- nouveau: add patch fixing ttm issues that lead to oopses/corruption (rhbz#699551)
+
* Wed Aug 24 2011 Chuck Ebbert <cebbert at redhat.com>
- Automate the kernel version faking.
More information about the scm-commits
mailing list