[Nouveau] [Bug 98654] New: kernel paging request at iowrite32

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

Bug ID: 98654
   Summary: kernel paging request at iowrite32
   Product: xorg
   Version: unspecified
  Hardware: Other
OS: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: Driver/nouveau
  Assignee: nouveau@lists.freedesktop.org
  Reporter: germano.massu...@gmail.com
QA Contact: xorg-t...@lists.x.org

This is the upstream bugreport clone of
https://bugzilla.redhat.com/show_bug.cgi?id=1343242
I attach only the first comment, for more information please see the previous
URL


Additional info:
reporter:   libreport-2.7.1
BUG: unable to handle kernel paging request at c9eb
IP: [] iowrite32+0x2e/0x40
PGD 1b90a0067 PUD 1b90a1067 PMD bb976067 PTE 0
Oops: 0002 [#1] SMP 
Modules linked in: bnep nfnetlink_queue nfnetlink_log bluetooth rfkill xfs fuse
xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun ip6t_rpfilter ip6t_REJECT
nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_broute bridge stp llc
ebtable_nat ip6table_mangle ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6
nf_nat_ipv6 ip6table_security ip6table_raw iptable_mangle iptable_nat
nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack
iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables
rc_dib0700_rc5 dib7000p raid456 async_raid6_recov async_memcpy async_pq
async_xor xor async_tx raid6_pq coretemp kvm_intel kvm iTCO_wdt gpio_ich
iTCO_vendor_support snd_hda_codec_analog snd_hda_codec_generic irqbypass
dvb_pll cx22702 cx88_dvb cx88_vp3054_i2c videobuf2_dvb
 ir_lirc_codec lirc_dev dvb_usb_dib0700 rc_cinergy_1400 dib7000m dib0090
dib0070 dib3000mc dibx000_common dvb_usb i2c_i801 dvb_core dm_thin_pool
dm_persistent_data dm_bio_prison libcrc32c joydev cx8800 cx8802 cx88xx
snd_hda_intel videobuf2_dma_sg tveeprom videobuf2_memops videobuf2_v4l2
snd_hda_codec videobuf2_core rc_core v4l2_common snd_hda_core videodev
snd_hwdep snd_seq media snd_seq_device lpc_ich snd_pcm snd_timer snd
asus_atk0110 soundcore shpchp acpi_cpufreq tpm_tis tpm binfmt_misc nfsd
auth_rpcgss nfs_acl lockd grace sunrpc ata_generic pata_acpi nouveau video
mxm_wmi wmi i2c_algo_bit drm_kms_helper serio_raw ttm firewire_ohci
firewire_core skge crc_itu_t drm hid_logitech uas ff_memless usb_storage
pata_jmicron fjes
CPU: 1 PID: 10062 Comm: multiqueue24:sr Not tainted 4.5.5-300.fc24.x86_64 #1
Hardware name: System manufacturer System Product Name/P5B-Deluxe, BIOS 1238   
09/30/2008
task: 8801a28bba80 ti: 88010ee74000 task.ti: 88010ee74000
RIP: 0010:[]  [] iowrite32+0x2e/0x40
RSP: 0018:88010ee77948  EFLAGS: 00010292
RAX: a0205100 RBX: 0001 RCX: 0009
RDX: 1dfc5201 RSI: c9eb RDI: 1dfc5201
RBP: 88010ee77950 R08: 0100 R09: 1deda000
R10: 8801a49ca800 R11: 1deda000 R12: 
R13: 1dfc5201 R14: 0080 R15: 880036a65340
FS:  7ff0a66ea700() GS:8801bfc8() knlGS:
CS:  0010 DS:  ES:  CR0: 80050033
CR2: c9eb CR3: a6bd1000 CR4: 06e0
Stack:
 a0174494 88010ee779a8 a017a1c6 8801a49ca800
 8800a7426258 1dfd5001 0028 0100
  2015 8801b5d6f600 8800a7426258
Call Trace:
 [] ? nvkm_instobj_wr32+0x14/0x20 [nouveau]
 [] nv50_vm_map+0x156/0x1a0 [nouveau]
 [] nvkm_vm_map_at+0xdd/0x1d0 [nouveau]
 [] nv50_instobj_map+0x1b/0x20 [nouveau]
 [] nv50_instobj_boot+0xc2/0x120 [nouveau]
 [] nv50_instobj_acquire+0x4b/0x70 [nouveau]
 [] nvkm_instobj_acquire_slow+0x17/0x30 [nouveau]
 [] nvkm_instobj_new+0x6a/0x170 [nouveau]
 [] nvkm_memory_new+0x44/0x80 [nouveau]
 [] nvkm_vm_get+0x15f/0x250 [nouveau]
 [] nouveau_bo_vma_add+0x30/0x90 [nouveau]
 [] nouveau_channel_prep+0x1d9/0x2a0 [nouveau]
 [] nouveau_channel_new+0x57/0x6e0 [nouveau]
 [] ? nvif_device_init+0x2d/0x30 [nouveau]
 [] ? kmem_cache_alloc_trace+0x1c2/0x1d0
 [] nouveau_abi16_ioctl_channel_alloc+0xd6/0x2c0 [nouveau]
 [] drm_ioctl+0x152/0x540 [drm]
 [] ? nouveau_abi16_ioctl_setparam+0x10/0x10 [nouveau]
 [] nouveau_drm_ioctl+0x74/0xc0 [nouveau]
 [] do_vfs_ioctl+0xa3/0x5d0
 [] SyS_ioctl+0x79/0x90
 [] entry_SYSCALL_64_fastpath+0x12/0x6d
Code: ff ff 03 00 77 25 48 81 fe 00 00 01 00 76 07 0f b7 d6 89 f8 ef c3 55 48
89 f7 48 c7 c6 52 84 aa 81 48 89 e5 e8 54 fe ff ff 5d c3 <89> 3e c3 0f 1f 44 00
00 66 2e 0f 1f 84 00 00 00 00 00 48 81 ff 
RIP  [] iowrite32+0x2e/0x40
 RSP 


-- 
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 98656] New: [NVE6] Nouveau hangs after opening Chromium on GNOME 3

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

