[Nouveau] [Bug 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

Ilia Guterman  changed:

   What|Removed |Added

 Attachment #125656|patch, possible fix |0001-nvkm_gpuobj-size-is-sm
description||aller-then-nvkm_gpuobj-size
   ||-ca.patch

-- 
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 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #55 from Ilia Guterman  ---
Created attachment 125656
  --> https://bugs.freedesktop.org/attachment.cgi?id=125656=edit
patch, possible fix

After some messing around i am able to boot.

I noticed it crashes only when initializing certain nvkm_gpuobj, which has it
'nvkm_gpuobj->size' bigger then 'nv50_instobj(memory)->mem->size <<
NVKM_RAM_MM_SHIFT'.

catching that specific case made it better.

from your kernel directory do 'git apply
0001-nvkm_gpuobj-size-is-smaller-then-nvkm_gpuobj-size-ca.patch

and if you can post the boot log.

-- 
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 31122] Cannot control backlight intensity on Powerbook

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31122

--- Comment #19 from Karol Herbst  ---
I meant of course reviewed-by, not rb-by

-- 
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 31122] Cannot control backlight intensity on Powerbook

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31122

--- Comment #18 from Karol Herbst  ---
Comment on attachment 125642
  --> https://bugs.freedesktop.org/attachment.cgi?id=125642
backlight control w/ gpio check

Review of attachment 125642:
-

::: nouveau_backlight.c.orig
@@ +69,5 @@
> +else
> +level = val + NV30_BL_MIN_LEVEL - 1;
> +
> +nvif_wr32(device, NV30_PMC_BACKLIGHT,
> + (level << 16) + 0x8535);  /* workaround for disabled 
> backlight after waking from suspend */

also like imirkin said: use | instead of +

((level << 16) + 535) | 0x8000

-- 
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 31122] Cannot control backlight intensity on Powerbook

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31122

--- Comment #17 from Karol Herbst  ---
Comment on attachment 125642
  --> https://bugs.freedesktop.org/attachment.cgi?id=125642
backlight control w/ gpio check

Review of attachment 125642:
-

This looks much better already. There are still a few things:

the kernel uses tabs 8 character big. Don't use whitespaces. Other remaining
issues inlined.

With everything taking care off, you get my rb-by karolher...@gmail.com

::: nouveau_backlight.c.orig
@@ +46,5 @@
> +{
> +struct nouveau_drm *drm = bl_get_data(bd);
> +struct nvif_object *device = >device.object;
> +int val = (nvif_rd32(device, NV30_PMC_BACKLIGHT) &
> +   NV30_PMC_BACKLIGHT_MASK) >> 16;

indentation, either try to fit it in one line or break the nvif_rd32 command
like this:

nvif_rd32(arg1,
  arg2);

@@ +64,5 @@
> +int level;
> +
> +if (val == 0)
> +level = 0x00;
> +

remove empty line here

@@ +69,5 @@
> +else
> +level = val + NV30_BL_MIN_LEVEL - 1;
> +
> +nvif_wr32(device, NV30_PMC_BACKLIGHT,
> + (level << 16) + 0x8535);  /* workaround for disabled 
> backlight after waking from suspend */

indentation same as above. Also beware the 80 character limit.

@@ +101,5 @@
> +return 0;
> +
> +memset(, 0, sizeof(struct backlight_properties));
> +props.type = BACKLIGHT_RAW;
> +props.max_brightness = NV30_BL_MAX_LEVEL - NV30_BL_MIN_LEVEL;  /* 
> includes an additional 0x00 level (backlight off) */

80 character limit

-- 
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 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #54 from Efrem McCrimon  ---
Hi QA:

 I had can to create the manual blacklist entry for nouveau.   I did this
because I wanted to use the non-free driver.  This is also required if you
want to use the Intel HD internal graphics card with a Nvidia chip set as a
secondary card.

The first edit will disable nouveau and verify by "lsmod | grep -i nouveau"



Manual edits required to get this working.

1. Created blacklist entry, /etc/modprobe.d/blacklist­nouveau.conf as shown
below

# cat /etc/modprobe.d/blacklist­nouveau.conf

blacklist nouveau

options nouveau modeset=0

2. kernel option used, nomodeset

Below (lines below) if you want to use the Nvidia non-free driver support:

3. Used Nvidia xconfig tool, nvidia­xconfig

4. Edit the file manually to see what drivers were being used , it should
state: Drivers “nvidia”

5. ** Special note, I have two separate video GPU cards and decided to use
individual heads, device1, device2


Now after booting, Nvidia drivers are working because the X server came up.
I noticed that

'num­lock' was off. Verification of X is as follows:

1. Verify what is in proc, lsmod, dmesg messages

# cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module 352.30 Tue Jul 21 18:53:45
PDT 2015

GCC version: gcc version 4.8.3 20140106 (OpenMandriva Association) (Linaro
GCC 4.8­2014.01)

This is the driver we wanted, 352.30, installed from 'mcc'; manual edits
required for the blacklist

file creation. The installation needs to create something. The Nvidia
installer does create a file for

you using their manual installation method by executing the driver
installation .run.

2. Verify X log in /var/log/Xorg.0.log.

3. Run Nvidia settings and Nvidia System Management Interface tool,
nvidia­settings, a X tool,

and nvidia­smi, System Management interface tool

Nvidia­smi, reports the driver version match such as in
proc/driver/nvidia/version and reports the

GPU(s). GPU­0, is the 960; GPU­1, is the 730 card. I want to run the 960 as
the primary (a

physical connection to a 24in monitor).

# nvidia­smi

Sat Feb 27 04:26:53 2016

+­­+

| NVIDIA­SMI 352.30 Driver Version: 352.30 |

|­­­+­­+­­+

| GPU Name Persistence­M| Bus­Id Disp.A | Volatile Uncorr. ECC |

| Fan Temp Perf Pwr:Usage/Cap| Memory­Usage | GPU­Util Compute M. |

|+==+==|

| 0 GeForce GTX 960 Off | :01:00.0 On | N/A |

| 0% 28C P8 7W / 128W | 216MiB / 4091MiB | 0% Default |

+­­­+­­+­­+

| 1 GeForce GT 730 Off | :02:00.0 N/A | N/A |

| 30% 28C P8 N/A / N/A | 66MiB / 1023MiB | N/A Default |

+­­­+­­+­­+

+­+

| Processes: GPU Memory |

| GPU PID Type Process name Usage |

|==|

| 0 4619 G /etc/X11/X 200MiB |

| 0 6121 G /usr/bin/nvidia­settings 2MiB |

| 1 Not Supported |


Regards,

Efrem Mc

PS, I have used this in the past.  You can also try using "acpi_osi=Linux"
on the kernel command line.
This allows be to boot with the Nvidia card as a primary video source with
the Intel HD graphics card disabled in BIOS.

I have found that the BIOS is disabled and initfs still loads the i915
driver module


On Tue, Aug 9, 2016 at 12:00 PM,  wrote:

> *Comment # 53  on
> bug 94990  from Pierre
> Moreau  *
>
> (In reply to Ilia Guterman from comment #52 
> )> i tested with 
> 'nouveau.modeset=0' on kernel 4.5 and 4.6 on debian/sid and got
> > the same results of screen flickering and seems like nothing inside of the
> > nouveau driver getting called.
>
> Right, `nouveau.modeset=0` wont’t prevent Nouveau from loading, however the
> driver is in a "disable" state and won’t do a thing:
> > modeset
> > Whether the driver should be enabled. 0 for disabled, 1 for enabled, 2 for 
> > headless
>
> (taken from the Nouveau 
> wiki:https://nouveau.freedesktop.org/wiki/KernelModuleParameters/#modeset)
>
> --
> 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
>
>

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

Re: [Nouveau] [Bug 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-09 Thread Efrem Mc
Hi QA:

 I had can to create the manual blacklist entry for nouveau.   I did this
because I wanted to use the non-free driver.  This is also required if you
want to use the Intel HD internal graphics card with a Nvidia chip set as a
secondary card.

The first edit will disable nouveau and verify by "lsmod | grep -i nouveau"



Manual edits required to get this working.

1. Created blacklist entry, /etc/modprobe.d/blacklist­nouveau.conf as shown
below

# cat /etc/modprobe.d/blacklist­nouveau.conf

blacklist nouveau

options nouveau modeset=0

2. kernel option used, nomodeset

Below (lines below) if you want to use the Nvidia non-free driver support:

3. Used Nvidia xconfig tool, nvidia­xconfig

4. Edit the file manually to see what drivers were being used , it should
state: Drivers “nvidia”

5. ** Special note, I have two separate video GPU cards and decided to use
individual heads, device1, device2


Now after booting, Nvidia drivers are working because the X server came up.
I noticed that

'num­lock' was off. Verification of X is as follows:

1. Verify what is in proc, lsmod, dmesg messages

# cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module 352.30 Tue Jul 21 18:53:45
PDT 2015

GCC version: gcc version 4.8.3 20140106 (OpenMandriva Association) (Linaro
GCC 4.8­2014.01)

This is the driver we wanted, 352.30, installed from 'mcc'; manual edits
required for the blacklist

file creation. The installation needs to create something. The Nvidia
installer does create a file for

you using their manual installation method by executing the driver
installation .run.

2. Verify X log in /var/log/Xorg.0.log.

3. Run Nvidia settings and Nvidia System Management Interface tool,
nvidia­settings, a X tool,

and nvidia­smi, System Management interface tool

Nvidia­smi, reports the driver version match such as in
proc/driver/nvidia/version and reports the

GPU(s). GPU­0, is the 960; GPU­1, is the 730 card. I want to run the 960 as
the primary (a

physical connection to a 24in monitor).

# nvidia­smi

Sat Feb 27 04:26:53 2016

+­­+

| NVIDIA­SMI 352.30 Driver Version: 352.30 |

|­­­+­­+­­+

| GPU Name Persistence­M| Bus­Id Disp.A | Volatile Uncorr. ECC |

| Fan Temp Perf Pwr:Usage/Cap| Memory­Usage | GPU­Util Compute M. |

|+==+==|

| 0 GeForce GTX 960 Off | :01:00.0 On | N/A |

| 0% 28C P8 7W / 128W | 216MiB / 4091MiB | 0% Default |

+­­­+­­+­­+

| 1 GeForce GT 730 Off | :02:00.0 N/A | N/A |

| 30% 28C P8 N/A / N/A | 66MiB / 1023MiB | N/A Default |

+­­­+­­+­­+

+­+

| Processes: GPU Memory |

| GPU PID Type Process name Usage |

|==|

| 0 4619 G /etc/X11/X 200MiB |

| 0 6121 G /usr/bin/nvidia­settings 2MiB |

| 1 Not Supported |


Regards,

Efrem Mc

PS, I have used this in the past.  You can also try using "acpi_osi=Linux"
on the kernel command line.
This allows be to boot with the Nvidia card as a primary video source with
the Intel HD graphics card disabled in BIOS.

I have found that the BIOS is disabled and initfs still loads the i915
driver module


On Tue, Aug 9, 2016 at 12:00 PM,  wrote:

> *Comment # 53  on
> bug 94990  from Pierre
> Moreau  *
>
> (In reply to Ilia Guterman from comment #52 
> )> i tested with 
> 'nouveau.modeset=0' on kernel 4.5 and 4.6 on debian/sid and got
> > the same results of screen flickering and seems like nothing inside of the
> > nouveau driver getting called.
>
> Right, `nouveau.modeset=0` wont’t prevent Nouveau from loading, however the
> driver is in a "disable" state and won’t do a thing:
> > modeset
> > Whether the driver should be enabled. 0 for disabled, 1 for enabled, 2 for 
> > headless
>
> (taken from the Nouveau 
> wiki:https://nouveau.freedesktop.org/wiki/KernelModuleParameters/#modeset)
>
> --
> 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 mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 31122] Cannot control backlight intensity on Powerbook

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31122

--- Comment #16 from Ilia Mirkin  ---
(In reply to A. Chaud from comment #15)
> Regarding the 0x535.  It's a workaround for bug 31120.  The lower half of
> the register gets set to 0x7fff upon waking from suspend which disables the
> backlight. This changes it back to a working value.

There should be a way to save a value on suspend and restore that saved value
on resume.

BTW, I didn't check whether you're still doing this in the latest patch, but a
few things I remember noticing:

(a) foo | 0x8000, not +
(b) use ARRAY_SIZE, although I think you got rid of that array anyways

-- 
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 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #53 from Pierre Moreau  ---
(In reply to Ilia Guterman from comment #52)
> i tested with 'nouveau.modeset=0' on kernel 4.5 and 4.6 on debian/sid and got
> the same results of screen flickering and seems like nothing inside of the
> nouveau driver getting called.

Right, `nouveau.modeset=0` wont’t prevent Nouveau from loading, however the
driver is in a "disable" state and won’t do a thing:

> modeset
> Whether the driver should be enabled. 0 for disabled, 1 for enabled, 2 for 
> headless

(taken from the Nouveau wiki:
https://nouveau.freedesktop.org/wiki/KernelModuleParameters/#modeset)

-- 
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 31122] Cannot control backlight intensity on Powerbook

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31122

A. Chaud  changed:

   What|Removed |Added

 Attachment #125562|0   |1
is obsolete||

--- Comment #15 from A. Chaud  ---
Created attachment 125642
  --> https://bugs.freedesktop.org/attachment.cgi?id=125642=edit
backlight control w/ gpio check

Thank you for the comments.

This version removes the powerpc ifdef and exposes the full range of brightness
values.  I also fixed the formatting.  Let me know if I missed any of it.

Regarding the 0x535.  It's a workaround for bug 31120.  The lower half of the
register gets set to 0x7fff upon waking from suspend which disables the
backlight. This changes it back to a working value.

-- 
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 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #52 from Ilia Guterman  ---
i tested with 'nouveau.modeset=0' on kernel 4.5 and 4.6 on debian/sid and got
the same results of screen flickering and seems like nothing inside of the
nouveau driver getting called.

-- 
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 94990] Latest 4.6rc4 kernel, no booting on gtx970

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94990

--- Comment #51 from Tobias Klausmann  ---
(In reply to Yann Golanski from comment #50)
> Could some kind soul write a how to modify grub2 configs to add the
> `nouveau.modeset=0` so we could test is that work on our setup?

Add it in /boot/grub2/grub.cfg to the kernel commandline for the kernel you
want to boot, or change the boot config inside grub2 for a oneshot (F12). But
you should have just googled that ;-)

-- 
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 31122] Cannot control backlight intensity on Powerbook

2016-08-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31122

--- Comment #14 from Karol Herbst  ---
Comment on attachment 125562
  --> https://bugs.freedesktop.org/attachment.cgi?id=125562
backlight control w/ gpio check

Review of attachment 125562:
-

Please read the Linux kernel coding style:
https://www.kernel.org/doc/Documentation/CodingStyle
and adjust your Patch to that (especially the tabs except spaces part).

Also there are a few things I really dislike:

 1. way too coarse backlight level control.
Please consider exposing the full range and remove all the curve handling
code.
Userspace should handle this _not_ the kernel. It makes the code much
cleaner and easier to read.

 2. it only works for powerpc. Is there any reason to make it ppc only?

more things inline.

::: nouveau_backlight.c.orig
@@ +49,5 @@
> +struct nvif_object *device = >device.object;
> +int val = (nvif_rd32(device, NV30_PMC_BACKLIGHT) &
> +   NV30_PMC_BACKLIGHT_MASK) >> 16;
> +int i;
> +for(i=0;i +{
> +if(NV30_BL_CURVE[i] == val) return i;
> +}
> +
> +return sizeof(NV30_BL_CURVE)/sizeof(NV30_BL_CURVE[0]);

spaces

@@ +66,5 @@
> +struct nvif_object *device = >device.object;
> +int val = bd->props.brightness;
> +
> +nvif_wr32(device, NV30_PMC_BACKLIGHT,
> + (NV30_BL_CURVE[val] << 16) + 0x8535);

what does the 0x535 part stands for? Is it to protect against turning off the
display by accident? In that case, remove it.

@@ +87,5 @@
> +struct backlight_device *bd;
> + 
> + struct dcb_gpio_func func;
> + struct nvkm_gpio *gpio = nvxx_gpio(>device);
> + int ret = nvkm_gpio_find(gpio, 0,0x00,0xff, );

spaces

@@ +97,5 @@
> +return 0;
> +
> +memset(, 0, sizeof(struct backlight_properties));
> +props.type = BACKLIGHT_RAW;
> +props.max_brightness = 
> sizeof(NV30_BL_CURVE)/sizeof(NV30_BL_CURVE[0])-1;

spaces

-- 
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