Patch "drm: bridge: dw_hdmi: fix connector access for scdc" has been added to the 6.4-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: dw_hdmi: fix connector access for scdc

to the 6.4-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-dw_hdmi-fix-connector-access-for-scdc.patch
and it can be found in the queue-6.4 subdirectory.

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



commit 55ccff99ae176eb0c945916524cfd9719d1abd4c
Author: Adrián Larumbe <adrian.larumbe@xxxxxxxxxxxxx>
Date:   Thu Jun 1 13:31:53 2023 +0100

    drm: bridge: dw_hdmi: fix connector access for scdc
    
    [ Upstream commit 98703e4e061fb8715c7613cd227e32cdfd136b23 ]
    
    Commit 5d844091f237 ("drm/scdc-helper: Pimp SCDC debugs") changed the scdc
    interface to pick up an i2c adapter from a connector instead. However, in
    the case of dw-hdmi, the wrong connector was being used to pass i2c adapter
    information, since dw-hdmi's embedded connector structure is only populated
    when the bridge attachment callback explicitly asks for it.
    
    drm-meson is handling connector creation, so this won't happen, leading to
    a NULL pointer dereference.
    
    Fix it by having scdc functions access dw-hdmi's current connector pointer
    instead, which is assigned during the bridge enablement stage.
    
    Fixes: 5d844091f237 ("drm/scdc-helper: Pimp SCDC debugs")
    Signed-off-by: Adrián Larumbe <adrian.larumbe@xxxxxxxxxxxxx>
    Reported-by: Lukas F. Hartmann <lukas@xxxxxxxxx>
    Acked-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
    [narmstrong: moved Fixes tag before first S-o-b and added Reported-by tag]
    Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230601123153.196867-1-adrian.larumbe@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 603bb3c51027b..3b40e0fdca5cb 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -1426,9 +1426,9 @@ void dw_hdmi_set_high_tmds_clock_ratio(struct dw_hdmi *hdmi,
 	/* Control for TMDS Bit Period/TMDS Clock-Period Ratio */
 	if (dw_hdmi_support_scdc(hdmi, display)) {
 		if (mtmdsclock > HDMI14_MAX_TMDSCLK)
-			drm_scdc_set_high_tmds_clock_ratio(&hdmi->connector, 1);
+			drm_scdc_set_high_tmds_clock_ratio(hdmi->curr_conn, 1);
 		else
-			drm_scdc_set_high_tmds_clock_ratio(&hdmi->connector, 0);
+			drm_scdc_set_high_tmds_clock_ratio(hdmi->curr_conn, 0);
 	}
 }
 EXPORT_SYMBOL_GPL(dw_hdmi_set_high_tmds_clock_ratio);
@@ -2116,7 +2116,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
 				min_t(u8, bytes, SCDC_MIN_SOURCE_VERSION));
 
 			/* Enabled Scrambling in the Sink */
-			drm_scdc_set_scrambling(&hdmi->connector, 1);
+			drm_scdc_set_scrambling(hdmi->curr_conn, 1);
 
 			/*
 			 * To activate the scrambler feature, you must ensure
@@ -2132,7 +2132,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
 			hdmi_writeb(hdmi, 0, HDMI_FC_SCRAMBLER_CTRL);
 			hdmi_writeb(hdmi, (u8)~HDMI_MC_SWRSTZ_TMDSSWRST_REQ,
 				    HDMI_MC_SWRSTZ);
-			drm_scdc_set_scrambling(&hdmi->connector, 0);
+			drm_scdc_set_scrambling(hdmi->curr_conn, 0);
 		}
 	}
 
@@ -3553,6 +3553,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
 	hdmi->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
 			 | DRM_BRIDGE_OP_HPD;
 	hdmi->bridge.interlace_allowed = true;
+	hdmi->bridge.ddc = hdmi->ddc;
 #ifdef CONFIG_OF
 	hdmi->bridge.of_node = pdev->dev.of_node;
 #endif



[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