First version of host1x intro

2012-12-07 Thread Mark Zhang
On 12/07/2012 02:44 PM, Terje Bergstr?m wrote: > On 07.12.2012 07:38, Mark Zhang wrote: >> On 12/06/2012 07:36 PM, Terje Bergstr?m wrote: >>> This is about the hardware, and the correct verb is "copy". HOST1X >>> hardware pre-fetches opcodes from push buffer and contents of GATHERs to >>> a FIFO to

First version of host1x intro

2012-12-07 Thread Mark Zhang
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,

First version of host1x intro

2012-12-07 Thread Mark Zhang
On 12/06/2012 07:36 PM, Terje Bergstr?m wrote: > On 06.12.2012 09:06, Mark Zhang wrote: >> Thank you for the doc. So here I have questions: >> >> Push buffer contains a lot of opcodes for this channel. So when multiple >> userspace processes submit jobs to this channel, all these jobs will be >> sa

First version of host1x intro

2012-12-07 Thread Mark Zhang
On 12/06/2012 07:17 PM, Lucas Stach wrote: > Am Donnerstag, den 06.12.2012, 16:13 +0800 schrieb Mark Zhang: >> On 12/06/2012 04:00 PM, Lucas Stach wrote: > [...] >>> >>> Or maybe I'm misunderstanding you and you mean it the other way around. >>> You don't let userspace dictate the addresses, the re

First version of host1x intro

2012-12-07 Thread Terje Bergström
On 07.12.2012 07:38, Mark Zhang wrote: > On 12/06/2012 07:36 PM, Terje Bergstr?m wrote: >> This is about the hardware, and the correct verb is "copy". HOST1X >> hardware pre-fetches opcodes from push buffer and contents of GATHERs to >> a FIFO to overcome memory latencies. The execution happens fro

Re: First version of host1x intro

2012-12-06 Thread Mark Zhang
On 12/07/2012 02:44 PM, Terje Bergström wrote: > On 07.12.2012 07:38, Mark Zhang wrote: >> On 12/06/2012 07:36 PM, Terje Bergström wrote: >>> This is about the hardware, and the correct verb is "copy". HOST1X >>> hardware pre-fetches opcodes from push buffer and contents of GATHERs to >>> a FIFO to

Re: First version of host1x intro

2012-12-06 Thread Terje Bergström
On 07.12.2012 07:38, Mark Zhang wrote: > On 12/06/2012 07:36 PM, Terje Bergström wrote: >> This is about the hardware, and the correct verb is "copy". HOST1X >> hardware pre-fetches opcodes from push buffer and contents of GATHERs to >> a FIFO to overcome memory latencies. The execution happens fro

Re: First version of host1x intro

2012-12-06 Thread Mark Zhang
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,

Re: First version of host1x intro

2012-12-06 Thread Mark Zhang
On 12/06/2012 07:36 PM, Terje Bergström wrote: > On 06.12.2012 09:06, Mark Zhang wrote: >> Thank you for the doc. So here I have questions: >> >> Push buffer contains a lot of opcodes for this channel. So when multiple >> userspace processes submit jobs to this channel, all these jobs will be >> sa

Re: First version of host1x intro

2012-12-06 Thread Mark Zhang
On 12/06/2012 07:17 PM, Lucas Stach wrote: > Am Donnerstag, den 06.12.2012, 16:13 +0800 schrieb Mark Zhang: >> On 12/06/2012 04:00 PM, Lucas Stach wrote: > [...] >>> >>> Or maybe I'm misunderstanding you and you mean it the other way around. >>> You don't let userspace dictate the addresses, the re

First version of host1x intro

2012-12-06 Thread Mark Zhang
On 12/06/2012 04:00 PM, Lucas Stach wrote: > Am Donnerstag, den 06.12.2012, 15:49 +0800 schrieb Mark Zhang: [...] >> >> OK. So these relocation addresses are used to let userspace tells kernel >> which buffers mentioned in the command should be relocated to addresses >> which host1x clients able to

First version of host1x intro

2012-12-06 Thread Mark Zhang
On 12/06/2012 03:20 PM, Lucas Stach wrote: > Am Donnerstag, den 06.12.2012, 15:06 +0800 schrieb Mark Zhang: > [...] >>> First action taken is taking a reference to all buffers in the command >>> stream. This includes the command stream buffers themselves, but also >>> the target buffers. We also ma

First version of host1x intro

2012-12-06 Thread Mark Zhang
On 12/05/2012 05:47 PM, Terje Bergstr?m wrote: > Hi, > [...] > > Channels > > > Channel is a push buffer containing HOST1X opcodes. The push buffer > boundaries are defined with `HOST1X_CHANNEL_DMASTART_0` and > `HOST1X_CHANNEL_DMAEND_0`. `HOST1X_CHANNEL_DMAGET_0` indicates the next > p

First version of host1x intro

2012-12-06 Thread Terje Bergström
On 06.12.2012 09:06, Mark Zhang wrote: > Thank you for the doc. So here I have questions: > > Push buffer contains a lot of opcodes for this channel. So when multiple > userspace processes submit jobs to this channel, all these jobs will be > saved in the push buffer and return, right? I mean, nvh

First version of host1x intro

2012-12-06 Thread Lucas Stach
Am Donnerstag, den 06.12.2012, 16:13 +0800 schrieb Mark Zhang: > On 12/06/2012 04:00 PM, Lucas Stach wrote: [...] > > > > Or maybe I'm misunderstanding you and you mean it the other way around. > > You don't let userspace dictate the addresses, the relocation > > information just tells the kernel

First version of host1x intro

2012-12-06 Thread Stephen Warren
On 12/06/2012 01:13 AM, Mark Zhang wrote: > On 12/06/2012 04:00 PM, Lucas Stach wrote: >> Am Donnerstag, den 06.12.2012, 15:49 +0800 schrieb Mark Zhang: > [...] >>> >>> OK. So these relocation addresses are used to let userspace tells kernel >>> which buffers mentioned in the command should be relo

Re: First version of host1x intro

2012-12-06 Thread Stephen Warren
On 12/06/2012 01:13 AM, Mark Zhang wrote: > On 12/06/2012 04:00 PM, Lucas Stach wrote: >> Am Donnerstag, den 06.12.2012, 15:49 +0800 schrieb Mark Zhang: > [...] >>> >>> OK. So these relocation addresses are used to let userspace tells kernel >>> which buffers mentioned in the command should be relo

First version of host1x intro

2012-12-06 Thread Lucas Stach
Am Donnerstag, den 06.12.2012, 15:49 +0800 schrieb Mark Zhang: > On 12/06/2012 03:20 PM, Lucas Stach wrote: > > Am Donnerstag, den 06.12.2012, 15:06 +0800 schrieb Mark Zhang: > > [...] > >>> First action taken is taking a reference to all buffers in the command > >>> stream. This includes the comma

First version of host1x intro

2012-12-06 Thread Lucas Stach
Am Donnerstag, den 06.12.2012, 15:06 +0800 schrieb Mark Zhang: [...] > > First action taken is taking a reference to all buffers in the command > > stream. This includes the command stream buffers themselves, but also > > the target buffers. We also map each buffer to target hardware to get a > > d

Re: First version of host1x intro

2012-12-06 Thread Terje Bergström
On 06.12.2012 09:06, Mark Zhang wrote: > Thank you for the doc. So here I have questions: > > Push buffer contains a lot of opcodes for this channel. So when multiple > userspace processes submit jobs to this channel, all these jobs will be > saved in the push buffer and return, right? I mean, nvh

Re: First version of host1x intro

2012-12-06 Thread Lucas Stach
Am Donnerstag, den 06.12.2012, 16:13 +0800 schrieb Mark Zhang: > On 12/06/2012 04:00 PM, Lucas Stach wrote: [...] > > > > Or maybe I'm misunderstanding you and you mean it the other way around. > > You don't let userspace dictate the addresses, the relocation > > information just tells the kernel

Re: First version of host1x intro

2012-12-06 Thread Mark Zhang
On 12/06/2012 04:00 PM, Lucas Stach wrote: > Am Donnerstag, den 06.12.2012, 15:49 +0800 schrieb Mark Zhang: [...] >> >> OK. So these relocation addresses are used to let userspace tells kernel >> which buffers mentioned in the command should be relocated to addresses >> which host1x clients able to

Re: First version of host1x intro

2012-12-06 Thread Lucas Stach
Am Donnerstag, den 06.12.2012, 15:49 +0800 schrieb Mark Zhang: > On 12/06/2012 03:20 PM, Lucas Stach wrote: > > Am Donnerstag, den 06.12.2012, 15:06 +0800 schrieb Mark Zhang: > > [...] > >>> First action taken is taking a reference to all buffers in the command > >>> stream. This includes the comma

Re: First version of host1x intro

2012-12-06 Thread Mark Zhang
On 12/06/2012 03:20 PM, Lucas Stach wrote: > Am Donnerstag, den 06.12.2012, 15:06 +0800 schrieb Mark Zhang: > [...] >>> First action taken is taking a reference to all buffers in the command >>> stream. This includes the command stream buffers themselves, but also >>> the target buffers. We also ma

Re: First version of host1x intro

2012-12-06 Thread Lucas Stach
Am Donnerstag, den 06.12.2012, 15:06 +0800 schrieb Mark Zhang: [...] > > First action taken is taking a reference to all buffers in the command > > stream. This includes the command stream buffers themselves, but also > > the target buffers. We also map each buffer to target hardware to get a > > d

Re: First version of host1x intro

2012-12-06 Thread Mark Zhang
On 12/05/2012 05:47 PM, Terje Bergström wrote: > Hi, > [...] > > Channels > > > Channel is a push buffer containing HOST1X opcodes. The push buffer > boundaries are defined with `HOST1X_CHANNEL_DMASTART_0` and > `HOST1X_CHANNEL_DMAEND_0`. `HOST1X_CHANNEL_DMAGET_0` indicates the next > p

First version of host1x intro

2012-12-05 Thread Terje Bergström
Hi, I created a base for host1x introduction text, and pasted it into https://gitorious.org/linux-tegra-drm/pages/Host1xIntroduction. For convenience, I also copy it below. As I've worked with all of this for so long, I cannot know what areas are most interesting to you, so I just tried to put in

First version of host1x intro

2012-12-05 Thread Terje Bergström
Hi, I created a base for host1x introduction text, and pasted it into https://gitorious.org/linux-tegra-drm/pages/Host1xIntroduction. For convenience, I also copy it below. As I've worked with all of this for so long, I cannot know what areas are most interesting to you, so I just tried to put in