@@ -21,6 +21,7 @@
#include <drm/drmP.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_mipi_dsi.h>
+#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
@@ -964,11 +965,13 @@ static int sun6i_dsi_attach(struct mipi_dsi_host *host,
struct mipi_dsi_device *device)
{
struct sun6i_dsi *dsi = host_to_sun6i_dsi(host);
+ int ret;
dsi->device = device;
- dsi->panel = of_drm_find_panel(device->dev.of_node);
- if (IS_ERR(dsi->panel))
- return PTR_ERR(dsi->panel);
+ ret = drm_of_find_panel_or_bridge(host->dev->of_node, 0, 0,
+ &dsi->panel, NULL);
+ if (ret)
+ return ret;
dev_info(host->dev, "Attached device %s\n", device->name);
Right now the driver is finding the panel using of_drm_find_panel, replace the same with drm_of_find_panel_or_bridge which would help to find the panel or bridge on the same call if bridge support added in future. Added NULL in bridge argument, same will replace with bridge parameter once bridge supported. Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)