diff --git a/drm-ttm-fix.patch b/drm-ttm-fix.patch new file mode 100644 index 0000000..f0b0c12 --- /dev/null +++ b/drm-ttm-fix.patch @@ -0,0 +1,39 @@ +From 0fbecd400dd0a82d465b3086f209681e8c54cb0f Mon Sep 17 00:00:00 2001 +From: Francisco Jerez +Date: Tue, 21 Sep 2010 02:15:15 +0200 +Subject: [PATCH] drm/ttm: Clear the ghost cpu_writers flag on ttm_buffer_object_transfer. + +It makes sense for a BO to move after a process has requested +exclusive RW access on it (e.g. because the BO used to be located in +unmappable VRAM and we intercepted the CPU access from the fault +handler). + +If we let the ghost object inherit cpu_writers from the original +object, ttm_bo_release_list() will raise a kernel BUG when the ghost +object is destroyed. This can be reproduced with the nouveau driver on +nv5x. + +Reported-by: Marcin Slusarz +Reviewed-by: Jerome Glisse +Tested-by: Marcin Slusarz +Signed-off-by: Francisco Jerez +Signed-off-by: Dave Airlie +--- + drivers/gpu/drm/ttm/ttm_bo_util.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c +index 7cffb3e..3451a82 100644 +--- a/drivers/gpu/drm/ttm/ttm_bo_util.c ++++ b/drivers/gpu/drm/ttm/ttm_bo_util.c +@@ -351,6 +351,7 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, + INIT_LIST_HEAD(&fbo->lru); + INIT_LIST_HEAD(&fbo->swap); + fbo->vm_node = NULL; ++ atomic_set(&fbo->cpu_writers, 0); + + fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj); + kref_init(&fbo->list_kref); +-- +1.7.3.1 + diff --git a/kernel.spec b/kernel.spec index 76bec79..088333c 100644 --- a/kernel.spec +++ b/kernel.spec @@ -662,6 +662,7 @@ Patch1802: revert-drm-kms-toggle-poll-around-switcheroo.patch Patch1805: drm-simplify-i2c-config.patch Patch1806: drm-sil164-module.patch Patch1807: drm-i2c-ch7006-fix.patch +Patch1808: drm-ttm-fix.patch # nouveau + drm fixes Patch1810: drm-nouveau-updates.patch Patch1811: drm-nouveau-race-fix.patch @@ -1300,6 +1301,7 @@ ApplyPatch fix_xen_guest_on_old_EC2.patch ApplyPatch drm-simplify-i2c-config.patch ApplyPatch drm-sil164-module.patch ApplyPatch drm-i2c-ch7006-fix.patch +ApplyPatch drm-ttm-fix.patch # Nouveau DRM + drm fixes ApplyPatch drm-nouveau-updates.patch ApplyPatch drm-nouveau-race-fix.patch @@ -1977,6 +1979,9 @@ fi # and build. %changelog +* Mon Oct 11 2010 Ben Skeggs +- fix ttm bug that can cause nouveau to crash + * Fri Oct 08 2010 Kyle McMartin 2.6.35.6-39 - Push to F-14.