summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-01-21 08:45:21 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-01-22 06:11:23 +0100
commit162b6a57ac50eec236530a16c071ffa50e87362a (patch)
treea5ee229d88358a8228124f8f5cfa0a5061b6f91a /sound
parent42c5814c9c9828a7fcbe25f69c5c8cbbf29ed957 (diff)
downloadlinux-stable-162b6a57ac50eec236530a16c071ffa50e87362a.tar.gz
linux-stable-162b6a57ac50eec236530a16c071ffa50e87362a.tar.bz2
linux-stable-162b6a57ac50eec236530a16c071ffa50e87362a.zip
drm/probe-helper: don't lose hotplug event
There's a race window (small for hpd, 10s large for polled outputs) where userspace could sneak in with an unrelated connnector probe ioctl call and eat the hotplug event (since neither the hpd nor the poll code see a state change). To avoid this, check whether the connector state changes in all other ->detect calls (in the current helper code that's only probe_single) and if that's the case, fire off a hotplug event. Note that we can't directly call the hotplug event handler, since that expects that no locks are held (due to reentrancy with the fb code to update the kms console). Also, this requires that drivers using the probe_single helper function set up the poll work. All current drivers do that already, and with the reworked hpd handling there'll be no downside to unconditionally setting up the poll work any more. v2: Review from Rob Clark - Don't bail out of the output poll work immediately if it's disabled to make sure we deliver the delayed hoptplug events. Instead just jump to the tail. - Don't scheduel the work when it's not set up. Would be a driver bug since using probe helpers for anything dynamic without them initialized makes them all noops. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1) Cc: Rob Clark <robdclark@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Tested-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions