Re: [Nouveau] [PATCH] drm/nouveau/hwmon: Uninitialized variables in sysfs

2017-12-29 Thread Pierre Moreau
Ping: this can still be an issue today as kstrtol() & co haven’t changed their
possible return value since the patch was written.

On 2017-07-22 — 14:13, Pierre Moreau wrote:
> Reviewed-by: Pierre Moreau 
> 
> On 2017-07-17 — 11:17, Dan Carpenter wrote:
> > kstrtol() and friends can return -EINVAL or -ERANGE.  We have to test
> > for both, otherwise the value is possibly uninitialized.  Also in some
> > of these files we accidentally return "count" on error instead of a
> > negative error code.
> > 
> > Signed-off-by: Dan Carpenter 
> > 
> > diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c 
> > b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> > index 7c965648df80..5e75af91c446 100644
> > --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> > +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> > @@ -68,9 +68,11 @@ nouveau_hwmon_set_temp1_auto_point1_temp(struct device 
> > *d,
> > struct nouveau_drm *drm = nouveau_drm(dev);
> > struct nvkm_therm *therm = nvxx_therm(>client.device);
> > long value;
> > +   int ret;
> >  
> > -   if (kstrtol(buf, 10, ) == -EINVAL)
> > -   return count;
> > +   ret = kstrtol(buf, 10, );
> > +   if (ret)
> > +   return ret;
> >  
> > therm->attr_set(therm, NVKM_THERM_ATTR_THRS_FAN_BOOST,
> > value / 1000);
> > @@ -101,9 +103,11 @@ nouveau_hwmon_set_temp1_auto_point1_temp_hyst(struct 
> > device *d,
> > struct nouveau_drm *drm = nouveau_drm(dev);
> > struct nvkm_therm *therm = nvxx_therm(>client.device);
> > long value;
> > +   int ret;
> >  
> > -   if (kstrtol(buf, 10, ) == -EINVAL)
> > -   return count;
> > +   ret = kstrtol(buf, 10, );
> > +   if (ret)
> > +   return ret;
> >  
> > therm->attr_set(therm, NVKM_THERM_ATTR_THRS_FAN_BOOST_HYST,
> > value / 1000);
> > @@ -156,8 +160,9 @@ nouveau_hwmon_set_pwm1_min(struct device *d, struct 
> > device_attribute *a,
> > long value;
> > int ret;
> >  
> > -   if (kstrtol(buf, 10, ) == -EINVAL)
> > -   return -EINVAL;
> > +   ret = kstrtol(buf, 10, );
> > +   if (ret)
> > +   return ret;
> >  
> > ret = therm->attr_set(therm, NVKM_THERM_ATTR_FAN_MIN_DUTY, value);
> > if (ret < 0)
> > @@ -179,8 +184,9 @@ nouveau_hwmon_set_pwm1_max(struct device *d, struct 
> > device_attribute *a,
> > long value;
> > int ret;
> >  
> > -   if (kstrtol(buf, 10, ) == -EINVAL)
> > -   return -EINVAL;
> > +   ret = kstrtol(buf, 10, );
> > +   if (ret)
> > +   return ret;
> >  
> > ret = therm->attr_set(therm, NVKM_THERM_ATTR_FAN_MAX_DUTY, value);
> > if (ret < 0)
> > ___
> > Nouveau mailing list
> > Nouveau@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/nouveau



> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau



signature.asc
Description: PGP signature
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] drm/nouveau: Remove no longer needed local ACPI_VIDEO_NOTIFY_PROBE define

2017-12-29 Thread Pierre Moreau
Ping

On 2017-07-22 — 13:54, Pierre Moreau wrote:
> Reviewed-by: Pierre Moreau 
> 
> On 2017-06-21 — 15:19, Hans de Goede wrote:
> > Hi,
> > 
> > On 26-05-17 09:35, Hans De Goede wrote:
> > > The local #define of ACPI_VIDEO_NOTIFY_PROBE was only added temporarily
> > > to avoid a dependency between the acpi and nouveau trees while merging.
> > > 
> > > This is now properly defined in acpi/video.h and the local #define can
> > > be dropped.
> > > 
> > > Signed-off-by: Hans de Goede 
> > 
> > ping, what is the status of this patch ?
> > 
> > Regards,
> > 
> > Hans
> > 
> > 
> > > ---
> > >   drivers/gpu/drm/nouveau/nouveau_display.c | 9 -
> > >   1 file changed, 9 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c 
> > > b/drivers/gpu/drm/nouveau/nouveau_display.c
> > > index 549763f5e17d..70de2079b2cc 100644
> > > --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> > > +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> > > @@ -369,15 +369,6 @@ nouveau_display_hpd_work(struct work_struct *work)
> > >   #ifdef CONFIG_ACPI
> > > -/*
> > > - * Hans de Goede: This define belongs in acpi/video.h, I've submitted a 
> > > patch
> > > - * to the acpi subsys to move it there from drivers/acpi/acpi_video.c .
> > > - * This should be dropped once that is merged.
> > > - */
> > > -#ifndef ACPI_VIDEO_NOTIFY_PROBE
> > > -#define ACPI_VIDEO_NOTIFY_PROBE  0x81
> > > -#endif
> > > -
> > >   static int
> > >   nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val,
> > > void *data)
> > > 
> > ___
> > dri-devel mailing list
> > dri-de...@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel



> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau



signature.asc
Description: PGP signature
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH] ramgf100: Fix small typo.

2017-12-29 Thread Pierre Moreau
The typo is still present in master.
Not sure whether it will help you Ben, regarding Fermi reclocking, but it
shouldn’t harm in reducing possible errors. :-)

