Patch "drm/bridge: tc358767: Fix link properties discovery" has been added to the 5.15-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/bridge: tc358767: Fix link properties discovery

to the 5.15-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-bridge-tc358767-fix-link-properties-discovery.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 91a3096d151ce8c6748fe66515aba4218eaad0dc
Author: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
Date:   Wed Nov 8 13:27:23 2023 +0200

    drm/bridge: tc358767: Fix link properties discovery
    
    [ Upstream commit 2d343723c7e1f9f6d64f721f07cfdfc2993758d1 ]
    
    When a display controller driver uses DRM_BRIDGE_ATTACH_NO_CONNECTOR,
    tc358767 will behave properly and skip the creation of the connector.
    
    However, tc_get_display_props(), which is used to find out about the DP
    monitor and link, is only called from two places: .atomic_enable() and
    tc_connector_get_modes(). The latter is only used when tc358767 creates
    its own connector, i.e. when DRM_BRIDGE_ATTACH_NO_CONNECTOR is _not_
    set.
    
    Thus, the driver never finds out the link properties before get_edid()
    is called. With num_lanes of 0 and link_rate of 0 there are not many
    valid modes...
    
    Fix this by adding tc_get_display_props() call at the beginning of
    get_edid(), so that we have up to date information before looking at the
    modes.
    
    Reported-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
    Closes: https://lore.kernel.org/all/24282420-b4dd-45b3-bb1c-fc37fe4a8205@xxxxxxxxxxx/
    Fixes: de5e6c027ae6 ("drm/bridge: tc358767: add drm_panel_bridge support")
    Reviewed-by: Aradhya Bhatia <a-bhatia1@xxxxxx>
    Tested-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20231108-tc358767-v2-2-25c5f70a2159@xxxxxxxxxxxxxxxx
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 3436d39c90b4c..64ded2dd0c08f 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -1319,6 +1319,13 @@ static struct edid *tc_get_edid(struct drm_bridge *bridge,
 				struct drm_connector *connector)
 {
 	struct tc_data *tc = bridge_to_tc(bridge);
+	int ret;
+
+	ret = tc_get_display_props(tc);
+	if (ret < 0) {
+		dev_err(tc->dev, "failed to read display props: %d\n", ret);
+		return 0;
+	}
 
 	return drm_get_edid(connector, &tc->aux.ddc);
 }




[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