[Nouveau] [Bug 32959] X fails to set mode on NV11 and dies.
https://bugs.freedesktop.org/show_bug.cgi?id=32959 --- Comment #14 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 02:59:29 PST --- I added a xorg.conf to the 2.6.37 kernel, and got a GPU hang. Eep! Added xorg,conf and relevant logs. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] X fails to set mode on NV11 and dies.
https://bugs.freedesktop.org/show_bug.cgi?id=32959 --- Comment #15 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 03:00:48 PST --- Created an attachment (id=41905) -- (https://bugs.freedesktop.org/attachment.cgi?id=41905) xorg.conf used with 2.6.37 -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] X fails to set mode on NV11 and dies.
https://bugs.freedesktop.org/show_bug.cgi?id=32959 --- Comment #16 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 03:01:37 PST --- Created an attachment (id=41906) -- (https://bugs.freedesktop.org/attachment.cgi?id=41906) GPU hang with 2.6.37's xorg.conf -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] X fails to set mode on NV11 and dies.
https://bugs.freedesktop.org/show_bug.cgi?id=32959 --- Comment #17 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 03:02:33 PST --- Created an attachment (id=41907) -- (https://bugs.freedesktop.org/attachment.cgi?id=41907) GPU hang in 2.6.37 - Xorg.0.log -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 Alex Buell alex.bu...@munted.org.uk changed: What|Removed |Added Summary|X fails to set mode on NV11 |2.6.37 - NV11 goes into GPU |and dies. |hang -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 --- Comment #18 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 04:06:17 PST --- With diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index cfb8a3c..97de9e1 100644 (nv10_invalid_placement_range.patch), and same kernel parameter arguments, it boots just fine but X still exhibits problem. New logs added. Next thing to do is to test kernel without these parameters. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 --- Comment #19 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 04:06:56 PST --- Created an attachment (id=41910) -- (https://bugs.freedesktop.org/attachment.cgi?id=41910) w/ range patch and kernel args - dmesg -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 --- Comment #20 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 04:07:27 PST --- Created an attachment (id=41911) -- (https://bugs.freedesktop.org/attachment.cgi?id=41911) w/ range patch and kernel args - Xorg.0.log -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 --- Comment #21 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 04:23:54 PST --- Additonal debugging added to kernel parameters, new logs to follow. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 Alex Buell alex.bu...@munted.org.uk changed: What|Removed |Added Attachment #41910|0 |1 is obsolete|| --- Comment #22 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 04:24:42 PST --- Created an attachment (id=41913) -- (https://bugs.freedesktop.org/attachment.cgi?id=41913) w/ newrange patch and drm.debug kernel args - dmesg -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 Alex Buell alex.bu...@munted.org.uk changed: What|Removed |Added Attachment #41911|0 |1 is obsolete|| --- Comment #23 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 04:25:16 PST --- Created an attachment (id=41915) -- (https://bugs.freedesktop.org/attachment.cgi?id=41915) w/ newrange patch and drm.debug kernel args - Xorg.0.log -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 Alex Buell alex.bu...@munted.org.uk changed: What|Removed |Added Attachment #41913|0 |1 is obsolete|| --- Comment #25 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 05:34:26 PST --- Created an attachment (id=41919) -- (https://bugs.freedesktop.org/attachment.cgi?id=41919) w/ newer range patch, dmesg output -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 Alex Buell alex.bu...@munted.org.uk changed: What|Removed |Added Attachment #41915|0 |1 is obsolete|| --- Comment #26 from Alex Buell alex.bu...@munted.org.uk 2011-01-12 05:35:05 PST --- Created an attachment (id=41920) -- (https://bugs.freedesktop.org/attachment.cgi?id=41920) w/ newer range patch, Xorg.0.log -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 32959] 2.6.37 - NV11 goes into GPU hang
https://bugs.freedesktop.org/show_bug.cgi?id=32959 Alex Buell alex.bu...@munted.org.uk changed: What|Removed |Added Attachment #41919|application/octet-stream|text/plain mime type|| -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] AGP Nvidia Geforce 7800 GS to donate
Following suggestion from IRC, I am posting here to donate AGP Nvidia Geforce 7800GS BFG edition. It runs fine with Nouveau driver on Fedora 14. Because the AGP motherboard stopped working and is replaced by a PCI-E version, I have no longer use of that GPU. Should someone be interested to obtain this GPU, please send me email and your contact so I can ship it. Luya Tshimbalanga ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [libdrm PATCH 1/3] nouveau: remove unused OUT_RELOC2 and OUT_RELOCr
Marcin Slusarz marcin.slus...@gmail.com writes: --- nouveau/nouveau_pushbuf.h | 17 - 1 files changed, 0 insertions(+), 17 deletions(-) diff --git a/nouveau/nouveau_pushbuf.h b/nouveau/nouveau_pushbuf.h index 2a98789..70d0f28 100644 --- a/nouveau/nouveau_pushbuf.h +++ b/nouveau/nouveau_pushbuf.h @@ -109,15 +109,6 @@ OUT_RELOC(struct nouveau_channel *chan, struct nouveau_bo *bo, data, 0, flags, vor, tor); } -static __inline__ int -OUT_RELOC2(struct nouveau_channel *chan, struct nouveau_bo *bo, -unsigned data, unsigned data2, unsigned flags, -unsigned vor, unsigned tor) -{ - return nouveau_pushbuf_emit_reloc(chan, chan-cur++, bo, - data, data2, flags, vor, tor); -} - /* Raw data + flags depending on FB/TT buffer */ static __inline__ int OUT_RELOCd(struct nouveau_channel *chan, struct nouveau_bo *bo, @@ -143,14 +134,6 @@ OUT_RELOCl(struct nouveau_channel *chan, struct nouveau_bo *bo, return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_LOW, 0, 0); } -/* Low 32-bits of offset + GPU linear access range info */ -static __inline__ int -OUT_RELOCr(struct nouveau_channel *chan, struct nouveau_bo *bo, -unsigned delta, unsigned size, unsigned flags) -{ - return OUT_RELOC2(chan, bo, delta, size, flags | NOUVEAU_BO_LOW, 0, 0); -} - /* High 32-bits of offset */ static __inline__ int OUT_RELOCh(struct nouveau_channel *chan, struct nouveau_bo *bo, This patch series looks like a good clean-up. Ben, do you have any additional changes in mind for the libdrm API? (If you do they could go in together to avoid annoying users more often than necessary) pgpkBoeu2H8Yo.pgp Description: PGP signature ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [ddx PATCH v2] convert OUT_RELOCh + OUT_RELOCl to OUT_RELOC2
--- src/nv50_accel.c | 32 src/nv50_exa.c | 24 src/nv50_xv.c| 25 - 3 files changed, 24 insertions(+), 57 deletions(-) v2: s/OUT_RELOChl/OUT_RELOC2/g as requested diff --git a/src/nv50_accel.c b/src/nv50_accel.c index d6c7528..d2c44c7 100644 --- a/src/nv50_accel.c +++ b/src/nv50_accel.c @@ -148,9 +148,7 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn) OUT_RING (chan, 0x54); BEGIN_RING(chan, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - if (OUT_RELOCh(chan, pNv-tesla_scratch, PVP_OFFSET, - NOUVEAU_BO_VRAM | NOUVEAU_BO_WR) || - OUT_RELOCl(chan, pNv-tesla_scratch, PVP_OFFSET, + if (OUT_RELOC2(chan, pNv-tesla_scratch, PVP_OFFSET, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR)) { MARK_UNDO(chan); return FALSE; @@ -190,9 +188,7 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn) OUT_RING (chan, 0); BEGIN_RING(chan, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - if (OUT_RELOCh(chan, pNv-tesla_scratch, - PFP_OFFSET + PFP_S, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR) || - OUT_RELOCl(chan, pNv-tesla_scratch, + if (OUT_RELOC2(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_S, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR)) { MARK_UNDO(chan); return FALSE; @@ -208,9 +204,7 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn) OUT_RING (chan, 0xf641); OUT_RING (chan, 0xc785); BEGIN_RING(chan, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - if (OUT_RELOCh(chan, pNv-tesla_scratch, - PFP_OFFSET + PFP_C, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR) || - OUT_RELOCl(chan, pNv-tesla_scratch, + if (OUT_RELOC2(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_C, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR)) { MARK_UNDO(chan); return FALSE; @@ -236,9 +230,7 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn) OUT_RING (chan, 0xc004060d); OUT_RING (chan, 0x0781); BEGIN_RING(chan, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - if (OUT_RELOCh(chan, pNv-tesla_scratch, - PFP_OFFSET + PFP_CCA, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR) || - OUT_RELOCl(chan, pNv-tesla_scratch, + if (OUT_RELOC2(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_CCA, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR)) { MARK_UNDO(chan); return FALSE; @@ -264,9 +256,7 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn) OUT_RING (chan, 0xc007060d); OUT_RING (chan, 0x0781); BEGIN_RING(chan, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - if (OUT_RELOCh(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_CCASA, - NOUVEAU_BO_VRAM | NOUVEAU_BO_WR) || - OUT_RELOCl(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_CCASA, + if (OUT_RELOC2(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_CCASA, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR)) { MARK_UNDO(chan); return FALSE; @@ -292,9 +282,7 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn) OUT_RING (chan, 0xc004060d); OUT_RING (chan, 0x0781); BEGIN_RING(chan, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - if (OUT_RELOCh(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_S_A8, - NOUVEAU_BO_VRAM | NOUVEAU_BO_WR) || - OUT_RELOCl(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_S_A8, + if (OUT_RELOC2(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_S_A8, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR)) { MARK_UNDO(chan); return FALSE; @@ -314,9 +302,7 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn) OUT_RING (chan, 0x100d); OUT_RING (chan, 0x0403c781); BEGIN_RING(chan, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - if (OUT_RELOCh(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_C_A8, - NOUVEAU_BO_VRAM | NOUVEAU_BO_WR) || - OUT_RELOCl(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_C_A8, + if (OUT_RELOC2(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_C_A8, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR)) { MARK_UNDO(chan); return FALSE; @@ -342,9 +328,7 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn) OUT_RING (chan, 0x1609); OUT_RING (chan, 0x0403c781); BEGIN_RING(chan, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - if (OUT_RELOCh(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_NV12, - NOUVEAU_BO_VRAM | NOUVEAU_BO_WR) || - OUT_RELOCl(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_NV12, + if (OUT_RELOC2(chan, pNv-tesla_scratch, PFP_OFFSET + PFP_NV12, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR)) { MARK_UNDO(chan); return FALSE; diff --git a/src/nv50_exa.c b/src/nv50_exa.c index e8ff5aa..776187f
[Nouveau] [mesa PATCH 2/2 v2] gallium/nouveau: convert OUT_RELOCh + OUT_RELOCl to OUT_RELOC2
--- src/gallium/drivers/nv50/nv50_query.c |6 +-- src/gallium/drivers/nv50/nv50_screen.c | 39 src/gallium/drivers/nv50/nv50_shader_state.c |3 +- src/gallium/drivers/nv50/nv50_surface.c| 12 ++- src/gallium/drivers/nv50/nv50_transfer.c |6 +-- src/gallium/drivers/nv50/nv50_vbo.c|4 +-- src/gallium/drivers/nvc0/nvc0_fence.c |3 +- src/gallium/drivers/nvc0/nvc0_screen.c | 24 +-- src/gallium/drivers/nvc0/nvc0_state_validate.c | 21 src/gallium/drivers/nvc0/nvc0_surface.c| 12 ++- src/gallium/drivers/nvc0/nvc0_tex.c|3 +- src/gallium/drivers/nvc0/nvc0_transfer.c | 18 --- src/gallium/drivers/nvc0/nvc0_vbo.c|3 +- 13 files changed, 51 insertions(+), 103 deletions(-) v2: s/OUT_RELOChl/OUT_RELOC2/g as requested diff --git a/src/gallium/drivers/nv50/nv50_query.c b/src/gallium/drivers/nv50/nv50_query.c index 53f9482..ead22a1 100644 --- a/src/gallium/drivers/nv50/nv50_query.c +++ b/src/gallium/drivers/nv50/nv50_query.c @@ -95,8 +95,7 @@ nv50_query_end(struct pipe_context *pipe, struct pipe_query *pq) MARK_RING (chan, 5, 2); /* flush on lack of space or relocs */ BEGIN_RING(chan, tesla, NV50TCL_QUERY_ADDRESS_HIGH, 4); - OUT_RELOCh(chan, q-bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_WR); - OUT_RELOCl(chan, q-bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_WR); + OUT_RELOC2(chan, q-bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_WR); OUT_RING (chan, 0x); OUT_RING (chan, 0x0100f002); @@ -150,8 +149,7 @@ nv50_render_condition(struct pipe_context *pipe, } BEGIN_RING(chan, tesla, NV50TCL_COND_ADDRESS_HIGH, 3); - OUT_RELOCh(chan, q-bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_RD); - OUT_RELOCl(chan, q-bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_RD); + OUT_RELOC2(chan, q-bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_RD); OUT_RING (chan, NV50TCL_COND_MODE_RES); } diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index edc3d54..ce216e1 100644 --- a/src/gallium/drivers/nv50/nv50_screen.c +++ b/src/gallium/drivers/nv50/nv50_screen.c @@ -262,8 +262,7 @@ nv50_screen_reloc_constbuf(struct nv50_screen *screen, unsigned cbi) } BGN_RELOC (chan, bo, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3, rl); - OUT_RELOCh(chan, bo, 0, rl); - OUT_RELOCl(chan, bo, 0, rl); + OUT_RELOC2(chan, bo, 0, rl); OUT_RELOC (chan, bo, (cbi 16) | size, rl, 0, 0); } @@ -282,19 +281,16 @@ nv50_screen_relocs(struct nv50_screen *screen) OUT_RING (chan, 0); BGN_RELOC (chan, screen-tic, tesla, NV50TCL_TIC_ADDRESS_HIGH, 2, rl); - OUT_RELOCh(chan, screen-tic, 0, rl); - OUT_RELOCl(chan, screen-tic, 0, rl); + OUT_RELOC2(chan, screen-tic, 0, rl); BGN_RELOC (chan, screen-tsc, tesla, NV50TCL_TSC_ADDRESS_HIGH, 2, rl); - OUT_RELOCh(chan, screen-tsc, 0, rl); - OUT_RELOCl(chan, screen-tsc, 0, rl); + OUT_RELOC2(chan, screen-tsc, 0, rl); nv50_screen_reloc_constbuf(screen, NV50_CB_PMISC); BGN_RELOC (chan, screen-constbuf_misc[0], tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3, rl); - OUT_RELOCh(chan, screen-constbuf_misc[0], 0x200, rl); - OUT_RELOCl(chan, screen-constbuf_misc[0], 0x200, rl); + OUT_RELOC2(chan, screen-constbuf_misc[0], 0x200, rl); OUT_RELOC (chan, screen-constbuf_misc[0], (NV50_CB_AUX 16) | 0x0200, rl, 0, 0); @@ -303,16 +299,14 @@ nv50_screen_relocs(struct nv50_screen *screen) BGN_RELOC (chan, screen-stack_bo, tesla, NV50TCL_STACK_ADDRESS_HIGH, 2, rl); - OUT_RELOCh(chan, screen-stack_bo, 0, rl); - OUT_RELOCl(chan, screen-stack_bo, 0, rl); + OUT_RELOC2(chan, screen-stack_bo, 0, rl); if (!screen-cur_ctx-req_lmem) return; BGN_RELOC (chan, screen-local_bo, tesla, NV50TCL_LOCAL_ADDRESS_HIGH, 2, rl); - OUT_RELOCh(chan, screen-local_bo, 0, rl); - OUT_RELOCl(chan, screen-local_bo, 0, rl); + OUT_RELOC2(chan, screen-local_bo, 0, rl); } #ifndef NOUVEAU_GETPARAM_GRAPH_UNITS @@ -484,12 +478,10 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev) return NULL; } BEGIN_RING(chan, screen-tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - OUT_RELOCh(chan, screen-constbuf_misc[0], 0, rl); - OUT_RELOCl(chan, screen-constbuf_misc[0], 0, rl); + OUT_RELOC2(chan, screen-constbuf_misc[0], 0, rl); OUT_RING (chan, (NV50_CB_PMISC 16) | 0x0200); BEGIN_RING(chan, screen-tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); - OUT_RELOCh(chan, screen-constbuf_misc[0], 0x200, rl); - OUT_RELOCl(chan, screen-constbuf_misc[0], 0x200, rl); + OUT_RELOC2(chan, screen-constbuf_misc[0], 0x200, rl);
[Nouveau] [mesa PATCH 3/2 ; )] gallium/nouveau: introduce so_reloc2 as so_reloc(high) + so_reloc(low)
--- src/gallium/drivers/nouveau/nouveau_stateobj.h |8 src/gallium/drivers/nv50/nv50_shader_state.c | 15 +++ src/gallium/drivers/nv50/nv50_state_validate.c | 15 +-- src/gallium/drivers/nv50/nv50_vbo.c| 15 --- 4 files changed, 20 insertions(+), 33 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h index 7b06518..be8850b 100644 --- a/src/gallium/drivers/nouveau/nouveau_stateobj.h +++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h @@ -211,6 +211,14 @@ so_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo, so-cur_reloc++; } +static INLINE void +so_reloc2(struct nouveau_stateobj *so, struct nouveau_bo *bo, +unsigned data, unsigned flags, unsigned vor, unsigned tor) +{ + so_reloc(so, bo, data, flags | NOUVEAU_BO_HIGH, vor, tor); + so_reloc(so, bo, data, flags | NOUVEAU_BO_LOW, vor, tor); +} + /* Determine if this buffer object is referenced by this state object. */ static INLINE boolean so_bo_is_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo) diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c index ffdd8b9..e3e47dd 100644 --- a/src/gallium/drivers/nv50/nv50_shader_state.c +++ b/src/gallium/drivers/nv50/nv50_shader_state.c @@ -215,10 +215,7 @@ nv50_vp_update_stateobj(struct nv50_context *nv50, struct nv50_program *p) nv50_program_validate_code(nv50, p); so_method(so, tesla, NV50TCL_VP_ADDRESS_HIGH, 2); - so_reloc (so, p-bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | - NOUVEAU_BO_HIGH, 0, 0); - so_reloc (so, p-bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | - NOUVEAU_BO_LOW, 0, 0); + so_reloc2(so, p-bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD, 0, 0); so_method(so, tesla, NV50TCL_VP_ATTR_EN_0, 2); so_data (so, p-vp.attrs[0]); so_data (so, p-vp.attrs[1]); @@ -242,10 +239,7 @@ nv50_fp_update_stateobj(struct nv50_context *nv50, struct nv50_program *p) nv50_program_validate_code(nv50, p); so_method(so, tesla, NV50TCL_FP_ADDRESS_HIGH, 2); - so_reloc (so, p-bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | - NOUVEAU_BO_HIGH, 0, 0); - so_reloc (so, p-bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | - NOUVEAU_BO_LOW, 0, 0); + so_reloc2(so, p-bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD, 0, 0); so_method(so, tesla, NV50TCL_FP_REG_ALLOC_TEMP, 1); so_data (so, p-max_gpr); so_method(so, tesla, NV50TCL_FP_RESULT_COUNT, 1); @@ -270,10 +264,7 @@ nv50_gp_update_stateobj(struct nv50_context *nv50, struct nv50_program *p) nv50_program_validate_code(nv50, p); so_method(so, tesla, NV50TCL_GP_ADDRESS_HIGH, 2); - so_reloc (so, p-bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | - NOUVEAU_BO_HIGH, 0, 0); - so_reloc (so, p-bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | - NOUVEAU_BO_LOW, 0, 0); + so_reloc2(so, p-bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD, 0, 0); so_method(so, tesla, NV50TCL_GP_REG_ALLOC_TEMP, 1); so_data (so, p-max_gpr); so_method(so, tesla, NV50TCL_GP_REG_ALLOC_RESULT, 1); diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c index ae02143..80737c1 100644 --- a/src/gallium/drivers/nv50/nv50_state_validate.c +++ b/src/gallium/drivers/nv50/nv50_state_validate.c @@ -63,10 +63,8 @@ validate_fb(struct nv50_context *nv50) so_data (so, fb-cbufs[i]-height); so_method(so, tesla, NV50TCL_RT_ADDRESS_HIGH(i), 5); - so_reloc (so, bo, ((struct nv50_surface *)fb-cbufs[i])-offset, NOUVEAU_BO_VRAM | - NOUVEAU_BO_HIGH | NOUVEAU_BO_RDWR, 0, 0); - so_reloc (so, bo, ((struct nv50_surface *)fb-cbufs[i])-offset, NOUVEAU_BO_VRAM | - NOUVEAU_BO_LOW | NOUVEAU_BO_RDWR, 0, 0); + so_reloc2(so, bo, ((struct nv50_surface *)fb-cbufs[i])-offset, NOUVEAU_BO_VRAM | + NOUVEAU_BO_RDWR, 0, 0); so_data (so, nv50_format_table[fb-cbufs[i]-format].rt); so_data (so, nv50_miptree(pt)- level[fb-cbufs[i]-u.tex.level].tile_mode 4); @@ -92,10 +90,8 @@ validate_fb(struct nv50_context *nv50) assert(nv50_format_table[fb-zsbuf-format].rt); so_method(so, tesla, NV50TCL_ZETA_ADDRESS_HIGH, 5); - so_reloc (so, bo, ((struct nv50_surface *)(fb-zsbuf))-offset, NOUVEAU_BO_VRAM | - NOUVEAU_BO_HIGH | NOUVEAU_BO_RDWR, 0, 0); - so_reloc (so, bo, ((struct nv50_surface *)(fb-zsbuf))-offset, NOUVEAU_BO_VRAM | - NOUVEAU_BO_LOW | NOUVEAU_BO_RDWR, 0, 0); + so_reloc2(so, bo, ((struct nv50_surface *)(fb-zsbuf))-offset, NOUVEAU_BO_VRAM | + NOUVEAU_BO_RDWR, 0, 0); so_data (so,
[Nouveau] [libdrm PATCH 2/3 v2] nouveau: add new OUT_RELOC2 (OUT_RELOCh + OUT_RELOCl)
--- nouveau/nouveau_pushbuf.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) v2: s/OUT_RELOChl/OUT_RELOC2/g as requested diff --git a/nouveau/nouveau_pushbuf.h b/nouveau/nouveau_pushbuf.h index 70d0f28..9273272 100644 --- a/nouveau/nouveau_pushbuf.h +++ b/nouveau/nouveau_pushbuf.h @@ -142,4 +142,15 @@ OUT_RELOCh(struct nouveau_channel *chan, struct nouveau_bo *bo, return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_HIGH, 0, 0); } +/* High 32-bits, then low 32-bits of offset */ +static __inline__ int +OUT_RELOC2(struct nouveau_channel *chan, struct nouveau_bo *bo, + unsigned delta, unsigned flags) +{ + int r = OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_HIGH, 0, 0); + if (r) + return r; + return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_LOW, 0, 0); +} + #endif -- 1.7.3.3 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH] Add PFIFO and PGRAPH pausing methods
Martin Peres martin.pe...@free.fr writes: Hi, I'm still working on getting the reclocking work done right. There are several parts I identify: - Pausing PFIFO (with its caches), pause PGRAPH and wait for idle - Stop some PLL (I guess it is more, physically disconnect them from the engines) using the 0xc040 register. - reclock memory - reclock the other engines - Make sure the display doesn't blow up Depending on the cards, I have completed all of the steps or none. Anyway, pausing PFIFO and PGRAPH works well on all the card I tested and so, I would like it to be pushed. I have a new theory upon the PLL_SUPERVISOR(0xc040) that I want to test. When I'm done with this, I'll put together a patch for it and continue on the other steps. Please provide me with some feedback on the patch or push it if nothing bothers you. Thanks, some comments inline. Martin PS: I'm quite busy at the moment, I'll write an in-depth mail when I've verified my theories and got proper support on other cards than the nv86 ones. From f7ad98f4a857dd4b1892712d15f93c13eb0669e3 Mon Sep 17 00:00:00 2001 From: Martin Peres martin.pe...@ensi-bourges.fr Date: Mon, 10 Jan 2011 00:44:05 +0100 Subject: [PATCH] Pause PFIFO and PGRAPH before reclocking Signed-off-by: Martin Peres martin.pe...@ensi-bourges.fr --- drivers/gpu/drm/nouveau/nouveau_drv.h | 15 +++ drivers/gpu/drm/nouveau/nouveau_pm.c| 32 ++- drivers/gpu/drm/nouveau/nouveau_reg.h |3 + drivers/gpu/drm/nouveau/nouveau_state.c | 51 +++- drivers/gpu/drm/nouveau/nv04_fifo.c | 16 +++ drivers/gpu/drm/nouveau/nv50_fifo.c | 20 + drivers/gpu/drm/nouveau/nv50_graph.c| 66 +++ 7 files changed, 200 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 6d749b7..b0c52c7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -359,6 +359,12 @@ struct nouveau_fifo_engine { int (*load_context)(struct nouveau_channel *); int (*unload_context)(struct drm_device *); void (*tlb_flush)(struct drm_device *dev); + + int (*pause)(struct drm_device *); + void (*unpause)(struct drm_device *); + + int (*cache_pause)(struct drm_device *); + void (*cache_unpause)(struct drm_device *); You could fold fifo-cache_pause() into fifo-pause(). I don't see any reason to have two separate pairs of callbacks here, they're always going to be called one after the other. }; struct nouveau_pgraph_engine { @@ -383,6 +389,9 @@ struct nouveau_pgraph_engine { void (*tlb_flush)(struct drm_device *dev); void (*set_tile_region)(struct drm_device *dev, int i); + + int (*pause)(struct drm_device *); + void (*unpause)(struct drm_device *); }; struct nouveau_display_engine { @@ -1094,6 +1103,8 @@ extern void nv04_fifo_destroy_context(struct nouveau_channel *); extern int nv04_fifo_load_context(struct nouveau_channel *); extern int nv04_fifo_unload_context(struct drm_device *); extern void nv04_fifo_isr(struct drm_device *); +extern void nv04_fifo_cache_pause(struct drm_device *dev); +extern void nv04_fifo_cache_unpause(struct drm_device *dev); /* nv10_fifo.c */ extern int nv10_fifo_init(struct drm_device *); @@ -1117,6 +1128,8 @@ extern void nv50_fifo_destroy_context(struct nouveau_channel *); extern int nv50_fifo_load_context(struct nouveau_channel *); extern int nv50_fifo_unload_context(struct drm_device *); extern void nv50_fifo_tlb_flush(struct drm_device *dev); +extern int nv50_fifo_pause(struct drm_device *); +extern void nv50_fifo_unpause(struct drm_device *); /* nvc0_fifo.c */ extern int nvc0_fifo_init(struct drm_device *); @@ -1189,6 +1202,8 @@ extern int nv50_graph_unload_context(struct drm_device *); extern int nv50_grctx_init(struct nouveau_grctx *); extern void nv50_graph_tlb_flush(struct drm_device *dev); extern void nv86_graph_tlb_flush(struct drm_device *dev); +extern int nv50_graph_pause(struct drm_device *dev); +extern void nv50_graph_unpause(struct drm_device *dev); extern struct nouveau_enum nv50_data_error_names[]; /* nvc0_graph.c */ diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index fb846a3..233deec 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c @@ -59,6 +59,7 @@ nouveau_pm_perflvl_set(struct drm_device *dev, struct nouveau_pm_level *perflvl) { struct drm_nouveau_private *dev_priv = dev-dev_private; struct nouveau_pm_engine *pm = dev_priv-engine.pm; + unsigned long flags; int ret; if (perflvl == pm-cur) @@ -72,13 +73,42 @@ nouveau_pm_perflvl_set(struct drm_device *dev, struct nouveau_pm_level *perflvl) } } + /* Do
[Nouveau] [kernel PATCH] drm/nouveau: add NOUVEAU_GEM_RELOC_HILO
add new relocation flag which allows to halving number of relocation entries on = nv50 cards Signed-off-by: Marcin Slusarz marcin.slus...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_gem.c | 22 +++--- include/drm/nouveau_drm.h |1 + 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 9a1fdcf..2e21412 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -507,6 +507,7 @@ nouveau_gem_pushbuf_reloc_apply(struct drm_device *dev, struct drm_nouveau_gem_pushbuf_bo *b; struct nouveau_bo *nvbo; uint32_t data; + uint32_t data2; if (unlikely(r-bo_index req-nr_buffers)) { NV_ERROR(dev, reloc bo index invalid\n); @@ -544,17 +545,22 @@ nouveau_gem_pushbuf_reloc_apply(struct drm_device *dev, if (r-flags NOUVEAU_GEM_RELOC_LOW) data = b-presumed.offset + r-data; - else - if (r-flags NOUVEAU_GEM_RELOC_HIGH) + else if (r-flags NOUVEAU_GEM_RELOC_HIGH) data = (b-presumed.offset + r-data) 32; - else + else if (r-flags NOUVEAU_GEM_RELOC_HILO) { + data = (b-presumed.offset + r-data) 32; + data2 = b-presumed.offset + r-data; + } else data = r-data; if (r-flags NOUVEAU_GEM_RELOC_OR) { - if (b-presumed.domain == NOUVEAU_GEM_DOMAIN_GART) - data |= r-tor; - else - data |= r-vor; + if (b-presumed.domain == NOUVEAU_GEM_DOMAIN_GART) { + data |= r-tor; + data2 |= r-tor; + } else { + data |= r-vor; + data2 |= r-vor; + } } spin_lock(nvbo-bo.lock); @@ -566,6 +572,8 @@ nouveau_gem_pushbuf_reloc_apply(struct drm_device *dev, } nouveau_bo_wr32(nvbo, r-reloc_bo_offset 2, data); + if (r-flags NOUVEAU_GEM_RELOC_HILO) + nouveau_bo_wr32(nvbo, (r-reloc_bo_offset 2) + 1, data2); } kfree(reloc); diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index bc5590b..126ea8a 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h @@ -137,6 +137,7 @@ struct drm_nouveau_gem_pushbuf_bo { #define NOUVEAU_GEM_RELOC_LOW (1 0) #define NOUVEAU_GEM_RELOC_HIGH (1 1) #define NOUVEAU_GEM_RELOC_OR (1 2) +#define NOUVEAU_GEM_RELOC_HILO (1 3) #define NOUVEAU_GEM_MAX_RELOCS 1024 struct drm_nouveau_gem_pushbuf_reloc { uint32_t reloc_bo_index; -- 1.7.3.3 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [libdrm PATCH] nouveau: optimize OUT_RELOC2
use one relocation with newly introduced flag unfortunately we can't enable it unconditionally, because we don't know if the kernel supports it... --- include/drm/nouveau_drm.h |1 + nouveau/nouveau_bo.h |1 + nouveau/nouveau_pushbuf.h |9 + nouveau/nouveau_reloc.c | 28 ++-- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index b18cad0..4c35399 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h @@ -138,6 +138,7 @@ struct drm_nouveau_gem_pushbuf_bo { #define NOUVEAU_GEM_RELOC_LOW (1 0) #define NOUVEAU_GEM_RELOC_HIGH (1 1) #define NOUVEAU_GEM_RELOC_OR (1 2) +#define NOUVEAU_GEM_RELOC_HILO (1 3) #define NOUVEAU_GEM_MAX_RELOCS 1024 struct drm_nouveau_gem_pushbuf_reloc { uint32_t reloc_bo_index; diff --git a/nouveau/nouveau_bo.h b/nouveau/nouveau_bo.h index 3a1f2d4..bbf88ec 100644 --- a/nouveau/nouveau_bo.h +++ b/nouveau/nouveau_bo.h @@ -37,6 +37,7 @@ #define NOUVEAU_BO_NOSYNC (1 13) #define NOUVEAU_BO_NOWAIT (1 14) #define NOUVEAU_BO_IFLUSH (1 15) +#define NOUVEAU_BO_HILO (1 16) #define NOUVEAU_BO_DUMMY (1 31) #define NOUVEAU_BO_TILE_LAYOUT_MASK 0xff00 diff --git a/nouveau/nouveau_pushbuf.h b/nouveau/nouveau_pushbuf.h index f256c70..92bffde 100644 --- a/nouveau/nouveau_pushbuf.h +++ b/nouveau/nouveau_pushbuf.h @@ -142,15 +142,24 @@ OUT_RELOCh(struct nouveau_channel *chan, struct nouveau_bo *bo, return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_HIGH, 0, 0); } +//disabled for now +//#define NOUVEAU_DRM_NEW_RELOC /* High 32-bits, then low 32-bits of offset */ static __inline__ int OUT_RELOC2(struct nouveau_channel *chan, struct nouveau_bo *bo, unsigned delta, unsigned flags) { +#ifdef NOUVEAU_DRM_NEW_RELOC + int r = nouveau_pushbuf_emit_reloc(chan, chan-cur, bo, + delta, flags | NOUVEAU_BO_HILO, 0, 0); + chan-cur += 2; + return r; +#else int r = OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_HIGH, 0, 0); if (r) return r; return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_LOW, 0, 0); +#endif } #endif diff --git a/nouveau/nouveau_reloc.c b/nouveau/nouveau_reloc.c index c636333..864ab61 100644 --- a/nouveau/nouveau_reloc.c +++ b/nouveau/nouveau_reloc.c @@ -29,19 +29,21 @@ static uint32_t nouveau_reloc_calc(struct drm_nouveau_gem_pushbuf_bo *pbbo, - struct drm_nouveau_gem_pushbuf_reloc *r) + struct drm_nouveau_gem_pushbuf_reloc *r, + uint32_t flags) { uint32_t push = 0; + flags |= r-flags; - if (r-flags NOUVEAU_GEM_RELOC_LOW) + if (flags NOUVEAU_GEM_RELOC_LOW) push = (pbbo-presumed.offset + r-data); else - if (r-flags NOUVEAU_GEM_RELOC_HIGH) + if (flags NOUVEAU_GEM_RELOC_HIGH) push = (pbbo-presumed.offset + r-data) 32; else push = r-data; - if (r-flags NOUVEAU_GEM_RELOC_OR) { + if (flags NOUVEAU_GEM_RELOC_OR) { if (pbbo-presumed.domain NOUVEAU_GEM_DOMAIN_VRAM) push |= r-vor; else @@ -138,15 +140,29 @@ nouveau_reloc_emit(struct nouveau_channel *chan, struct nouveau_bo *reloc_bo, r-flags |= NOUVEAU_GEM_RELOC_HIGH; if (flags NOUVEAU_BO_OR) r-flags |= NOUVEAU_GEM_RELOC_OR; + if (flags NOUVEAU_BO_HILO) + r-flags |= NOUVEAU_GEM_RELOC_HILO; r-data = data; r-vor = vor; r-tor = tor; if (reloc_ptr) { if (flags NOUVEAU_BO_DUMMY) - *reloc_ptr = 0; + if (flags NOUVEAU_BO_HILO) { + reloc_ptr[0] = 0; + reloc_ptr[1] = 0; + } else + *reloc_ptr = 0; else - *reloc_ptr = nouveau_reloc_calc(pbbo, r); + { + if (flags NOUVEAU_BO_HILO) { + reloc_ptr[0] = nouveau_reloc_calc(pbbo, r, + NOUVEAU_GEM_RELOC_HIGH); + reloc_ptr[1] = nouveau_reloc_calc(pbbo, r, + NOUVEAU_GEM_RELOC_LOW); + } else + *reloc_ptr = nouveau_reloc_calc(pbbo, r, 0); + } } return 0; -- 1.7.3.3 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [mesa PATCH] gallium/nouveau: optimize so_reloc2
use one relocation with newly introduced flag unfortunately we can't enable it unconditionally, because we don't know if the kernel supports it... --- src/gallium/drivers/nouveau/nouveau_stateobj.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h index be8850b..4a08ba3 100644 --- a/src/gallium/drivers/nouveau/nouveau_stateobj.h +++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h @@ -182,6 +182,9 @@ so_method(struct nouveau_stateobj *so, struct nouveau_grobj *gr, so-cur = 0; } +//disabled for now +//#define NOUVEAU_MESA_NEW_RELOC + static INLINE void so_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo, unsigned data, unsigned flags, unsigned vor, unsigned tor) @@ -208,6 +211,10 @@ so_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo, r[so-cur_reloc].tor = tor; so_data(so, data); +#if defined(NOUVEAU_MESA_NEW_RELOC) defined(NOUVEAU_BO_HILO) + if (flags NOUVEAU_BO_HILO) + so_data(so, data); +#endif so-cur_reloc++; } @@ -215,8 +222,12 @@ static INLINE void so_reloc2(struct nouveau_stateobj *so, struct nouveau_bo *bo, unsigned data, unsigned flags, unsigned vor, unsigned tor) { +#if defined(NOUVEAU_MESA_NEW_RELOC) defined(NOUVEAU_BO_HILO) + so_reloc(so, bo, data, flags | NOUVEAU_BO_HILO, vor, tor); +#else so_reloc(so, bo, data, flags | NOUVEAU_BO_HIGH, vor, tor); so_reloc(so, bo, data, flags | NOUVEAU_BO_LOW, vor, tor); +#endif } /* Determine if this buffer object is referenced by this state object. */ -- 1.7.3.3 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [kernel PATCH] drm/nouveau: add NOUVEAU_GEM_RELOC_HILO
Marcin Slusarz marcin.slus...@gmail.com writes: add new relocation flag which allows to halving number of relocation entries on = nv50 cards I suspect that this change is unnecessary. If you're actually seeing a performance improvement (I guess you are?), it's very likely to be masking the actual root of the problem -- last time I checked the nv50 gallium pipe driver was rather careless about reloc re-submission (it re-submits the whole reloc chain once for every draw call instead of once for every pushbuf flush), and nouveau_reloc_emit() and friends are very unoptimized. I'm betting that using HILO or not will make pretty much no difference once those two places are fixed :). Signed-off-by: Marcin Slusarz marcin.slus...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_gem.c | 22 +++--- include/drm/nouveau_drm.h |1 + 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 9a1fdcf..2e21412 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -507,6 +507,7 @@ nouveau_gem_pushbuf_reloc_apply(struct drm_device *dev, struct drm_nouveau_gem_pushbuf_bo *b; struct nouveau_bo *nvbo; uint32_t data; + uint32_t data2; if (unlikely(r-bo_index req-nr_buffers)) { NV_ERROR(dev, reloc bo index invalid\n); @@ -544,17 +545,22 @@ nouveau_gem_pushbuf_reloc_apply(struct drm_device *dev, if (r-flags NOUVEAU_GEM_RELOC_LOW) data = b-presumed.offset + r-data; - else - if (r-flags NOUVEAU_GEM_RELOC_HIGH) + else if (r-flags NOUVEAU_GEM_RELOC_HIGH) data = (b-presumed.offset + r-data) 32; - else + else if (r-flags NOUVEAU_GEM_RELOC_HILO) { + data = (b-presumed.offset + r-data) 32; + data2 = b-presumed.offset + r-data; + } else data = r-data; if (r-flags NOUVEAU_GEM_RELOC_OR) { - if (b-presumed.domain == NOUVEAU_GEM_DOMAIN_GART) - data |= r-tor; - else - data |= r-vor; + if (b-presumed.domain == NOUVEAU_GEM_DOMAIN_GART) { + data |= r-tor; + data2 |= r-tor; + } else { + data |= r-vor; + data2 |= r-vor; + } } spin_lock(nvbo-bo.lock); @@ -566,6 +572,8 @@ nouveau_gem_pushbuf_reloc_apply(struct drm_device *dev, } nouveau_bo_wr32(nvbo, r-reloc_bo_offset 2, data); + if (r-flags NOUVEAU_GEM_RELOC_HILO) + nouveau_bo_wr32(nvbo, (r-reloc_bo_offset 2) + 1, data2); } kfree(reloc); diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index bc5590b..126ea8a 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h @@ -137,6 +137,7 @@ struct drm_nouveau_gem_pushbuf_bo { #define NOUVEAU_GEM_RELOC_LOW (1 0) #define NOUVEAU_GEM_RELOC_HIGH (1 1) #define NOUVEAU_GEM_RELOC_OR (1 2) +#define NOUVEAU_GEM_RELOC_HILO (1 3) #define NOUVEAU_GEM_MAX_RELOCS 1024 struct drm_nouveau_gem_pushbuf_reloc { uint32_t reloc_bo_index; pgpn658v5svsE.pgp Description: PGP signature ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [kernel PATCH] drm/nouveau: add NOUVEAU_GEM_RELOC_HILO
On Wed, Jan 12, 2011 at 10:08:55PM +0100, Francisco Jerez wrote: Marcin Slusarz marcin.slus...@gmail.com writes: add new relocation flag which allows to halving number of relocation entries on = nv50 cards I suspect that this change is unnecessary. If you're actually seeing a performance improvement (I guess you are?), it's very likely to be I did it for performance reasons, but actual improvement is very small (0.3%). I sent these patches, because it's just better to do less and use less memory. masking the actual root of the problem -- last time I checked the nv50 gallium pipe driver was rather careless about reloc re-submission (it re-submits the whole reloc chain once for every draw call instead of once for every pushbuf flush), and nouveau_reloc_emit() and friends are very unoptimized. I'm betting that using HILO or not will make pretty much no difference once those two places are fixed :). It looks they are already fixed :). Well, you can treat these patches as data (relocations are not a bottleneck) and forget about them. Marcin ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau