linux/drivers/gpu/drm
Imre Deak 7d11507605 drm/dp_mst: Fix the DDC I2C device unregistration of an MST port
The WARN below triggers during the removal of an MST port. The problem
is that the parent device's (the connector's kdev) sysfs directory is
removed recursively when the connector is unregistered (even though the
I2C device holds a reference on the parent device). To fix this set
first the Peer Device Type to none which will remove the I2C device.

Note that atm, inconsistently, the parent of the I2C device is initially set to
the DRM kdev and after a Connection Status Notification the parent may be reset
to be the connector's kdev. This problem is addressed by the next patch.

[ 4462.989299] ------------[ cut here ]------------
[ 4463.014940] sysfs group 'power' not found for kobject 'i2c-24'
[ 4463.034664] WARNING: CPU: 0 PID: 970 at fs/sysfs/group.c:281 sysfs_remove_group+0x71/0x80
[ 4463.044357] Modules linked in: snd_hda_intel i915 drm_kms_helper(O) drm netconsole snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul snd_intel_dspcf
g crc32_pclmul snd_hda_codec snd_hwdep ghash_clmulni_intel snd_hda_core asix usbnet kvm_intel mii i2c_algo_bit snd_pcm syscopyarea sysfillrect e1000e sysimgblt fb_sys_fops prim
e_numbers ptp pps_core i2c_i801 r8169 mei_me realtek mei [last unloaded: drm]
[ 4463.044399] CPU: 0 PID: 970 Comm: kworker/0:2 Tainted: G           O      5.7.0+ #172
[ 4463.044402] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP
[ 4463.044423] Workqueue: events drm_dp_delayed_destroy_work [drm_kms_helper]
[ 4463.044428] RIP: 0010:sysfs_remove_group+0x71/0x80
[ 4463.044431] Code: 48 89 df 5b 5d 41 5c e9 cd b6 ff ff 48 89 df e8 95 b4 ff ff eb cb 49 8b 14 24 48 8b 75 00 48 c7 c7 20 0f 3f 82 e8 9f c5 d7 ff <0f> 0b 5b 5d 41 5c c3 0f 1f
84 00 00 00 00 00 48 85 f6 74 31 41 54
[ 4463.044433] RSP: 0018:ffffc900018bfbf0 EFLAGS: 00010282
[ 4463.044436] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
[ 4463.044439] RDX: 0000000080000001 RSI: ffff88849e828f38 RDI: 00000000ffffffff
[ 4463.052970] [drm:drm_atomic_get_plane_state [drm]] Added [PLANE💯plane 2B] 00000000c2160caa state to 00000000d172564a
[ 4463.070533] RBP: ffffffff820cea20 R08: ffff88847f4b8958 R09: 0000000000000000
[ 4463.070535] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88848a725018
[ 4463.070537] R13: 0000000000000000 R14: ffffffff827090e0 R15: 0000000000000002
[ 4463.070539] FS:  0000000000000000(0000) GS:ffff88849e800000(0000) knlGS:0000000000000000
[ 4463.070541] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4463.070543] CR2: 00007fdf8a756538 CR3: 0000000489684001 CR4: 0000000000760ef0
[ 4463.070545] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4463.070547] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 4463.070549] PKRU: 55555554
[ 4463.070551] Call Trace:
[ 4463.070560]  device_del+0x84/0x400
[ 4463.070571]  cdev_device_del+0x10/0x30
[ 4463.070578]  put_i2c_dev+0x69/0x80
[ 4463.070584]  i2cdev_detach_adapter+0x2e/0x60
[ 4463.070591]  notifier_call_chain+0x34/0x90
[ 4463.070599]  blocking_notifier_call_chain+0x3f/0x60
[ 4463.070606]  device_del+0x7c/0x400
[ 4463.087817]  ? lockdep_init_map_waits+0x57/0x210
[ 4463.087825]  device_unregister+0x11/0x60
[ 4463.087829]  i2c_del_adapter+0x249/0x310
[ 4463.087846]  drm_dp_port_set_pdt+0x6b/0x2c0 [drm_kms_helper]
[ 4463.087862]  drm_dp_delayed_destroy_work+0x2af/0x350 [drm_kms_helper]
[ 4463.087876]  process_one_work+0x268/0x600
[ 4463.105438]  ? __schedule+0x30c/0x920
[ 4463.105451]  worker_thread+0x37/0x380
[ 4463.105457]  ? process_one_work+0x600/0x600
[ 4463.105462]  kthread+0x140/0x160
[ 4463.105466]  ? kthread_park+0x80/0x80
[ 4463.105474]  ret_from_fork+0x24/0x50

Cc: <stable@vger.kernel.org>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200607212522.16935-1-imre.deak@intel.com
2020-06-11 15:35:25 +03:00
..
amd drm/amd: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:31 +01:00
arc drm/arc: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:02:03 +02:00
arm drm/malidp: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE 2020-06-10 09:04:08 +02:00
armada drm/armada: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:32 +01:00
aspeed drm/cma-helper: Rename symbols from drm_cma_gem_ to drm_gem_cma_ 2020-06-10 09:01:38 +02:00
ast drm/ast: Don't check new mode if CRTC is being disabled 2020-05-08 09:29:18 +02:00
atmel-hlcdc drm/atmel-hlcdc: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:02:34 +02:00
bochs drm/bochs: Remove explicit drm_connector_register 2020-04-28 16:14:17 +02:00
bridge drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
etnaviv drm/etnaviv: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:32 +01:00
exynos drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
fsl-dcu drm/fsl-dcu: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:02:52 +02:00
gma500 drm/gma500: Stop using mode->private_flags 2020-05-27 14:31:42 +03:00
hisilicon drm/hisilicon/kirin: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:03:13 +02:00
i2c drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
i810
i915 drm/i915/dp_mst: Work around out-of-spec adapters filtering short pulses 2020-06-11 15:28:45 +03:00
imx drm/imx: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:03:27 +02:00
ingenic drm/ingenic: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:03:39 +02:00
lib
lima drm/lima: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:33 +01:00
mcde drm/mcde: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:04:21 +02:00
mediatek drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
meson drm/meson: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE 2020-06-10 09:04:38 +02:00
mga
mgag200 drm/mgag200: Use managed device initialization 2020-06-11 10:06:14 +02:00
msm drm/msm: Don't call dma_buf_vunmap without _vmap 2020-06-03 14:48:26 +02:00
mxsfb drm/mxsfb: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:04:51 +02:00
nouveau drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
omapdrm drm/omapdrm: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:34 +01:00
panel drm/panel: simple: Add support for KOE TX26D202VM0BWA panel 2020-06-05 17:45:26 +02:00
panfrost drm/panfrost: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:34 +01:00
pl111 drm: pl111: Move VExpress setup into versatile init 2020-04-28 14:06:20 -05:00
qxl drm/qxl: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:34 +01:00
r128 drm: delete drm_pci.h 2020-04-03 17:11:41 +02:00
radeon drm/radeon: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:34 +01:00
rcar-du drm/rcar-du: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE 2020-06-10 09:05:05 +02:00
rockchip drm/rockchip: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:35 +01:00
savage
scheduler drm/scheduler: fix rare NULL ptr race 2020-03-26 10:22:36 -04:00
selftests drm/mm: add ig_frag selftest 2020-06-08 15:14:16 +02:00
shmobile drm/shmobile: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:05:18 +02:00
sis
sti drm/sti: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:05:45 +02:00
stm drm/stm: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE 2020-06-10 09:05:32 +02:00
sun4i drm/cma-helper: Rework DRM_GEM_CMA_VMAP_DRIVER_OPS macro 2020-06-10 09:01:41 +02:00
tdfx
tegra drm/tegra: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:35 +01:00
tidss drm/cma-helper: Rework DRM_GEM_CMA_VMAP_DRIVER_OPS macro 2020-06-10 09:01:41 +02:00
tilcdc drm/tilcdc: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:05:58 +02:00
tiny drm/cma-helper: Rework DRM_GEM_CMA_VMAP_DRIVER_OPS macro 2020-06-10 09:01:41 +02:00
ttm Merge drm/drm-next into drm-misc-next 2020-04-17 08:12:22 +02:00
tve200 drm/tve200: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:06:11 +02:00
udl drm/udl: Use GEM vmap/mmap function from SHMEM helpers 2020-06-10 10:17:21 +02:00
v3d drm/v3d: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:35 +01:00
vboxvideo drm/vboxvideo: Use devm_gen_pool_create 2020-04-28 15:08:51 +02:00
vc4 drm/vc4: crtc: Restrict HACT_ACT setup to DSI 2020-06-10 11:09:38 +02:00
vgem drm/vgem: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:36 +01:00
via
virtio drm/virtio: Call the right shmem helpers 2020-06-03 14:48:27 +02:00
vkms drm/vkms: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:36 +01:00
vmwgfx drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
xen drm/xen: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:36 +01:00
zte drm/zte: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS 2020-06-10 09:06:23 +02:00
drm_agpsupport.c
drm_atomic.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_atomic_helper.c drm: use drm_dev_has_vblank more 2020-05-29 12:58:11 +02:00
drm_atomic_state_helper.c
drm_atomic_uapi.c
drm_auth.c drm/auth: remove redundant assignment to variable ret 2020-05-25 16:35:52 +02:00
drm_blend.c drm: add docs about the IN_FORMATS plane property 2020-03-31 11:12:42 +02:00
drm_bridge.c
drm_bridge_connector.c
drm_bufs.c drm: delete drm_pci.h 2020-04-03 17:11:41 +02:00
drm_cache.c
drm_client.c drm/client: Add drm_client_framebuffer_flush() 2020-05-26 13:31:01 +02:00
drm_client_modeset.c drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
drm_color_mgmt.c
drm_connector.c drm: document how user-space should use link-status 2020-06-08 11:24:49 +02:00
drm_context.c drm: context: Clean up documentation 2020-03-16 09:23:55 +01:00
drm_crtc.c drm: add docs for standard CRTC properties 2020-06-01 16:13:20 +02:00
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_damage_helper.c
drm_debugfs.c drm/debugfs: fix plain echo to connector "force" attribute 2020-05-17 17:27:57 +01:00
drm_debugfs_crc.c
drm_dma.c drm: delete drm_pci.h 2020-04-03 17:11:41 +02:00
drm_dp_aux_dev.c
drm_dp_cec.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c drivers: gpu: drm: Fix trivial spelling 2020-06-10 17:32:24 +02:00
drm_dp_mst_topology.c drm/dp_mst: Fix the DDC I2C device unregistration of an MST port 2020-06-11 15:35:25 +03:00
drm_dp_mst_topology_internal.h
drm_drv.c drm: Add devm_drm_dev_alloc macro 2020-04-28 15:05:19 +02:00
drm_dsc.c
drm_dumb_buffers.c
drm_edid.c drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
drm_edid_load.c
drm_encoder.c
drm_encoder_slave.c drm: encoder_slave: use new I2C API 2020-05-17 21:29:41 +01:00
drm_fb_cma_helper.c drm: Fix misspellings of "Analog Devices" 2020-04-21 08:15:03 +02:00
drm_fb_helper.c drm/fb-helper: Remove return value from drm_fbdev_generic_setup() 2020-04-08 16:27:08 +02:00
drm_file.c drm/file: wrap excessively long line 2020-05-19 22:31:37 +01:00
drm_flip_work.c
drm_format_helper.c drm/format-helper: Add drm_fb_swab() 2020-05-26 13:33:08 +02:00
drm_fourcc.c
drm_framebuffer.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_gem.c drm: Remove struct drm_driver.gem_print_info 2020-06-10 09:06:30 +02:00
drm_gem_cma_helper.c drm/cma-helper: Rework DRM_GEM_CMA_VMAP_DRIVER_OPS macro 2020-06-10 09:01:41 +02:00
drm_gem_framebuffer_helper.c drm: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:31 +01:00
drm_gem_shmem_helper.c drm/shmem-helper: Add .gem_create_object helper that sets map_cached flag 2020-06-10 10:16:43 +02:00
drm_gem_ttm_helper.c drm: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:31 +01:00
drm_gem_vram_helper.c drm: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:31 +01:00
drm_hashtab.c
drm_hdcp.c
drm_internal.h drm: Manage drm_vblank_cleanup with drmm_ 2020-03-26 15:38:17 +01:00
drm_ioc32.c drm: print the current->comm alongside the pid 2020-05-19 22:31:37 +01:00
drm_ioctl.c drm: print the current->comm alongside the pid 2020-05-19 22:31:37 +01:00
drm_irq.c drm: use drm_dev_has_vblank more 2020-05-29 12:58:11 +02:00
drm_kms_helper_common.c
drm_lease.c drm/lease: fix WARNING in idr_destroy 2020-03-18 14:42:18 +01:00
drm_legacy.h
drm_legacy_misc.c
drm_lock.c drm: lock: Clean up documentation 2020-03-16 09:27:09 +01:00
drm_managed.c drm: Include internal header for managed function declarations 2020-05-18 16:27:54 +01:00
drm_memory.c
drm_mipi_dbi.c drm/format-helper: Add drm_fb_swab() 2020-05-26 13:33:08 +02:00
drm_mipi_dsi.c
drm_mm.c drm/mm: fix hole size comparison 2020-06-04 09:57:22 +02:00
drm_mode_config.c drm: Manage drm_mode_config_init with drmm_ 2020-03-26 15:45:43 +01:00
drm_mode_object.c drm: Replace drm_modeset_lock/unlock_all with DRM_MODESET_LOCK_ALL_* helpers 2020-05-05 10:51:56 +02:00
drm_modes.c drm: Flatten drm_mode_vrefresh() 2020-05-27 14:31:42 +03:00
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c
drm_panel.c
drm_panel_orientation_quirks.c
drm_pci.c drm: delete drm_pci.h 2020-04-03 17:11:41 +02:00
drm_plane.c
drm_plane_helper.c
drm_prime.c drm: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:31 +01:00
drm_print.c
drm_probe_helper.c drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
drm_property.c
drm_rect.c
drm_scatter.c
drm_scdc_helper.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c drm/simple-kms: Fix documentation for drm_simple_encoder_init() 2020-03-06 09:24:29 +01:00
drm_syncobj.c
drm_sysfs.c drm: sysfs: Use scnprintf() for avoiding potential buffer overflow 2020-03-11 14:54:09 +01:00
drm_trace.h
drm_trace_points.c
drm_vblank.c drm/vblank: use drm_WARN for all warnings 2020-05-31 22:34:21 +02:00
drm_vm.c drm: remove unused drm_gem.h include 2020-05-19 21:52:16 +01:00
drm_vma_manager.c
drm_writeback.c drm/writeback: don't set fence->ops to default 2020-05-20 20:03:45 +02:00
Kconfig drm/cirrus: Move to drm/tiny 2020-04-28 16:05:15 +02:00
Makefile drm/cirrus: Move to drm/tiny 2020-04-28 16:05:15 +02:00