Re: [PATCH 00/12] fbdev helper locking rework and deferred setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 22, 2017 at 4:54 PM, Liviu Dudau <liviu@xxxxxxxxxxx> wrote:
> On Wed, Jun 21, 2017 at 08:28:03PM +0200, Daniel Vetter wrote:
>> Hi all,
>>
>> This is Thierry's deferred fbdev setup series, with the locking rework almost
>> entirely redone. The much wider scope is to get rid of drm_modeset_lock_all
>> calls for atomic drivers and remove users of the fairly nasty
>> mode_config->acquire_ctx hack, which breaks when doing multiple atomic commits.
>>
>> Testing&review very much appreciated, especially from people who care about the
>> various fbdev emulation things and the deferred setup stuff.
>
> Tested on my Juno dev board on a bit of a convoluted setup: the dev board has
> built into the SoC 2x HDLCD instances and I also have an FPGA daughter board
> with Mali DP 650 running again on a 2x configuration. On boot I'm getting this
> warning:
>
> juno-r0-ld login: [  241.986785] INFO: task kworker/3:1:80 blocked for more than 120 seconds.
> [  241.993652]       Not tainted 4.12.0-rc5-01275-g1e2237a19156 #2
> [  241.999689] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> [  242.007660] kworker/3:1     D    0    80      2 0x00000000
> [  242.013340] Workqueue: events output_poll_execute [drm_kms_helper]
> [  242.019637] Call trace:
> [  242.022132] [<ffff000008085798>] __switch_to+0x98/0xb0
> [  242.027373] [<ffff00000886b3d4>] __schedule+0x19c/0x5e8
> [  242.032699] [<ffff00000886b858>] schedule+0x38/0xa0
> [  242.037672] [<ffff00000886bd38>] schedule_preempt_disabled+0x20/0x38
> [  242.044144] [<ffff00000886c968>] __mutex_lock.isra.0+0x140/0x530
> [  242.050262] [<ffff00000886cd68>] __mutex_lock_slowpath+0x10/0x18
> [  242.056379] [<ffff00000886cda0>] mutex_lock+0x30/0x38
> [  242.061597] [<ffff000000929660>] drm_fb_helper_hotplug_event.part.22+0x20/0x100 [drm_kms_helper]
> [  242.070611] [<ffff000000929764>] drm_fb_helper_hotplug_event+0x24/0x38 [drm_kms_helper]
> [  242.078828] [<ffff00000092a360>] drm_fbdev_cma_hotplug_event+0x10/0x20 [drm_kms_helper]
> [  242.086984] [<ffff000000b44494>] hdlcd_fb_output_poll_changed+0x14/0x20 [hdlcd]
> [  242.094495] [<ffff000000919e90>] drm_kms_helper_hotplug_event+0x28/0x38 [drm_kms_helper]
> [  242.102801] [<ffff00000091a090>] output_poll_execute+0x1a0/0x1f0 [drm_kms_helper]
> [  242.110424] [<ffff0000080d7fd4>] process_one_work+0x1d4/0x330
> [  242.116280] [<ffff0000080d8178>] worker_thread+0x48/0x468
> [  242.121781] [<ffff0000080ddf64>] kthread+0x12c/0x130
> [  242.126839] [<ffff000008082ec0>] ret_from_fork+0x10/0x50
> [  242.132252] INFO: task kworker/5:1:82 blocked for more than 120 seconds.
> [  242.139074]       Not tainted 4.12.0-rc5-01275-g1e2237a19156 #2
> [  242.145099] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> [  242.153064] kworker/5:1     D    0    82      2 0x00000000
> [  242.158724] Workqueue: events output_poll_execute [drm_kms_helper]
> [  242.165019] Call trace:
> [  242.167519] [<ffff000008085798>] __switch_to+0x98/0xb0
> [  242.172755] [<ffff00000886b3d4>] __schedule+0x19c/0x5e8
> [  242.178079] [<ffff00000886b858>] schedule+0x38/0xa0
> [  242.183051] [<ffff00000886bd38>] schedule_preempt_disabled+0x20/0x38
> [  242.189520] [<ffff00000886c968>] __mutex_lock.isra.0+0x140/0x530
> [  242.195639] [<ffff00000886cd68>] __mutex_lock_slowpath+0x10/0x18
> [  242.201756] [<ffff00000886cda0>] mutex_lock+0x30/0x38
> [  242.206972] [<ffff000000929660>] drm_fb_helper_hotplug_event.part.22+0x20/0x100 [drm_kms_helper]
> [  242.215984] [<ffff000000929764>] drm_fb_helper_hotplug_event+0x24/0x38 [drm_kms_helper]
> [  242.224201] [<ffff00000092a360>] drm_fbdev_cma_hotplug_event+0x10/0x20 [drm_kms_helper]
> [  242.232367] [<ffff000000b543a4>] malidp_output_poll_changed+0x14/0x20 [mali_dp]
> [  242.239880] [<ffff000000919e90>] drm_kms_helper_hotplug_event+0x28/0x38 [drm_kms_helper]
> [  242.248188] [<ffff00000091a090>] output_poll_execute+0x1a0/0x1f0 [drm_kms_helper]
> [  242.255808] [<ffff0000080d7fd4>] process_one_work+0x1d4/0x330
> [  242.261664] [<ffff0000080d8178>] worker_thread+0x48/0x468
> [  242.267196] [<ffff0000080ddf64>] kthread+0x12c/0x130
> [  242.272312] [<ffff000008082ec0>] ret_from_fork+0x10/0x50
>
> Each hardware type has only one instance of each driver being connected to an
> output, HDLCD is connected to an HDMI monitor that is not "active" (i.e.
> input is switched to DP connection), while the Mali DP instance is connected to
> a monitor.
>
> Suggestions on where to look next are welcome.

I'm betting I've fumbled an unlock path somewhere and now your stuck
trying to get a lock you can't get. Can you pls recompile with lockdep
enabled and repro? That will directly tell us where and what went
wrong.

Thanks for testing.
-Daniel

>
> Best regards,
> Liviu
>
>>
>> Thanks, Daniel
>>
>> Daniel Vetter (7):
>>   drm/i915: Drop FBDEV #ifdev in mst code
>>   drm/fb-helper: Push locking in fb_is_bound
>>   drm/fb-helper: Drop locking from the vsync wait ioctl code
>>   drm/fb-helper: Push locking into pan_display_atomic|legacy
>>   drm/fb-helper: Push locking into restore_fbdev_mode_atomic|legacy
>>   drm/fb-helper: Stop using mode_config.mutex for internals
>>   drm/fb-helper: Split dpms handling into legacy and atomic paths
>>
>> Thierry Reding (5):
>>   drm/fb-helper: Push down modeset lock into FB helpers
>>   drm/fb-helper: Add top-level lock
>>   drm/fb-helper: Support deferred setup
>>   drm/exynos: Remove custom FB helper deferred setup
>>   drm/hisilicon: Remove custom FB helper deferred setup
>>
>>  drivers/gpu/drm/drm_fb_helper.c                 | 361 ++++++++++++++++++------
>>  drivers/gpu/drm/drm_vblank.c                    |   2 +-
>>  drivers/gpu/drm/exynos/exynos_drm_drv.c         |   6 +-
>>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c       |  26 +-
>>  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c |  21 +-
>>  drivers/gpu/drm/i915/intel_dp_mst.c             |  43 +--
>>  drivers/gpu/drm/radeon/radeon_dp_mst.c          |   7 -
>>  include/drm/drm_fb_helper.h                     |  42 ++-
>>  8 files changed, 336 insertions(+), 172 deletions(-)
>>
>> --
>> 2.11.0
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@xxxxxxxxxxxxxxxxxxxxx
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
>    _
>  _|_|_
>  ('_')
>  (⊃  )⊃
>  |_|_|



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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux