Patch "drm: Fix output poll work for drm_kms_helper_poll=n" has been added to the 6.6-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    drm: Fix output poll work for drm_kms_helper_poll=n

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-fix-output-poll-work-for-drm_kms_helper_poll-n.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3f0e8fe920b02c266f148b1f87a7102627dc3be1
Author: Imre Deak <imre.deak@xxxxxxxxx>
Date:   Fri Mar 1 17:22:43 2024 +0200

    drm: Fix output poll work for drm_kms_helper_poll=n
    
    [ Upstream commit 72e6d668773fd19f78a6e8017347b08a5cccaaeb ]
    
    If drm_kms_helper_poll=n the output poll work will only get scheduled
    from drm_helper_probe_single_connector_modes() to handle a delayed
    hotplug event. Since polling is disabled the work in this case should
    just call drm_kms_helper_hotplug_event() w/o detecting the state of
    connectors and rescheduling the work.
    
    After commit d33a54e3991d after a delayed hotplug event above the
    connectors did get re-detected in the poll work and the work got
    re-scheduled periodically (since poll_running is also false if
    drm_kms_helper_poll=n), in effect ignoring the drm_kms_helper_poll=n
    kernel param.
    
    Fix the above by calling only drm_kms_helper_hotplug_event() for a
    delayed hotplug event if drm_kms_helper_hotplug_event=n, as was done
    before d33a54e3991d.
    
    Cc: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Reported-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
    Fixes: d33a54e3991d ("drm/probe_helper: sort out poll_running vs poll_enabled")
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240301152243.1670573-1-imre.deak@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 3f479483d7d80..23b4e9a3361d8 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -760,9 +760,11 @@ static void output_poll_execute(struct work_struct *work)
 	changed = dev->mode_config.delayed_event;
 	dev->mode_config.delayed_event = false;
 
-	if (!drm_kms_helper_poll && dev->mode_config.poll_running) {
-		drm_kms_helper_disable_hpd(dev);
-		dev->mode_config.poll_running = false;
+	if (!drm_kms_helper_poll) {
+		if (dev->mode_config.poll_running) {
+			drm_kms_helper_disable_hpd(dev);
+			dev->mode_config.poll_running = false;
+		}
 		goto out;
 	}
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux