aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2017-01-09 09:31:58 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-01 02:33:02 -0500
commit2abb7f408f7cfb9af9218e74507f5f44af154302 (patch)
tree308ab321d74f466edef47b5877c4896e3acf1787 /drivers/gpu/drm
parente4be4d4942b92cdd2d3e87ed178269bcd5844526 (diff)
drm: Schedule the output_poll_work with 1s delay if we have delayed event
commit 68f458eec7069d618a6c884ca007426e0cea411b upstream. Instead of scheduling the work to handle the initial delayed event, use 1s delay. This delay should not be needed, but Optimus/nouveau will fail in a mysterious way if the delayed event is handled as soon as possible like it is done in drm_helper_probe_single_connector_modes() in case the poll was enabled before. Reverting 339fd36238dd would give back the 10 sec (!) delay to handle the delayed event. Adding 1sec delay to the poll_work is enough to work around the issue in Optimus setups and gives shorter response on handling the initial delayed event. Fixes: 339fd36238dd ("drm: drm_probe_helper: Fix output_poll_work scheduling") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> [danvet: Add FIXME to the comment to make it stick out more.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170109143158.21917-1-peter.ujfalusi@ti.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/drm_probe_helper.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index f6b64d7d3528..276474d13763 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -143,8 +143,18 @@ void drm_kms_helper_poll_enable_locked(struct drm_device *dev)
143 } 143 }
144 144
145 if (dev->mode_config.delayed_event) { 145 if (dev->mode_config.delayed_event) {
146 /*
147 * FIXME:
148 *
149 * Use short (1s) delay to handle the initial delayed event.
150 * This delay should not be needed, but Optimus/nouveau will
151 * fail in a mysterious way if the delayed event is handled as
152 * soon as possible like it is done in
153 * drm_helper_probe_single_connector_modes() in case the poll
154 * was enabled before.
155 */
146 poll = true; 156 poll = true;
147 delay = 0; 157 delay = HZ;
148 } 158 }
149 159
150 if (poll) 160 if (poll)