Re: amdgpu dropping load callback triggers WARN_ON in __drm_mode_object_add

2020-04-03 Thread Daniel Vetter
5 seconds on irc and I've found the splat ...

drm_properties need to be created at driver load time, upfront. You
can attach them to hotpluggable drm_connector objects later on, but
only before calling drm_connector_register().

The warning exists because i915 had the same bug :-)
-Daniel

On Fri, Apr 3, 2020 at 6:38 PM Daniel Vetter  wrote:
>
> On Fri, Apr 3, 2020 at 6:30 PM Michel Dänzer  wrote:
> >
> >
> > I'm getting the attached WARNING splats since amdgpu dropped its load
> > callback. They're from
> >
> > WARN_ON(!dev->driver->load && dev->registered && !obj_free_cb);
> >
> > in __drm_mode_object_add.
> >
> > I'm not sure how to address this, since obj_free_cb is always NULL here,
> > and I don't think MST connectors getting added after dev->registered is
> > set can be avoided?
>
> I need the full splat, otherwise can't tell you what's going wrong.
> There's 2 cases:
>
> - hotpluggable stuff, which has the obj_free_cb set. Essentially MST 
> connectors.
>
> - not-hotpluggable stuff, which is everything else. They don't have
> obj_free_cb set. It's a driver bug to register those after the overall
> drm_device has already been registered and published to userspace.
> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: amdgpu dropping load callback triggers WARN_ON in __drm_mode_object_add

2020-04-03 Thread Daniel Vetter
On Fri, Apr 3, 2020 at 6:30 PM Michel Dänzer  wrote:
>
>
> I'm getting the attached WARNING splats since amdgpu dropped its load
> callback. They're from
>
> WARN_ON(!dev->driver->load && dev->registered && !obj_free_cb);
>
> in __drm_mode_object_add.
>
> I'm not sure how to address this, since obj_free_cb is always NULL here,
> and I don't think MST connectors getting added after dev->registered is
> set can be avoided?

I need the full splat, otherwise can't tell you what's going wrong.
There's 2 cases:

- hotpluggable stuff, which has the obj_free_cb set. Essentially MST connectors.

- not-hotpluggable stuff, which is everything else. They don't have
obj_free_cb set. It's a driver bug to register those after the overall
drm_device has already been registered and published to userspace.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


amdgpu dropping load callback triggers WARN_ON in __drm_mode_object_add

2020-04-03 Thread Michel Dänzer

I'm getting the attached WARNING splats since amdgpu dropped its load
callback. They're from

WARN_ON(!dev->driver->load && dev->registered && !obj_free_cb);

in __drm_mode_object_add.

I'm not sure how to address this, since obj_free_cb is always NULL here,
and I don't think MST connectors getting added after dev->registered is
set can be avoided?


