summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2018-02-14 06:41:25 +0100
committerLukas Wunner <lukas@wunner.de>2018-02-16 22:30:06 +0100
commit25c058ccaf2ebbc3e250ec1e199e161f91fe27d4 (patch)
tree93aa786dec9bd0d10648ea885444f78b36daceb9 /include/drm
parent27d4ee03078aba88c5e07dcc4917e8d01d046f38 (diff)
downloadlinux-next-25c058ccaf2ebbc3e250ec1e199e161f91fe27d4.tar.gz
drm: Allow determining if current task is output poll worker
Introduce a helper to determine if the current task is an output poll worker. This allows us to fix a long-standing deadlock in several DRM drivers wherein the ->runtime_suspend callback waits for the output poll worker to finish and the worker in turn calls a ->detect callback which waits for runtime suspend to finish. The ->detect callback is invoked from multiple call sites and waiting for runtime suspend to finish is the correct thing to do except if it's executing in the context of the worker. v2: Expand kerneldoc to specifically mention deadlock between output poll worker and autosuspend worker as use case. (Lyude) Cc: Dave Airlie <airlied@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Link: https://patchwork.freedesktop.org/patch/msgid/3549ce32e7f1467102e70d3e9cbf70c46bfe108e.1518593424.git.lukas@wunner.de
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_crtc_helper.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 76e237bd989b..6914633037a5 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -77,5 +77,6 @@ void drm_kms_helper_hotplug_event(struct drm_device *dev);
void drm_kms_helper_poll_disable(struct drm_device *dev);
void drm_kms_helper_poll_enable(struct drm_device *dev);
+bool drm_kms_helper_is_poll_worker(void);
#endif