[Nouveau] [PATCH] nouveau: forward error generated while resuming objects tree

2019-03-28 Thread Tobias Klausmann
-functioning state. Signed-off-by: Tobias Klausmann --- drivers/gpu/drm/nouveau/nouveau_drm.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 5020265bfbd9..56a107f3a0e1 100644

Re: [Nouveau] Nouveau dmem NULL Pointer deref (SVM)

2019-03-21 Thread Tobias Klausmann
On 21.03.19 20:30, Tobias Klausmann wrote: On 21.03.19 18:12, Jerome Glisse wrote: On Thu, Mar 21, 2019 at 04:59:14PM +0100, Tobias Klausmann wrote: Hi, just for your information and maybe for some help: with 5.1rc1 and SVM enabled i see the following backtrace [1] when the nouveau card

Re: [Nouveau] Nouveau dmem NULL Pointer deref (SVM)

2019-03-21 Thread Tobias Klausmann
On 21.03.19 18:12, Jerome Glisse wrote: On Thu, Mar 21, 2019 at 04:59:14PM +0100, Tobias Klausmann wrote: Hi, just for your information and maybe for some help: with 5.1rc1 and SVM enabled i see the following backtrace [1] when the nouveau card (reverse prime) goes to sleep, for now i have

[Nouveau] Nouveau dmem NULL Pointer deref (SVM)

2019-03-21 Thread Tobias Klausmann
Hi, just for your information and maybe for some help: with 5.1rc1 and SVM enabled i see the following backtrace [1] when the nouveau card (reverse prime) goes to sleep, for now i have papered over with [2] which leaves me with userspace hangs. Any pointers where to look for the actual culprit

