[Nouveau] Interrupt setting
Younes Manton
younes.m at gmail.com
Fri Mar 12 17:30:41 PST 2010
On Fri, Mar 12, 2010 at 4:14 PM, Shinpei KATO
<shinpei at il.is.s.u-tokyo.ac.jp> wrote:
> Hi,
>
> I am responding to myself...
> Interrupts now work; I should have set the
> NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY_STYLE_WRITE_LE_AWAKEN flag every time a
> command is sent.
> In fact, I thought this flag tells GPU to notify us of when DMA transfers
> are done, but I got PGRAPH_NOTIFY interrupts by this.
> It sounds to me that they notify of when GPU operations are done rather than
> DMA transfers.
> # PGRAPH_BUFFER_NOTIFY sounds more related to DMA transfers.
>
> Is my understanding wrong?
> I appreciate any comments or information about this.
>
> Best regards,
> - Shinpei
>
>> -----Original Message-----
>> From: nouveau-bounces at lists.freedesktop.org
>> [mailto:nouveau-bounces at lists.freedesktop.org] On Behalf Of Shinpei KATO
>> Sent: Friday, March 12, 2010 7:21 AM
>> To: nouveau at lists.freedesktop.org
>> Subject: [Nouveau] Interrupt setting
>>
>> Hi all,
>>
>> I am a Nouveau user on FC12 with GeForce 9500GT.
>> I have read the Nouveau wiki documents, and they imply that there are ways
>> to set GPU to send interrupts to CPU, when we want to be notified for
>> something, e.g., when DMA transfer or GPU operation is completed.
>> By default, when I run an OpenGL demo application from Gallium3D, the
> driver
>> gets no interrupts from GPU in nouveau_irq_handler(), except that it gets
>> one NV_PFIFO_INTR_CACHE_ERROR interrupt right after the FIFO is allocated.
>> According to the wiki docs, I need to set
>> NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY_STYLE_WRITE_LE_AWAKEN into the
>> 'notify'
>> field of an object in a channel.
>> Hence, I tried seting a flag to a DMA notifier in nouveau_dma_init():
>>
>> // seems entry[1] is related to a DMA notifier?
>> nv_wo32(dev, m2mf, 1,
>> NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY_STYLE_WRITE_LE_AWAKEN);
>>
>> I also tried sending some command:
>>
>> // guess this is a very wrong way ;-)
>> BEGIN_RING(chan, NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY, 1);
>> OUT_RING(chan,
>> NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY_STYLE_WRITE_LE_AWAKEN);
>>
>> But they both did not work...
>> How can we set GPU to send interrupts to CPU?
>> I would appreciate your comments.
>>
>> Thanks,
>> - Shinpei
>>
Nouveau doesn't really make use of interrupts so you wont see them
while running OpenGL. In general we make use of fences to signal when
things of interest have occured. Is there something particular you're
trying to accomplish or is this just a learning exercise?
More information about the Nouveau
mailing list