Patch "drm/bridge: tc358767: Move (e)DP bridge endpoint parsing into dedicated function" 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

    drm/bridge: tc358767: Move (e)DP bridge endpoint parsing into dedicated function

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:
     drm-bridge-tc358767-move-e-dp-bridge-endpoint-parsin.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 fb0488eabf8575cf64ea395cc481ab6bf076bdc0
Author: Marek Vasut <marex@xxxxxxx>
Date:   Tue Mar 29 10:50:10 2022 +0200

    drm/bridge: tc358767: Move (e)DP bridge endpoint parsing into dedicated function
    
    [ Upstream commit 8478095a8c4bcea3c83b0767d6c9127434160761 ]
    
    The TC358767/TC358867/TC9595 are all capable of operating in multiple
    modes, DPI-to-(e)DP, DSI-to-(e)DP, DSI-to-DPI. Only the first mode is
    currently supported. In order to support the rest of the modes without
    making the tc_probe() overly long, split the bridge endpoint parsing
    into dedicated function, where the necessary logic to detect the bridge
    mode based on which endpoints are connected, can be implemented.
    
    Reviewed-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
    Tested-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx> # In both DPI to eDP and DSI to DPI mode.
    Signed-off-by: Marek Vasut <marex@xxxxxxx>
    Cc: Jonas Karlman <jonas@xxxxxxxxx>
    Cc: Laurent Pinchart <Laurent.pinchart@xxxxxxxxxxxxxxxx>
    Cc: Maxime Ripard <maxime@xxxxxxxxxx>
    Cc: Neil Armstrong <narmstrong@xxxxxxxxxxxx>
    Cc: Sam Ravnborg <sam@xxxxxxxxxxxx>
    Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220329085015.39159-7-marex@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 34a3e4e9f717..9af564cf92e5 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -1535,19 +1535,12 @@ static irqreturn_t tc_irq_handler(int irq, void *arg)
 	return IRQ_HANDLED;
 }
 
-static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int tc_probe_edp_bridge_endpoint(struct tc_data *tc)
 {
-	struct device *dev = &client->dev;
+	struct device *dev = tc->dev;
 	struct drm_panel *panel;
-	struct tc_data *tc;
 	int ret;
 
-	tc = devm_kzalloc(dev, sizeof(*tc), GFP_KERNEL);
-	if (!tc)
-		return -ENOMEM;
-
-	tc->dev = dev;
-
 	/* port@2 is the output port */
 	ret = drm_of_find_panel_or_bridge(dev->of_node, 2, 0, &panel, NULL);
 	if (ret && ret != -ENODEV)
@@ -1566,6 +1559,25 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		tc->bridge.type = DRM_MODE_CONNECTOR_DisplayPort;
 	}
 
+	return ret;
+}
+
+static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
+{
+	struct device *dev = &client->dev;
+	struct tc_data *tc;
+	int ret;
+
+	tc = devm_kzalloc(dev, sizeof(*tc), GFP_KERNEL);
+	if (!tc)
+		return -ENOMEM;
+
+	tc->dev = dev;
+
+	ret = tc_probe_edp_bridge_endpoint(tc);
+	if (ret)
+		return ret;
+
 	/* Shut down GPIO is optional */
 	tc->sd_gpio = devm_gpiod_get_optional(dev, "shutdown", GPIOD_OUT_HIGH);
 	if (IS_ERR(tc->sd_gpio))



[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