ttm: add patch required by nouveau

This commit is contained in:
Ben Skeggs 2011-04-04 11:27:29 +10:00
parent abe10d7eb7
commit f3e795d08b
2 changed files with 46 additions and 1 deletions

40
drm-ttm-move-notify.patch Normal file
View File

@ -0,0 +1,40 @@
From e40ec45d67d32ce900dd6f2242675979593db18c Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs@redhat.com>
Date: Tue, 18 Jan 2011 11:04:03 +1000
Subject: [PATCH] drm/ttm: call driver move_notify() when doing system->tt bo moves
Nouveau doesn't have enough information at ttm_backend_func.bind() time
to implement things like tiled GART, or to keep a buffer at a constant
address in the GPU virtual address space no matter where in physical
memory it's placed.
To resolve this, nouveau will handle binding of all buffers to the GPU
itself from the move_notify() hook. This commit ensures it's called
for all buffer moves.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index af61fc2..0b6a55a 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -406,11 +406,12 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
}
if (bo->mem.mem_type == TTM_PL_SYSTEM) {
+ if (bdev->driver->move_notify)
+ bdev->driver->move_notify(bo, mem);
bo->mem = *mem;
mem->mm_node = NULL;
goto moved;
}
-
}
if (bdev->driver->move_notify)
--
1.7.4.2

View File

@ -51,7 +51,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be prepended with "0.", so
# for example a 3 here will become 0.3
#
%global baserelease 10
%global baserelease 11
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -670,6 +670,7 @@ Patch1555: fix_xen_guest_on_old_EC2.patch
# nouveau + drm fixes
Patch1810: drm-nouveau-updates.patch
Patch1811: drm-ttm-move-notify.patch
Patch1819: drm-intel-big-hammer.patch
# intel drm is all merged upstream
# fix for 945G corruption will hit stable eventually
@ -1300,6 +1301,7 @@ ApplyPatch fix_xen_guest_on_old_EC2.patch
# DRM core
# Nouveau DRM
ApplyPatch drm-ttm-move-notify.patch
ApplyOptionalPatch drm-nouveau-updates.patch
# Intel DRM
@ -1972,6 +1974,9 @@ fi
# and build.
%changelog
* Mon Apr 04 2011 Ben Skeggs <bskeggs@redhat.com> 2.6.38-2.11
- ttm: add patch from upstream to fix a recent nouveau issue
* Thu Mar 31 2011 Ben Skeggs <bskeggs@redhat.com> 2.6.38-2.10
- nouveau: nva3+ stability improvements
- nouveau: nvc0 "stutter" fixes