Re: [Nouveau] [PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed

2018-01-26 Thread Tobias Klausmann
hwmon. On Fri, Jan 26, 2018 at 2:40 PM, Tobias Klausmann wrote: Not sure if i understand completely what you intend to say here, with this we prevent hwmon from reporting utterly wrong temperature values returning an error (we could return -EBUSY or somehting instead, granted), yet if the device is

Re: [Nouveau] [PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed

2018-01-26 Thread Tobias Klausmann
obias Klausmann wrote: This fixes wrong temperature outputs e.g. 511°C if the card is asleep. Signed-off-by: Tobias Klausmann --- drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100

[Nouveau] [PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed

2018-01-25 Thread Tobias Klausmann
This fixes wrong temperature outputs e.g. 511°C if the card is asleep. Signed-off-by: Tobias Klausmann --- drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c b/drivers/gpu

[Nouveau] [PATCH v2] nv50/ir: Initialize all members of GCRA (trivial)

2017-12-30 Thread Tobias Klausmann
v2: use initialization list (Pierre) Signed-off-by: Tobias Klausmann Reviewed-by: Pierre Moreau --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium

Re: [Nouveau] nouveau. swiotlb: coherent allocation failed for device 0000:01:00.0 size=2097152

2017-12-18 Thread Tobias Klausmann
On 12/18/17 7:06 PM, Mike Galbraith wrote: Greetings, Kernel bound workloads seem to trigger the below for whatever reason.  I only see this when beating up NFS.  There was a kworker wakeup latency issue, but with a bandaid applied to fix that up, I can still trigger this. Hi, i have seen

Re: [Nouveau] [PATCH] Accept 3d controllers and not only VGA controllers.

2017-12-14 Thread Tobias Klausmann
On 12/3/17 8:56 PM, Josef Larsson wrote: Sure, I can easily split it into two commits, but I would like to have an OK on the actual code changes before splitting the patch. Best regards, Josef Larsson On 2017-11-11 01:05, Tobias Klausmann wrote: On 11/10/17 7:49 PM, Josef Larsson wrote

Re: [Nouveau] [RFC PATCH] gr: did you try turning it off and on again.

2017-11-28 Thread Tobias Klausmann
Hi, comments inline On 11/28/17 2:11 PM, Karol Herbst wrote: Fixes secure boot on my gp107. No idea why. Otherwise the GPU enters complete lockdown after starting the gpccs and fecs with the LS images loaded. Signed-off-by: Karol Herbst --- drm/nouveau/nvkm/engine/gr/gf100.c | 7 +++ 1

[Nouveau] [PATCH v3] nouveau/compiler: Allow to omit line numbers when printing instructions

2017-11-24 Thread Tobias Klausmann
This comes in handy when checking "NV50_PROG_DEBUG=1" outputs with diff! V2: - Use environmental variable (Karol Herbst) V3: - Use the already populated nv50_ir_prog_info to forward information to the print pass (Pierre Moreau) Signed-off-by: Tobias Klausmann --- src/galli

[Nouveau] [PATCH v2] nouveau/compiler: Allow to omit line numbers when printing instructions

2017-11-17 Thread Tobias Klausmann
This comes in handy when checking "NV50_PROG_DEBUG=1" outputs with diff! V2: - Use environmental variable (Karol Herbst) Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/codegen/nv50_ir.cpp| 6 +++--- src/gallium/drivers/nouveau/codegen/nv50_ir.h |

Re: [Nouveau] [PATCH] nouveau/codegen: dump tgsi floats as hex values

2017-11-16 Thread Tobias Klausmann
and being able to debug some issues much better in the end. As long as the new version is still correctly parsed with nouveau_compiler, Yes, it is still parsed correctly! this change is acked-by me. On Wed, Nov 15, 2017 at 10:52 PM, Tobias Klausmann wrote: Hi, yeah in the long run showing

Re: [Nouveau] [PATCH] nouveau/codegen: dump tgsi floats as hex values

2017-11-15 Thread Tobias Klausmann
could be a second option to display as both float and hex? Reviewed-by: Pierre Moreau On 2017-11-14 — 15:11, Tobias Klausmann wrote: Printing without this could lead to the following output, while the values are not exactly zero: IMM[5] FLT32 {0., 0., 0., 0.} IMM[6

Re: [Nouveau] [PATCH] nouveau/codegen: dump tgsi floats as hex values

2017-11-15 Thread Tobias Klausmann
ping! On 11/14/17 3:11 PM, Tobias Klausmann wrote: Printing without this could lead to the following output, while the values are not exactly zero: IMM[5] FLT32 {0., 0., 0., 0.} IMM[6] FLT32 {0., 0., 0., 0.} IMM[7] FLT32

[Nouveau] [RFC PATCH] nouveau/compiler: Allow to omit line numbers when printing instructions

2017-11-14 Thread Tobias Klausmann
This comes in handy when checking "NV50_PROG_DEBUG=1" outputs with diff! Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/codegen/nv50_ir.cpp| 6 +++--- src/gallium/drivers/nouveau/codegen/nv50_ir.h | 2 +- src/gallium/drivers/nouveau/codegen/nv50_i

[Nouveau] [PATCH] nouveau/codegen: dump tgsi floats as hex values

2017-11-14 Thread Tobias Klausmann
the values as hex, we can now see the differences: IMM[5] FLT32 {0x0019, 0x000f, 0x0005, 0x001e} IMM[6] FLT32 {0x001e, 0x0005, 0x000a, 0x0014} IMM[7] FLT32 {0x0014, 0x000a, 0x000f, 0x0019} Signed-off-by: Tobias Klausmann --- src/gallium/drivers

Re: [Nouveau] [PATCH] Accept 3d controllers and not only VGA controllers.

2017-11-10 Thread Tobias Klausmann
On 11/10/17 7:49 PM, Josef Larsson wrote: Accept 3d controllers and not only VGA controllers. According to Ilia Mirkin, the VGA controller check should be removed. This makes it possible to use external connectors on a docking station (40A5) for a Thinkpad P51. (See Bug 101778). lspci example:

Re: [Nouveau] Nouveau: kernel hang on Optimus+Intel+NVidia GeForce 1060m

2017-09-13 Thread Tobias Klausmann
Hi, the system fails to initialize your vbios using secureboot (i had a rare chance to on my system to witness it again), for now i traced it to acr_boot_falcon() in "linux/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0148cdec.c" where it throws -110 which is -ETIMEDOUT. You could try to increase

Re: [Nouveau] Nouveau: kernel hang on Optimus+Intel+NVidia GeForce 1060m

2017-09-11 Thread Tobias Klausmann
Hi, i remember seeing the same error with earlier firmware version with a similar system (GP106) once in a while on boot, yet it does not happen with newer versions. Maybe you could try to update the firmware to the latest version from kernel-firmware. As a small addition: I remember deeply: you

[Nouveau] [PATCH] nv50/ra: Only increment DefValue counter if we are going to spill

2017-08-19 Thread Tobias Klausmann
This is in preparation of an upcoming patch changing how we keep track of the defs. Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp

[Nouveau] [PATCH] nvc0: fix handling of inverted render condition

2017-08-17 Thread Tobias Klausmann
Wether we wait on an inverted rendering condition or not, we should not render on a passed query. This fixes the CTS test case 'KHR-GL45.conditional_render_inverted.functional'. Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 2 +- 1 file

Re: [Nouveau] [PATCH v2] nvc0/ir: propagate immediates to CALL input MOVs

2017-08-16 Thread Tobias Klausmann
ping on this v2 On 8/13/17 3:02 AM, Tobias Klausmann wrote: > On using builtin functions we have to move the input to registers $0 and $1, > if > one of the input value is an immediate, we fail to propagate the immediate: > > ... > mov u32 $r477 0x0003 (0) > ... > mov

[Nouveau] [PATCH v2] nvc0/ir: propagate immediates to CALL input MOVs

2017-08-12 Thread Tobias Klausmann
notice the mov op at all and thus not cleaning it up. That makes up a big chunk of the regression the above commit caused. Keep the deletion of the op where it is, deleting it later unnecessarily blows up size of the change. Signed-off-by: Tobias Klausmann --- .../nouveau/codegen/nv50_ir_lowe

Re: [Nouveau] [PATCH] nvc0/ir: propagate immediates to CALL input MOVs

2017-08-12 Thread Tobias Klausmann
On 8/12/17 10:20 PM, Ilia Mirkin wrote: > On Sat, Aug 12, 2017 at 3:33 PM, Tobias Klausmann > wrote: >> On using builtin functions we have to move the input to registers $0 and $1, >> if >> one of the input value is an immediate, we fail to propagate the immediate: &g

[Nouveau] [PATCH] nvc0/ir: propagate immediates to CALL input MOVs

2017-08-12 Thread Tobias Klausmann
0 0 0 Signed-off-by: Tobias Klausmann --- .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/n

[Nouveau] [PATCH] nv50/ir: Initialize all members of GCRA (trivial)

2017-08-11 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 9d70ec3c9c..e4f38c8e46 100644 --- a/src

Re: [Nouveau] [PATCH] drm/nouveau/mpeg: print more debug info when rejecting dma objects

2017-08-06 Thread Tobias Klausmann
Hi, Lgtm! Reviewed-by: Tobias Klausmann On 8/6/17 4:19 AM, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > --- > > This was helpful when debugging our earlier mpeg woes. May as well have it > upstream. > > drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c | 7 +

Re: [Nouveau] [PATCH 17/29] drm/nouveau: switch to drm_*{get, put} helpers

2017-08-03 Thread Tobias Klausmann
Looks good to me! Reviewed-by: Tobias Klausmann On 8/3/17 1:58 PM, Cihangir Akturk wrote: > drm_*_reference() and drm_*_unreference() functions are just > compatibility alias for drm_*_get() and drm_*_put() adn should not be > used by new code. So convert all users of compatibility

[Nouveau] [RFC PATCH v2] nv50/ir: allow spilling of def values for constrained MERGES/UNIONS

2017-08-01 Thread Tobias Klausmann
0 The additional instructions (+368) gprs (+35) and local (+336) are contained in the Civilization 6 shader: 90.shader_test - type: 0, local: 336, gpr: 35, inst: 368, bytes: 3928 Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/codegen/nv50_ir.cpp| 2 ++ src/gallium/driver

[Nouveau] [RFC PATCH] nv50/ir: allow spilling of def values for constrained MERGES/UNIONS

2017-07-31 Thread Tobias Klausmann
This lets us spill more values and compile a big shader for Civilization 6. Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers

Re: [Nouveau] [PATCH] drm: disable vblank only if it got previously enabled

2017-07-20 Thread Tobias Klausmann
fix it up. > Otherwise we're back to the old style vblank horror show. > > Thanks, Daniel > >> On Wed, Jul 19, 2017 at 1:25 PM, Tobias Klausmann >> wrote: >>> mimic the behavior of vblank_disable_fn(), another caller of >>> drm_vblank_disable_and_

[Nouveau] [PATCH] drm: disable vblank only if it got previously enabled

2017-07-19 Thread Tobias Klausmann
b0 e8 38 fa ed c6 44 0f b6 [ 12.768508] ---[ end trace d9bb853af3659bd5 ]--- Signed-off-by: Tobias Klausmann --- drivers/gpu/drm/drm_vblank.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index a233a6

[Nouveau] [PATCH v2] drm/nouveau: honor return type of nvif_mthd, trivial

2017-07-14 Thread Tobias Klausmann
nvif_mthd() returns an int, so provide that for return checking Signed-off-by: Tobias Klausmann --- V2: declare var only once The other patch should have never get out at all, but as i'm at it, send out a fixed one! drivers/gpu/drm/nouveau/nouveau_display.c | 5 +++-- 1 file chang

Re: [Nouveau] [regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335

2017-07-14 Thread Tobias Klausmann
The conversion is a nice catch, but i'd like to have a bit more context, see below! With a better description: Tobias Klausmann On 7/14/17 5:10 PM, Karol Herbst wrote: Yeah, we shouldn't let the machine die. Are there more WARN_ON_ONCE usage we could convert to WARN_ONCE? R

Re: [Nouveau] [regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335

2017-07-14 Thread Tobias Klausmann
On 7/14/17 3:41 PM, Mike Galbraith wrote: On Fri, 2017-07-14 at 15:36 +0200, Mike Galbraith wrote:  All DRM did was to slip a WARN_ON_ONCE() that nouveau triggers into a kernel module where such things no longer warn, they blow the box out of the water. BTW, turn that irksome WARN_ON_ONCE() in

Re: [Nouveau] [PATCH] drm/nouveau: split nouveau_drm_postclose back in pre/postclose

2017-07-12 Thread Tobias Klausmann
Mike, sorry i forgot to add: Can you plase test this patch? Thanks, tobias On 7/12/17 11:56 PM, Tobias Klausmann wrote: This patch brings back the old nouveau_drm_preclose and nouveau_drm_postclose functions for closing down a drm device Signed-off-by: Tobias Klausmann --- drivers/gpu

[Nouveau] [PATCH] drm/nouveau: split nouveau_drm_postclose back in pre/postclose

2017-07-12 Thread Tobias Klausmann
This patch brings back the old nouveau_drm_preclose and nouveau_drm_postclose functions for closing down a drm device Signed-off-by: Tobias Klausmann --- drivers/gpu/drm/nouveau/nouveau_drm.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau

[Nouveau] [PATCH] drm/nouveau: honor return type of nvif_mthd, trivial

2017-07-12 Thread Tobias Klausmann
nvif_mthd() returns an int, so provide that for return checking Signed-off-by: Tobias Klausmann --- drivers/gpu/drm/nouveau/nouveau_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau

Re: [Nouveau] [regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335

2017-07-12 Thread Tobias Klausmann
On 7/12/17 7:19 PM, Mike Galbraith wrote: On Wed, 2017-07-12 at 07:37 -0400, Ilia Mirkin wrote: On Wed, Jul 12, 2017 at 7:25 AM, Mike Galbraith wrote: On Wed, 2017-07-12 at 11:55 +0200, Mike Galbraith wrote: On Tue, 2017-07-11 at 14:22 -0400, Ilia Mirkin wrote: Some display stuff did change

Re: [Nouveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335

2017-07-11 Thread Tobias Klausmann
>On Tue, Jul 11, 2017 at 2:08 PM, Mike Galbraith wrote: >> On Tue, 2017-07-11 at 13:51 -0400, Ilia Mirkin wrote: >>> Some details that may be useful in analysis of the bug: >>> >>> 1. lspci -nn -d 10de: >> >> 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 980] [10

Re: [Nouveau] [PATCH] nv50/ir: Propagate third immediate src when folding OP_MAD

2016-10-02 Thread Tobias Klausmann
ned, addition to the LoadPropagation pass, where i was told to fix it within OP_MAD :/ On Sun, Oct 2, 2016 at 2:24 PM, Tobias Klausmann wrote: On 02.10.2016 20:03, Ilia Mirkin wrote: On Sun, Oct 2, 2016 at 1:58 PM, Tobias Klausmann wrote: Previously we'd end up with an unnecessary mo

Re: [Nouveau] [PATCH] nv50/ir: Propagate third immediate src when folding OP_MAD

2016-10-02 Thread Tobias Klausmann
On 02.10.2016 20:03, Ilia Mirkin wrote: On Sun, Oct 2, 2016 at 1:58 PM, Tobias Klausmann wrote: Previously we'd end up with an unnecessary mov for the thirs immediate value. total instructions in shared programs : 851881 -> 851864 (-0.00%) total gprs used in shared programs

[Nouveau] [PATCH] nv50/ir: Propagate third immediate src when folding OP_MAD

2016-10-02 Thread Tobias Klausmann
localgpr inst bytes helped 0 0 17 17 hurt 0 0 0 0 Suggested-by: Karol Herbst Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 15 +

Re: [Nouveau] [PATCH v2] nv50/ir: constant fold OP_SPLIT

2016-09-30 Thread Tobias Klausmann
On 30.09.2016 23:57, Ilia Mirkin wrote: On Fri, Sep 30, 2016 at 5:50 PM, Tobias Klausmann wrote: Split the source immediate value into two new values and create OP_MOV instructions the two newly created values. V2: get rid of special cases Signed-off-by: Tobias Klausmann --- src/gallium

[Nouveau] [PATCH v2] nv50/ir: constant fold OP_SPLIT

2016-09-30 Thread Tobias Klausmann
Split the source immediate value into two new values and create OP_MOV instructions the two newly created values. V2: get rid of special cases Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 16 1 file changed, 16 insertions

Re: [Nouveau] [PATCH] nv50/ir: constant fold OP_SPLIT

2016-09-30 Thread Tobias Klausmann
On 28.09.2016 02:01, Ilia Mirkin wrote: On Tue, Sep 27, 2016 at 7:25 PM, Tobias Klausmann wrote: Split the source immediate value into two new values and create OP_MOV instructions the two newly created values. Signed-off-by: Tobias Klausmann --- .../drivers/nouveau/codegen

[Nouveau] [PATCH] nv50/ir: constant fold OP_SPLIT

2016-09-27 Thread Tobias Klausmann
Split the source immediate value into two new values and create OP_MOV instructions the two newly created values. Signed-off-by: Tobias Klausmann --- .../drivers/nouveau/codegen/nv50_ir_peephole.cpp | 23 ++ 1 file changed, 23 insertions(+) diff --git a/src/gallium

[Nouveau] [PATCH] nv50/ir: use unordered_set instead of list to keep track of var defs

2015-09-06 Thread Tobias Klausmann
The set of variable defs does not need to be ordered in any way, and removing/adding elements is a fairly common operation in various optimization passes. This shortens runtime of piglit test fp-long-alu to ~11s from ~22s No piglit regressions observed on nvc0! Signed-off-by: Tobias Klausmann

Re: [Nouveau] [PATCH] nv50: avoid using inline vertex data submit when gl_VertexID is used

2015-08-24 Thread Tobias Klausmann
On 24.08.2015 17:51, Ilia Mirkin wrote: The hardware only generates vertexid when vertices come from a VBO. This fixes: vertexid-drawelements vertexid-drawarrays Signed-off-by: Ilia Mirkin Cc: "11.0" --- src/gallium/drivers/nouveau/nv50/nv50_program.c| 1 + src/gallium/driv

[Nouveau] [PATCH] glsl: Extend lowering pass for gl_ClipDistance to support other arrays

2015-08-17 Thread Tobias Klausmann
This will come in handy when we want to lower gl_CullDistance into gl_CullDistanceMESA. Signed-off-by: Tobias Klausmann --- src/glsl/Makefile.sources| 2 +- src/glsl/ir_optimization.h | 1 + src/glsl/lower_clip_distance.cpp | 574 src/glsl

Re: [Nouveau] [PATCH] avoid build fail without COMPOSITE

2015-07-14 Thread Tobias Klausmann
Lgtm! You can add my R-b if you want! On 14.07.2015 23:17, Ilia Mirkin wrote: --- src/nouveau_dri2.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index f22e319..4398559 100644 --- a/src/nouveau_dri2.c +++ b/src/no

Re: [Nouveau] [RFC PATCH 00/11] Implement ARB_cull_distance

2015-07-08 Thread Tobias Klausmann
On 25.05.2015 17:07, Ilia Mirkin wrote: On Mon, May 25, 2015 at 9:40 AM, Tobias Klausmann wrote: On 25.05.2015 07:17, Dave Airlie wrote: On 25 May 2015 at 08:11, Marek Olšák wrote: It's the same on Radeon. There are 2x ClipOrCullDistance output vectors and a mask saying it should cl

Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings

2015-07-08 Thread Tobias Klausmann
On 08.07.2015 21:42, Emil Velikov wrote: On 8 July 2015 at 20:34, Tobias Klausmann wrote: Mh i'm not aware of me ever changed the "nouveau_compiler". But i'm happy to see this made you laugh, so it has something positive at least... :/ Story time: This particular compi

Re: [Nouveau] [PATCH 2/2] nv50/ir: fix a compiler warning with debug-only code

2015-07-08 Thread Tobias Klausmann
On 08.07.2015 21:34, Emil Velikov wrote: On 8 July 2015 at 19:27, Tobias Klausmann wrote: codegen/nv50_ir_emit_nv50.cpp: In member function ‘void nv50_ir::CodeEmitterNV50::emitLOAD(const nv50_ir::Instruction*)’: codegen/nv50_ir_emit_nv50.cpp:620:12: warning: unused variable ‘offset

Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings

2015-07-08 Thread Tobias Klausmann
8 July 2015 at 19:38, Ilia Mirkin wrote: Compiler is wrong. On Wed, Jul 8, 2015 at 2:27 PM, Tobias Klausmann wrote: nouveau_compiler.c: In function ‘main’: nouveau_compiler.c:216:27: warning: ‘code’ may be used uninitialized in this function [-Wmaybe-uninitialized] printf

Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings

2015-07-08 Thread Tobias Klausmann
On 08.07.2015 20:38, Ilia Mirkin wrote: Compiler is wrong. So just "nouveau: ..." then? Anyway, change it to your liking. On Wed, Jul 8, 2015 at 2:27 PM, Tobias Klausmann wrote: nouveau_compiler.c: In function ‘main’: nouveau_compiler.c:216:27: warning: ‘code’ may be used uni

[Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings

2015-07-08 Thread Tobias Klausmann
ed in this function [-Wmaybe-uninitialized] for (i = 0; i < size; i += 4) { Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/nouveau_compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/nouveau_compiler.c b/src/gallium/dr

[Nouveau] [PATCH 2/2] nv50/ir: fix a compiler warning with debug-only code

2015-07-08 Thread Tobias Klausmann
codegen/nv50_ir_emit_nv50.cpp: In member function ‘void nv50_ir::CodeEmitterNV50::emitLOAD(const nv50_ir::Instruction*)’: codegen/nv50_ir_emit_nv50.cpp:620:12: warning: unused variable ‘offset’ [-Wunused-variable] int32_t offset = i->getSrc(0)->reg.data.offset; Signed-off-by:

Re: [Nouveau] [RFC PATCH 00/11] Implement ARB_cull_distance

2015-05-27 Thread Tobias Klausmann
-or-cull array? It doesn't seem to be possible. Marek On Mon, May 25, 2015 at 5:07 PM, Ilia Mirkin wrote: On Mon, May 25, 2015 at 9:40 AM, Tobias Klausmann wrote: On 25.05.2015 07:17, Dave Airlie wrote: On 25 May 2015 at 08:11, Marek Olšák wrote: It's the same on Radeon. There a

Re: [Nouveau] Self introduction Hans de Goede

2015-05-26 Thread Tobias Klausmann
On 26.05.2015 09:43, Hans de Goede wrote: Hi, On 26-05-15 09:41, Martin Peres wrote: On 26/05/15 10:29, Hans de Goede wrote: Hi All, Since I will be working on nouveau pretty much starting today I thought it would be good to write a quick self introduction. I'm an FOSS enthusiast / develop

Re: [Nouveau] [PATCH 2/2] nv30/draw: switch varying hookup logic to know about texcoords

2015-05-26 Thread Tobias Klausmann
On 26.05.2015 02:59, Ilia Mirkin wrote: On Mon, May 25, 2015 at 8:55 PM, Tobias Klausmann wrote: On 26.05.2015 02:49, Ilia Mirkin wrote: On Mon, May 25, 2015 at 8:37 PM, Tobias Klausmann wrote: On 25.05.2015 21:29, Ilia Mirkin wrote: Commit 8acaf862dfe switched things over to use

Re: [Nouveau] [PATCH 2/2] nv30/draw: switch varying hookup logic to know about texcoords

2015-05-25 Thread Tobias Klausmann
On 26.05.2015 02:49, Ilia Mirkin wrote: On Mon, May 25, 2015 at 8:37 PM, Tobias Klausmann wrote: On 25.05.2015 21:29, Ilia Mirkin wrote: Commit 8acaf862dfe switched things over to use TEXCOORD instead of GENERIC, but did not update the nv30 swtnl draw paths. This teaches the draw logic

Re: [Nouveau] [PATCH 1/2] nv30/draw: rework some of the output vertex buffer logic

2015-05-25 Thread Tobias Klausmann
usage semantic for it. i'm not really happy moving things to gart and don't see why this resolves the issue but granted if it works out :-) Reviewed-by: Tobias Klausmann Signed-off-by: Ilia Mirkin Cc: "10.5 10.6" --- src/gallium/drivers/nouveau/nv30/nv30_draw.c | 30 ++

Re: [Nouveau] [PATCH 2/2] nv30/draw: switch varying hookup logic to know about texcoords

2015-05-25 Thread Tobias Klausmann
On 25.05.2015 21:29, Ilia Mirkin wrote: Commit 8acaf862dfe switched things over to use TEXCOORD instead of GENERIC, but did not update the nv30 swtnl draw paths. This teaches the draw logic about TEXCOORD. Among other things, this fixes a crash in demos/arbocclude when using swtnl. Curiously e

Re: [Nouveau] [Mesa-dev] [PATCH 09/11] gallium: add support for arb_cull_distance

2015-05-25 Thread Tobias Klausmann
least for llvmpipe, I'm not entirely sure for softpipe) if not there's some unaccounted difference somewhere how we'd thought of how this should work for dx10 vs. opengl). Hey nice to know llvmpipe already supports this, i'll test it! Tobias Roland Am 24.05.2015 um

[Nouveau] [PATCH] docs: Mark ARB_cull_distance as in progress

2015-05-25 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- I'm already getting emails wanting me to do this, so just mark it, wont change anything really docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 44a824b..8e1c8cd 100644 --- a/docs/GL3.txt

Re: [Nouveau] [RFC PATCH 00/11] Implement ARB_cull_distance

2015-05-25 Thread Tobias Klausmann
On 25.05.2015 07:17, Dave Airlie wrote: On 25 May 2015 at 08:11, Marek Olšák wrote: It's the same on Radeon. There are 2x ClipOrCullDistance output vectors and a mask saying it should clip or cull or do nothing. Marek My thinking was gallium should have a single semantic and a mask in the s

Re: [Nouveau] [Mesa-dev] [PATCH 07/11] glsl: Add arb_cull_distance support

2015-05-24 Thread Tobias Klausmann
hi, replay inline. On 25.05.2015 00:34, Timothy Arceri wrote: On Sun, 2015-05-24 at 19:58 +0200, Tobias Klausmann wrote: Signed-off-by: Tobias Klausmann --- src/glsl/ast_to_hir.cpp | 14 + src/glsl/builtin_variables.cpp | 13 +++- src/glsl/glcpp/glcpp-parse.y

Re: [Nouveau] [RFC PATCH 00/11] Implement ARB_cull_distance

2015-05-24 Thread Tobias Klausmann
On 24.05.2015 21:36, Ilia Mirkin wrote: On Sun, May 24, 2015 at 3:30 PM, Tobias Klausmann wrote: On 24.05.2015 20:25, Ilia Mirkin wrote: I'm having a bit of trouble tracing through this. What happens if I have a shader that just does: gl_ClipDistance[0] = 1; gl_CullDistance[0] = 1;

Re: [Nouveau] [PATCH 02/11] mesa/main: add support for GL_ARB_cull_distance

2015-05-24 Thread Tobias Klausmann
On 24.05.2015 20:11, Ilia Mirkin wrote: On Sun, May 24, 2015 at 1:58 PM, Tobias Klausmann wrote: Signed-off-by: Tobias Klausmann --- src/mesa/main/extensions.c | 1 + src/mesa/main/get.c | 26 ++ src/mesa/main/get_hash_params.py

Re: [Nouveau] [Mesa-dev] [PATCH 04/11] mesa/st: add support for GL_ARB_cull_distance

2015-05-24 Thread Tobias Klausmann
On 24.05.2015 20:12, Marek Olšák wrote: On Sun, May 24, 2015 at 7:58 PM, Tobias Klausmann wrote: Signed-off-by: Tobias Klausmann --- src/mesa/state_tracker/st_extensions.c | 4 src/mesa/state_tracker/st_program.c| 34 ++ 2 files changed, 38

Re: [Nouveau] [RFC PATCH 00/11] Implement ARB_cull_distance

2015-05-24 Thread Tobias Klausmann
rated nvc0 code (for the vertex shader)? (hack up a patch for this, run it without DRI_PRIME=1, see i pass and forget to check it again) yeah those are equal, sorry for wasting your time on this :/ On Sun, May 24, 2015 at 1:57 PM, Tobias Klausmann wrote: This patch series adds the needed su

[Nouveau] [PATCH 01/11] glapi: add GL_ARB_cull_distance

2015-05-24 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/mapi/glapi/gen/gl_API.xml | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 3090b9f..a792056 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen

[Nouveau] [RFC PATCH 00/11] Implement ARB_cull_distance

2015-05-24 Thread Tobias Klausmann
This patch series adds the needed support for this extension to the various parts of mesa to finally enable it for nvc0. Dave Airlie (1): glsl: lower cull_distance into cull_distance_mesa Tobias Klausmann (10): glapi: add GL_ARB_cull_distance mesa/main: add support for GL_ARB_cull_distance

[Nouveau] [PATCH 02/11] mesa/main: add support for GL_ARB_cull_distance

2015-05-24 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/mesa/main/extensions.c | 1 + src/mesa/main/get.c | 26 ++ src/mesa/main/get_hash_params.py | 4 src/mesa/main/mtypes.h | 22 +- src/mesa/main/shaderapi.c

[Nouveau] [PATCH 08/11] i965: rename UsesClipDistanceOut to UsesClipCullDistanceOut

2015-05-24 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +- src/mesa/drivers/dri/i965/brw_gs.c | 2 +- src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vs.c

[Nouveau] [PATCH 05/11] glsl: Add a helper to see if an array was unsize in the shader

2015-05-24 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/glsl/glsl_types.cpp | 8 src/glsl/glsl_types.h | 10 -- src/glsl/linker.cpp | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp index f675e90..4bc7324 100644

[Nouveau] [PATCH 04/11] mesa/st: add support for GL_ARB_cull_distance

2015-05-24 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/mesa/state_tracker/st_extensions.c | 4 src/mesa/state_tracker/st_program.c| 34 ++ 2 files changed, 38 insertions(+) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c

[Nouveau] [PATCH 11/11] nouveau/nvc0: implement cull_distance as a special form of clip distance

2015-05-24 Thread Tobias Klausmann
This enables ARB_cull_distance. Signed-off-by: Tobias Klausmann --- docs/GL3.txt | 2 +- docs/relnotes/10.7.0.html | 4 +++- src/gallium/drivers/nouveau/nvc0/nvc0_program.c| 6 +- src/gallium/drivers/nouveau/nvc0

[Nouveau] [PATCH 06/11] glsl: lower cull_distance into cull_distance_mesa

2015-05-24 Thread Tobias Klausmann
From: Dave Airlie Signed-off-by: Tobias Klausmann --- src/glsl/Makefile.sources| 1 + src/glsl/ir_optimization.h | 1 + src/glsl/link_varyings.cpp | 15 +- src/glsl/link_varyings.h | 3 +- src/glsl/linker.cpp | 1 + src/glsl

[Nouveau] [PATCH 07/11] glsl: Add arb_cull_distance support

2015-05-24 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/glsl/ast_to_hir.cpp | 14 + src/glsl/builtin_variables.cpp | 13 +++- src/glsl/glcpp/glcpp-parse.y| 3 + src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/glsl_parser_extras.h | 3 + src/glsl/link_varyings.cpp

[Nouveau] [PATCH 10/11] nouveau/codegen: sort in galliums cull_distance semantic into the drivers bitmask

2015-05-24 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index ecd115f..381a958

[Nouveau] [PATCH 09/11] gallium: add support for arb_cull_distance

2015-05-24 Thread Tobias Klausmann
Add another pipe cap so we can savely enable of disable this extension Signed-off-by: Tobias Klausmann --- src/gallium/auxiliary/cso_cache/cso_context.c| 3 +++ src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/i915/i915_screen.c | 1 + src/gallium

[Nouveau] [PATCH 03/11] mesa/prog: Add varyings for arb_cull_distance

2015-05-24 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/mesa/program/prog_print.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c index d588d07..e8855cd 100644 --- a/src/mesa/program/prog_print.c +++ b/src/mesa/program/prog_print.c @@ -147,6

Re: [Nouveau] [Mesa-dev] [PATCH 2/2] nv30: fix clip plane uploads and enable changes

2015-05-24 Thread Tobias Klausmann
On 24.05.2015 17:42, Ilia Mirkin wrote: On Sun, May 24, 2015 at 10:56 AM, Tobias Klausmann wrote: On 24.05.2015 16:15, Pierre Moreau wrote: On 24 May 2015, at 16:03, Tobias Klausmann wrote: On 24.05.2015 10:38, Samuel Pitoiset wrote: On 05/24/2015 06:58 AM, Ilia Mirkin wrote

Re: [Nouveau] [Mesa-dev] [PATCH 2/2] nv30: fix clip plane uploads and enable changes

2015-05-24 Thread Tobias Klausmann
On 24.05.2015 16:15, Pierre Moreau wrote: On 24 May 2015, at 16:03, Tobias Klausmann wrote: On 24.05.2015 10:38, Samuel Pitoiset wrote: On 05/24/2015 06:58 AM, Ilia Mirkin wrote: nv30_validate_clip depends on the rasterizer state. Also we should upload all the new clip planes on change

Re: [Nouveau] [Mesa-dev] [PATCH 2/2] nv30: fix clip plane uploads and enable changes

2015-05-24 Thread Tobias Klausmann
On 24.05.2015 10:38, Samuel Pitoiset wrote: On 05/24/2015 06:58 AM, Ilia Mirkin wrote: nv30_validate_clip depends on the rasterizer state. Also we should upload all the new clip planes on change since next time the plane data won't have changed, but the enables might. Signed-off-by: Ilia Mi

Re: [Nouveau] [PATCH v2] nv50/ir: avoid messing up arg1 of PFETCH

2015-05-23 Thread Tobias Klausmann
Reviewed-by: Tobias Klausmann On 23.05.2015 18:56, Ilia Mirkin wrote: There can be scenarios where the "indirect" arg of a PFETCH becomes known, and so the code will attempt to propagate it. Use this opportunity to just fold it into the first argument, and prevent the load propag

Re: [Nouveau] [Mesa-dev] [PATCH] nv50/ir: avoid messing up arg1 of PFETCH

2015-05-23 Thread Tobias Klausmann
On 23.05.2015 08:06, Ilia Mirkin wrote: There can be scenarios where the "indirect" arg of a PFETCH becomes known, and so the code will attempt to propagate it. Use this opportunity to just fold it into the first argument, and prevent the load propagation pass from touching PFETCH further. Thi

Re: [Nouveau] [PATCH 4/9] nvkm/fb/ramnv50: Ressurect timing code, use proper timing/rammap handlers

2015-05-22 Thread Tobias Klausmann
On 23.05.2015 00:33, Roy Spliet wrote: Might need some generalisation to < GT200. For those: use at your own risk! Signed-off-by: Roy Spliet --- .../drm/nouveau/include/nvkm/subdev/bios/ramcfg.h | 16 ++ .../drm/nouveau/include/nvkm/subdev/bios/rammap.h | 2 + drivers/gpu/drm/nouveau

Re: [Nouveau] [PATCH] ram/gf100-: error out if a ridiculous amount of vram is detected

2015-05-20 Thread Tobias Klausmann
Any idea on how to solve the problem. other than just reporting it? But for now this adds a helpful error message... you may add my R-b. On 20.05.2015 22:01, Ilia Mirkin wrote: Some newer chips have trouble coming up, and we get bad MMIO reads from them, like 0xbadf100. This ends up translating

Re: [Nouveau] [PATCH] fix a wrong use of a logical operator in drmmode_output_dpms()

2015-05-20 Thread Tobias Klausmann
looks good to me! :) Feel free to add my R-b. On 20.05.2015 17:08, Samuel Pitoiset wrote: This is probably a typo error which has been introduced in 2009... This fixes the following warning detected by Clang : drmmode_display.c:907:30: warning: use of logical '&&' with constant operand [-Wcon

[Nouveau] [PATCH] nvc0: fix context destruction for partly implemented tesselation

2015-05-17 Thread Tobias Klausmann
=0x68a9f0) at state_tracker/st_context.c:382 ... Signed-off-by: Tobias Klausmann --- src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h b/src/gallium/drivers/nouveau/nvc0

Re: [Nouveau] [Mesa-dev] [PATCH 00/12] Tessellation support for nvc0

2015-05-17 Thread Tobias Klausmann
as far as i can evaluate this without deeper insight into tess, this patchseries looks good to me! Reviewed-by: Tobias Klausmann On 17.05.2015 07:07, Ilia Mirkin wrote: This is enough to enable tessellation support on nvc0. It seems to work a lot better on my GF108 than GK208. I suspect that

Re: [Nouveau] [PATCH] nvc0: switch mechanism for shader eviction to be a while loop

2015-05-10 Thread Tobias Klausmann
On 10.05.2015 07:57, Ilia Mirkin wrote: This aligns it to work similarly to nv50. However there's no library code there, so the whole thing can be freed. Here we end up with an allocated node that's not attached to a specific program. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=8679

Re: [Nouveau] [PATCH 4/4] nv50/ir: allow OP_SET to merge with OP_SET_AND/etc as well as a neg

2015-05-09 Thread Tobias Klausmann
On 09.05.2015 07:35, Ilia Mirkin wrote: This covers the pattern where a KILL_IF is used, which triggers a comparison of -x to 0. This can usually be folded into the comparison whose result is being compared to 0, however it may, itself, have already been combined with another comparison. That s

Re: [Nouveau] [PATCH 3/4] nvc0/ir: optimize set & 1.0 to produce boolean-float sets

2015-05-09 Thread Tobias Klausmann
On 09.05.2015 19:53, Ilia Mirkin wrote: On Sat, May 9, 2015 at 11:27 AM, Tobias Klausmann wrote: On 09.05.2015 07:35, Ilia Mirkin wrote: This has started to happen more now that the backend is producing KILL_IF more often. Signed-off-by: Ilia Mirkin --- .../drivers/nouveau/codegen

Re: [Nouveau] [PATCH 3/4] nvc0/ir: optimize set & 1.0 to produce boolean-float sets

2015-05-09 Thread Tobias Klausmann
On 09.05.2015 07:35, Ilia Mirkin wrote: This has started to happen more now that the backend is producing KILL_IF more often. Signed-off-by: Ilia Mirkin --- .../drivers/nouveau/codegen/nv50_ir_peephole.cpp | 29 ++ .../nouveau/codegen/nv50_ir_target_nv50.cpp|

  1   2   >