linux-uconsole/drivers/gpu
Yakir Yang cf12427db7 FROMLIST: 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.

(am from https://patchwork.kernel.org/patch/8313001/)

Change-Id: Id7b357de0f497ff8c9f259fe31dc28be34f17083
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:45:44 +08:00
..
arm MALI: rockchip: not to use sg_dma_len. 2016-03-09 15:26:53 +08:00
drm FROMLIST: drm: bridge: analogix/dp: Fix the possible dead lock in bridge disable time 2016-03-21 19:45:44 +08:00
host1x rk: revert to v3.10 2015-11-11 15:57:28 +08:00
ipu-v3 gpu: ipu-v3: Assign of_node of child platform devices to corresponding ports 2015-11-24 11:30:17 +01:00
rogue RK3368 GPU version: Rogue L 0.22 2015-08-17 14:12:00 +08:00
rogue_m GPU: Rogue_M: update to 1.31_2 version & support gpu pd. 2016-01-18 19:04:28 +08:00
vga vgaarb: fix signal handling in vga_get() 2015-12-11 14:04:44 +10:00
Makefile MALI: add midgard src dir 2016-03-09 16:51:03 +08:00