From: Mark Zhang <nvmarkzhang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: "Lucas Stach" <dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>,
"Terje Bergström"
<tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Thierry Reding"
<thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
Subject: Re: First version of host1x intro
Date: Fri, 07 Dec 2012 13:49:29 +0800 [thread overview]
Message-ID: <50C18369.2080001@gmail.com> (raw)
In-Reply-To: <50C0E7F4.2090802-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
On 12/07/2012 02:46 AM, Stephen Warren wrote:
> On 12/06/2012 01:13 AM, Mark Zhang wrote:
[...]
>>
>> Yes, I think this is what I mean. No dummy information in the command
>> stream, userspace just fills the address which it uses(actually this is
>> cpu address of the buffer) in the command stream, and our driver must
>> have a HashTable or something which contains the buffer address pair --
>> (cpu address, dma address), so our driver can find the dma addresses for
>> every buffer then modify the addresses in the command stream.
>
> Typically there would be no CPU address; there's no need in most cases
> to ever map most buffers to the CPU.
>
> Automatically parsing the buffer sounds like an interesting idea, but
> then the kernel relocation code would have to know the meaning of every
> single register or command-stream "method" in order to know which of
> them take a buffer address as an argument. I am not familiar with this
> HW specifically, so perhaps it's much more regular than I think and it's
> actually easy to do that, but I imagine it'd be a PITA to implement that
> (although perhaps we have to for the command-stream validation stuff
> anyway?).
Yes. To make the driver understands all command stream stuffs is not an
easy and interesting work. And this part of codes need to be taken care
with each generation of tegra.
> Also, it'd be a lot quicker at least for larger command
> buffers to go straight to the few locations in the command stream where
> a buffer is referenced (i.e. use the side-band metadata for relocation)
> rather than having the CPU re-read the entire command stream in the
> kernel to parse it.
>
Agree. Although we can categorize the commands and ignore the commands
which not take buffer address as arguments.
next prev parent reply other threads:[~2012-12-07 5:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-05 9:47 First version of host1x intro Terje Bergström
[not found] ` <50BF1831.3060606-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-12-06 7:06 ` Mark Zhang
[not found] ` <50C0440D.3000702-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-06 7:20 ` Lucas Stach
2012-12-06 7:49 ` Mark Zhang
[not found] ` <50C04E1D.1050702-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-06 8:00 ` Lucas Stach
2012-12-06 8:13 ` Mark Zhang
[not found] ` <50C053AD.2000802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-06 11:17 ` Lucas Stach
2012-12-07 5:26 ` Mark Zhang
2012-12-06 18:46 ` Stephen Warren
[not found] ` <50C0E7F4.2090802-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-12-07 5:49 ` Mark Zhang [this message]
2012-12-06 11:36 ` Terje Bergström
[not found] ` <50C08338.3070408-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-12-07 5:38 ` Mark Zhang
[not found] ` <50C180DA.508-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-07 6:44 ` Terje Bergström
[not found] ` <50C1903C.8040608-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-12-07 7:05 ` Mark Zhang
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=50C18369.2080001@gmail.com \
--to=nvmarkzhang-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.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;
as well as URLs for NNTP newsgroup(s).