Regards,
Pierre

On 2017-07-27 — 18:20, Rosen Penev wrote:
> Signed-off by: Rosen Penev 
> ---
>  drm/nouveau/nvkm/subdev/fb/ramgf100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drm/nouveau/nvkm/subdev/fb/ramgf100.c 
> b/drm/nouveau/nvkm/subdev/fb/ramgf100.c
> index 4a9bd4f1..feb8820c 100644
> --- a/drm/nouveau/nvkm/subdev/fb/ramgf100.c
> +++ b/drm/nouveau/nvkm/subdev/fb/ramgf100.c
> @@ -717,7 +717,7 @@ gf100_ram_new_(const struct nvkm_ram_func *func,
>   ram->fuc.r_0x10f9b4 = ramfuc_reg(0x10f9b4);
>   ram->fuc.r_0x10fb04 = ramfuc_reg(0x10fb04);
>   ram->fuc.r_0x10fb08 = ramfuc_reg(0x10fb08);
> - ram->fuc.r_0x137310 = ramfuc_reg(0x137300);
> + ram->fuc.r_0x137300 = ramfuc_reg(0x137300);
>   ram->fuc.r_0x137310 = ramfuc_reg(0x137310);
>   ram->fuc.r_0x137360 = ramfuc_reg(0x137360);
>   ram->fuc.r_0x1373ec = ramfuc_reg(0x1373ec);
> -- 
> 2.13.3
> 
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau


signature.asc
Description: PGP signature
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


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

2017-12-29 Thread Pierre Moreau
It looks like this patch was never merged.

You could initialise “nodeCount” and “nodes” directly in the member
initialisation list. With that changed, this patch is

Reviewed-by: Pierre Moreau 

On 2017-08-12 — 01:45, Tobias Klausmann wrote:
> 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/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> @@ -1146,6 +1146,9 @@ GCRA::GCRA(Function *fn, SpillCodeInserter& spill) :
> regs(fn->getProgram()->getTarget()),
> spill(spill)
>  {
> +   nodeCount = 0;
> +   nodes = NULL;
> +
> prog = func->getProgram();
>  
> // initialize relative degrees array - i takes away from j
> -- 
> 2.14.0
> 
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau


signature.asc
Description: PGP signature
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 104413] [NV11] GPU Lockup on GeForce2 MX/MX 400

2017-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104413

--- Comment #7 from rtent...@yandex.ru ---
The BIOS let me choose a priority of the graphic devices (AGI is first, than
PCI, than onboard). I didn't find option to disable the onboard video. So, it
may be it. Or not. I don't know how to check.

And i try the values from 3 to 7 with the NvAGP option. It didn't work.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 104413] [NV11] GPU Lockup on GeForce2 MX/MX 400

2017-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104413

--- Comment #6 from Ilia Mirkin  ---
(In reply to rtentser from comment #5)
> (b) Yes, i had onboard card enabled (Intel Extreme Graphics 2, i915). But
> that wasn't the problem: i try to blacklist the driver and boot still
> freezed. I blacklist it now for efficiency and smaller dmesg.

Well, just because you don't load the driver doesn't make it disabled. It'd be
something in the BIOS.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 104413] [NV11] GPU Lockup on GeForce2 MX/MX 400

2017-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104413

--- Comment #5 from rtent...@yandex.ru ---
Created attachment 136448
  --> https://bugs.freedesktop.org/attachment.cgi?id=136448=edit
dmesg (linux-4.9, modprobe.blacklist=i915, nouveau.config=NvAGP=0)

(a) 128MB is default memory that assigned to onboard video. It's not the AGP.
(b) Yes, i had onboard card enabled (Intel Extreme Graphics 2, i915). But that
wasn't the problem: i try to blacklist the driver and boot still freezed. I
blacklist it now for efficiency and smaller dmesg.
(c) nouveau.config=NvAGP=2 doesn't work: same thing.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 104413] [NV11] GPU Lockup on GeForce2 MX/MX 400

2017-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104413

--- Comment #4 from Ilia Mirkin  ---
A few things:

(a) The messages in your dmesg are very confusing. They talk about a 4M AGP
aperture, but then 128MB GTT?
(b) You appear to have the onboard video enabled. I don't know about i865, but
at least some chipsets were unable to both do AGP *and* use onboard video.
(c) Try enabling AGP by forcing a specific mode. e.g. nouveau.config=NvAGP=2
will force AGP 2x.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 104413] [NV11] GPU Lockup on GeForce2 MX/MX 400

