[Nouveau] [Bug 92077] nouveau graphics freeze when using KDE Plasma 5; PGR engine fault
https://bugs.freedesktop.org/show_bug.cgi?id=92077 --- Comment #24 from Andrey Mazo--- A similar fault and a deadlock that happened on newer kernel (4.7.2). Looks like to be triggered by qupzilla (www-client/qupzilla-2.0.1, compiled with KDE/Plasma 5 support) launch this time. Could be a QtWebEngine problem though. [838735.611662] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 000c data 003c [838735.611680] nouveau :03:00.0: fifo: PBDMA0: 0200 [] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0020 data [838735.611694] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0030 data 003c [838735.611707] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0034 data 20040360 [838735.611720] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0038 data [838735.611733] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 003c data [838735.611746] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0040 data [838735.611758] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0044 data [838735.611771] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0048 data 20010674 [838735.611784] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 004c data 003c [838735.611798] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0054 data [838735.611811] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0058 data 00252000 [838735.611824] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 005c data 200240c7 [838735.611836] nouveau :03:00.0: fifo: PBDMA0: 0020 [ILLEGAL_MTHD] ch 15 [001f68d000 qupzilla[12159]] subc 0 mthd 0060 data 0048 [838735.611855] nouveau :03:00.0: fifo: read fault at 00 engine 07 [PFIFO] client 07 [BAR_READ] reason 02 [PAGE_NOT_PRESENT] on channel 15 [001f68d000 qupzilla[12159]] [838735.611858] nouveau :03:00.0: fifo: fifo engine fault on channel 15, recovering... [838735.612309] = [838735.612311] [ INFO: possible recursive locking detected ] [838735.612314] 4.7.2-gentoo-20160906 #2 Not tainted [838735.612315] - [838735.612317] kworker/0:1/12138 is trying to acquire lock: [838735.612319] ((>recover.work)){+.+...}, at: [] flush_work+0x0/0x290 [838735.612329] but task is already holding lock: [838735.612331] ((>recover.work)){+.+...}, at: [] process_one_work+0x14b/0x450 [838735.612336] other info that might help us debug this: [838735.612337] Possible unsafe locking scenario: [838735.612339]CPU0 [838735.612340] [838735.612341] lock((>recover.work)); [838735.612343] lock((>recover.work)); [838735.612345] *** DEADLOCK *** [838735.612347] May be due to missing lock nesting notation [838735.612349] 2 locks held by kworker/0:1/12138: [838735.612351] #0: ("events"){.+.+.+}, at: [] process_one_work+0x14b/0x450 [838735.612356] #1: ((>recover.work)){+.+...}, at: [] process_one_work+0x14b/0x450 [838735.612360] stack backtrace: [838735.612363] CPU: 0 PID: 12138 Comm: kworker/0:1 Not tainted 4.7.2-gentoo-20160906 #2 [838735.612365] Hardware name: Dell Inc. Precision Tower 7910/0215PR, BIOS A06 01/19/2015 [838735.612371] Workqueue: events gf100_fifo_recover_work [838735.612373] 8800750a7af0 b7567885 88082f22 [838735.612378] b86fd780 8800750a7bb8 b73064c8 b86fd780 [838735.612381] 88082f220050 8800750a7b00 000268312189 0002 [838735.612385] Call Trace: [838735.612391] [] dump_stack+0x67/0x92 [838735.612396] [] __lock_acquire+0x1508/0x1620 [838735.612399] [] lock_acquire+0x60/0x80 [838735.612401] [] ? mod_delayed_work_on+0x80/0x80 [838735.612403] [] flush_work+0x47/0x290 [838735.612405] [] ? mod_delayed_work_on+0x80/0x80 [838735.612408] [] ? mark_held_locks+0x71/0x90 [838735.612414] [] ? ktime_get+0x6a/0x130 [838735.612417] [] gf100_fifo_fini+0x10/0x20 [838735.612420] [] nvkm_fifo_fini+0x1a/0x30 [838735.612424] [] nvkm_engine_fini+0x20/0x30 [838735.612429] [] nvkm_subdev_fini+0x5a/0x160 [838735.612432] [] gf100_fifo_recover_work+0xea/0x1f0 [838735.612434] [] process_one_work+0x1aa/0x450 [838735.612436] [] ? process_one_work+0x14b/0x450 [838735.612438] []
[Nouveau] [Bug 97462] Graphics deadlock "ILLEGAL_MTHD" in nouveau with mesa version 11.2.2 when visiting Google Maps with firefox 49.0b5
https://bugs.freedesktop.org/show_bug.cgi?id=97462 --- Comment #10 from Paviluf--- By the way Chromium work well. -- 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] [PATCH 2/3] drm/nouveau/led: guard against a division by 0
2016-09-16 11:14 GMT+02:00 Martin Peres: > On 16/09/16 10:42, Karol Herbst wrote: >> >> Reviewed-by: Karol Herbst >> >> 2016-09-16 9:34 GMT+02:00 Martin Peres : >>> >>> Signed-off-by: Martin Peres >>> --- >>> drm/nouveau/nouveau_led.c | 5 - >>> 1 file changed, 4 insertions(+), 1 deletion(-) >>> >>> diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c >>> index 5e28b5f..1f731da 100644 >>> --- a/drm/nouveau/nouveau_led.c >>> +++ b/drm/nouveau/nouveau_led.c >>> @@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led) >>> div = nvif_rd32(device, 0x61c880) & 0x00ff; >>> duty = nvif_rd32(device, 0x61c884) & 0x00ff; >>> >>> - return duty * LED_FULL / div; >>> + if (div > 0) >>> + return duty * LED_FULL / div; >>> + else >>> + return 0; >> >> minor nitpick: you can drop the else, I don't mind though. Maybe it >> would be clearer to do it the other way around though. >> >> Or to do: >> >> if (unlikely(div <= 0)) return 0; >> return duty * LED_FULL / div; > > > The unlikely is a good idea, not a fan of single lines if conditions though > :s the single line was me being lazy. if (unlikely(div <= 0)) return 0; return duty * LED_FULL / div; :p ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH] volt: use kernel's 64-bit signed division function
yeah locks fine Reviewed-by: Karol Herbst2016-09-16 11:09 GMT+02:00 Alexandre Courbot : > Doing direct 64 bit divisions in kernel code leads to references to > undefined symbols on 32 bit architectures. Replace such divisions with > calls to div64_s64 to make the module usable on 32 bit archs. > > Signed-off-by: Alexandre Courbot > --- > drm/nouveau/nvkm/subdev/volt/base.c | 6 +++--- > lib/include/nvif/os.h | 1 + > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drm/nouveau/nvkm/subdev/volt/base.c > b/drm/nouveau/nvkm/subdev/volt/base.c > index 90d234231eed..e8569b04b55d 100644 > --- a/drm/nouveau/nvkm/subdev/volt/base.c > +++ b/drm/nouveau/nvkm/subdev/volt/base.c > @@ -116,9 +116,9 @@ nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp) > return volt->speedo; > > if (ver == 0x10 || (ver == 0x20 && info.mode == 0)) { > - result = (s64)info.arg[0] / 10; > - result += ((s64)info.arg[1] * volt->speedo) / 10; > - result += ((s64)info.arg[2] * volt->speedo * > volt->speedo) / 10; > + result = div64_s64((s64)info.arg[0], 10); > + result += div64_s64((s64)info.arg[1] * volt->speedo, > 10); > + result += div64_s64((s64)info.arg[2] * volt->speedo * > volt->speedo, 10); > } else if (ver == 0x20) { > switch (info.mode) { > /* 0x0 handled above! */ > diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h > index b45a1862436e..2c1985d90474 100644 > --- a/lib/include/nvif/os.h > +++ b/lib/include/nvif/os.h > @@ -88,6 +88,7 @@ typedef dma_addr_t resource_size_t; > ) > #define do_div(a,b) (a) = (a) / (b) > #define div_u64(a,b) (a) / (b) > +#define div64_s64(a,b) (a) / (b) > #define likely(a) (a) > #define unlikely(a) (a) > #define BIT(a) (1UL << (a)) > -- > 2.9.3 > ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH] volt: use kernel's 64-bit signed division function
Doing direct 64 bit divisions in kernel code leads to references to undefined symbols on 32 bit architectures. Replace such divisions with calls to div64_s64 to make the module usable on 32 bit archs. Signed-off-by: Alexandre Courbot--- drm/nouveau/nvkm/subdev/volt/base.c | 6 +++--- lib/include/nvif/os.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c index 90d234231eed..e8569b04b55d 100644 --- a/drm/nouveau/nvkm/subdev/volt/base.c +++ b/drm/nouveau/nvkm/subdev/volt/base.c @@ -116,9 +116,9 @@ nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp) return volt->speedo; if (ver == 0x10 || (ver == 0x20 && info.mode == 0)) { - result = (s64)info.arg[0] / 10; - result += ((s64)info.arg[1] * volt->speedo) / 10; - result += ((s64)info.arg[2] * volt->speedo * volt->speedo) / 10; + result = div64_s64((s64)info.arg[0], 10); + result += div64_s64((s64)info.arg[1] * volt->speedo, 10); + result += div64_s64((s64)info.arg[2] * volt->speedo * volt->speedo, 10); } else if (ver == 0x20) { switch (info.mode) { /* 0x0 handled above! */ diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h index b45a1862436e..2c1985d90474 100644 --- a/lib/include/nvif/os.h +++ b/lib/include/nvif/os.h @@ -88,6 +88,7 @@ typedef dma_addr_t resource_size_t; ) #define do_div(a,b) (a) = (a) / (b) #define div_u64(a,b) (a) / (b) +#define div64_s64(a,b) (a) / (b) #define likely(a) (a) #define unlikely(a) (a) #define BIT(a) (1UL << (a)) -- 2.9.3 ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 2/3] drm/nouveau/led: guard against a division by 0
On 16/09/16 10:42, Karol Herbst wrote: Reviewed-by: Karol Herbst2016-09-16 9:34 GMT+02:00 Martin Peres : Signed-off-by: Martin Peres --- drm/nouveau/nouveau_led.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 5e28b5f..1f731da 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led) div = nvif_rd32(device, 0x61c880) & 0x00ff; duty = nvif_rd32(device, 0x61c884) & 0x00ff; - return duty * LED_FULL / div; + if (div > 0) + return duty * LED_FULL / div; + else + return 0; minor nitpick: you can drop the else, I don't mind though. Maybe it would be clearer to do it the other way around though. Or to do: if (unlikely(div <= 0)) return 0; return duty * LED_FULL / div; The unlikely is a good idea, not a fan of single lines if conditions though :s ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 3/3] drm/nouveau/led: abort early if the device does not have GPIOs
Reviewed-by: Karol Herbst2016-09-16 9:34 GMT+02:00 Martin Peres : > Signed-off-by: Martin Peres > --- > drm/nouveau/nouveau_led.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c > index 1f731da..3e2f1b6 100644 > --- a/drm/nouveau/nouveau_led.c > +++ b/drm/nouveau/nouveau_led.c > @@ -82,6 +82,9 @@ nouveau_led_init(struct drm_device *dev) > struct dcb_gpio_func logo_led; > int ret; > > + if (!gpio) > + return 0; > + > /* check that there is a GPIO controlling the logo LED */ > if (nvkm_gpio_find(gpio, 0, DCB_GPIO_LOGO_LED_PWM, 0xff, _led)) > return 0; > -- > 2.8.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
Re: [Nouveau] [PATCH 3/3] drm/nouveau/led: abort early if the device does not have GPIOs
On Fri, Sep 16, 2016 at 4:34 PM, Martin Pereswrote: > Signed-off-by: Martin Peres Tested-by: Alexandre Courbot Fixes the crash I was seeing on Tegra, thanks! ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 2/3] drm/nouveau/led: guard against a division by 0
On Fri, Sep 16, 2016 at 4:34 PM, Martin Pereswrote: > Signed-off-by: Martin Peres Tested-by: Alexandre Courbot Fixes the crash I was seeing on GM206, thanks! ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 2/3] drm/nouveau/led: guard against a division by 0
Reviewed-by: Karol Herbst2016-09-16 9:34 GMT+02:00 Martin Peres : > Signed-off-by: Martin Peres > --- > drm/nouveau/nouveau_led.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c > index 5e28b5f..1f731da 100644 > --- a/drm/nouveau/nouveau_led.c > +++ b/drm/nouveau/nouveau_led.c > @@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led) > div = nvif_rd32(device, 0x61c880) & 0x00ff; > duty = nvif_rd32(device, 0x61c884) & 0x00ff; > > - return duty * LED_FULL / div; > + if (div > 0) > + return duty * LED_FULL / div; > + else > + return 0; minor nitpick: you can drop the else, I don't mind though. Maybe it would be clearer to do it the other way around though. Or to do: if (unlikely(div <= 0)) return 0; return duty * LED_FULL / div; > } > > static void > -- > 2.8.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
[Nouveau] [PATCH 3/3] drm/nouveau/led: abort early if the device does not have GPIOs
Signed-off-by: Martin Peres--- drm/nouveau/nouveau_led.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 1f731da..3e2f1b6 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -82,6 +82,9 @@ nouveau_led_init(struct drm_device *dev) struct dcb_gpio_func logo_led; int ret; + if (!gpio) + return 0; + /* check that there is a GPIO controlling the logo LED */ if (nvkm_gpio_find(gpio, 0, DCB_GPIO_LOGO_LED_PWM, 0xff, _led)) return 0; -- 2.8.0 ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH 1/3] drm/nouveau/led: don't access led subdev if it wasn't initialized
From: Karol HerbstFixes a kernel crash on suspend/resume. --- drm/nouveau/nouveau_led.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 9eed5a6..5e28b5f 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -107,7 +107,8 @@ nouveau_led_suspend(struct drm_device *dev) { struct nouveau_drm *drm = nouveau_drm(dev); - led_classdev_suspend(>led->led); + if (drm->led) + led_classdev_suspend(>led->led); } void @@ -115,8 +116,8 @@ nouveau_led_resume(struct drm_device *dev) { struct nouveau_drm *drm = nouveau_drm(dev); - led_classdev_resume(>led->led); - + if (drm->led) + led_classdev_resume(>led->led); } void -- 2.8.0 ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH 2/3] drm/nouveau/led: guard against a division by 0
Signed-off-by: Martin Peres--- drm/nouveau/nouveau_led.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 5e28b5f..1f731da 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led) div = nvif_rd32(device, 0x61c880) & 0x00ff; duty = nvif_rd32(device, 0x61c884) & 0x00ff; - return duty * LED_FULL / div; + if (div > 0) + return duty * LED_FULL / div; + else + return 0; } static void -- 2.8.0 ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH] drm/nouveau/disp: remove unused function in sorg94.c
We get 1 warning when building kernel with W=1: drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c:49:1: warning: no previous prototype for 'g94_sor_output_new' [-Wmissing-prototypes] In fact, this function is called by no one and not exported, so this patch removes it. Signed-off-by: Baoyou Xie--- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c index 1bb9d66..4510cb6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c @@ -45,14 +45,6 @@ static const struct nvkm_output_func g94_sor_output_func = { }; -int -g94_sor_output_new(struct nvkm_disp *disp, int index, - struct dcb_output *dcbE, struct nvkm_output **poutp) -{ - return nvkm_output_new_(_sor_output_func, disp, - index, dcbE, poutp); -} - /*** * DisplayPort **/ -- 2.7.4 ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau