drm: bridge/dw_hdmi: fix phy enable/disable handling
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 5 Jun 2015 11:22:46 +0000 (12:22 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 18 Aug 2015 10:33:58 +0000 (11:33 +0100)
commitb872a8e16b3fb17c3fe1e97f4ed0803f4a740aae
treece8d2a4178dc5fc48aa51f24827cd218b5468125
parent2fada109cfb7dbfd52f472140d6477a27a1f0d6d
drm: bridge/dw_hdmi: fix phy enable/disable handling

The dw_hdmi enable/disable handling is particularly weak in several
regards:
* The hotplug interrupt could call hdmi_poweron() or hdmi_poweroff()
  while DRM is setting a mode, which could race with a mode being set.
* Hotplug will always re-enable the phy whenever it detects an active
  hotplug signal, even if DRM has disabled the output.

Resolve all of these by introducing a mutex to prevent races, and a
state-tracking bool so we know whether DRM wishes the output to be
enabled.  We choose to use our own mutex rather than ->struct_mutex
so that we can still process interrupts in a timely fashion.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpu/drm/bridge/dw_hdmi.c
This page took 0.036587 seconds and 5 git commands to generate.