But at the time the mesa3d file src/gallium/drivers/nouveau/nv30/nv30_screen.c is called and when the various PUSH_DATA begin to be called there is not yet a call to nouveau_pushbuf_space. So it would generate a seg fault in push->curr. Again, sorry for the confusion and thanks for the reply. Awaiting for an answer if possible. Thanks in advance. 2015-11-02 14:44 GMT-03:00 Ilia Mirkin <imirkin at alum.mit.edu>:> See libdrm's pushbuf.c -- iirc push->cur points to a GART-mapped bo. > > http://cgit.freedesktop.org/mesa/drm/tree/nouveau/pushbuf.c#n682 > > nouveau_pushbuf_data(push, NULL, 0, 0); > nouveau_bo_ref(bo, &nvpb->bo); > nouveau_bo_ref(NULL, &bo); > > nvpb->bgn = nvpb->bo->map; > nvpb->ptr = nvpb->bgn; > push->cur = nvpb->bgn; > push->end = push->cur + (nvpb->bo->size / 4); > push->end -= 2 + push->rsvd_kick; /* space for suffix */ > > Not sure what problem you're trying to solve. > > -ilia > > On Mon, Nov 2, 2015 at 12:31 PM, Daniel Melo Jorge da Cunha > <dmjcunha at gmail.com> wrote: > > Hi, sorry if I misunderstood everything... > > > > In the file src/gallium/drivers/nouveau/nv30/nv30_screen.c there is > loans of > > PUSH_DATA which is basically *push->curr = data; > > > > I'm thinking that somehow push->curr is the bo->map = drm_mmap(...) > > that is called in nouveau_bo_map. But I cannot see how they are linked... > > Because when nouveau_bo_map calls nouveau_bo_wait > > push = cli_push_get(client, bo) returns NULL... > > > > Is push->curr the region of memory that we send data to the card? > > If so, how is it mapped? > > Has bo->map something to do with it? If so, how are they linked? > > > > _______________________________________________ > > Nouveau mailing list > > Nouveau at lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/nouveau > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20151102/5ef43c10/attachment-0001.html>
Errrr.... are you sure? nv30_screen_create starts with a bunch of stuff init'ing objects, and then does: BEGIN_NV04(push, NV01_SUBC(3D, OBJECT), 1); PUSH_DATA (push, screen->eng3d->handle); And as you can see in nv30_winsys.h: static inline void BEGIN_NV04(struct nouveau_pushbuf *push, int subc, int mthd, int size) { PUSH_SPACE(push, size + 1); PUSH_DATA (push, 0x00000000 | (size << 18) | (subc << 13) | mthd); } and PUSH_SPACE in turn calls nouveau_pushbuf_space. -ilia On Mon, Nov 2, 2015 at 1:36 PM, Daniel Melo Jorge da Cunha <dmjcunha at gmail.com> wrote:> But at the time the mesa3d file > src/gallium/drivers/nouveau/nv30/nv30_screen.c > is called and when the various PUSH_DATA begin to be called there is not yet > a call to nouveau_pushbuf_space. So it would generate a seg fault in > push->curr. Again, sorry for the confusion and thanks for the reply. > Awaiting > for an answer if possible. Thanks in advance. > > 2015-11-02 14:44 GMT-03:00 Ilia Mirkin <imirkin at alum.mit.edu>: >> >> See libdrm's pushbuf.c -- iirc push->cur points to a GART-mapped bo. >> >> http://cgit.freedesktop.org/mesa/drm/tree/nouveau/pushbuf.c#n682 >> >> nouveau_pushbuf_data(push, NULL, 0, 0); >> nouveau_bo_ref(bo, &nvpb->bo); >> nouveau_bo_ref(NULL, &bo); >> >> nvpb->bgn = nvpb->bo->map; >> nvpb->ptr = nvpb->bgn; >> push->cur = nvpb->bgn; >> push->end = push->cur + (nvpb->bo->size / 4); >> push->end -= 2 + push->rsvd_kick; /* space for suffix */ >> >> Not sure what problem you're trying to solve. >> >> -ilia >> >> On Mon, Nov 2, 2015 at 12:31 PM, Daniel Melo Jorge da Cunha >> <dmjcunha at gmail.com> wrote: >> > Hi, sorry if I misunderstood everything... >> > >> > In the file src/gallium/drivers/nouveau/nv30/nv30_screen.c there is >> > loans of >> > PUSH_DATA which is basically *push->curr = data; >> > >> > I'm thinking that somehow push->curr is the bo->map = drm_mmap(...) >> > that is called in nouveau_bo_map. But I cannot see how they are >> > linked... >> > Because when nouveau_bo_map calls nouveau_bo_wait >> > push = cli_push_get(client, bo) returns NULL... >> > >> > Is push->curr the region of memory that we send data to the card? >> > If so, how is it mapped? >> > Has bo->map something to do with it? If so, how are they linked? >> > >> > _______________________________________________ >> > Nouveau mailing list >> > Nouveau at lists.freedesktop.org >> > http://lists.freedesktop.org/mailman/listinfo/nouveau >> > > >
SORRY SORRY SORRY :) Thanks for the consideration. 2015-11-02 15:42 GMT-03:00 Ilia Mirkin <imirkin at alum.mit.edu>:> Errrr.... are you sure? > > nv30_screen_create starts with a bunch of stuff init'ing objects, and then > does: > > BEGIN_NV04(push, NV01_SUBC(3D, OBJECT), 1); > PUSH_DATA (push, screen->eng3d->handle); > > And as you can see in nv30_winsys.h: > > static inline void > BEGIN_NV04(struct nouveau_pushbuf *push, int subc, int mthd, int size) > { > PUSH_SPACE(push, size + 1); > PUSH_DATA (push, 0x00000000 | (size << 18) | (subc << 13) | mthd); > } > > and PUSH_SPACE in turn calls nouveau_pushbuf_space. > > -ilia > > On Mon, Nov 2, 2015 at 1:36 PM, Daniel Melo Jorge da Cunha > <dmjcunha at gmail.com> wrote: > > But at the time the mesa3d file > > src/gallium/drivers/nouveau/nv30/nv30_screen.c > > is called and when the various PUSH_DATA begin to be called there is not > yet > > a call to nouveau_pushbuf_space. So it would generate a seg fault in > > push->curr. Again, sorry for the confusion and thanks for the reply. > > Awaiting > > for an answer if possible. Thanks in advance. > > > > 2015-11-02 14:44 GMT-03:00 Ilia Mirkin <imirkin at alum.mit.edu>: > >> > >> See libdrm's pushbuf.c -- iirc push->cur points to a GART-mapped bo. > >> > >> http://cgit.freedesktop.org/mesa/drm/tree/nouveau/pushbuf.c#n682 > >> > >> nouveau_pushbuf_data(push, NULL, 0, 0); > >> nouveau_bo_ref(bo, &nvpb->bo); > >> nouveau_bo_ref(NULL, &bo); > >> > >> nvpb->bgn = nvpb->bo->map; > >> nvpb->ptr = nvpb->bgn; > >> push->cur = nvpb->bgn; > >> push->end = push->cur + (nvpb->bo->size / 4); > >> push->end -= 2 + push->rsvd_kick; /* space for suffix */ > >> > >> Not sure what problem you're trying to solve. > >> > >> -ilia > >> > >> On Mon, Nov 2, 2015 at 12:31 PM, Daniel Melo Jorge da Cunha > >> <dmjcunha at gmail.com> wrote: > >> > Hi, sorry if I misunderstood everything... > >> > > >> > In the file src/gallium/drivers/nouveau/nv30/nv30_screen.c there is > >> > loans of > >> > PUSH_DATA which is basically *push->curr = data; > >> > > >> > I'm thinking that somehow push->curr is the bo->map = drm_mmap(...) > >> > that is called in nouveau_bo_map. But I cannot see how they are > >> > linked... > >> > Because when nouveau_bo_map calls nouveau_bo_wait > >> > push = cli_push_get(client, bo) returns NULL... > >> > > >> > Is push->curr the region of memory that we send data to the card? > >> > If so, how is it mapped? > >> > Has bo->map something to do with it? If so, how are they linked? > >> > > >> > _______________________________________________ > >> > Nouveau mailing list > >> > Nouveau at lists.freedesktop.org > >> > http://lists.freedesktop.org/mailman/listinfo/nouveau > >> > > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20151102/0ff27c4d/attachment.html>