Re: [Nouveau] nouveau: DRM: GPU lockup - switching to software fbcon

2019-06-30 Thread Sergey Senozhatsky
On (06/19/19 02:07), Ilia Mirkin wrote:
> If all else fails, just remove nouveau_dri.so and/or boot with
> nouveau.noaccel=1 -- should be perfect.

nouveau.noaccel=1 did the trick. Is there any other, let's say
less CPU-intensive, way to fix nouveau?

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

Re: [Nouveau] nouveau: DRM: GPU lockup - switching to software fbcon

2019-06-19 Thread Sergey Senozhatsky
On (06/19/19 15:27), Sergey Senozhatsky wrote:
> [..]
> 
> > If all else fails, just remove nouveau_dri.so and/or boot with
> > nouveau.noaccel=1 -- should be perfect.
> 
> Can give it a try.

That has some impact on system responsiveness:

 CPU%   COMM
 339.7  firefox

Which is slightly less than perfect :)

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

Re: nouveau: DRM: GPU lockup - switching to software fbcon

2019-06-19 Thread Sergey Senozhatsky
On (06/19/19 02:07), Ilia Mirkin wrote:
> On Wed, Jun 19, 2019 at 1:48 AM Sergey Senozhatsky
>  wrote:
> >
> > On (06/19/19 01:20), Ilia Mirkin wrote:
> > > On Wed, Jun 19, 2019 at 1:08 AM Sergey Senozhatsky
> > >  wrote:
> > > >
> > > > On (06/14/19 11:50), Sergey Senozhatsky wrote:
> > > > > dmesg
> > > > >
> > > > >  nouveau :01:00.0: DRM: GPU lockup - switching to software fbcon
> > > > >  nouveau :01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
> > > > >  nouveau :01:00.0: fifo: runlist 0: scheduled for recovery
> > > > >  nouveau :01:00.0: fifo: channel 5: killed
> > > > >  nouveau :01:00.0: fifo: engine 6: scheduled for recovery
> > > > >  nouveau :01:00.0: fifo: engine 0: scheduled for recovery
> > > > >  nouveau :01:00.0: firefox[476]: channel 5 killed!
> > > > >  nouveau :01:00.0: firefox[476]: failed to idle channel 5 
> > > > > [firefox[476]]
> > > > >
> > > > > It lockups several times a day. Twice in just one hour today.
> > > > > Can we fix this?
> > > >
> > > > Unusable
> > >
> > > Are you using a GTX 660 by any chance? You've provided rather minimal
> > > system info.
> >
> > 01:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 
> > 730] (rev a1)
> 
> Quite literally the same GPU I have plugged in...
> 
> 02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208B
> [GeForce GT 730] [10de:1287] (rev a1)
> 
> Works great here! Only other thing I can think of is that I avoid
> applications with the letters "G" and "K" in their names, and I'm
> using xf86-video-nouveau ddx, whereas you might be using the "modeset"
> ddx with glamor.

xf86-video-nouveau 1.0.16-1

cat .local/share/xorg/Xorg.0.log

