From: Jay Estabrook <jay.estabrook@gmail.com>
To: Dave Airlie <airlied@gmail.com>
Cc: linux-alpha <linux-alpha@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Matt Turner <mattst88@gmail.com>,
Richard Henderson <rth@twiddle.net>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
airlied@linux.ie
Subject: Re: [PATCH 3/3] alpha, drm: Add Alpha support to Radeon DRM code
Date: Tue, 14 Jun 2011 22:38:10 -0400 [thread overview]
Message-ID: <4DF81B12.2040800@gmail.com> (raw)
In-Reply-To: <BANLkTinvXFV1bObeaym6A4VEcxv0jN+zXQ@mail.gmail.com>
Hi, Dave,
It is the explanation that is inaccurate; I was still thinking about mmap when
the new paradigm is to do the mapping when the VM faults.
I believe the code that requires this patch is: ttm/ttm_bo_vm.c: ttm_bo_vm_fault(),
specifically:
for (i = 0; i < TTM_BO_VM_NUM_PREFAULT; ++i) {
if (bo->mem.bus.is_iomem)
pfn = ((bo->mem.bus.base + bo->mem.bus.offset) >> PAGE_SHIFT) + page_offset;
else {
The "pfn" needs to reflect the correct system bus address to get to the VRAM
on the graphics card.
I will rework the commentary and resend.
Thanks for the feedback.
Jay
On 06/13/2011 07:35 PM, Dave Airlie wrote:
> On Fri, Jun 10, 2011 at 8:20 AM, Jay Estabrook <jay.estabrook@gmail.com> wrote:
>> Alpha needs to have the system bus address for the device's local
>> memory available, so that it can be returned to user-level, where
>> it may be used in an mmap(). So, we make bus.addr hold the ioremap()
>> return for kernel use, and then we can modify bus.base appropriately.
>>
>
> I don't get this. why is mmap passing in an address? we don't do that anymore.
>
> When you mmap the device node it passes back a hashed offset in the
> table, that the
> kernel then translates into a proper address and sets up the page tables.
>
> So I really don't get what this patch is doing, either the
> explaination of what it is doing is wrong
> or it is wrong.
>
> Dave.
prev parent reply other threads:[~2011-06-15 2:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 22:20 [PATCH 3/3] alpha, drm: Add Alpha support to Radeon DRM code Jay Estabrook
2011-06-13 23:35 ` Dave Airlie
2011-06-15 2:38 ` Jay Estabrook [this message]
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=4DF81B12.2040800@gmail.com \
--to=jay.estabrook@gmail.com \
--cc=airlied@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=rth@twiddle.net \
/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;
as well as URLs for NNTP newsgroup(s).