<div dir="ltr"><div><div><div><div>But at the time the mesa3d file src/gallium/drivers/nouveau/nv30/nv30_screen.c<br></div>is called and when the various PUSH_DATA begin to be called there is not yet<br></div>a call to<code> <span style="font-family:arial,helvetica,sans-serif">nouveau_pushbuf_space. So it would generate a seg fault in<br></span></code></div><code><span style="font-family:arial,helvetica,sans-serif">push->curr. Again, sorry for the confusion and thanks for the reply. Awaiting<br></span></code></div><code><span style="font-family:arial,helvetica,sans-serif">for an answer if possible. Thanks in advance.<br></span></code></div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-02 14:44 GMT-03:00 Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">See libdrm's pushbuf.c -- iirc push->cur points to a GART-mapped bo.<br>
<br>
<a href="http://cgit.freedesktop.org/mesa/drm/tree/nouveau/pushbuf.c#n682" rel="noreferrer" target="_blank">http://cgit.freedesktop.org/mesa/drm/tree/nouveau/pushbuf.c#n682</a><br>
<br>
nouveau_pushbuf_data(push, NULL, 0, 0);<br>
nouveau_bo_ref(bo, &nvpb->bo);<br>
nouveau_bo_ref(NULL, &bo);<br>
<br>
nvpb->bgn = nvpb->bo->map;<br>
nvpb->ptr = nvpb->bgn;<br>
push->cur = nvpb->bgn;<br>
push->end = push->cur + (nvpb->bo->size / 4);<br>
push->end -= 2 + push->rsvd_kick; /* space for suffix */<br>
<br>
Not sure what problem you're trying to solve.<br>
<br>
-ilia<br>
<div><div class="h5"><br>
On Mon, Nov 2, 2015 at 12:31 PM, Daniel Melo Jorge da Cunha<br>
<<a href="mailto:dmjcunha@gmail.com">dmjcunha@gmail.com</a>> wrote:<br>
> Hi, sorry if I misunderstood everything...<br>
><br>
> In the file src/gallium/drivers/nouveau/nv30/nv30_screen.c there is loans of<br>
> PUSH_DATA which is basically *push->curr = data;<br>
><br>
> I'm thinking that somehow push->curr is the bo->map = drm_mmap(...)<br>
> that is called in nouveau_bo_map. But I cannot see how they are linked...<br>
> Because when nouveau_bo_map calls nouveau_bo_wait<br>
> push = cli_push_get(client, bo) returns NULL...<br>
><br>
> Is push->curr the region of memory that we send data to the card?<br>
> If so, how is it mapped?<br>
> Has bo->map something to do with it? If so, how are they linked?<br>
><br>
</div></div>> _______________________________________________<br>
> Nouveau mailing list<br>
> <a href="mailto:Nouveau@lists.freedesktop.org">Nouveau@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/nouveau" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nouveau</a><br>
><br>
</blockquote></div><br></div>