[..]
[   304.159] (II) NOUVEAU driver 
[   304.159] (II) NOUVEAU driver for NVIDIA chipset families :
[   304.159]RIVA TNT(NV04)
[   304.159]RIVA TNT2   (NV05)
[   304.159]GeForce 256 (NV10)
[   304.159]GeForce 2   (NV11, NV15)
[   304.159]GeForce 4MX (NV17, NV18)
[   304.159]GeForce 3   (NV20)
[   304.159]GeForce 4Ti (NV25, NV28)
[   304.159]GeForce FX  (NV3x)
[   304.159]GeForce 6   (NV4x)
[   304.159]GeForce 7   (G7x)
[   304.159]GeForce 8   (G8x)
[   304.159]GeForce 9   (G9x)
[   304.159]GeForce GTX 2xx/3xx (GT2xx)
[   304.159]GeForce GTX 4xx/5xx (GFxxx)
[   304.159]GeForce GTX 6xx/7xx (GKxxx)
[   304.159]GeForce GTX 9xx (GMxxx)
[   304.159]GeForce GTX 10xx(GPxxx)
[   304.159] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   304.159] (II) [drm] nouveau interface version: 1.3.1
[   304.159] (WW) Falling back to old probe method for modesetting
[   304.159] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   304.159] (II) Loading sub module "dri2"
[   304.159] (II) LoadModule: "dri2"
[   304.159] (II) Module "dri2" already built-in
[   304.159] (--) NOUVEAU(0): Chipset: "NVIDIA NV106"
[   304.159] (II) NOUVEAU(0): Creating default Display subsection in Screen 
section
"Default Screen Section" for depth/fbbpp 24/32
[...]
[   304.309] (II) UnloadModule: "modesetting"
[   304.309] (II) Unloading modesetting
[   304.310] (II) NOUVEAU(0): Channel setup complete.
[   304.310] (II) NOUVEAU(0): [COPY] async initialised.
[   304.310] (II) NOUVEAU(0): Hardware support for Present enabled
[   304.310] (II) NOUVEAU(0): [DRI2] Setup complete
[   304.310] (II) NOUVEAU(0): [DRI2]   DRI driver: nouveau
[   304.310] (II) NOUVEAU(0): [DRI2]   VDPAU driver: nouveau
[   304.310] (II) Loading sub module "exa"
[   304.310] (II) LoadModule: "exa"
[   304.310] (II) Loading /usr/lib/xorg/modules/libexa.so
[   304.310] (II) Module exa: vendor="X.Org Foundation"
[   304.310]compiled for 1.20.5, module version = 2.6.0
[   304.310]ABI class: X.Org Video Driver, version 24.0
[   304.310] (II) EXA(0): Driver allocated offscreen pixmaps
[   304.310] (II) EXA(0): Driver registered support for the following 
operations:
[   304.310] (II) Solid
[   304.310] (II) Copy
[   304.310] (II) Composite (RENDER acceleration)
[   304.310] (II) UploadToScreen
[   304.310] (II) DownloadFromScreen
[   304.310] (==) NOUVEAU(0): Backing store enabled
[   304.310] (==) NOUVEAU(0): Silken mouse disabled
[   304.310] (II) NOUVEAU(0): [XvMC] Associated with Nouveau GeForce 8/9 
Textured Video.
[   304.310] (II) NOUVEAU(0): [XvMC] Extension initialized.
[   304.310] (==) NOUVEAU(0): DPMS enabled
[..]

> If all else fails, just remove nouveau_dri.so and/or boot with
> nouveau.noaccel=1 -- should be perfect.

Can give it a try.

-ss


Re: [Nouveau] nouveau: DRM: GPU lockup - switching to software fbcon

2019-06-18 Thread Sergey Senozhatsky
On (06/19/19 01:20), Ilia Mirkin wrote:
> On Wed, Jun 19, 2019 at 1:08 AM Sergey Senozhatsky
>  wrote:
> >
> > On (06/14/19 11:50), Sergey Senozhatsky wrote:
> > > dmesg
> > >
> > >  nouveau :01:00.0: DRM: GPU lockup - switching to software fbcon
> > >  nouveau :01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
> > >  nouveau :01:00.0: fifo: runlist 0: scheduled for recovery
> > >  nouveau :01:00.0: fifo: channel 5: killed
> > >  nouveau :01:00.0: fifo: engine 6: scheduled for recovery
> > >  nouveau :01:00.0: fifo: engine 0: scheduled for recovery
> > >  nouveau :01:00.0: firefox[476]: channel 5 killed!
> > >  nouveau :01:00.0: firefox[476]: failed to idle channel 5 
> > > [firefox[476]]
> > >
> > > It lockups several times a day. Twice in just one hour today.
> > > Can we fix this?
> >
> > Unusable
> 
> Are you using a GTX 660 by any chance? You've provided rather minimal
> system info.

01:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 730] 
(rev a1)

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

Re: [Nouveau] nouveau: DRM: GPU lockup - switching to software fbcon

2019-06-18 Thread Sergey Senozhatsky
On (06/14/19 11:50), Sergey Senozhatsky wrote:
> dmesg
> 
>  nouveau :01:00.0: DRM: GPU lockup - switching to software fbcon
>  nouveau :01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
>  nouveau :01:00.0: fifo: runlist 0: scheduled for recovery
>  nouveau :01:00.0: fifo: channel 5: killed
>  nouveau :01:00.0: fifo: engine 6: scheduled for recovery
>  nouveau :01:00.0: fifo: engine 0: scheduled for recovery
>  nouveau :01:00.0: firefox[476]: channel 5 killed!
>  nouveau :01:00.0: firefox[476]: failed to idle channel 5 [firefox[476]]
> 
> It lockups several times a day. Twice in just one hour today.
> Can we fix this?

Unusable

[10380.555859] [ cut here ]
[10380.556923] nouveau :01:00.0: timeout
[10380.557981] WARNING: CPU: 3 PID: 12845 at 
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c:171 
gk104_fifo_runlist_commit+0x11d/0x140
[10380.559079] Modules linked in: rndis_host cdc_ether usbnet mii mousedev 
hid_generic usbhid hid snd_hda_codec_realtek snd_hda_codec_generic r8169 
snd_hda_intel realtek libphy snd_hda_codec snd_hda_core snd_pcm coretemp hwmon 
snd_timer snd i2c_i801 soundcore button xhci_pci xhci_hcd usbcore usb_common
[10380.560390] CPU: 3 PID: 12845 Comm: JS Helper Not tainted 
5.2.0-rc5-next-20190617-dbg-00012-g45d135944f17-dirty #3438
[10380.560392] RIP: 0010:gk104_fifo_runlist_commit+0x11d/0x140
[10380.560393] Code: 24 08 48 8b 40 10 48 8b 78 10 4c 8b 77 50 4d 85 f6 74 34 
e8 75 ea 06 00 4c 89 f2 48 c7 c7 ba b1 de a8 48 89 c6 e8 4e 8b c2 ff <0f> 0b 41 
8b 45 50 85 c0 0f 85 33 1d 00 00 48 83 c4 30 5b 5d 41 5c
[10380.560393] RSP: 0018:962383e179b8 EFLAGS: 00010296
[10380.560394] RAX: 001d RBX: 8b98cc9a7400 RCX: 
[10380.560394] RDX: 8b98ceae5218 RSI: 8b98cead6348 RDI: 8b98cead6348
[10380.560395] RBP: 2284 R08: 8b98cead6348 R09: 02d7
[10380.560395] R10: 0001 R11:  R12: 
[10380.560396] R13: 8b98cb0f9000 R14: 8b95c7594b20 R15: 
[10380.560396] FS:  7fcff2aff700() GS:8b98ceac() 
knlGS:
[10380.560397] CS:  0010 DS:  ES:  CR0: 80050033
[10380.560397] CR2: 55d2e178b098 CR3: 0001e3008006 CR4: 001606e0
[10380.560398] DR0:  DR1:  DR2: 
[10380.560398] DR3:  DR6: fffe0ff0 DR7: 0400
[10380.560398] Call Trace:
[10380.560401]  gk104_fifo_runlist_update+0x19e/0x1c0
[10380.560403]  gk104_fifo_gpfifo_fini+0x7d/0xa0
[10380.560404]  nvkm_fifo_chan_fini+0x19/0x20
[10380.560406]  nvkm_object_fini+0xbc/0x150
[10380.560408]  nvkm_ioctl_del+0x2f/0x50
[10380.560409]  nvkm_ioctl+0xdf/0x177
[10380.560410]  nvif_object_fini+0x49/0x60
[10380.560412]  nouveau_channel_del+0x89/0x110
[10380.560413]  nouveau_abi16_chan_fini.isra.0+0xa0/0x110
[10380.560414]  nouveau_abi16_fini+0x2d/0x60
[10380.560416]  nouveau_drm_postclose+0x4c/0xe0
[10380.560418]  drm_file_free.part.0+0x1e0/0x290
[10380.560420]  drm_release+0xa7/0xe0
[10380.591300]  __fput+0xc7/0x250
[10380.592291]  task_work_run+0x90/0xc0
[10380.593271]  do_exit+0x286/0xb10
[10380.594306]  do_group_exit+0x33/0xa0
[10380.595333]  get_signal+0x12d/0x7e0
[10380.596304]  do_signal+0x23/0x590
[10380.597490]  ? __bpf_prog_run64+0x40/0x40
[10380.598441]  ? __seccomp_filter+0x7e/0x430
[10380.599503]  ? __x64_sys_futex+0x12c/0x145
[10380.600477]  exit_to_usermode_loop+0x5d/0x70
[10380.601447]  do_syscall_64+0x21f/0x2e8
[10380.602420]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[10380.603352] RIP: 0033:0x7fd0025bdbac
[10380.604341] Code: Bad RIP value.
[10380.605264] RSP: 002b:7fcff2afe590 EFLAGS: 0246 ORIG_RAX: 
00ca
[10380.606196] RAX: fe00 RBX: 7fcff2b06608 RCX: 7fd0025bdbac
[10380.607241] RDX:  RSI: 0080 RDI: 7fcff2b06630
[10380.608241] RBP:  R08:  R09: 
[10380.609172] R10:  R11: 0246 R12: 1ecc
[10380.610097] R13: 7fcff2b065b0 R14:  R15: 7fcff2b06630
[10380.611023] ---[ end trace 3a96e3448f4194de ]---
[10380.611946] nouveau :01:00.0: fifo: runlist 0 update timeout
[10382.850861] nouveau :01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
[10382.851777] nouveau :01:00.0: fifo: runlist 0: scheduled for recovery
[10382.852673] nouveau :01:00.0: fifo: channel 5: killed
[10382.853560] nouveau :01:00.0: fifo: engine 0: scheduled for recovery
[10382.854521] nouveau :01:00.0: firefox[12157]: channel 5 killed!
[10395.612848] nouveau :01:00.0: firefox[12157]: failed to idle channel 5 
[firefox[12157]]

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