Bug ID: 98656
   Summary: [NVE6] Nouveau hangs after opening Chromium on GNOME 3
   Product: Mesa
   Version: 13.0
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/DRI/nouveau
  Assignee: nouveau@lists.freedesktop.org
  Reporter: pgkos.bugzi...@yahoo.com
QA Contact: nouveau@lists.freedesktop.org

Created attachment 127865
  --> https://bugs.freedesktop.org/attachment.cgi?id=127865&action=edit
dmesg output

A few seconds after opening Chromium web browser on GNOME 3 Desktop everything
hangs, keyboard and mouse stop working, mouse pointer is not movable.

Graphics card: NVIDIA GK106 [GeForce GTX 660]

Chromium: version 54.0.2840.90
GNOME 3 Desktop: version 3.22.2
Xorg server: version 1.18.4
Linux kernel: version 4.8.6
libdrm: version 2.4.71
Nouveau: version 1.0.13
Mesa: version 13.0.0

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


[Nouveau] [Bug 98656] [NVE6] Nouveau hangs after opening Chromium on GNOME 3

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

pgkos  changed:

   What|Removed |Added

 Attachment #127865|application/x-octet-stream  |text/plain
  mime type||

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


[Nouveau] [Bug 98657] New: Reproducible freeze when changing volume amplification in kodi

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

Bug ID: 98657
   Summary: Reproducible freeze when changing volume amplification
in kodi
   Product: xorg
   Version: unspecified
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Driver/nouveau
  Assignee: nouveau@lists.freedesktop.org
  Reporter: wolfgang@rohdewald.de
QA Contact: xorg-t...@lists.x.org

Sound goes out as Surround 5.1 over the HDMI cable on an Nvidia GT 630.

Volume amplification is at minimum 0dB - if I increase it, the screen freezes.

lspci:
01:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 630
Rev. 2] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev
a1)

Kubuntu 16.04.1 with self compiled standard kernel 4.8.6
kodi version 15.2

Xorg.0.log says: 
[ 4.645] (II) Module nouveau: vendor="X.Org Foundation"
[ 4.645]compiled for 1.18.1, module version = 1.0.12

kern.log:
Nov  9 13:18:51 s5 kernel: [  599.178480] nouveau :01:00.0: fifo: PBDMA0:
0004 [PBENTRY] ch 8 [003f902000 kodi.bin[2449]] subc 0 mthd  data

Nov  9 13:18:51 s5 kernel: [  599.178502] nouveau :01:00.0: fifo: PBDMA0:
0004 [PBENTRY] ch 8 [003f902000 kodi.bin[2449]] subc 0 mthd  data

Nov  9 13:18:51 s5 kernel: [  599.178515] nouveau :01:00.0: gr: DATA_ERROR
000c [INVALID_BITFIELD] ch 8 [003f902000 kodi.bin[2449]] subc 0 class a197
mthd 114c data 0500
Nov  9 13:18:51 s5 kernel: [  599.178522] nouveau :01:00.0: fifo: PBDMA0:
0004 [PBENTRY] ch 8 [003f902000 kodi.bin[2449]] subc 0 mthd  data

