Patch "Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time"" has been added to the 5.10-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

    Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time"

to the 5.10-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:
     revert-drm-bridge-analogix-dp-add-panel-prepare-unpr.patch
and it can be found in the queue-5.10 subdirectory.

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



commit df2eec4641b25579cd381d79f49f3e8e85d26456
Author: Brian Norris <briannorris@xxxxxxxxxxxx>
Date:   Mon Aug 22 18:08:04 2022 -0700

    Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time"
    
    [ Upstream commit cc62d98bd56d45de4531844ca23913a15136c05b ]
    
    This reverts commit 211f276ed3d96e964d2d1106a198c7f4a4b3f4c0.
    
    For quite some time, core DRM helpers already ensure that any relevant
    connectors/CRTCs/etc. are disabled, as well as their associated
    components (e.g., bridges) when suspending the system. Thus,
    analogix_dp_bridge_{enable,disable}() already get called, which in turn
    call drm_panel_{prepare,unprepare}(). This makes these drm_panel_*()
    calls redundant.
    
    Besides redundancy, there are a few problems with this handling:
    
    (1) drm_panel_{prepare,unprepare}() are *not* reference-counted APIs and
    are not in general designed to be handled by multiple callers --
    although some panel drivers have a coarse 'prepared' flag that mitigates
    some damage, at least. So at a minimum this is redundant and confusing,
    but in some cases, this could be actively harmful.
    
    (2) The error-handling is a bit non-standard. We ignored errors in
    suspend(), but handled errors in resume(). And recently, people noticed
    that the clk handling is unbalanced in error paths, and getting *that*
    right is not actually trivial, given the current way errors are mostly
    ignored.
    
    (3) In the particular way analogix_dp_{suspend,resume}() get used (e.g.,
    in rockchip_dp_*(), as a late/early callback), we don't necessarily have
    a proper PM relationship between the DP/bridge device and the panel
    device. So while the DP bridge gets resumed, the panel's parent device
    (e.g., platform_device) may still be suspended, and so any prepare()
    calls may fail.
    
    So remove the superfluous, possibly-harmful suspend()/resume() handling
    of panel state.
    
    Fixes: 211f276ed3d9 ("drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time")
    Link: https://lore.kernel.org/all/Yv2CPBD3Picg%2FgVe@xxxxxxxxxx/
    Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
    Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
    Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220822180729.1.I8ac5abe3a4c1c6fd5c061686c6e883c22f69022c@changeid
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index a7bcb429c02b..e8baa07450b7 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1865,12 +1865,6 @@ EXPORT_SYMBOL_GPL(analogix_dp_remove);
 int analogix_dp_suspend(struct analogix_dp_device *dp)
 {
 	clk_disable_unprepare(dp->clock);
-
-	if (dp->plat_data->panel) {
-		if (drm_panel_unprepare(dp->plat_data->panel))
-			DRM_ERROR("failed to turnoff the panel\n");
-	}
-
 	return 0;
 }
 EXPORT_SYMBOL_GPL(analogix_dp_suspend);
@@ -1885,13 +1879,6 @@ int analogix_dp_resume(struct analogix_dp_device *dp)
 		return ret;
 	}
 
-	if (dp->plat_data->panel) {
-		if (drm_panel_prepare(dp->plat_data->panel)) {
-			DRM_ERROR("failed to setup the panel\n");
-			return -EBUSY;
-		}
-	}
-
 	return 0;
 }
 EXPORT_SYMBOL_GPL(analogix_dp_resume);



[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