[Nouveau] [RFC PATCH 22/29] nvif: Add boost info and set operations

2017-09-15 Thread Karol Herbst
v5: Return ENODEV on devices without any vpstates. Fail earlier if not supported. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/include/nvif/if0001.h | 15 + drm/nouveau/nvkm/engine/device

[Nouveau] [RFC PATCH 12/29] therm: Don't cancel the timer

2017-09-15 Thread Karol Herbst
We will need a always running therm daemon to adjust the voltage/clocks on the fly. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/nvkm/subdev/therm/base.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deleti

[Nouveau] [RFC PATCH 13/29] therm: Move the temp readout into the alarm

2017-09-15 Thread Karol Herbst
It makes more sense to read out the temperature in the alarm, because we want to do various things with it: 1. adjust the fans 2. notify the clk subdev about the changed temperature Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev/therm.h | 1

[Nouveau] [RFC PATCH 11/29] debugfs: Wake up GPU before doing any reclocking

2017-09-15 Thread Karol Herbst
Fixes various reclocking related issues on prime systems Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nouveau_debugfs.c | 4 1 file changed, 4 insertions(+) diff --git a/drm/nouveau/nouveau_debugfs.c b/drm/nouveau/nouveau_debugfs.c index 27281c4e..b0a598f9

[Nouveau] [RFC PATCH 09/29] clk: Set clocks to pre suspend state after suspend

2017-09-15 Thread Karol Herbst
The idea is to clear out the saved state, because after a resume we can't know what the GPU is clocked to. The reclock is triggered by the call to nvkm_clk_update later in nvkm_clk_init. v2: convert to C style comments Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin

[Nouveau] [RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp

2017-09-15 Thread Karol Herbst
and let hwmon return an error properly. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev/therm.h | 2 +- drm/nouveau/nouveau_hwmon.c | 15 +-- drm/nouveau/nvkm/subdev/therm/base.c| 19 ++- drm/nouveau/nvkm/

[Nouveau] [RFC PATCH 10/29] core/device: Move therm behind clk

2017-09-15 Thread Karol Herbst
Later therm will depend on clk reporting new temperatures and triggereing reclocks for thermal throttling or therm related voltage/clock adjustments. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/core/device.h | 2 +- 1 file changed, 1 insertion(+), 1 de

[Nouveau] [RFC PATCH 04/29] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it

2017-09-15 Thread Karol Herbst
This function will be used to update the current clock state. This will happen for various reasons: * Temperature changes * User changes clocking state * Load changes v2: remove parameter name Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev

[Nouveau] [RFC PATCH 07/29] clk: Hold information about the current cstate status

2017-09-15 Thread Karol Herbst
Later we will have situations where the expected and the current state isn't the same. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/include/nvkm/subdev/clk.h | 2 ++ drm/nouveau/nvkm/subdev/clk/ba

[Nouveau] [RFC PATCH 02/29] hwmon: properly check for errors

2017-09-15 Thread Karol Herbst
Otherwise hwmon interprets error codes as real values. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nouveau_hwmon.c | 33 ++--- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/n

[Nouveau] [RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate

2017-09-15 Thread Karol Herbst
We will access the current cstate at least every second and this saves us some CPU cycles looking them up every second. v2: Rewording commit message. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/include/nvkm/

[Nouveau] [RFC PATCH 05/29] clk: Remove dstate

2017-09-15 Thread Karol Herbst
We won't need it now, because we will adjust the clocks depending on engine loads later on anyway or a static lookup table. It also simplifies the clocking logic. This code was nowhere used anyway and just a mock up. v2: fixed typo in commit message Signed-off-by: Karol Herbst <karol

[Nouveau] [RFC PATCH 00/29] Current State of my clk patches

2017-09-15 Thread Karol Herbst
full reclocks when only parts need to be updated 19-20: Hacky Workaround for enabling Maxwell2 reclocking (hidden behind module parameter) 21-23: debugfs file to change boost mode 24-29: Parse battery vpstate to throttle clocks when system is running on battery Karol Herbst (29): therm: split

Re: [Nouveau] [PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning

2017-09-06 Thread Karol Herbst
On Wed, Sep 6, 2017 at 10:11 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Wed, Sep 6, 2017 at 4:20 PM, Karol Herbst <karolher...@gmail.com> wrote: >>> In this instance, I think using multiplication is more intuitive >>> than '&&', so I'm addin

[Nouveau] [PATCH 6/8] clk: Set clocks to pre suspend state after suspend

2017-09-03 Thread Karol Herbst
The idea is to clear out the saved state, because after a resume we can't know what the GPU is clocked to. The reclock is triggered by the call to nvkm_clk_update later in nvkm_clk_init. v2: convert to C style comments Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin

[Nouveau] [PATCH 7/8] core/device: Move therm behind clk

2017-09-03 Thread Karol Herbst
Later therm will depend on clk reporting new temperatures and triggereing reclocks for thermal throttling or therm related voltage/clock adjustments. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/core/device.h | 2 +- 1 file changed, 1 insertion(+), 1 de

[Nouveau] [PATCH 1/8] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it

2017-09-03 Thread Karol Herbst
This function will be used to update the current clock state. This will happen for various reasons: * Temperature changes * User changes clocking state * Load changes v2: remove parameter name Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev

[Nouveau] [PATCH 3/8] clk: Make pstate a pointer to nvkm_pstate

2017-09-03 Thread Karol Herbst
We will access the current cstate at least every second and this saves us some CPU cycles looking them up every second. v2: Rewording commit message. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/include/nvkm/

[Nouveau] [PATCH 4/8] clk: Hold information about the current cstate status

2017-09-03 Thread Karol Herbst
Later we will have situations where the expected and the current state isn't the same. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/include/nvkm/subdev/clk.h | 2 ++ drm/nouveau/nvkm/subdev/clk/ba

[Nouveau] [PATCH 0/8] clk subdev updates

2017-09-03 Thread Karol Herbst
subdevs Karol Herbst (8): clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it clk: Remove dstate clk: Make pstate a pointer to nvkm_pstate clk: Hold information about the current cstate status clk: We should pass the pstate id around not the index in the list clk: Set clocks to pre

[Nouveau] [PATCH 0/3] Several hwmon fixes

2017-09-02 Thread Karol Herbst
= +1.20 V) temp1:N/A (high = +95.0°C, hyst = +3.0°C) (crit = +105.0°C, hyst = +5.0°C) (emerg = +135.0°C, hyst = +5.0°C) power1: N/A Karol Herbst (3): therm: split return code and value in nvkm_get_temp hwmon: properly check

[Nouveau] [PATCH 1/3] therm: split return code and value in nvkm_get_temp

2017-09-02 Thread Karol Herbst
and let hwmon return an error properly. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev/therm.h | 2 +- drm/nouveau/nouveau_hwmon.c | 15 +-- drm/nouveau/nvkm/subdev/therm/base.c| 19 ++- drm/nouveau/nvkm/

[Nouveau] [PATCH 2/3] hwmon: properly check for errors

2017-09-02 Thread Karol Herbst
Otherwise hwmon interprets error codes as real values. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nouveau_hwmon.c | 33 ++--- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/n

[Nouveau] [PATCH 3/3] subdev/volt/gk104: return error when read fails

2017-09-02 Thread Karol Herbst
While my gpu was powered off, hwmon returned 0.6V as the current voltage. If nvkm_rd32 fails for any reason, return the error. With that sensors will display a "N/A" instead of 0.6V. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/volt/gk104.c | 7

Re: [Nouveau] [RFC PATCH] drm/nouveau/therm: initial implementation of new gp1xx temperature sensor

2017-08-31 Thread Karol Herbst
On Thu, Aug 31, 2017 at 4:55 AM, Rhys Kidd wrote: > Signed-off-by: Rhys Kidd > --- > .../gpu/drm/nouveau/include/nvkm/subdev/therm.h| 1 + > drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 +++ >

Re: [Nouveau] [RFC PATCH 12/13] clk: parse thermal policies for throttling thresholds

2017-07-21 Thread Karol Herbst
On Sat, Jul 22, 2017 at 2:23 AM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Fri, Jul 21, 2017 at 5:55 PM, Karol Herbst <karolher...@gmail.com> wrote: >> Signed-off-by: Karol Herbst <karolher...@gmail.com> >> --- >> drm/nouveau/include/nvkm/subdev/clk.h

[Nouveau] [RFC PATCH 12/13] clk: parse thermal policies for throttling thresholds

2017-07-21 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev/clk.h | 2 ++ drm/nouveau/nvkm/subdev/clk/base.c| 42 +++ 2 files changed, 44 insertions(+) diff --git a/drm/nouveau/include/nvkm/subdev/clk.h b/drm/nouveau/includ

[Nouveau] [RFC PATCH 10/13] therm: Trigger reclock in temperature daemon

2017-07-21 Thread Karol Herbst
Depending on the temperature, cstates might become unreachable or the maped voltage of a cstate changes. We want to adjust to that. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/nvkm/subdev/therm/base.c | 7 +++

[Nouveau] [RFC PATCH 09/13] therm: Move the temp readout into the alarm

2017-07-21 Thread Karol Herbst
It makes more sense to read out the temperature in the alarm, because we want to do various things with it: 1. adjust the fans 2. notify the clk subdev about the changed temperature Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev/therm.h | 1

[Nouveau] [RFC PATCH 08/13] therm: Don't cancel the timer

2017-07-21 Thread Karol Herbst
We will need a always running therm daemon to adjust the voltage/clocks on the fly. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/nvkm/subdev/therm/base.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deleti

[Nouveau] [RFC PATCH 06/13] clk: Set clocks to pre suspend state after suspend

2017-07-21 Thread Karol Herbst
The idea is to clear out the saved state, because after a resume we can't know what the GPU is clocked to. The reclock is triggered by the call to nvkm_clk_update later in nvkm_clk_init. v2: convert to C style comments Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin

[Nouveau] [RFC PATCH 01/13] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it

2017-07-21 Thread Karol Herbst
This function will be used to update the current clock state. This will happen for various reasons: * Temperature changes * User changes clocking state * Load changes v2: remove parameter name Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev

[Nouveau] [RFC PATCH 03/13] clk: Make pstate a pointer to nvkm_pstate

2017-07-21 Thread Karol Herbst
We will access the current cstate at least every second and this saves us some CPU cycles looking them up every second. v2: Rewording commit message. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/include/nvkm/

[Nouveau] [RFC PATCH 00/13] Thermal throttling

2017-07-21 Thread Karol Herbst
series, but I thought it makes sense to include those in this series as well for completness. Please comment Karol Herbst (13): clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it clk: Remove dstate clk: Make pstate a pointer to nvkm_pstate clk: Hold information about the current

[Nouveau] [RFC PATCH 13/13] clk: thermal throttling

2017-07-21 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev/clk.h | 1 + drm/nouveau/nvkm/subdev/clk/base.c| 35 +++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/drm/nouveau/include/nvkm/subdev/clk.h

[Nouveau] [RFC PATCH 05/13] clk: We should pass the pstate id around not the index in the list

2017-07-21 Thread Karol Herbst
This makes the code easier, because we can compare the id with pstate->pstate and saves us from the trouble of iterating over the pstates to match the index. v2: reword commit message Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.

[Nouveau] [RFC PATCH 04/13] clk: Hold information about the current cstate status

2017-07-21 Thread Karol Herbst
Later we will have situations where the expected and the current state isn't the same. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/include/nvkm/subdev/clk.h | 2 ++ drm/nouveau/nvkm/subdev/clk/ba

[Nouveau] [RFC PATCH 07/13] clk: Check pm_runtime status before reclocking

2017-07-21 Thread Karol Herbst
We don't want to change anything on the GPU if it's suspended. Also we need to increase the refcount on the pm_runtime counter so that the GPU won't be suspended while reclocking. v2: convert to C style comments Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subd

[Nouveau] [RFC PATCH 11/13] bios: add thermal policies table

2017-07-21 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- .../include/nvkm/subdev/bios/thermal_policies.h| 27 drm/nouveau/nvkm/subdev/bios/Kbuild| 1 + drm/nouveau/nvkm/subdev/bios/thermal_policies.c| 81 ++ 3 files changed, 109 inse

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

2017-07-14 Thread Karol Herbst
Yeah, we shouldn't let the machine die. Are there more WARN_ON_ONCE usage we could convert to WARN_ONCE? Reviewed-By: Karol Herbst <karolher...@gmail.com> On Fri, Jul 14, 2017 at 5:05 PM, Tobias Klausmann <tobias.johannes.klausm...@mni.thm.de> wrote: > On 7/14/17 3:41 PM, Mike

Re: [Nouveau] [PATCH] secboot/acr352: reset PMU after secboot

2017-07-05 Thread Karol Herbst
On Wed, Jul 5, 2017 at 3:23 AM, Ben Skeggs <skeg...@gmail.com> wrote: > On 07/05/2017 03:35 AM, Karol Herbst wrote: >> This is needed for using Nouveaus PMU image after performing secboot. This >> will >> be helpfull for Maxwell2 reclocking on boards without externa

[Nouveau] [PATCH] secboot/acr352: reset PMU after secboot

2017-07-04 Thread Karol Herbst
This is needed for using Nouveaus PMU image after performing secboot. This will be helpfull for Maxwell2 reclocking on boards without externally controlled fans like on most laptops or fanless boards. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/s

[Nouveau] [PATCH] therm/gm200: Added

2017-07-03 Thread Karol Herbst
This allows temperature readouts on maxwell2 GPUs. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev/therm.h | 1 + drm/nouveau/nvkm/engine/device/base.c | 3 +++ drm/nouveau/nvkm/subdev/therm/Kbuild| 1 + drm/nouveau/nvkm/subdev/therm

[Nouveau] [PATCH v2 2/7] clk: Remove dstate

2017-07-01 Thread Karol Herbst
We won't need it now, because we will adjust the clocks depending on engine loads later on anyway or a static lookup table. It also simplifies the clocking logic. This code was nowhere used anyway and just a mock up. v2: fixed typo in commit message Signed-off-by: Karol Herbst <karol

[Nouveau] [PATCH v2 3/7] clk: Make pstate a pointer to nvkm_pstate

2017-07-01 Thread Karol Herbst
We will access the current cstate at least every second and this saves us some CPU cycles looking them up every second. v2: Rewording commit message. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/include/nvkm/

[Nouveau] [PATCH v2 4/7] clk: Hold information about the current cstate status

2017-07-01 Thread Karol Herbst
Later we will have situations where the expected and the current state isn't the same. Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/include/nvkm/subdev/clk.h | 2 ++ drm/nouveau/nvkm/subdev/clk/ba

[Nouveau] [PATCH v2 7/7] clk: Check pm_runtime status before reclocking

2017-07-01 Thread Karol Herbst
We don't want to change anything on the GPU if it's suspended. Also we need to increase the refcount on the pm_runtime counter so that the GPU won't be suspended while reclocking. v2: convert to C style comments Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subd

[Nouveau] [PATCH v2 5/7] clk: We should pass the pstate id around not the index in the list

2017-07-01 Thread Karol Herbst
This makes the code easier, because we can compare the id with pstate->pstate and saves us from the trouble of iterating over the pstates to match the index. v2: reword commit message Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.

[Nouveau] [PATCH v2 1/7] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it

2017-07-01 Thread Karol Herbst
This function will be used to update the current clock state. This will happen for various reasons: * Temperature changes * User changes clocking state * Load changes v2: remove parameter name Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev

[Nouveau] [PATCH v2 6/7] clk: Set clocks to pre suspend state after suspend

2017-07-01 Thread Karol Herbst
The idea is to clear out the saved state, because after a resume we can't know what the GPU is clocked to. The reclock is triggered by the call to nvkm_clk_update later in nvkm_clk_init. v2: convert to C style comments Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin

[Nouveau] [PATCH v2 0/7] clk subdev updates

2017-07-01 Thread Karol Herbst
work of changing the clock state due to temperature changes and dynamic reclocking. v2: remove commits to support partial reclocks Karol Herbst (7): clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it clk: Remove dstate clk: Make pstate a pointer to nvkm_pstate clk: Hold

Re: [Nouveau] speed of card?

2017-06-20 Thread Karol Herbst
On Tue, Jun 20, 2017 at 5:35 PM, James wrote: > On 2017-06-19 01:38 PM, Ilia Mirkin wrote: >> On Mon, Jun 19, 2017 at 1:32 PM, James wrote: >>> On 2017-06-19 01:18 PM, Ilia Mirkin wrote: cat /sys/kernel/debug/dri/0/pstate AC (or DC) line

[Nouveau] [RFC 6/9] nv50/ir: add precise field to Instruction

2017-06-11 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/drivers/nouveau/codegen/nv50_ir.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.h b/src/gallium/drivers/nouveau/codegen/nv50_ir.h index 5c09fed05c..6835c4fa8c 100644 ---

[Nouveau] [RFC 9/9] nv50/ir/tgsi: split mad to mul+add

2017-06-11 Thread Karol Herbst
fixes KHR-GL44.gpu_shader5.precise_qualifier KHR-GL45.gpu_shader5.precise_qualifier Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/gallium/drivers/n

[Nouveau] [RFC 7/9] nv50/ir/tgsi: handle precise for most ALU instructions

2017-06-11 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 2 ++ 1 file changed, 2 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

[Nouveau] [RFC 8/9] nv50/ir: disable mul+add to mad for precise instructions

2017-06-11 Thread Karol Herbst
fixes missrendering in TombRaider Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/g

[Nouveau] [RFC 3/9] st/glsl_to_tgsi: handle precise modifier

2017-06-11 Thread Karol Herbst
all subexpression inside an ir_assignment needs to be tagged as precise. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 80 -- 1 file changed, 65 insertions(+), 15 deletions(-) diff --git a/src/mesa/state_t

[Nouveau] [RFC 0/9] Add precise/invariant semantics to TGSI

2017-06-11 Thread Karol Herbst
sy way to handle this. Maybe somebody of you has a better idea? Karol Herbst (9): tgsi: add precise flag to tgsi_instruction tgsi/dump: print _PRECISE modifier on Instrutions st/glsl_to_tgsi: handle precise modifier tgsi: populate precise tgsi/text: parse _PRECISE modifier nv50/ir: add p

[Nouveau] [RFC 1/9] tgsi: add precise flag to tgsi_instruction

2017-06-11 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/auxiliary/tgsi/tgsi_build.c| 1 + src/gallium/include/pipe/p_shader_tokens.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliar

[Nouveau] [RFC 4/9] tgsi: populate precise

2017-06-11 Thread Karol Herbst
Only implemented for glsl->tgsi. Other converters just set precise to 0. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/auxiliary/tgsi/tgsi_build.c | 3 +++ src/gallium/auxiliary/tgsi/tgsi_ureg.c| 14 +++--- src/gallium/auxiliary/tgsi/tg

[Nouveau] [RFC 5/9] tgsi/text: parse _PRECISE modifier

2017-06-11 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/auxiliary/tgsi/tgsi_text.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index 93a05568f4..c5fcb3283d

[Nouveau] [RFC 2/9] tgsi/dump: print _PRECISE modifier on Instrutions

2017-06-11 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/auxiliary/tgsi/tgsi_dump.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index f6eba7424b..b58e64511c 100644 --- a/src/gallium/aux

Re: [Nouveau] Kernel panic on nouveau during boot on NVIDIA NV118 (GM108)

2017-06-07 Thread Karol Herbst
It looks similiar to this one: https://bugs.freedesktop.org/show_bug.cgi?id=101322 please provide a dmesg booted with "nouveau.debug=debug" as well 2017-06-02 12:01 GMT+02:00 Chris Chiu : > We are working with new desktop that have the NVIDIA NV118 > chipset. > > During boot,

[Nouveau] [PATCH v3 3/7] pmu/fuc: implement GET_SLOTS

2017-06-05 Thread Karol Herbst
Reads out all stored 8 bit slot values. The 0th one being always 0xff. v3: Add macros documenting the command. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 894 ++- drm/nouveau/nvkm/subdev/pmu/fuc/gf119.

[Nouveau] [PATCH v3 7/7] nouveau/debugfs: add interface for current load

2017-06-05 Thread Karol Herbst
output of the file will be something like that: core, mem, vid, pci 0xfd, 0x15, 0x00, 0xa2 v2: relayout the debugfs file v3: rework the struct holding load values Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvif/device.h | 1 + drm/nouveau/includ

[Nouveau] [PATCH v3 4/7] pmu/fuc: implement SET_SLOT

2017-06-05 Thread Karol Herbst
Interface to set the PMU counter mask of a specific slot. v3: Add macros documenting the command. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 889 ++- drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h

[Nouveau] [PATCH v3 5/7] pmu: add counter_slots field

2017-06-05 Thread Karol Herbst
v3: seperated change into own commit Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/pmu/gf100.c | 1 + drm/nouveau/nvkm/subdev/pmu/gf119.c | 1 + drm/nouveau/nvkm/subdev/pmu/gk104.c | 1 + drm/nouveau/nvkm/subdev/pmu/gk110.c | 1 + drm/nouveau/nvkm/subd

[Nouveau] [PATCH v3 0/7] PMU engine counters

2017-06-05 Thread Karol Herbst
is required to implement proper dynamic reclocking on GT215 and newer. On pre GT215 GPUs there is also PCOUNTERS, but this is ugly so that I only focus on dynamic reclocking starting with GT215 for now. Karol Herbst (7): pmu/fuc: add macros for pmu engine counters pmu/fuc: read out counters and store

[Nouveau] [PATCH v3 2/7] pmu/fuc: read out counters and store them

2017-06-05 Thread Karol Herbst
if we need it. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 821 +++ drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 763 ++--- drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h

[Nouveau] [PATCH v3 6/7] pmu: setup counters

2017-06-05 Thread Karol Herbst
Generally following Nvidia here, but being more focused on the load groups. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvkm/subdev/pmu.h | 9 drm/nouveau/nvkm/subdev/pmu/gt215.c | 43 +++ 2 files changed, 52 inse

[Nouveau] [PATCH v3 1/7] pmu/fuc: add macros for pmu engine counters

2017-06-05 Thread Karol Herbst
v2: removed definitions we won't need anymore v3: rename IF_NOT_ALL to IF_ANY Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 8 1 file changed, 8 insertions(+) diff

[Nouveau] [RFC v2 4/6] pmu/fuc: implement SET_SLOT

2017-05-07 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 889 ++- drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 825 - drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 245 drm/nouvea

[Nouveau] [RFC v2 0/6] PMU engine counters

2017-05-07 Thread Karol Herbst
can only report "idle" or "non-idle". Karol Herbst (6): pmu/fuc: add macros for pdaemon pwr counters pmu/fuc: read out counters and store them pmu/fuc: implement GET_SLOTS pmu/fuc: implement SET_SLOT nouveau/debugfs: add interface for current load pmu: setup co

[Nouveau] [RFC v2 5/6] nouveau/debugfs: add interface for current load

2017-05-07 Thread Karol Herbst
output of the file will be something like that: core, mem, vid, pci 0xfd, 0x15, 0x00, 0xa2 v2: relayout the debugfs file Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/include/nvif/device.h | 1 + drm/nouveau/include/nvkm/subdev/pmu.h | 10 ++ drm/n

[Nouveau] [RFC v2 6/6] pmu: setup counters

2017-05-07 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/pmu/gt215.c | 39 + 1 file changed, 39 insertions(+) diff --git a/drm/nouveau/nvkm/subdev/pmu/gt215.c b/drm/nouveau/nvkm/subdev/pmu/gt215.c index 6ffd3cba..3e3c910f

[Nouveau] [RFC v2 2/6] pmu/fuc: read out counters and store them

2017-05-07 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 821 +++ drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 763 ++--- drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 711 --

[Nouveau] [RFC v2 1/6] pmu/fuc: add macros for pdaemon pwr counters

2017-05-07 Thread Karol Herbst
v2: clean up definitions we won't need anymore Signed-off-by: Karol Herbst <karolher...@gmail.com> Reviewed-by: Martin Peres <martin.pe...@free.fr> --- drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 8 1 file changed, 8 insertions(+) diff --git a/drm/nouveau/nvkm/su

[Nouveau] [RFC v2 3/6] pmu/fuc: implement GET_SLOTS

2017-05-07 Thread Karol Herbst
Signed-off-by: Karol Herbst <karolher...@gmail.com> fixup Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 894 ++- drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 840 + drm/nouveau

[Nouveau] SHA2017 - Nouveau Village - Anybody wanna help?

2017-05-04 Thread Karol Herbst
Hi everybody, I bought my SHA2017 ticket and actually plan to create a little Nouveau village here to talk about Nouveau and maybe teach others some reverse engineering or just to hang out with people interested in the project or whatever. Big question: Who wants to help out or join me on that

Re: [Nouveau] [PATCH v5 5/5] nouveau_hwmon: Change permissions to numeric

2017-05-02 Thread Karol Herbst
2017-05-02 7:07 GMT+02:00 Martin Peres : > On 26/04/17 19:46, Oscar Salvador wrote: >> This patch replaces the symbolic permissions with the numeric ones, >> and adds me to the authors too. >> >> Signed-off-by: Oscar Salvador > > >> --- >>

Re: [Nouveau] [PATCH v2] nv50/ir: optimize shl(a, 0) to a

2017-04-30 Thread Karol Herbst
return a OP_CVT, so I have to do the check. I don't see how I can only use getOp, but not fixing the mod? > On Apr 29, 2017 8:09 PM, "Karol Herbst" <karolher...@gmail.com> wrote: > > 2017-04-30 0:28 GMT+02:00 Ilia Mirkin <imir...@alum.mit.edu>: >> On

Re: [Nouveau] [PATCH v2] nv50/ir: optimize shl(a, 0) to a

2017-04-29 Thread Karol Herbst
2017-04-30 0:28 GMT+02:00 Ilia Mirkin <imir...@alum.mit.edu>: > On Sat, Apr 29, 2017 at 6:09 PM, Karol Herbst <karolher...@gmail.com> wrote: >> helps two alien isolation shaders >> >> shader-db: >> total instructions in shared programs : 4251497 -> 425

[Nouveau] [PATCH v2] nv50/ir: optimize shl(a, 0) to a

2017-04-29 Thread Karol Herbst
38960264 -> 38960232 (-0.00%) localgpr inst bytes helped 0 0 2 2 hurt 0 0 0 0 v2: handle potential mods on src0 Signed-off-by: Karol Herbst <karolher...@gmail.com> R

Re: [Nouveau] [PATCH] nv50/ir: optimmize shl(a, 0) to a

2017-04-29 Thread Karol Herbst
2017-04-29 21:03 GMT+02:00 Ilia Mirkin <imir...@alum.mit.edu>: > On Sat, Apr 29, 2017 at 12:46 PM, Karol Herbst <karolher...@gmail.com> wrote: >> helps two alien isolation shaders >> >> shader-db: >> total instructions in shared programs : 4251497 -> 425

[Nouveau] [PATCH] nv50/ir: optimmize shl(a, 0) to a

2017-04-29 Thread Karol Herbst
38960264 -> 38960232 (-0.00%) localgpr inst bytes helped 0 0 2 2 hurt 0 0 0 0 Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/drive

Re: [Nouveau] [PATCH] nv50/ir: we can't replace 0x0 with zero reg for SHLADD

2017-04-29 Thread Karol Herbst
2017-04-29 17:18 GMT+02:00 Ilia Mirkin <imir...@alum.mit.edu>: > On Sat, Apr 29, 2017 at 10:41 AM, Karol Herbst <karolher...@gmail.com> wrote: >> fixes a crash in Alien Isolation > > What crash? assertion, because shladd requires an immediate, there can't be a reg a

[Nouveau] [PATCH] nv50/ir: we can't replace 0x0 with the zero reg for SHLADD

2017-04-29 Thread Karol Herbst
fixes a crash in Alien Isolation Signed-off-by: Karol Herbst <karolher...@gmail.com> Cc: 13.0 17.0 17.1 <mesa-sta...@lists.freedesktop.org> --- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gal

[Nouveau] [PATCH] nv50/ir: we can't replace 0x0 with zero reg for SHLADD

2017-04-29 Thread Karol Herbst
fixes a crash in Alien Isolation Signed-off-by: Karol Herbst <karolher...@gmail.com> --- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/g

Re: [Nouveau] [PATCH] drm/nouveau/fb/gf100-: Fix 32 bit wraparound in new ram detection

2017-04-29 Thread Karol Herbst
good catch Reviewed-by: Karol Herbst <karolher...@gmail.com> 2017-04-29 6:11 GMT+02:00 Mario Kleiner <mario.kleiner...@gmail.com>: > A missing u64 cast causes a 32-Bit wraparound from > 4096 MiB to 0 MiB and therefore total 0 MiB VRAM detected > if card has 4096 Mib pe

Re: [Nouveau] [PATCH] drm/nouveau: Add support for clockgating on Fermi+

2017-04-26 Thread Karol Herbst
2017-04-26 20:31 GMT+02:00 Lyude Paul <ly...@redhat.com>: > On Wed, 2017-04-26 at 00:49 +0200, Karol Herbst wrote: >> Hi Lyude, >> >> thanks for the great work. Just a view comments inline. >> >> 2017-04-25 20:38 GMT+02:00 Lyude <ly...@redhat.com>:

Re: [Nouveau] [PATCH] drm/nouveau: Add support for clockgating on Fermi+

2017-04-25 Thread Karol Herbst
Hi Lyude, thanks for the great work. Just a view comments inline. 2017-04-25 20:38 GMT+02:00 Lyude : > This adds support for enabling automatic clockgating on nvidia GPUs for > Fermi and later generations. This saves a little bit of power, bringing > my fermi GPU's power

[Nouveau] [PATCH v3] bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10

2017-04-23 Thread Karol Herbst
I only saw those values inside the vbios: 0xff, 0xfd, 0xfc, 0xfa for valid rails. No idea what the lower value does, but at least we get power readings on a lot of Fermi GPUs with that. v2: add missing parentheses Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/

[Nouveau] [PATCH v2] bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10

2017-04-23 Thread Karol Herbst
I only saw those values inside the vbios: 0xff, 0xfd, 0xfc, 0xfa for valid rails. No idea what the lower value does, but at least we get power readings on a lot of Fermi GPUs with that. v2: add missing parentheses Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/

[Nouveau] [PATCH] bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10

2017-04-23 Thread Karol Herbst
I only saw those values inside the vbios: 0xff, 0xfd, 0xfc, 0xfa for valid rails. No idea what the lower value does, but at least we get power readings on a lot of Fermi GPUs with that. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/bios/iccsense.c | 5 ++

[Nouveau] [PATCH] bios/volt: Parse min and max for Version 0x40

2017-04-23 Thread Karol Herbst
This is according to what we have in nvbios. Fixes "ERROR: Can't get value of subfeature in0_min: Can't read" errors in sensors for some GPUs. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nouveau/nvkm/subdev/bios/volt.c | 6 +++--- 1 file changed, 3 insertions

Re: [Nouveau] [PATCH v4 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string

2017-04-22 Thread Karol Herbst
2017-04-22 11:24 GMT+02:00 Oscar Salvador : > This patch introduces the nouveau_hwmon_ops structure, sets up > .is_visible and .read_string operations and adds all the functions > for these operations. > This is also a preparation for the next patches, where most of

Re: [Nouveau] [PATCH] volt: Improve min/max deteaction of range based volting

2017-04-22 Thread Karol Herbst
2017-04-22 16:46 GMT+02:00 Roy Spliet <nouv...@spliet.org>: > Response in-line: > > > Op 22-04-17 om 13:22 schreef Karol Herbst: >> >> info.min and info.max doesn't always represent the actual voltage range we >> can use. Do the same as with the entry based vo

[Nouveau] [PATCH] volt: Improve min/max deteaction of range based volting

2017-04-22 Thread Karol Herbst
info.min and info.max doesn't always represent the actual voltage range we can use. Do the same as with the entry based volting. Fixes "ERROR: Can't get value of subfeature in0_min: Can't read" errors in sensors. Signed-off-by: Karol Herbst <karolher...@gmail.com> --- drm/nou

Re: [Nouveau] [PATCH v2 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string

2017-04-18 Thread Karol Herbst
2017-04-17 9:47 GMT+02:00 Oscar Salvador : > This patch introduces the nouveau_hwmon_ops structure, sets up > .is_visible and .read_string operations and adds all the functions > for these operations. > This is also a preparation for the next patches, where most of

Re: [Nouveau] [PATCH 1/4] nouveau_hwmon: migrate to hwmon_device_register_with_info

2017-04-13 Thread Karol Herbst
2017-04-13 11:08 GMT+02:00 Oscar Salvador : > This patch introduces the structure "struct hwmon_ops" and sets up the > ".visible" operation. > Is also a preparation for the next patch where all work is being done. > > ---

<    2   3   4   5   6   7   8   9   10   11   >