-- 
Earthling Michel Dänzer   |   https://redhat.com
Libre software enthusiast | Mesa and X developer
Apr  3 17:32:55 thor kernel: [1.593399][  T129] [ cut here 
]
Apr  3 17:32:55 thor kernel: [1.593409][  T129] WARNING: CPU: 6 PID: 129 at 
drivers/gpu/drm/drm_mode_object.c:45 __drm_mode_object_add+0xa1/0xb0 [drm]
Apr  3 17:32:55 thor kernel: [1.593409][  T129] Modules linked in: 
crc32c_intel(E) amdgpu(E) mfd_core(E) i2c_algo_bit(E) aesni_intel(E) ttm(E) 
glue_helper(E) gpu_sched(E) crypto_simd(E) cryptd(E) drm_kms_helper(E) cec(E) 
xhci_pci(E) evdev(E) psmouse(E) rc_core(E) serio_raw(E) xhci_hcd(E) usbcore(E) 
drm(E) nvme(E) nvme_core(E) t10_pi(E)
Apr  3 17:32:55 thor kernel: [1.593409][  T129] CPU: 6 PID: 129 Comm: 
kworker/6:1 Tainted: GE 5.6.0+ #1
Apr  3 17:32:55 thor kernel: [1.593409][  T129] Hardware name: LENOVO 
20NFGE/20NFGE, BIOS R11ET30W (1.10 ) 10/11/2019
Apr  3 17:32:55 thor kernel: [1.593409][  T129] Workqueue: events_long 
drm_dp_mst_link_probe_work [drm_kms_helper]
Apr  3 17:32:55 thor kernel: [1.593409][  T129] RIP: 
0010:__drm_mode_object_add+0xa1/0xb0 [drm]
Apr  3 17:32:55 thor kernel: [1.593409][  T129] Code: 00 00 4c 89 f7 e8 3f 
e4 46 ca 85 db b8 00 00 00 00 0f 4e c3 5b 5d 41 5c 41 5d 41 5e 41 5f c3 80 7f 
40 00 74 8c 4d 85 c0 75 87 <0f> 0b eb 83 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 
44 00 00 45 31
Apr  3 17:32:55 thor kernel: [1.593409][  T129] RSP: 0018:993f803e7ad8 
EFLAGS: 00010246
Apr  3 17:32:55 thor kernel: [1.593409][  T129] RAX: c0c39120 RBX: 
896166b1d000 RCX: 0001
Apr  3 17:32:55 thor kernel: [1.593409][  T129] RDX: b0b0b0b0 RSI: 
896164a7b590 RDI: 896166b1d000
Apr  3 17:32:55 thor kernel: [1.593409][  T129] RBP: 896164a7b590 R08: 
 R09: 896164a81600
Apr  3 17:32:55 thor kernel: [1.593409][  T129] R10:  R11: 
89626e0bedd7 R12: b0b0b0b0
Apr  3 17:32:55 thor kernel: [1.593409][  T129] R13:  R14: 
c0215091 R15: 0001
Apr  3 17:32:55 thor kernel: [1.593409][  T129] FS:  () 
GS:896170b8() knlGS:
Apr  3 17:32:55 thor kernel: [1.593409][  T129] CS:  0010 DS:  ES:  
CR0: 80050033
Apr  3 17:32:55 thor kernel: [1.593409][  T129] CR2: 7ffc35448de8 CR3: 
0003a6ddc000 CR4: 003406e0
Apr  3 17:32:55 thor kernel: [1.593409][  T129] Call Trace:
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
drm_property_create+0xcd/0x1a0 [drm]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
drm_property_create_range+0x1a/0x40 [drm]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
drm_connector_attach_max_bpc_property+0x62/0x80 [drm]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
amdgpu_dm_connector_init_helper+0x1cd/0x280 [amdgpu]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
dm_dp_add_mst_connector+0xbb/0x1a0 [amdgpu]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
drm_dp_mst_port_add_connector+0x108/0x1a0 [drm_kms_helper]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  ? 
dm_dp_aux_transfer+0x8f/0xf0 [amdgpu]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  ? 
drm_dp_dpcd_access+0xdf/0x110 [drm_kms_helper]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  ? 
drm_dp_mst_add_port+0x2f/0xe0 [drm_kms_helper]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
drm_dp_send_link_address+0x368/0x990 [drm_kms_helper]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  ? 
preempt_count_sub+0x9b/0xd0
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
drm_dp_check_and_send_link_address+0xad/0xd0 [drm_kms_helper]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
drm_dp_mst_link_probe_work+0x94/0x180 [drm_kms_helper]
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  
process_one_work+0x1ab/0x3a0
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  worker_thread+0x50/0x3a0
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  kthread+0xf9/0x130
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  ? 
process_one_work+0x3a0/0x3a0
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  ? kthread_park+0x90/0x90
Apr  3 17:32:55 thor kernel: [1.593409][  T129]  ret_from_fork+0x22/0x40
Apr  3 17:32:55 thor kernel: [1.593409][  T129] ---[ end trace 
f1dd3fe3af522768 ]---
Apr  3 17:32:55 thor kernel: [1.593816][  T129] [ cut here 
]
Apr  3 17:32:55 thor kernel: [1.593829][  T129] WARNING: CPU: 6