Nov  9 13:18:51 s5 kernel: [  599.178533] nouveau :01:00.0: gr: DATA_ERROR
0003 [INVALID_OPERATION] ch 8 [003f902000 kodi.bin[2449]] subc 0 class a197
mthd 1158 data 3f80
Nov  9 13:18:51 s5 kernel: [  599.178540] nouveau :01:00.0: fifo: PBDMA0:
0004 [PBENTRY] ch 8 [003f902000 kodi.bin[2449]] subc 0 mthd  data


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


Re: [Nouveau] NVAC "No Signal"

2016-11-09 Thread Pierre Moreau
I retested with both 4.8.4, Ben’s linux-4.9 and linux-4.10 branches (so only
the linux-4.10 branch had the atomic+MST patches).
For all branches, if I bootplug the external screen, I get nothing on the
external screen, and the laptop screen is frozen with some mix of images (but
the laptop itself is not locked up), nothing in dmesg. If I hotplug the screen,
the laptop screen is not frozen, but starting with linux-4.10, I get an EVO
timeout when turning off the external monitor. Adding your patch did not change
anything for me.
Looks like I’ll need to spend some more time testing and bisecting those
issues…

Pierre

On 06:12 am - Nov 08 2016, poma wrote:
> On 21.10.2016 10:56, Pierre Moreau wrote:
> > On 01:15 am - Oct 21 2016, Lukas Wunner wrote:
> >> On Thu, Oct 20, 2016 at 10:08:28AM +0200, Lukas Wunner wrote:
> >>> On Wed, Oct 19, 2016 at 07:58:06PM +0200, Pierre Moreau wrote:
>  For example, my laptop (which also has an NVAC) has been triggering the
>  no-signal message on external monitors way before Ben???s patch landed,
>  but only for some adapters. I haven???t tried Ben???s patch yet, nor
>  yours, but I will certainly do it, and see what effect each of them has.
> >>>
> >>> The external DP port on your MBP5,3 is switchable between GPUs and
> >>> the apple-gmux driver switches it in unison with the panel.  Thus
> >>> the NVAC cannot drive external displays when gmux is switched to
> >>> the MCP79.  (You probably were aware of this, just wanted to mention
> >>   ^
> >> I meant G96, sorry I mixed it up.
> >>
> >> Lukas
> > 
> > Yes, that bit had stayed in my memory, that switching between the two GPUs
> > would not only switch them for the laptop screen, but for the external ones 
> > as
> > well. IIRC, I am getting the no signal in both cases, but I need to retest.
> > 
> > Pierre
> 
> Any news related on your side?
> 
> 
> 


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


[Nouveau] [PATCH] acpi: video: Move ACPI_VIDEO_NOTIFY_* defines to acpi/video.h

2016-11-09 Thread Hans de Goede
acpi_video.c passed the ACPI_VIDEO_NOTIFY_* defines as type code to
acpi_notifier_call_chain(). Move these defines to acpi/video.h so
that acpi_notifier listeners can check the type code using these
defines.

Signed-off-by: Hans de Goede 
---
 drivers/acpi/acpi_video.c | 11 ---
 include/acpi/video.h  | 11 +++
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index c5557d0..201292e 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -43,17 +43,6 @@
 
 #define ACPI_VIDEO_BUS_NAME"Video Bus"
 #define ACPI_VIDEO_DEVICE_NAME "Video Device"
-#define ACPI_VIDEO_NOTIFY_SWITCH   0x80
-#define ACPI_VIDEO_NOTIFY_PROBE0x81
-#define ACPI_VIDEO_NOTIFY_CYCLE0x82
-#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT  0x83
-#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT  0x84
-
-#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x85
-#defineACPI_VIDEO_NOTIFY_INC_BRIGHTNESS0x86
-#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS   0x87
-#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS  0x88
-#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF  0x89
 
 #define MAX_NAME_LEN   20
 
diff --git a/include/acpi/video.h b/include/acpi/video.h
index 4536bd3..bfe484d 100644
--- a/include/acpi/video.h
+++ b/include/acpi/video.h
@@ -30,6 +30,17 @@ struct acpi_device;
 #define ACPI_VIDEO_DISPLAY_LEGACY_PANEL   0x0110
 #define ACPI_VIDEO_DISPLAY_LEGACY_TV  0x0200
 
+#define ACPI_VIDEO_NOTIFY_SWITCH   0x80
+#define ACPI_VIDEO_NOTIFY_PROBE0x81
+#define ACPI_VIDEO_NOTIFY_CYCLE0x82
+#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT  0x83
+#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT  0x84
+#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x85
+#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS   0x86
+#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS   0x87
+#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS  0x88
+#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF  0x89
+
 enum acpi_backlight_type {
acpi_backlight_undef = -1,
acpi_backlight_none = 0,
-- 
2.9.3

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


[Nouveau] [PATCH] drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE

2016-11-09 Thread Hans de Goede
Various notebooks with nvidia GPUs generate an ACPI_VIDEO_NOTIFY_PROBE
acpi-video event when an external device gets plugged in (and again on
modesets on that connector), the default behavior in the acpi-video
driver for this is to send a KEY_SWITCHVIDEOMODE evdev event, which
causes e.g. gnome-settings-daemon to ask us to rescan the connectors
(good), but also causes g-s-d to switch to mirror mode on a newly plugged
monitor rather then using the monitor to extend the desktop (bad)
as KEY_SWITCHVIDEOMODE is supposed to switch between extend the desktop
vs mirror mode.

More troublesome are the repeated ACPI_VIDEO_NOTIFY_PROBE events on
changing the mode on the connector, which cause g-s-d to switch
between mirror/extend mode, which causes a new ACPI_VIDEO_NOTIFY_PROBE
event and we end up with an endless loop.

This commit fixes this by adding an acpi notifier block handler to
nouveau_display.c to intercept ACPI_VIDEO_NOTIFY_PROBE and:

1) Wake-up runtime suspended GPUs and call drm_helper_hpd_irq_event()
   on them, this is necessary in some cases for the GPU to detect connector
   hotplug events while runtime suspended
2) Return NOTIFY_BAD to stop acpi-video from emitting a bogus
   KEY_SWITCHVIDEOMODE key-press event