2017-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104413

--- Comment #3 from rtent...@yandex.ru ---
Yes, it works. Thank you!

Yes, it's an AGP device.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 100567] Nouveau system freeze fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]

2017-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100567

--- Comment #12 from Marc Burkhardt  ---
On my Lenovo P50 this problem is newly introduced since I use a 4.14 kernel.
Kernels below that are stable/working in regard of that problem. This is what I
can aquire from the logs:

Dec 28 17:23:13 marc kernel: [ 5657.352825] nouveau :01:00.0: fifo: channel
2: killed
Dec 28 17:23:13 marc kernel: [ 5657.352827] nouveau :01:00.0: fifo: runlist
0: scheduled for recovery
Dec 28 17:23:13 marc kernel: [ 5657.352830] nouveau :01:00.0: fifo: engine
0: scheduled for recovery
Dec 28 17:23:13 marc kernel: [ 5657.352833] nouveau :01:00.0: X[5708]:
channel 2 killed!
Dec 28 17:23:13 local kernel: nouveau :01:00.0: gr: TRAP ch 2 [00ffbd
X[5708]]
Dec 28 17:23:13 local kernel: nouveau :01:00.0: gr: GPC0/TPC0/TEX: 8000
Dec 28 17:23:13 local kernel: nouveau :01:00.0: gr: GPC0/TPC1/TEX: 8041
Dec 28 17:23:13 local kernel: nouveau :01:00.0: fifo: read fault at
000ac4 engine 00 [GR] client 07 [GPC0/T1_2] reason 02 [PTE] on channel 2
[00ffbd X[5708]]
Dec 28 17:23:13 local kernel: nouveau :01:00.0: fifo: channel 2: killed
Dec 28 17:23:13 local kernel: nouveau :01:00.0: fifo: runlist 0: scheduled
for recovery
Dec 28 17:23:13 local kernel: nouveau :01:00.0: fifo: engine 0: scheduled
for recovery
Dec 28 17:23:13 local kernel: nouveau :01:00.0: X[5708]: channel 2 killed!
Dec 28 17:24:03 marc kernel: [ 5706.891489] sysrq: SysRq : Keyboard mode set to
system default
Dec 28 17:24:03 local kernel: sysrq: SysRq : Keyboard mode set to system
default
Dec 28 17:24:04 marc exiting on signal 15

I found this in my Xorg.0.log but I don't know if it's somehow related to the
above:

[   155.535] (EE) libinput bug: timer event13 debounce short: offset negative
(-2229)

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 104413] [NV11] GPU Lockup on GeForce2 MX/MX 400

2017-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104413

--- Comment #2 from Ilia Mirkin  ---
Does nouveau.config=NvAGP=0 help?

I assume this is an AGP device?

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 104413] [NV11] GPU Lockup on GeForce2 MX/MX 400

2017-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104413

--- Comment #1 from rtent...@yandex.ru ---
https://bugs.freedesktop.org/show_bug.cgi?id=91037 is the similar (may be the
same) problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 104413] New: [NV11] GPU Lockup on GeForce2 MX/MX 400

2017-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104413

Bug ID: 104413
   Summary: [NV11] GPU Lockup on GeForce2 MX/MX 400
   Product: xorg
   Version: unspecified
  Hardware: x86 (IA32)
OS: Linux (All)
Status: NEW
  Severity: major
  Priority: medium
 Component: Driver/nouveau
  Assignee: nouveau@lists.freedesktop.org
  Reporter: rtent...@yandex.ru
QA Contact: xorg-t...@lists.x.org

Created attachment 136447
  --> https://bugs.freedesktop.org/attachment.cgi?id=136447=edit
kern.log

Boot freezes when X starts. The screen shows a garbage. Before it console show:
[...] desktop kernel: [   14.060255] nouveau :01:00.0: DRM: GPU lockup -
switching to software fbcon

Same thing happens with 4.9, 4.13 and 4.14 kernel.

I used this card on motherboard with NForce2 chipset and it worked fine (with
4.9 kernel). Now i use P4i65GV with Intel 865GV chipset. I think there can be
some drivers conflicts.

Boot with "nomodeset" option works.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau