Dmitry Baryshkov
a4e771729a
drm/probe_helper: sort out poll_running vs poll_enabled
There are two flags attemting to guard connector polling:
poll_enabled and poll_running. While poll_enabled semantics is clearly
defined and fully adhered (mark that drm_kms_helper_poll_init() was
called and not finalized by the _fini() call), the poll_running flag
doesn't have such clearliness.
This flag is used only in drm_helper_probe_single_connector_modes() to
guard calling of drm_kms_helper_poll_enable, it doesn't guard the
drm_kms_helper_poll_fini(), etc. Change it to only be set if the polling
is actually running. Tie HPD enablement to this flag.
This fixes the following warning reported after merging the HPD series:
Hot plug detection already enabled
WARNING: CPU: 2 PID: 9 at drivers/gpu/drm/drm_bridge.c:1257 drm_bridge_hpd_enable+0x94/0x9c [drm]
Modules linked in: videobuf2_memops snd_soc_simple_card snd_soc_simple_card_utils fsl_imx8_ddr_perf videobuf2_common snd_soc_imx_spdif adv7511 etnaviv imx8m_ddrc imx_dcss mc cec nwl_dsi gov
CPU: 2 PID: 9 Comm: kworker/u8:0 Not tainted 6.2.0-rc2-15208-g25b283acd578 #6
Hardware name: NXP i.MX8MQ EVK (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : drm_bridge_hpd_enable+0x94/0x9c [drm]
lr : drm_bridge_hpd_enable+0x94/0x9c [drm]
sp : ffff800009ef3740
x29: ffff800009ef3740 x28: ffff000009331f00 x27: 0000000000001000
x26: 0000000000000020 x25: ffff800001148ed8 x24: ffff00000a8fe000
x23: 00000000fffffffd x22: ffff000005086348 x21: ffff800001133ee0
x20: ffff00000550d800 x19: ffff000005086288 x18: 0000000000000006
x17: 0000000000000000 x16: ffff8000096ef008 x15: 97ffff2891004260
x14: 2a1403e194000000 x13: 97ffff2891004260 x12: 2a1403e194000000
x11: 7100385f29400801 x10: 0000000000000aa0 x9 : ffff800008112744
x8 : ffff000000250b00 x7 : 0000000000000003 x6 : 0000000000000011
x5 : 0000000000000000 x4 : ffff0000bd986a48 x3 : 0000000000000001
x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000000250000
Call trace:
drm_bridge_hpd_enable+0x94/0x9c [drm]
drm_bridge_connector_enable_hpd+0x2c/0x3c [drm_kms_helper]
drm_kms_helper_poll_enable+0x94/0x10c [drm_kms_helper]
drm_helper_probe_single_connector_modes+0x1a8/0x510 [drm_kms_helper]
drm_client_modeset_probe+0x204/0x1190 [drm]
__drm_fb_helper_initial_config_and_unlock+0x5c/0x4a4 [drm_kms_helper]
drm_fb_helper_initial_config+0x54/0x6c [drm_kms_helper]
drm_fbdev_client_hotplug+0xd0/0x140 [drm_kms_helper]
drm_fbdev_generic_setup+0x90/0x154 [drm_kms_helper]
dcss_kms_attach+0x1c8/0x254 [imx_dcss]
dcss_drv_platform_probe+0x90/0xfc [imx_dcss]
platform_probe+0x70/0xcc
really_probe+0xc4/0x2e0
__driver_probe_device+0x80/0xf0
driver_probe_device+0xe0/0x164
__device_attach_driver+0xc0/0x13c
bus_for_each_drv+0x84/0xe0
__device_attach+0xa4/0x1a0
device_initial_probe+0x1c/0x30
bus_probe_device+0xa4/0xb0
deferred_probe_work_func+0x90/0xd0
process_one_work+0x200/0x474
worker_thread+0x74/0x43c
kthread+0xfc/0x110
ret_from_fork+0x10/0x20
---[ end trace 0000000000000000 ]---
Reported-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Fixes: c8268795c9 ("drm/probe-helper: enable and disable HPD on connectors")
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Acked-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Tested-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Tested-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230124104548.3234554-2-dmitry.baryshkov@linaro.org
(cherry picked from commit d33a54e399)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2023-02-07 15:07:52 +01:00
..
2023-02-06 09:29:03 +01:00
2023-01-19 16:24:04 +01:00
2023-01-29 11:17:34 -08:00
2022-12-13 15:22:14 -08:00
2023-01-14 07:38:48 +09:00
2022-12-25 13:38:09 -08:00
2023-01-19 17:27:36 +01:00
2023-01-27 16:16:57 -08:00
2023-01-17 15:59:02 -08:00
2022-12-16 03:49:24 -08:00
2023-01-12 17:02:20 -06:00
2022-12-13 13:46:07 -08:00
2022-12-12 12:52:02 -08:00
2023-01-19 17:24:47 +01:00
2023-01-10 20:31:08 +01:00
2022-12-19 07:13:33 -06:00
2023-01-12 05:56:06 -06:00
2023-01-25 15:35:26 -08:00
2022-12-05 21:57:20 +09:00
2023-01-19 18:59:34 +05:30
2023-02-01 11:17:34 +01:00
2023-01-20 19:47:34 +01:00
2022-12-16 03:49:24 -08:00
2023-01-31 12:23:23 +01:00
2022-12-16 03:49:24 -08:00
2023-01-27 14:05:38 +01:00
2023-02-07 15:07:52 +01:00
2023-01-18 14:44:32 -08:00
2022-12-13 15:47:48 -08:00
2022-12-13 13:09:38 -08:00
2023-01-20 10:18:51 +01:00
2022-12-11 21:25:58 +01:00
2022-12-16 03:49:24 -08:00
2023-01-10 12:21:50 +02:00
2023-01-29 11:06:47 -08:00
2023-01-05 17:29:57 +02:00
2023-01-13 13:46:32 +01:00
2022-12-14 15:23:49 -08:00
2022-12-25 13:38:09 -08:00
2022-12-25 13:38:09 -08:00
2022-12-21 09:31:18 -08:00
2023-01-27 16:09:12 -08:00
2023-01-20 17:46:01 +02:00
2022-12-27 09:54:32 +01:00
2022-12-09 10:29:58 +01:00
2022-12-21 09:19:24 -08:00
2023-01-31 12:23:23 +01:00
2023-01-02 15:57:36 +01:00
2023-01-02 12:08:53 +01:00
2023-01-25 22:46:51 -08:00
2023-01-09 07:34:13 +00:00
2022-12-02 23:52:32 -08:00
2023-01-27 16:16:57 -08:00
2022-12-16 03:49:24 -08:00
2023-01-04 21:31:59 -06:00
2022-12-17 23:19:38 +01:00
2023-01-13 17:32:22 -06:00
2022-12-25 13:38:09 -08:00
2023-01-26 13:55:38 +00:00
2023-01-18 22:58:05 +05:30
2023-01-17 14:16:45 +01:00
2023-01-25 12:45:16 +01:00
2022-12-17 08:39:31 -06:00
2022-12-13 15:47:48 -08:00
2022-12-21 09:41:28 -08:00
2022-12-11 19:30:20 -08:00
2023-01-03 15:54:38 +00:00
2022-12-07 11:20:55 -07:00
2023-01-03 11:30:46 +01:00
2022-12-21 09:19:24 -08:00
2023-01-06 13:12:42 -08:00
2023-01-24 17:42:53 -08:00
2023-01-10 23:09:09 +01:00
2022-12-19 08:47:33 -06:00
2023-01-11 14:15:22 +00:00
2023-01-17 19:23:36 +01:00
2023-01-13 20:24:24 -05:00
2022-12-12 10:17:08 -08:00
2023-01-25 15:37:21 +01:00
2023-01-09 10:44:43 +02:00
2023-01-21 11:12:42 -08:00
2023-01-18 19:08:37 -05:00
2023-01-21 11:10:03 -08:00
2022-12-28 05:28:11 -05:00
2023-01-10 10:44:37 -07:00
2022-12-28 05:28:11 -05:00
2023-01-31 12:23:23 +01:00
2022-12-16 03:49:24 -08:00
2022-12-28 05:28:11 -05:00
2023-01-19 17:26:33 +01:00
2022-12-17 08:34:01 -06:00
2023-01-12 17:02:20 -06:00
2023-01-26 11:52:10 +02:00