Patch "drm/bridge: it6505: Initialize AUX channel in it6505_i2c_probe" has been added to the 6.1-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: it6505: Initialize AUX channel in it6505_i2c_probe

to the 6.1-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-it6505-initialize-aux-channel-in-it6505_i.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 8cf9f81242001333042b6db6450a8baad8a286f6
Author: Pin-yen Lin <treapking@xxxxxxxxxxxx>
Date:   Thu Oct 13 19:04:08 2022 +0800

    drm/bridge: it6505: Initialize AUX channel in it6505_i2c_probe
    
    [ Upstream commit e577d4b13064c337b83fe7edecb3f34e87144821 ]
    
    During device boot, the HPD interrupt could be triggered before the DRM
    subsystem registers it6505 as a DRM bridge. In such cases, the driver
    tries to access AUX channel and causes NULL pointer dereference.
    Initializing the AUX channel earlier to prevent such error.
    
    Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
    Signed-off-by: Pin-yen Lin <treapking@xxxxxxxxxxxx>
    Reviewed-by: Robert Foss <robert.foss@xxxxxxxxxx>
    Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20221013110411.1674359-2-treapking@xxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index dfe4351c9bdd..99123eec4551 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -2860,10 +2860,7 @@ static int it6505_bridge_attach(struct drm_bridge *bridge,
 	}
 
 	/* Register aux channel */
-	it6505->aux.name = "DP-AUX";
-	it6505->aux.dev = dev;
 	it6505->aux.drm_dev = bridge->dev;
-	it6505->aux.transfer = it6505_aux_transfer;
 
 	ret = drm_dp_aux_register(&it6505->aux);
 
@@ -3316,6 +3313,11 @@ static int it6505_i2c_probe(struct i2c_client *client,
 	DRM_DEV_DEBUG_DRIVER(dev, "it6505 device name: %s", dev_name(dev));
 	debugfs_init(it6505);
 
+	it6505->aux.name = "DP-AUX";
+	it6505->aux.dev = dev;
+	it6505->aux.transfer = it6505_aux_transfer;
+	drm_dp_aux_init(&it6505->aux);
+
 	it6505->bridge.funcs = &it6505_bridge_funcs;
 	it6505->bridge.type = DRM_MODE_CONNECTOR_DisplayPort;
 	it6505->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID |



[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