<div dir="ltr"><div>SORRY SORRY SORRY :)<br></div>Thanks for the consideration.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-02 15:42 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">Errrr.... are you sure?<br>
<br>
nv30_screen_create starts with a bunch of stuff init'ing objects, and then does:<br>
<br>
BEGIN_NV04(push, NV01_SUBC(3D, OBJECT), 1);<br>
PUSH_DATA (push, screen->eng3d->handle);<br>
<br>
And as you can see in nv30_winsys.h:<br>
<br>
static inline void<br>
BEGIN_NV04(struct nouveau_pushbuf *push, int subc, int mthd, int size)<br>
{<br>
PUSH_SPACE(push, size + 1);<br>
PUSH_DATA (push, 0x00000000 | (size << 18) | (subc << 13) | mthd);<br>
}<br>
<br>
and PUSH_SPACE in turn calls nouveau_pushbuf_space.<br>
<br>
-ilia<br>
<br>
On Mon, Nov 2, 2015 at 1:36 PM, Daniel Melo Jorge da Cunha<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:dmjcunha@gmail.com">dmjcunha@gmail.com</a>> wrote:<br>
> But at the time the mesa3d file<br>
> src/gallium/drivers/nouveau/nv30/nv30_screen.c<br>
> is called and when the various PUSH_DATA begin to be called there is not yet<br>
> a call to nouveau_pushbuf_space. So it would generate a seg fault in<br>
> push->curr. Again, sorry for the confusion and thanks for the reply.<br>
> Awaiting<br>
> for an answer if possible. Thanks in advance.<br>
><br>
> 2015-11-02 14:44 GMT-03:00 Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>>:<br>
>><br>
>> 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>
>><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<br>
>> > 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<br>
>> > 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>
>> > _______________________________________________<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>
><br>
><br>
</div></div></blockquote></div><br></div>