From: "Michel Dänzer" <michel@daenzer.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
dri-devel@lists.freedesktop.org
Subject: Re: WARNING: at drivers/gpu/drm/radeon/radeon_object.c:236
Date: Tue, 27 Mar 2012 10:20:21 +0200 [thread overview]
Message-ID: <1332836421.5395.338.camel@thor.local> (raw)
In-Reply-To: <1332829303.2882.52.camel@pasglop>
On Die, 2012-03-27 at 17:21 +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2012-03-26 at 17:32 -0400, Dave Jones wrote:
> > Seeing this in Linus' tree as of v3.3-6972-ge22057c
>
> Same WARN_ON hit here on a G5 with rv350
Thanks for the report, guys. Does the patch below help?
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index f441d58..ad9d450 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -233,7 +233,17 @@ int radeon_bo_pin_restricted(struct radeon_bo *bo, u32 domain, u64 max_offset,
bo->pin_count++;
if (gpu_addr)
*gpu_addr = radeon_bo_gpu_offset(bo);
- WARN_ON_ONCE(max_offset != 0);
+
+ if (max_offset != 0) {
+ u64 domain_start;
+
+ if (domain == RADEON_GEM_DOMAIN_VRAM)
+ domain_start = bo->rdev->mc.vram_start;
+ else
+ domain_start = bo->rdev->mc.gtt_start;
+ WARN_ON_ONCE((*gpu_addr - domain_start) > max_offset);
+ }
+
return 0;
}
radeon_ttm_placement_from_domain(bo, domain);
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
next prev parent reply other threads:[~2012-03-27 8:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-26 21:32 WARNING: at drivers/gpu/drm/radeon/radeon_object.c:236 Dave Jones
2012-03-27 6:21 ` Benjamin Herrenschmidt
2012-03-27 8:20 ` Michel Dänzer [this message]
2012-03-28 0:21 ` Dave Jones
2012-03-28 1:06 ` Benjamin Herrenschmidt
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=1332836421.5395.338.camel@thor.local \
--to=michel@daenzer.net \
--cc=benh@kernel.crashing.org \
--cc=davej@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--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