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: 1713 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 746E23F067 for ; Mon, 22 Mar 2021 15:02:23 +0100 (CET) Received: by mail-pj1-f69.google.com with SMTP id j12sf29095602pjm.5 for ; Mon, 22 Mar 2021 07:02:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1616421741; cv=pass; d=google.com; s=arc-20160816; b=TKtfT/0HqsPF0n8moBkQz2MyhEyeVHmcdZMqUClEdrWvdUhKndtmlh+YSS7HZbLiTi 5APwtUAxsigT/33n2q7UYKynahcq322bNrRSY6Ui+xtLr5HuDzxQyM0gLbGNx0K+A9GH LfNhL9dkgK2HVWuQlISwWNn0x8lCrGrWIrPeY55e+quGlHETInyPLIebu2/4Fl8Nv2AP QLT4Efwk8ibDfvnPX1NmNJwpI9aOLQd5kGjwdgHg2FaWmtPl8X3Ii42ARnZfXGiv7dtX Sw0YM7e5+bFIvZdoFOFyh1a2JmNQ+E3NEk75b0mfAbEExF95faUchpbub6piif3BiDS3 JcPA== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=h14QX8HddP1JDyQtjljRx88S0OGe3elNC8PoO7Lu+H4=; b=OssPBwvWC251JB7tNC+IbHIjB113E+VCJ6Rx9efnu9Hnb1ElMaOU3EkFr7hfcCkrhf Hvf66D8EQaxV/q4RCq4mT51Ul08SYMXHzFnKumNmJmAcEvfS397NvPiiOrdyrTgoy5BA GZRx1X77TiMEspd2MQbLYGWyzVBQsjJlWpBDxUY9W/fuphRJ65P1jjvqnmS8CQ7YvHtJ 0d0Q8etrDovPgRTMdz/qDO+n1VcqHONdMrB7ohYQXrJTLzOTRYZ89aI4HMCHcpZ7agfu 0rGWoYwmjH3c4Lw/GFHPl+FFVQSBMzMiaLzbOaAMxkvdjPgAzHfhTgroZSIauqxW/6mn Rxqg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FQnXW17j; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=h14QX8HddP1JDyQtjljRx88S0OGe3elNC8PoO7Lu+H4=; b=Fx0nh/fhe7pvEVQIOsTE/JwLyWn7/2t2lqYknWuoFW9VrtLhRsiBuP60XFofpdb9lG QZ7tS6H0yNwgufTucBl3mjerid3d5AtvnmQCpVEbUTf97Twomj7tw4rMk76+z9w4nSaG +m6b9JtPn86co78EmN6h1vfCz8aGQ6BlrlffQ= 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: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=h14QX8HddP1JDyQtjljRx88S0OGe3elNC8PoO7Lu+H4=; b=XwoSSmMm4tCyo3NQ1/krjg4p/acG7m+SrM6FVijYdmsJy+07E+94qjXVPhODbcKwXS vMT3WDmDOH3Dg/B0Hcs48hSgYzA4BbLFsPY3BfM/mQmCXMA7tfIYk21Z4VIkUQHPT7hy s0+8ExfHKWxVQ4T5FrSaMvYuax8oAvbm4V100esXDDDaD+IO/hN7Rx5RxqoJhEFa+lTb ePbngeYIPmSAAa++KrzIOfEmDhDHs0yBD1rs8zAecoTheaSL4eeBdMYUr9OnHigc28R0 yCn8sfLHfByYxgHpSHTaG7crN7ZZ859VQBiAdZyLLjcZQu4Wwh9WbBOKm3IWdQv+/oxo hlIg== X-Gm-Message-State: AOAM530W3E1R06SfPMGmcQjDMPsQ8erbFvXEX7iP9LnMgFWE3qx0A04/ kvC1L9HzlF0IHjPswpSd2TtXzshP X-Google-Smtp-Source: ABdhPJxvw0EHmGbcXG0a5xfXw99arc+LHaawxPFKBvYUbM+0EREW7OHrqtONxQGmZsoAgunStqNaRQ== X-Received: by 2002:a17:902:d346:b029:e4:c35b:dc0a with SMTP id l6-20020a170902d346b02900e4c35bdc0amr27198717plk.75.1616421741535; Mon, 22 Mar 2021 07:02:21 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:6256:: with SMTP id q22ls4470194pgv.2.gmail; Mon, 22 Mar 2021 07:02:21 -0700 (PDT) X-Received: by 2002:a62:82cb:0:b029:1f6:213b:6590 with SMTP id w194-20020a6282cb0000b02901f6213b6590mr36259pfd.17.1616421740871; Mon, 22 Mar 2021 07:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616421740; cv=none; d=google.com; s=arc-20160816; b=pnkjSqhYhAiTkUBOGHl8T97H72GUDMaHtK9TFFOyYJW9jBPyv1bkjPum/FgerV1ncD hiE2pDgysAJFKmQjpIuWKzI0dzGH07vfQZ8pmHVQJP9b+v3ZKJ+PPyotnBxV4czh2OSg Z7OMf08QaR2Rv4h36qzA22Y3Fens5x0w22OPu4dHzyg2gDaCnUZgBW++V1uDYIuMWnv1 ryUZDytlfLU3jB/TRgydn7NAqDrBFc4R+/WVDSwQpPKo/5EH6dyfrBW94MXGxcXUb+kV eWZT2Mhd0Fmqnn86DHe/QLj2YcRCYBIAFtNnvheVEpjSQM0JZ9tot1xFEoGHt4kHXrPM 3qvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=yFiw4jYyVPgKKK9i77Vkg4hTSWnNarff0aeFjf5I2bg=; b=OBZvhcZPdAEGrAxBSSLUDb0gpQbVB29daUllBaDm6WrXqPHvbpv14Iz8gWXG0g6/yf Rj0yRphZy+uv8OEbWKp1uTpAcedYo4ncGeRmwvpHROaS855BTEBz8JnZd0eahz/IhHJf fQKuiEa7B339qd1t9+zOs6qW+5YfCFuRd56ChET/6M82b6FFADRwyiSA8uh6avYiI1Ha fziYOfHq1HnTghvwO01fU/acnZ7XWNeaU4sUFBVNXjwW4pMRKE/MXVpeZVdXkzNKsQGb q80POVR+hl7KpHLIDNJmmFdREvQFx6k5SxI4yogQ2OTRaYrmW5E2IXTkU8QtNSPi9em1 C2EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FQnXW17j; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@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 t24sor7287695pjy.26.2021.03.22.07.02.20 for (Google Transport Security); Mon, 22 Mar 2021 07:02:20 -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: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 Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki 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-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FQnXW17j; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@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: , 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;