summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot
diff options
context:
space:
mode:
authorYakir Yang <ykk@rock-chips.com>2016-02-15 12:11:50 +0100
committerYakir Yang <ykk@rock-chips.com>2016-04-05 04:13:10 +0200
commit7b4b7a8db439dca4342a0424b3d99d878a4e5a12 (patch)
treee283f8adfc539ad3ad2e2a85cf67a100d98299f4 /arch/arm/boot
parentdrm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time (diff)
downloadlinux-7b4b7a8db439dca4342a0424b3d99d878a4e5a12.tar.xz
linux-7b4b7a8db439dca4342a0424b3d99d878a4e5a12.zip
drm: bridge: analogix/dp: Fix the possible dead lock in bridge disable time
It may caused a dead lock if we flush the hpd work in bridge disable time. The normal flow would like: IN --> DRM IOCTL 1. Acquire crtc_ww_class_mutex (DRM IOCTL) IN --> analogix_dp_bridge 2. Acquire hpd work lock (Flush hpd work) 3. HPD work already in idle, no need to run the work function. OUT <-- analogix_dp_bridge OUT <-- DRM IOCTL The dead lock flow would like: IN --> DRM IOCTL 1. Acquire crtc_ww_class_mutex (DRM IOCTL) IN --> analogix_dp_bridge 2. Acquire hpd work lock (Flush hpd work) IN --> analogix_dp_hotplug IN --> drm_helper_hpd_irq_event 3. Acquire mode_config lock (This lock already have been acquired in previous step 1) ** Dead Lock Now ** It's wrong to flush the hpd work in bridge->disable time, I guess the original code just want to ensure the delay work must be finish before encoder disabled. The flush work in bridge disable time is try to ensure the HPD event won't be missed before display card disabled, actually we can take a fast respond way(interrupt thread) to update DRM HPD event to fix the delay update and possible dead lock. Tested-by: Caesar Wang <wxt@rock-chips.com> Tested-by: Douglas Anderson <dianders@chromium.org> Tested-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Diffstat (limited to 'arch/arm/boot')
0 files changed, 0 insertions, 0 deletions