There already is another acpi notifier block handler registered in
drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.c, but that is not
suitable since that one gets unregistered on runtime suspend, and
we also want to intercept ACPI_VIDEO_NOTIFY_PROBE when runtime suspended.

Signed-off-by: Hans de Goede 
---
Note that ACPI_VIDEO_NOTIFY_PROBE currently is a private define in
drivers/acpi/acpi_video.c, since it is passed to acpi_notifier_call_chain()
it really should be in a public header, so I've submitted a patch to
the acpi subsys to move it to include/acpi/video.h . In the mean time
this patch defines it with a #ifndef guard to allow merging without
introducing inter subsys dependencies. I will submit a follow up patch
removing the #ifndef block once both patches are in Linus' tree.
---
 drivers/gpu/drm/nouveau/nouveau_display.c | 61 +++
 drivers/gpu/drm/nouveau/nouveau_drv.h |  6 +++
 2 files changed, 67 insertions(+)

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c 
b/drivers/gpu/drm/nouveau/nouveau_display.c
index afbf557..6cd6723 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -24,6 +24,7 @@
  *
  */
 
+#include 
 #include 
 #include 
 
@@ -42,6 +43,8 @@
 #include 
 #include 
 
+
+
 static int
 nouveau_display_vblank_handler(struct nvif_notify *notify)
 {
@@ -358,6 +361,55 @@ static struct nouveau_drm_prop_enum_list dither_depth[] = {
}  \
 } while(0)
 
+#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_PROBE0x81
+#endif
+
+static void
+nouveau_display_acpi_work(struct work_struct *work)
+{
+   struct nouveau_drm *drm = container_of(work, typeof(*drm), acpi_work);
+
+   pm_runtime_get_sync(drm->dev->dev);
+
+   drm_helper_hpd_irq_event(drm->dev);
+
+   pm_runtime_mark_last_busy(drm->dev->dev);
+   pm_runtime_put_sync(drm->dev->dev);
+}
+
+static int
+nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val,
+ void *data)
+{
+   struct nouveau_drm *drm = container_of(nb, typeof(*drm), acpi_nb);
+   struct acpi_bus_event *info = data;
+
+   if (!strcmp(info->device_class, ACPI_VIDEO_CLASS)) {
+   if (info->type == ACPI_VIDEO_NOTIFY_PROBE) {
+   /*
+* This may be the only indication we receive of a
+* connector hotplug on a runtime suspended GPU,
+* schedule acpi_work to check.
+*/
+   schedule_work(&drm->acpi_work);
+
+   /* acpi-video should not generate keypresses for this */
+   return NOTIFY_BAD;
+   }
+   }
+
+   return NOTIFY_DONE;
+}
+#endif
+
 int
 nouveau_display_init(struct drm_device *dev)
 {
@@ -537,6 +589,12 @@ nouveau_display_create(struct drm_device *dev)
}
 
nouveau_backlight_init(dev);
+#ifdef CONFIG_ACPI
+   INIT_WORK(&drm->acpi_work, nouveau_display_acpi_work);
+   drm->acpi_nb.notifier_call = nouveau_display_acpi_ntfy;
+   register_acpi_notifier(&drm->acpi_nb);
+#endif
+
return 0;
 
 vblank_err:
@@ -552,6 +610,9 @@ nouveau_display_destroy(struct drm_device *dev)
 {
struct nouveau_display *disp = nouveau_display(dev);
 
+#ifdef CONFIG_ACPI
+   unregister_acpi_notifier(&nouveau_drm(dev)->acpi_nb);
+#endif
nouveau_