nouveau: fix potential dma race

This commit is contained in:
Ben Skeggs 2010-09-30 13:14:12 +10:00
parent 35a02f9ac3
commit 5c3c16ba28
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 55647c139cf7d6caeaa08a99b2165763a02ab71a Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs@redhat.com>
Date: Thu, 30 Sep 2010 09:09:42 +1000
Subject: [PATCH] drm/nv50: prevent (IB_PUT == IB_GET) for occurring unless idle
Should fix a DMA race condition I've never seen myself, but could be
the culprit in some random hangs that have been reported.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c
index 9d27acd..eb24e2b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dma.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dma.c
@@ -214,7 +214,7 @@ nv50_dma_push_wait(struct nouveau_channel *chan, int count)
chan->dma.ib_free = get - chan->dma.ib_put;
if (chan->dma.ib_free <= 0)
- chan->dma.ib_free += chan->dma.ib_max + 1;
+ chan->dma.ib_free += chan->dma.ib_max;
}
return 0;
--
1.7.2.2

View File

@ -48,7 +48,7 @@ Summary: The Linux kernel
# reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec).
# scripts/rebase.sh should be made to do that for you, actually.
#
%global baserelease 58
%global baserelease 59
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -715,6 +715,7 @@ Patch1900: linux-2.6-intel-iommu-igfx.patch
Patch1901: drm-nouveau-acpi-edid-fix.patch
Patch1902: agp-intel-use-the-correct-mask-to-detect-i830-aperture-size.patch
Patch1903: drm-nouveau-pusher-intr.patch
Patch1904: drm-nouveau-ibdma-race.patch
# radeon
# linux1394 git patches
@ -1408,6 +1409,7 @@ ApplyPatch drm-nouveau-nva3-noaccel.patch
ApplyPatch drm-nouveau-nv50-crtc-update-delay.patch
ApplyPatch drm-nouveau-acpi-edid-fix.patch
ApplyPatch drm-nouveau-pusher-intr.patch
ApplyPatch drm-nouveau-ibdma-race.patch
ApplyPatch drm-intel-big-hammer.patch
ApplyOptionalPatch drm-intel-next.patch
@ -2164,6 +2166,10 @@ fi
%changelog
* Thu Sep 30 2010 Ben Skeggs <bskeggs@redhat.com> 2.6.34.7-59
- nouveau: fix theoretical race condition that could be responsible for
certain random hangs that have been reported.
* Mon Sep 27 2010 Ben Skeggs <bskeggs@redhat.com> 2.6.34.7-58
- nouveau: better handling of certain GPU errors