From: Konrad Rzeszutek Wilk <konrad.wilk@Oracle.Com>
To: Dave Airlie <airlied@redhat.com>,
dri-devel@lists.freedesktop.org,
Jerome Glisse <jglisse@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Konrad Rzeszutek Wilk <konrad.wilk@Oracle.Com>
Subject: [PATCH] radeon: DMA unmap dummy page during unload/unbind.
Date: Wed, 23 Feb 2011 15:48:55 -0500 [thread overview]
Message-ID: <1298494135-16751-2-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1298494135-16751-1-git-send-email-konrad.wilk@oracle.com>
git commit 82568565683b4991964a5fc89a9ca0c7122818e8 adds a dummy page
so that if something goes wrong it will at least fetch/write data
_only_ to this location.
The radeon_gart_init sets it up.. but there is no corresponding
free-ing of this dummy page. There is one invocation to free-ing
the dummy page in r600.c but nothing in the radeon_gart_fini path.
This patch adds in the unloading/unbind path the free-ing of said
dummy page.
Without this patch and if we have CONFIG_DMA_API_DEBUG=y set we
get this:
[ 22.113420] drm: unregistered panic notifier
[ 22.126500] [drm] radeon: finishing device.
[ 22.130868] [drm] radeon: cp finalized
[ 22.135384] [TTM] Finalizing pool allocator.
[ 22.139669] [TTM] Zone kernel: Used memory at exit: 0 kiB.
[ 22.145229] [drm] radeon: ttm finalized
[ 22.149055] vga_switcheroo: disabled
[ 22.153393] ------------[ cut here ]------------
[ 22.158021] WARNING: at /home/konrad/ssd/linux/lib/dma-debug.c:689 dma_debug_device_change+0x12e/0x161()
[ 22.167475] Hardware name: PowerEdge T105
[ 22.171562] pci 0000:01:08.0: DMA-API: device driver has pending DMA allocations while released from device [count=1]
With this patch we don't see this anymore.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
drivers/gpu/drm/radeon/radeon_gart.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index 6501611..dc04c7b 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -269,4 +269,6 @@ void radeon_gart_fini(struct radeon_device *rdev)
kfree(rdev->gart.pages_addr);
rdev->gart.pages = NULL;
rdev->gart.pages_addr = NULL;
+
+ radeon_dummy_page_fini(rdev);
}
--
1.7.1
next prev parent reply other threads:[~2011-02-23 20:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 20:48 [PATCH] bug fix for radeon driver in 2.6.38-rc6 w/ATI ES1000 Konrad Rzeszutek Wilk
2011-02-23 20:48 ` Konrad Rzeszutek Wilk [this message]
2011-02-24 8:25 ` [PATCH] radeon: DMA unmap dummy page during unload/unbind Alex Deucher
2011-02-24 15:45 ` Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298494135-16751-2-git-send-email-konrad.wilk@oracle.com \
--to=konrad.wilk@oracle.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®