Patch "drm/bridge: Move devm_drm_of_get_bridge to bridge/panel.c" 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: Move devm_drm_of_get_bridge to bridge/panel.c

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-move-devm_drm_of_get_bridge-to-bridge-panel.c.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.


>From d4ae66f10c8b9959dce1766d9a87070e567236eb Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime@xxxxxxxxxx>
Date: Fri, 17 Sep 2021 20:09:25 +0200
Subject: drm/bridge: Move devm_drm_of_get_bridge to bridge/panel.c

From: Maxime Ripard <maxime@xxxxxxxxxx>

commit d4ae66f10c8b9959dce1766d9a87070e567236eb upstream.

By depending on devm_drm_panel_bridge_add(), devm_drm_of_get_bridge()
introduces a circular dependency between the modules drm (where
devm_drm_of_get_bridge() ends up) and drm_kms_helper (where
devm_drm_panel_bridge_add() is).

Fix this by moving devm_drm_of_get_bridge() to bridge/panel.c and thus
drm_kms_helper.

Fixes: 87ea95808d53 ("drm/bridge: Add a function to abstract away panels")
Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
Tested-by: Heiko Stuebner <heiko@xxxxxxxxx>
Acked-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
Link: https://patchwork.freedesktop.org/patch/msgid/20210917180925.2602266-1-maxime@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/bridge/panel.c |   37 +++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_bridge.c   |   34 ----------------------------------
 2 files changed, 37 insertions(+), 34 deletions(-)

--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -9,6 +9,7 @@
 #include <drm/drm_connector.h>
 #include <drm/drm_encoder.h>
 #include <drm/drm_modeset_helper_vtables.h>
+#include <drm/drm_of.h>
 #include <drm/drm_panel.h>
 #include <drm/drm_print.h>
 #include <drm/drm_probe_helper.h>
@@ -332,3 +333,39 @@ struct drm_connector *drm_panel_bridge_c
 	return &panel_bridge->connector;
 }
 EXPORT_SYMBOL(drm_panel_bridge_connector);
+
+#ifdef CONFIG_OF
+/**
+ * devm_drm_of_get_bridge - Return next bridge in the chain
+ * @dev: device to tie the bridge lifetime to
+ * @np: device tree node containing encoder output ports
+ * @port: port in the device tree node
+ * @endpoint: endpoint in the device tree node
+ *
+ * Given a DT node's port and endpoint number, finds the connected node
+ * and returns the associated bridge if any, or creates and returns a
+ * drm panel bridge instance if a panel is connected.
+ *
+ * Returns a pointer to the bridge if successful, or an error pointer
+ * otherwise.
+ */
+struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
+					  struct device_node *np,
+					  u32 port, u32 endpoint)
+{
+	struct drm_bridge *bridge;
+	struct drm_panel *panel;
+	int ret;
+
+	ret = drm_of_find_panel_or_bridge(np, port, endpoint,
+					  &panel, &bridge);
+	if (ret)
+		return ERR_PTR(ret);
+
+	if (panel)
+		bridge = devm_drm_panel_bridge_add(dev, panel);
+
+	return bridge;
+}
+EXPORT_SYMBOL(devm_drm_of_get_bridge);
+#endif
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -1232,40 +1232,6 @@ struct drm_bridge *of_drm_find_bridge(st
 	return NULL;
 }
 EXPORT_SYMBOL(of_drm_find_bridge);
-
-/**
- * devm_drm_of_get_bridge - Return next bridge in the chain
- * @dev: device to tie the bridge lifetime to
- * @np: device tree node containing encoder output ports
- * @port: port in the device tree node
- * @endpoint: endpoint in the device tree node
- *
- * Given a DT node's port and endpoint number, finds the connected node
- * and returns the associated bridge if any, or creates and returns a
- * drm panel bridge instance if a panel is connected.
- *
- * Returns a pointer to the bridge if successful, or an error pointer
- * otherwise.
- */
-struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
-					  struct device_node *np,
-					  u32 port, u32 endpoint)
-{
-	struct drm_bridge *bridge;
-	struct drm_panel *panel;
-	int ret;
-
-	ret = drm_of_find_panel_or_bridge(np, port, endpoint,
-					  &panel, &bridge);
-	if (ret)
-		return ERR_PTR(ret);
-
-	if (panel)
-		bridge = devm_drm_panel_bridge_add(dev, panel);
-
-	return bridge;
-}
-EXPORT_SYMBOL(devm_drm_of_get_bridge);
 #endif
 
 MODULE_AUTHOR("Ajay Kumar <ajaykumar.rs@xxxxxxxxxxx>");


Patches currently in stable-queue which might be from maxime@xxxxxxxxxx are

queue-5.15/drm-vc4-hdmi-avoid-full-hdmi-audio-fifo-writes.patch
queue-5.15/drm-bridge-tc358767-move-e-dp-bridge-endpoint-parsin.patch
queue-5.15/drm-hyperv-drm-include-framebuffer-and-edid-headers.patch
queue-5.15/drm-vc4-hdmi-fix-hpd-gpio-detection.patch
queue-5.15/drm-vc4-use-of_device_get_match_data.patch
queue-5.15/drm-vc4-dsi-register-dsi0-as-the-correct-vc4-encoder.patch
queue-5.15/drm-vc4-dsi-correct-dsi-divider-calculations.patch
queue-5.15/drm-vc4-hdmi-reset-hdmi-misc_control-register.patch
queue-5.15/drm-vc4-dsi-release-workaround-buffer-and-dma.patch
queue-5.15/drm-vc4-dsi-correct-pixel-order-for-dsi0.patch
queue-5.15/drm-bridge-add-a-function-to-abstract-away-panels.patch
queue-5.15/drm-bridge-tc358767-fix-e-dp-bridge-endpoint-parsing-in-dedicated-function.patch
queue-5.15/drm-vc4-plane-remove-subpixel-positioning-check.patch
queue-5.15/drm-vc4-plane-fix-margin-calculations-for-the-right-.patch
queue-5.15/drm-vc4-hdmi-correct-hdmi-timing-registers-for-inter.patch
queue-5.15/drm-vc4-dsi-add-correct-stop-condition-to-vc4_dsi_en.patch
queue-5.15/drm-vc4-change-vc4_dma_range_matches-from-a-global-to-static.patch
queue-5.15/drm-vc4-dsi-fix-dsi0-interrupt-support.patch
queue-5.15/drm-vc4-hdmi-fix-timings-for-interlaced-modes.patch
queue-5.15/drm-vc4-drv-adopt-the-dma-configuration-from-the-hvs.patch
queue-5.15/drm-bridge-move-devm_drm_of_get_bridge-to-bridge-panel.c.patch
queue-5.15/drm-vc4-hdmi-disable-audio-if-dmas-property-is-present-but-empty.patch
queue-5.15/drm-vc4-dsi-switch-to-devm_drm_of_get_bridge.patch



[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