From patchwork Thu Apr 28 09:48:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1924 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 43F0F3F0CD for ; Thu, 28 Apr 2022 11:48:53 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id i19-20020aa79093000000b0050d44b83506sf2519453pfa.22 for ; Thu, 28 Apr 2022 02:48:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1651139332; cv=pass; d=google.com; s=arc-20160816; b=WjO9lNXMyJtYsHkYywubqaCQEZQVyYPY2YURQKcN8yJb5lUN6P44pomu+pYMi22XtL p1l2LtaOFdl1drEchQ1sp7qs4jtr36FP8nGm5iXLqSZKYOL9sWdWd3bxhgdykGxOox07 1VHWynVyT5aDyCv1wt5o+vR7rSqcbkY4JBAv0enhvgR4PWBlhZA8wfCrITzdZX3vpwpK Sbdw1h/IS+ejEE//NXyjPIKShh6krqBb5+Rl3cBjhAAnHomcwhdgc13q7nNTJwsZkcah Lgj7AXs+aSutGVkNJZPIhdqxbbmA3APHC7ZjxoQDnlrJ0F1Rwn+aUs8diNLXc1zHzY5c eSZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=Qi/AbaB8pvH8YrLGIaj4AkeIXH9cS0UsFGcEFwqGRkA=; b=MNBuJyIl2rfrUs2vw8eap6VVwJvTAYgE/l93GqRAlLkUMyJhfL1SmNDLFSGsuoiqTA ooPZ+awsuVT9jG16vEr+qW91NQcTRPbLtTVDXUjuUj7NmkY6gndqdJTTSIx5y9ZIxlgy doXUFqPNV/aBygci6eNCgmZ3VXxiCuckj6Pq8CT2VgWsgOaJb+9TOjJRI8mC3oAK3lFc YpdW+htkd1bNzedLHizLdO3EjyKbEzhzMVhpAi2c6NvpPhDmvnYO7fEkAvVMHNz44v0w ndInympjVMWG+gOzziKAoleBMxcD1KUYyNVfZFN/K8jyC2fkV3FVJTiEtH2rMbzWkFXj j24A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lnQNze7+; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Qi/AbaB8pvH8YrLGIaj4AkeIXH9cS0UsFGcEFwqGRkA=; b=CWGMULwALcFdFNI22LQqJULrDzswU1zOa+FwRqugU80t2hM//vWDyxtXNdTIIffAOX uH+PVQr6SEnAik7R8PiI+cftwMkYcST3pxPlhhjMRPck5nmoz35VEbjHtAIFayN2bz2y CwcIhbZ8QR7T2H4uqaarbjcTPX5SVhaI+58kI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=Qi/AbaB8pvH8YrLGIaj4AkeIXH9cS0UsFGcEFwqGRkA=; b=hyjwEkfg9nFdnh/m/apRgvuQpQmRzrmFPreU2khGOAPlVkSZvGOpV81IBdFkKzTziR UEGZgVHQbK0pLLT97lGVdctyrc/3OlVgRItubqMJUxl3MiBVlEPCct+U9nDxwTADDR4W 3TGSncZDJpf/IND0DLg5fLSXJt+vGIVOTcegWmyQJO4Bv7wJ2crc8nxjxAnaofuVh1xz QYvFgLmkKhdUIUN4GamLMMYhmOTlf1HvFBzdj9eZnoyLqFKcn2C/WSA283uDjyr6KUo2 GxOgkPov/iCxiNwOd29nEUyAs8Zu/RacorDr5iONcfaGWVvoNbt9ZuicWof0tVchrWHQ AR5g== X-Gm-Message-State: AOAM533nilwITzVHaBuuZZ7YvcVSLwvqNGr1HenWf04kYRvDm1lLXI+t 3JW/2caOQ4iExrO6QR9it2Vyqa7k X-Google-Smtp-Source: ABdhPJxE6rwYSLgwv6x9z3cNOwgwoZqoNL9fOw5k+zgH2SNEcxedv0yK7QbV6r7HLEvp34ZWwYRJIA== X-Received: by 2002:a17:902:bd93:b0:158:fef8:b4fc with SMTP id q19-20020a170902bd9300b00158fef8b4fcmr33264040pls.48.1651139331833; Thu, 28 Apr 2022 02:48:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bb8c:b0:14d:d65a:dbdb with SMTP id m12-20020a170902bb8c00b0014dd65adbdbls7537090pls.6.gmail; Thu, 28 Apr 2022 02:48:51 -0700 (PDT) X-Received: by 2002:a17:902:6bc1:b0:15d:1e15:1a75 with SMTP id m1-20020a1709026bc100b0015d1e151a75mr18713146plt.114.1651139331124; Thu, 28 Apr 2022 02:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651139331; cv=none; d=google.com; s=arc-20160816; b=qXzHXvE6zYXkIn0jQiehP7HffHtBl7HwfOk7Bb116kHqfdqJXgkbHdst5e3yxZEWio K31ZzRuYIgovlQALEImXo0UcYRhl1QBESLFVseUsRLv++syZdVsw21uaoYKjBp86EWSe BQexQevM/gWtE8Y/6ca4seEyZQt4GPEqIA3jAWpf2eUFQ48iBxPb85b8y/9hZVt8glir XxhWuVNP2gock0SQzZnxSVg6qcSJtvNbby9O/BuocRWsyvfXEtfh3E5I1hMlBcfC2z+N Kca1yAWQ/gGtOrOQA3kv86vSVQV09FlQP4qnhT9uvYUr7846GQhjRXEDvCqGYqQG2/nQ pl2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=fSO9EXYOSC33q6TMX5paIc/n59vloq374c1uB49deWM=; b=arIYk41YbUMtqMnVC48tlSS7GE2vzUgf6Spo8X1LBrUk0ieUqkxBp9j/t/D1uAcG7V NIdFyuvggOMEcSZPU0yyC+3CBWf3HytBYaHmVK6IFDPeeoBKIrR/nSz6XNQvegVz2DL2 xF7TIV/rqEgfMq1ej0IlHPZDmRBu44JYlHfsZsfdwxMjb+CmOpXqtsHGHFJr7Sqht610 oBzM8K9jIQUjnMeYQitd3TWJ1GsF7QvKy3gbZcSzCe+jI4S4n2MlMH/Yu/J5e6+VB6D8 lFI4+jtuzr//r1m2O6ti8VohSrLJC1F0M0r+hWsGaeRoCeZi8gsMcrUqTbhN6gF2miYy xRFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lnQNze7+; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id i12-20020a170902cf0c00b0015309b5cc1fsor1920368plg.36.2022.04.28.02.48.51 for (Google Transport Security); Thu, 28 Apr 2022 02:48:51 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:902:ce01:b0:15c:eedb:f00c with SMTP id k1-20020a170902ce0100b0015ceedbf00cmr24832151plg.122.1651139330761; Thu, 28 Apr 2022 02:48:50 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a0a9:a3c7:357:7b61:223a]) by smtp.gmail.com with ESMTPSA id y9-20020a17090a1f4900b001cd498dc153sm9842845pjy.3.2022.04.28.02.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 02:48:50 -0700 (PDT) From: Jagan Teki To: Marek Szyprowski , Maxime Ripard , Inki Dae , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH] drm: exynos: dsi: Use child panel or bridge find helpers Date: Thu, 28 Apr 2022 15:18:08 +0530 Message-Id: <20220428094808.782938-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lnQNze7+; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , commit <711c7adc4687> ("drm: exynos: dsi: Use drm panel_bridge API") added devm_drm_of_get_bridge for looking up if child node has panel or bridge. However commit ("Revert "drm: of: Lookup if child node has panel or bridge") has reverted panel or bridge child node lookup from devm_drm_of_get_bridge which eventually failed to find the DSI devices in exynos drm dsi driver. So, use the conventional child panel bridge lookup helpers like it does before. Signed-off-by: Jagan Teki Tested-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index f067c86b0b12..ec673223d6b7 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -1451,9 +1452,18 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, struct device *dev = dsi->dev; struct drm_encoder *encoder = &dsi->encoder; struct drm_device *drm = encoder->dev; + struct drm_panel *panel; int ret; - dsi->out_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); + panel = of_drm_find_panel(device->dev.of_node); + if (!IS_ERR(panel)) { + dsi->out_bridge = devm_drm_panel_bridge_add(dev, panel); + } else { + dsi->out_bridge = of_drm_find_bridge(device->dev.of_node); + if (!dsi->out_bridge) + dsi->out_bridge = ERR_PTR(-EINVAL); + } + if (IS_ERR(dsi->out_bridge)) { ret = PTR_ERR(dsi->out_bridge); DRM_DEV_ERROR(dev, "failed to find the bridge: %d\n", ret);