From patchwork Mon Mar 22 14:01:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 12154853 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=-13.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 3A029C433DB for ; Mon, 22 Mar 2021 14:02:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 AEB2861931 for ; Mon, 22 Mar 2021 14:02:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEB2861931 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 191FF89D84; Mon, 22 Mar 2021 14:02:22 +0000 (UTC) Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0DE8189D4D for ; Mon, 22 Mar 2021 14:02:20 +0000 (UTC) Received: by mail-pj1-x1031.google.com with SMTP id a22-20020a17090aa516b02900c1215e9b33so10587060pjq.5 for ; Mon, 22 Mar 2021 07:02:20 -0700 (PDT) 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=yFiw4jYyVPgKKK9i77Vkg4hTSWnNarff0aeFjf5I2bg=; b=FQnXW17jLClsIa0WCco6PtxWqpR+hJ1FFaXzWbR1wwd4gF7f3cF/WbmZhsxFSrKU1+ 7QBqOl6PswpPSu8qPTP5iZoTftcoScwprRC3ZdX1tbFgEC2FBx/lsPVpaEBs2egfV7Zp ZHj/sXaZVDEdjK8MZ6AjnDI9lsrKqWaEVZfXE= 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=yFiw4jYyVPgKKK9i77Vkg4hTSWnNarff0aeFjf5I2bg=; b=DO2stjToUxZWQ4Qi8T3cK3/fAF9z+q5f9USqh6slU0XPRmOUICMgl8/9ZXBVCNBXZ0 rrRMcCwOL25h8EFxuaBCwao2NPS2KNnPwbUBGF5hrx5laNN4SpmPfhFSMCT0+KEmoFnp d3kwcDi7dMT4J5WVLVZjTIJjETs27D5J/yHHAVLJGrkwktM0wJGwlS2pHldn1lFguS1F J753aThmb2P24Hjc5FRbPzcjUWKRtB14sP2N5EZwAe2CrpOL2fd62Mtu/qQI7rQNHJ8f V+jlQ1K9aeDVbXb57//pnnIBPoEM0OEKsgFy4I204upCigUkosFJQI56MF8Tg5ioSuNC iBwg== X-Gm-Message-State: AOAM531HfEHztyUjCLPcMwkw7y47MhzIpDwmrmEAf7GDSiomjPVnciCl 69EAiradLMxyVf+H2pd896j6HHsQ7dJ0v99C X-Google-Smtp-Source: ABdhPJzE58DFBYBPm4FTbLkJ3y9/1Rr71/9oMKSOYfRiW0F09qVn4uXTqXnLF4g7p2OToVoay3/tiA== X-Received: by 2002:a17:90b:4a4c:: with SMTP id lb12mr13550185pjb.133.1616421740641; Mon, 22 Mar 2021 07:02:20 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a884:15c1:9a30:414f:d84b]) by smtp.gmail.com with ESMTPSA id gg22sm14112997pjb.20.2021.03.22.07.02.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 07:02:20 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Laurent Pinchart , Samuel Holland Subject: [PATCH v4 1/4] drm: sun4i: dsi: Use drm_of_find_panel_or_bridge Date: Mon, 22 Mar 2021 19:31:49 +0530 Message-Id: <20210322140152.101709-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210322140152.101709-1-jagan@amarulasolutions.com> References: <20210322140152.101709-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@googlegroups.com, Jagan Teki , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Reviewed-by: Laurent Pinchart --- Changes for v4, 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;