From patchwork Sun Feb 14 19:40:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 12087413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0361C433DB for ; Sun, 14 Feb 2021 19:42:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9EC4D64DE0 for ; Sun, 14 Feb 2021 19:42:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EC4D64DE0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=W2h/a6JPhIUoSNeCSdALIX1DPlPT8r9s89yf4XVm2zc=; b=DZeJ4Ha6DNcDHe+54tVLJh7Or /74wTFxbM7/tVopeMquufyd8r7uP1CtK7YRJgUoUJimaVv63d/znwlOs0I3imyI2RxZw0LkLyXJcl w+m1G2iILiRcnbYXFOJR0MPKS//P8i0wpM2/paPmDxOmK/tVRGdgdtZgkE9hvtkr0x5otes9fhYQf ummwKyyV9vjThYbCB1z5kPOmYmgwZUQXwXwUqsGVFxl6Dr9VBiA8U6ScEEd3qxtesRlb/2UDl/VWi GOjxuIc3p80YZ3xjr67MZLDvTpFhiPaP68IQ744EcJjWxY6fc5fYo5v3yRrSW4HfaN7k0rhpV3uox 1Mu+VQNKw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBNGu-0003sj-RH; Sun, 14 Feb 2021 19:41:32 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBNGm-0003pg-NQ for linux-arm-kernel@lists.infradead.org; Sun, 14 Feb 2021 19:41:26 +0000 Received: by mail-pj1-x102c.google.com with SMTP id gb24so2482451pjb.4 for ; Sun, 14 Feb 2021 11:41:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WI1iyrnvhWaNG/MvFsahwpBXf2DTPnogdw12xoDU1G0=; b=EVG43J4/EO4+pGlO0g6kGGmKnxCMV3wq1NjNbFjH7MFbJIqAUh55QKyHyORwlFS1QQ A/JhHhwLujRXfD3v9erPMAy2OZw7EQ942OvjnvGGBD8XS31lM1THGlcSgzh7mi3R96Lm DnZ6I6nmeBuaUaOMGAA7101hvQTmV6ogOlTzE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WI1iyrnvhWaNG/MvFsahwpBXf2DTPnogdw12xoDU1G0=; b=C+Del7Ed6+707Ze8wFpO0PMeijwxGHD3haQSf/GyyTDOsrnYwXkGGXa+jfZk8+AWSe IMvHXtf8VcCsu0qzejBKn63biaftKx1gLLmKmXeS29xxdXT7kHFgbttsKw1FJrkZWZrX uM5wTDkYQYW8B/dVLIrazfUMEDjb0C8/QSPxDORZPREOmlWCizCofrRSQnsQ0hw2eSfK O4yARuL2hbqbDwcRMoPf9c3kD0dAhnNlmJAOwbpg28THpTBblovToENeGlVWDduWEomg G0m51mf9Jp1XsAKtIcrl0cFLF/DqmdsWuXdlCBxZJcsACoCKXZzodrcf2P15D9sYf+/G tzhA== X-Gm-Message-State: AOAM530/xZdZJ41x8SOYdw+E+rJhnf8CSVq1OgoA/YAfYcatFvD5rFXu MvduWIoSSMoNdut1uNe3i+yUCw== X-Google-Smtp-Source: ABdhPJzOmjjDGQgqnxXklOvSXjd4BguDUqqil0xk86snbbpR/yGMkUu7WGUp4pAFWbPilT+STILTGw== X-Received: by 2002:a17:90a:7e94:: with SMTP id j20mr12988495pjl.8.1613331682653; Sun, 14 Feb 2021 11:41:22 -0800 (PST) Received: from ub-XPS-13-9350.domain.name ([45.249.78.214]) by smtp.gmail.com with ESMTPSA id 125sm15129247pfu.7.2021.02.14.11.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 11:41:22 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Laurent Pinchart Subject: [PATCH v3 1/7] drm: sun4i: dsi: Use drm_of_find_panel_or_bridge Date: Mon, 15 Feb 2021 01:10:56 +0530 Message-Id: <20210214194102.126146-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210214194102.126146-1-jagan@amarulasolutions.com> References: <20210214194102.126146-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210214_144124_814612_57C3DE7E X-CRM114-Status: GOOD ( 13.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace of_drm_find_panel with drm_of_find_panel_or_bridge for finding panel, this indeed help to find the bridge if bridge support added. Added NULL in bridge argument, same will replace with bridge parameter once bridge supported. Signed-off-by: Jagan Teki --- Changes for v3: - none drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 4f5efcace68e..2e9e7b2d4145 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -963,10 +964,14 @@ static int sun6i_dsi_attach(struct mipi_dsi_host *host, struct mipi_dsi_device *device) { struct sun6i_dsi *dsi = host_to_sun6i_dsi(host); - struct drm_panel *panel = of_drm_find_panel(device->dev.of_node); + struct drm_panel *panel; + int ret; + + ret = drm_of_find_panel_or_bridge(dsi->dev->of_node, 0, 0, + &panel, NULL); + if (ret) + return ret; - if (IS_ERR(panel)) - return PTR_ERR(panel); if (!dsi->drm || !dsi->drm->registered) return -EPROBE_DEFER;