[Nouveau] nouveau: DRM: GPU lockup - switching to software fbcon

2019-06-13 Thread Sergey Senozhatsky
5.2.0-rc4-next-20190613

dmesg

 nouveau :01:00.0: DRM: GPU lockup - switching to software fbcon
 nouveau :01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
 nouveau :01:00.0: fifo: runlist 0: scheduled for recovery
 nouveau :01:00.0: fifo: channel 5: killed
 nouveau :01:00.0: fifo: engine 6: scheduled for recovery
 nouveau :01:00.0: fifo: engine 0: scheduled for recovery
 nouveau :01:00.0: firefox[476]: channel 5 killed!
 nouveau :01:00.0: firefox[476]: failed to idle channel 5 [firefox[476]]

It lockups several times a day. Twice in just one hour today.
Can we fix this?

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

Re: [Nouveau] drm/nouveau/core/memory: kmemleak 684 new suspected memory leaks

2019-05-17 Thread Sergey Senozhatsky
On (05/17/19 16:27), Sergey Senozhatsky wrote:
> > ... but most likely it's utterly wrong.
> > 
> 
> JFI, I removed kmemleak annotation

meeehhh

kmemleak: 2046 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

unreferenced object 0x95cbea4e6060 (size 16):
  comm "Web Content", pid 1191, jiffies 4294795669 (age 735.950s)
  hex dump (first 16 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
  backtrace:
[<d0781ea4>] nvkm_memory_tags_get+0x8e/0x130
[<061f3c89>] gf100_vmm_valid+0x196/0x2f0
[<d79084b7>] nvkm_vmm_map+0xa8/0x360
[<e3174e33>] nvkm_vram_map+0x48/0x50
[<006adddb>] nvkm_uvmm_mthd+0x658/0x770
[<b36f3a8b>] nvkm_ioctl+0xdf/0x177
[<03acea2c>] nvif_object_mthd+0xd4/0x100
[<33824292>] nvif_vmm_map+0xeb/0x100
[<537f8629>] nouveau_mem_map+0x79/0xd0
[<c3b20b73>] nouveau_vma_new+0x19d/0x1c0
[<dc91383f>] nouveau_gem_object_open+0xd4/0x140
[<5a53123b>] drm_gem_handle_create_tail+0xe3/0x160
[<e733f5a8>] nouveau_gem_ioctl_new+0x6e/0xd0
[<b5bebef5>] drm_ioctl_kernel+0x8c/0xd0
[<4f28d8a6>] drm_ioctl+0x1c4/0x360
[<b08b5723>] nouveau_drm_ioctl+0x63/0xb0

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

Re: [Nouveau] drm/nouveau/core/memory: kmemleak 684 new suspected memory leaks

2019-05-17 Thread Sergey Senozhatsky
On (05/17/19 15:13), Sergey Senozhatsky wrote:

> ... but most likely it's utterly wrong.
> 

JFI, I removed kmemleak annotation and added the following
thing:

@@ -360,6 +360,7 @@ gp100_vmm_valid(struct nvkm_vmm *vmm, void *argv, u32 argc,
return -EINVAL;
}

+   kfree(map->tags);
ret = nvkm_memory_tags_get(memory, device, tags,
   nvkm_ltc_tags_clear,
   >tags);

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

Re: [Nouveau] drm/nouveau/core/memory: kmemleak 684 new suspected memory leaks

2019-05-17 Thread Sergey Senozhatsky
On (05/17/19 15:31), Sergey Senozhatsky wrote:
> >   backtrace:
> > [<81f2894f>] nvkm_memory_tags_get+0x8e/0x130
> > [<7cd7c0bc>] gf100_vmm_valid+0x196/0x2f0
> > [<70cc6d67>] nvkm_vmm_map+0xa8/0x360
> > [<ab678644>] nvkm_vram_map+0x48/0x50
> > [<d8176378>] nvkm_uvmm_mthd+0x658/0x770
> > [<463fca5a>] nvkm_ioctl+0xdf/0x177
> > [<0afc4996>] nvif_object_mthd+0xd4/0x100
> > [<2f7a7385>] nvif_vmm_map+0xeb/0x100
> > [<ef2537ed>] nouveau_mem_map+0x79/0xd0
> > [<14ddc0cf>] nouveau_vma_new+0x19d/0x1c0
> > [<f99888a1>] nouveau_gem_object_open+0xd4/0x140
> > [<9cd25861>] drm_gem_handle_create_tail+0xe3/0x160
> > [<191784d9>] nouveau_gem_ioctl_new+0x6e/0xd0
> > [<159678df>] drm_ioctl_kernel+0x8c/0xd0
> > [<fbaa6154>] drm_ioctl+0x1c4/0x360
> > [<6833fe15>] nouveau_drm_ioctl+0x63/0xb0
[..]
>   backtrace:
> [<6933ed2b>] nouveau_conn_reset+0x20/0xb0
> [<572e2e30>] nouveau_connector_create+0x356/0x54c
> [<8a6a13cd>] nv50_display_create+0x2fb/0x917
> [<7fab0a58>] nouveau_display_create+0x3e6/0x600
> [<8b8644c8>] nouveau_drm_device_init+0x149/0x6b0
> [<4fd78a1f>] nouveau_drm_probe+0x263/0x2b0
> [<357716ef>] pci_device_probe+0xa3/0x110
> [<061d40e4>] really_probe+0xd3/0x240
> [<0ade44b6>] driver_probe_device+0x50/0xc0
> [<9cd0024c>] device_driver_attach+0x53/0x60
> [<b11ab0bb>] __driver_attach+0x4c/0xb0
> [<16d8457f>] bus_for_each_dev+0x66/0x90
> [<f2855f5e>] bus_add_driver+0x171/0x1c0
> [<21c08fc1>] driver_register+0x6c/0xaf
> [<86357843>] do_one_initcall+0x36/0x1d4
> [<a6be055a>] kernel_init_freeable+0x1bf/0x24f

And one more:

iccsense->rail = kmalloc_array(cnt, sizeof(struct pwr_rail_t), 
GFP_KERNEL);

unreferenced object 0x94e5ccdc7600 (size 96):
  comm "swapper/0", pid 1, jiffies 4294667774 (age 913.205s)
  hex dump (first 32 bytes):
00 00 00 cc e5 94 ff ff 00 00 00 00 00 00 00 00  
04 00 f1 ff 00 00 00 00 00 00 00 00 00 00 00 00  
  backtrace:
[<242abcb3>] nvbios_iccsense_parse+0xdc/0x250
[<b5c70490>] nvkm_iccsense_oneinit+0x55/0x370
[<20e0a743>] nvkm_subdev_init+0x53/0xd0
[<4d8c6ef1>] nvkm_device_init+0x10d/0x190
[<bd7a4da4>] nvkm_udevice_init+0x41/0x60
[<47effcfc>] nvkm_object_init+0x3e/0x100
[<6d6bad21>] nvkm_ioctl_new+0x145/0x1e0
[<fc4e7e48>] nvkm_ioctl+0xdf/0x177
[<4cdc9cf8>] nvif_object_init+0xd6/0x130
[<1637584b>] nvif_device_init+0xe/0x50
[<830683d4>] nouveau_cli_init+0x17d/0x410
[<fd93c306>] nouveau_drm_device_init+0x55/0x6b0
[<7bc74e3f>] nouveau_drm_probe+0x263/0x2b0
[<0f94f913>] pci_device_probe+0xa3/0x110
[<f82d21be>] really_probe+0xd3/0x240
[<a8b8b02e>] driver_probe_device+0x50/0xc0

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

Re: [Nouveau] drm/nouveau/core/memory: kmemleak 684 new suspected memory leaks

2019-05-17 Thread Sergey Senozhatsky
On (05/17/19 15:13), Sergey Senozhatsky wrote:
> 5.1.0-next-20190517
> 
> I'm looking at quite a lot of kmemleak reports coming from
> drm/nouveau/core/memory, all of which are:
> 
> unreferenced object 0x8deec27c4ac0 (size 16):
>   comm "Web Content", pid 5309, jiffies 4309675011 (age 68.076s)
>   hex dump (first 16 bytes):
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
>   backtrace:
> [<81f2894f>] nvkm_memory_tags_get+0x8e/0x130
> [<7cd7c0bc>] gf100_vmm_valid+0x196/0x2f0
> [<70cc6d67>] nvkm_vmm_map+0xa8/0x360
> [<ab678644>] nvkm_vram_map+0x48/0x50
> [<d8176378>] nvkm_uvmm_mthd+0x658/0x770
> [<463fca5a>] nvkm_ioctl+0xdf/0x177
> [<0afc4996>] nvif_object_mthd+0xd4/0x100
> [<2f7a7385>] nvif_vmm_map+0xeb/0x100
> [<ef2537ed>] nouveau_mem_map+0x79/0xd0
> [<14ddc0cf>] nouveau_vma_new+0x19d/0x1c0
> [<f99888a1>] nouveau_gem_object_open+0xd4/0x140
> [<9cd25861>] drm_gem_handle_create_tail+0xe3/0x160
> [<191784d9>] nouveau_gem_ioctl_new+0x6e/0xd0
> [<159678df>] drm_ioctl_kernel+0x8c/0xd0
> [<fbaa6154>] drm_ioctl+0x1c4/0x360
> [<6833fe15>] nouveau_drm_ioctl+0x63/0xb0

Yet another one (4 leaks), but this looks more like a real leak.

unreferenced object 0x8f1e0cbbe840 (size 192):
  comm "swapper/0", pid 1, jiffies 4294668445 (age 742.639s)
  hex dump (first 32 bytes):
00 90 89 0c 1e 8f ff ff 00 00 00 00 00 00 00 00  
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
  backtrace:
[<6933ed2b>] nouveau_conn_reset+0x20/0xb0
[<572e2e30>] nouveau_connector_create+0x356/0x54c
[<8a6a13cd>] nv50_display_create+0x2fb/0x917
[<7fab0a58>] nouveau_display_create+0x3e6/0x600
[<8b8644c8>] nouveau_drm_device_init+0x149/0x6b0
[<4fd78a1f>] nouveau_drm_probe+0x263/0x2b0
[<357716ef>] pci_device_probe+0xa3/0x110
[<061d40e4>] really_probe+0xd3/0x240
[<0ade44b6>] driver_probe_device+0x50/0xc0
[<9cd0024c>] device_driver_attach+0x53/0x60
[<b11ab0bb>] __driver_attach+0x4c/0xb0
[<16d8457f>] bus_for_each_dev+0x66/0x90
[<f2855f5e>] bus_add_driver+0x171/0x1c0
[<21c08fc1>] driver_register+0x6c/0xaf
[<86357843>] do_one_initcall+0x36/0x1d4
[<a6be055a>] kernel_init_freeable+0x1bf/0x24f

Seems that connector ->state is not fully destroyed.

---
 drivers/gpu/drm/nouveau/nouveau_connector.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c 
b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 4116ee62adaf..caec1737a7de 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -251,8 +251,10 @@ nouveau_conn_reset(struct drm_connector *connector)
if (WARN_ON(!(asyc = kzalloc(sizeof(*asyc), GFP_KERNEL
return;
 
-   if (connector->state)
+   if (connector->state) {
__drm_atomic_helper_connector_destroy_state(connector->state);
+   kfree(connector->state);
+   }
__drm_atomic_helper_connector_reset(connector, >state);
asyc->dither.mode = DITHERING_MODE_AUTO;
asyc->dither.depth = DITHERING_DEPTH_AUTO;
-- 
2.21.0

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

[Nouveau] drm/nouveau/core/memory: kmemleak 684 new suspected memory leaks

2019-05-17 Thread Sergey Senozhatsky
Hello,

5.1.0-next-20190517

I'm looking at quite a lot of kmemleak reports coming from
drm/nouveau/core/memory, all of which are:

unreferenced object 0x8deec27c4ac0 (size 16):
  comm "Web Content", pid 5309, jiffies 4309675011 (age 68.076s)
  hex dump (first 16 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
  backtrace:
[<81f2894f>] nvkm_memory_tags_get+0x8e/0x130
[<7cd7c0bc>] gf100_vmm_valid+0x196/0x2f0
[<70cc6d67>] nvkm_vmm_map+0xa8/0x360
[] nvkm_vram_map+0x48/0x50
[] nvkm_uvmm_mthd+0x658/0x770
[<463fca5a>] nvkm_ioctl+0xdf/0x177
[<0afc4996>] nvif_object_mthd+0xd4/0x100
[<2f7a7385>] nvif_vmm_map+0xeb/0x100
[] nouveau_mem_map+0x79/0xd0
[<14ddc0cf>] nouveau_vma_new+0x19d/0x1c0
[] nouveau_gem_object_open+0xd4/0x140
[<9cd25861>] drm_gem_handle_create_tail+0xe3/0x160
[<191784d9>] nouveau_gem_ioctl_new+0x6e/0xd0
[<159678df>] drm_ioctl_kernel+0x8c/0xd0
[] drm_ioctl+0x1c4/0x360
[<6833fe15>] nouveau_drm_ioctl+0x63/0xb0

Wondering if those are real leaks or just false positives.

For now I marked `tags' as kmemleak_not_leak(); but most
likely it's utterly wrong.

Any thoughts?

---
 drivers/gpu/drm/nouveau/nvkm/core/memory.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/nouveau/nvkm/core/memory.c 
b/drivers/gpu/drm/nouveau/nvkm/core/memory.c
index e85a08ecd9da..cd46f54c5c32 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/memory.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/memory.c
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 void
 nvkm_memory_tags_put(struct nvkm_memory *memory, struct nvkm_device *device,
@@ -92,6 +93,7 @@ nvkm_memory_tags_get(struct nvkm_memory *memory, struct 
nvkm_device *device,
 
refcount_set(>refcount, 1);
mutex_unlock(>subdev.mutex);
+   kmemleak_not_leak(tags);
*ptags = tags;
return 0;
 }
-- 
2.21.0

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

Re: [Nouveau] [linux-next] DDC responded, but no EDID for %s errors

2018-09-05 Thread Sergey Senozhatsky
On (09/06/18 12:46), Ben Skeggs wrote:
> On Thu, Sep 6, 2018 at 12:42 PM Sergey Senozhatsky
>  wrote:
> >
> > On (08/02/18 11:46), Sergey Senozhatsky wrote:
> > > Hi,
> > >
> > > My dmesg is filled up with these errors
> > >
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for HDMI-A-1
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for HDMI-A-1
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> > > [..]
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> > >  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> > > [..]
> > >
> > > Basically, a message every 10s or so. Any chance we can make them
> > > go away?
> >
> > A gentle ping?
> I've got patches queued in my tree to resolve this, I will get them to
> drm-fixes shortly.

Thanks!

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


Re: [Nouveau] [linux-next] DDC responded, but no EDID for %s errors

2018-09-05 Thread Sergey Senozhatsky
On (08/02/18 11:46), Sergey Senozhatsky wrote:
> Hi,
> 
> My dmesg is filled up with these errors
> 
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for HDMI-A-1
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for HDMI-A-1
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> [..]
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
>  nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
> [..]
> 
> Basically, a message every 10s or so. Any chance we can make them
> go away?

A gentle ping?

It literally floods my logbuf with that "DRM: DDC responded, but no EDID
for VGA-1" thing.

name -a
4.19.0-rc2-dbg-00118-gb9a3bad8af2d

$ dmesg | tail -42
[ 3615.796938] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3626.036865] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3636.276878] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3646.516866] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3656.756750] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3666.996949] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3677.236884] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3687.476865] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3697.716858] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3707.956934] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3718.196925] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3728.436884] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3738.676861] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3748.916731] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3759.156754] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3769.396861] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3779.636826] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3789.876892] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3800.116686] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3810.356926] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3820.596887] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3830.836909] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3841.076932] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3851.316681] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3861.556926] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3871.796869] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3882.036750] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3892.276836] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3902.516803] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3912.756640] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3922.996957] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3933.236700] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3943.476851] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3953.716928] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3963.956915] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3974.196861] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3984.436928] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 3994.676885] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 4004.917030] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 4015.156935] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 4025.396872] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[ 4035.636877] nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1

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


[Nouveau] [linux-next] DDC responded, but no EDID for %s errors

2018-08-23 Thread Sergey Senozhatsky
Hi,

My dmesg is filled up with these errors

 nouveau :01:00.0: DRM: DDC responded, but no EDID for HDMI-A-1
 nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
 nouveau :01:00.0: DRM: DDC responded, but no EDID for HDMI-A-1
 nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
 nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[..]
 nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
 nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
 nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
 nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
 nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
 nouveau :01:00.0: DRM: DDC responded, but no EDID for VGA-1
[..]

Basically, a message every 10s or so. Any chance we can make them
go away?

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