[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241219080604.1423600-10-damon.ding@rock-chips.com>
Date: Thu, 19 Dec 2024 16:05:58 +0800
From: Damon Ding <damon.ding@...k-chips.com>
To: heiko@...ech.de
Cc: robh@...nel.org,
krzk+dt@...nel.org,
conor+dt@...nel.org,
rfoss@...nel.org,
vkoul@...nel.org,
sebastian.reichel@...labora.com,
cristian.ciocaltea@...labora.com,
l.stach@...gutronix.de,
andy.yan@...k-chips.com,
hjc@...k-chips.com,
algea.cao@...k-chips.com,
kever.yang@...k-chips.com,
dri-devel@...ts.freedesktop.org,
devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-phy@...ts.infradead.org,
Damon Ding <damon.ding@...k-chips.com>
Subject: [PATCH v3 09/15] drm/bridge: analogix_dp: Add support to get panel from the DP AUX bus
If the panel can not be found in the beginning of rockchip_dp_probe()
using the platform bus, we can still try to find it in analogix_dp_bind()
through the DP AUX bus after the &analogix_dp_device.aux has been
initialized.
Signed-off-by: Damon Ding <damon.ding@...k-chips.com>
---
.../drm/bridge/analogix/analogix_dp_core.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 9429c50cc1bc..eae02819e3bb 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -19,12 +19,14 @@
#include <linux/platform_device.h>
#include <drm/bridge/analogix_dp.h>
+#include <drm/display/drm_dp_aux_bus.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_crtc.h>
#include <drm/drm_device.h>
#include <drm/drm_edid.h>
+#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
@@ -1733,6 +1735,23 @@ int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev)
goto err_disable_pm_runtime;
}
+ if (!dp->plat_data->panel) {
+ /*
+ * If the edp-panel module has not yet been initialized, the
+ * devm_of_dp_aux_populate_bus() function will return 0 and
+ * the done_probing() callback will not be called either.
+ * Consequently, the panel will never be found.
+ *
+ * This is the reason why we do not use the done_probing()
+ * callback and do not check the reture value here.
+ */
+ devm_of_dp_aux_populate_bus(&dp->aux, NULL);
+ ret = drm_of_find_panel_or_bridge(dp->dev->of_node, 1, 0,
+ &dp->plat_data->panel, NULL);
+ if (ret)
+ goto err_unregister_aux;
+ }
+
ret = analogix_dp_create_bridge(drm_dev, dp);
if (ret) {
DRM_ERROR("failed to create bridge (%d)\n", ret);
--
2.34.1
Powered by blists - more mailing lists