[PATCH] drm: Schedule the output_poll_work with 1s delay if we have delayed event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of scheduling the work to handle the initial delayed event, use 1s
delay.

When the delayed event is handled w/o delay - in a similar matter when the
poll had been initialized before drm_helper_probe_single_connector_modes()
is called - it triggers a race in Optimus setups.

Fixes: 339fd36238dd ("drm: drm_probe_helper: Fix output_poll_work scheduling")
Cc: stable@xxxxxxxxxxxxxxx   # v4.9
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxx>
---
Hi,

related bug report: https://bugs.freedesktop.org/show_bug.cgi?id=98690

Regards,
Peter

 drivers/gpu/drm/drm_probe_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 98ed110e28ed..f30c14b0a72f 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -146,8 +146,9 @@ void drm_kms_helper_poll_enable_locked(struct drm_device *dev)
 	drm_connector_list_iter_put(&conn_iter);
 
 	if (dev->mode_config.delayed_event) {
+		/* Use short (1s) delay to handle the initial delayed event */
 		poll = true;
-		delay = 0;
+		delay = HZ;
 	}
 
 	if (poll)
-- 
2.11.0

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux