From patchwork Sun Jul 4 09:02:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 12357311 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=-18.2 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 EFA7EC07E9A for ; Sun, 4 Jul 2021 09:07:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C0FBA60241 for ; Sun, 4 Jul 2021 09:07:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0FBA60241 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aTIJ9OwqfhcpMw338OMCIpSHqEsyN00Jr6Iys1SYVe0=; b=G/D9yejoDT1eyX rZxKYOIlHT4ktR1FLgoJ8EUTciBoGWrhPN59u0Z9CRGuNTCujgxjcPC5RfbxgQVSZOPeda9m7uH7g P0NsPIEk9sftGHzWhfTKefdBw1OKeokj/vp+zD5J3sC+yhkmVPLUnBuoF2agIgJ3d7en1WvOXvjDr yGzxJpG2zRU87FEL9TMICFAHlEswwnspEYORy2hdg4hLe/lQk4oPDjcl1tX1kO0y2G+5Gh4xovuVw vPXFzmx6TYIWKGwHLMQun6s8aRSa7REdsu0DgG1sAijViY9OJK2Nwfp687CtTyXIyDAQM5RqRkKp/ /08XQyXpxw5mC+wK9T7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzy37-0060eT-MQ; Sun, 04 Jul 2021 09:04:25 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzy2y-0060cy-8T for linux-arm-kernel@lists.infradead.org; Sun, 04 Jul 2021 09:04:17 +0000 Received: by mail-pg1-x52b.google.com with SMTP id y17so15026292pgf.12 for ; Sun, 04 Jul 2021 02:04:15 -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=ULOrrFdhV/JTWgnzBXDJOCdsNgP87Dvucp1qYGDm5tE=; b=mVez0iKrR8JkDZCsuuGyPUIeJfGRmnxaLG48W8d3iMV2JtJ75Sit1vKpGLre6AYJMX +xi/XL2hfIAHmw9N/c9n4jfSgE5UB1G4S+k9vYY7sh0Zdo/LPYSTL16rkcLHDo8Sy1Nj 3pjYB0B3O8/s0bH08IAFNcb2iMShNT6pPVrwE= 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=ULOrrFdhV/JTWgnzBXDJOCdsNgP87Dvucp1qYGDm5tE=; b=j2uNT0+LNVpxU0HrxjyCfoAQ2Ivtg2E26L53f1XkFka+wl3QYvW79pFJ+PiffZ3uJF kmhsQKn5yqkowGyjx0l2A8ZgtHftSnKZfRT7XS4FblOB2OCaZLYJ0OmvPL3SGWZNiMvP s1wD4iAGlU2UGZclvvWz2ODsopUefptIiDFPGp1UAfknu9QxioVNXnITLWelGmOAjgzv SdQuD3KyLpS42AB2z8s2c7hF30cm9Ly/452ODkce6MKilFWpTnqvl27W2JmEhVuUDHPr Ls53YoZnFgpiLHlM20KwGqTsdQnlgn5w+KqJw74zBQFSrvCp4CILzADTuBtRsqz2UXqy mqSg== X-Gm-Message-State: AOAM5302eILH17z1GQkR8ylstwiNVNCLepZjW5AUDgGh2nS8WIJGbHx2 W6Jo0UyI4SxEHFwP+gm6ROY+FA== X-Google-Smtp-Source: ABdhPJw2Aj31gRqGFn/A6dWgX//TnNexKTHNHi9LK+Y07kgH9PAhz1sT2jvQ/AGUmlJHXDM9lT0+iQ== X-Received: by 2002:a63:f44e:: with SMTP id p14mr9404229pgk.143.1625389455525; Sun, 04 Jul 2021 02:04:15 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a884:1ae9:772f:6f0f:3e24]) by smtp.gmail.com with ESMTPSA id m24sm3360793pgd.60.2021.07.04.02.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 02:04:15 -0700 (PDT) From: Jagan Teki To: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Frieder Schrempf , Daniel Vetter , Marek Vasut , Krzysztof Kozlowski , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [RFC PATCH 01/17] drm/exynos: dsi: Convert to bridge driver Date: Sun, 4 Jul 2021 14:32:14 +0530 Message-Id: <20210704090230.26489-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210704090230.26489-1-jagan@amarulasolutions.com> References: <20210704090230.26489-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210704_020416_343839_15A9AEDC X-CRM114-Status: GOOD ( 21.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DRM bridge drivers have built-in handling of treating all display pipeline components as bridges. Convert exynos_drm_dsi to a bridge driver with built-in encoder support for compatibility with existing component drivers. This keeps switching the driver into the bridge in a more feasible manner. Signed-off-by: Jagan Teki --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 57 +++++++++++++++++-------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 1d777d8c1a83..90d2ce2c3055 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -257,6 +257,7 @@ struct exynos_dsi { struct drm_connector connector; struct drm_panel *panel; struct list_head bridge_chain; + struct drm_bridge bridge; struct drm_bridge *out_bridge; struct device *dev; @@ -287,9 +288,9 @@ struct exynos_dsi { #define host_to_dsi(host) container_of(host, struct exynos_dsi, dsi_host) #define connector_to_dsi(c) container_of(c, struct exynos_dsi, connector) -static inline struct exynos_dsi *encoder_to_dsi(struct drm_encoder *e) +static inline struct exynos_dsi *bridge_to_dsi(struct drm_bridge *b) { - return container_of(e, struct exynos_dsi, encoder); + return container_of(b, struct exynos_dsi, bridge); } enum reg_idx { @@ -1374,9 +1375,9 @@ static void exynos_dsi_unregister_te_irq(struct exynos_dsi *dsi) } } -static void exynos_dsi_enable(struct drm_encoder *encoder) +static void exynos_dsi_bridge_enable(struct drm_bridge *bridge) { - struct exynos_dsi *dsi = encoder_to_dsi(encoder); + struct exynos_dsi *dsi = bridge_to_dsi(bridge); struct drm_bridge *iter; int ret; @@ -1429,9 +1430,9 @@ static void exynos_dsi_enable(struct drm_encoder *encoder) pm_runtime_put(dsi->dev); } -static void exynos_dsi_disable(struct drm_encoder *encoder) +static void exynos_dsi_bridge_disable(struct drm_bridge *bridge) { - struct exynos_dsi *dsi = encoder_to_dsi(encoder); + struct exynos_dsi *dsi = bridge_to_dsi(bridge); struct drm_bridge *iter; if (!(dsi->state & DSIM_STATE_ENABLED)) @@ -1494,9 +1495,9 @@ static const struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs .get_modes = exynos_dsi_get_modes, }; -static int exynos_dsi_create_connector(struct drm_encoder *encoder) +static int exynos_dsi_create_connector(struct exynos_dsi *dsi) { - struct exynos_dsi *dsi = encoder_to_dsi(encoder); + struct drm_encoder *encoder = &dsi->encoder; struct drm_connector *connector = &dsi->connector; struct drm_device *drm = encoder->dev; int ret; @@ -1522,9 +1523,16 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder) return 0; } -static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = { - .enable = exynos_dsi_enable, - .disable = exynos_dsi_disable, +static int exynos_dsi_bridge_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) +{ + return 0; +} + +static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = { + .enable = exynos_dsi_bridge_enable, + .disable = exynos_dsi_bridge_disable, + .attach = exynos_dsi_bridge_attach, }; MODULE_DEVICE_TABLE(of, exynos_dsi_of_match); @@ -1543,7 +1551,7 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, dsi->out_bridge = out_bridge; list_splice_init(&encoder->bridge_chain, &dsi->bridge_chain); } else { - int ret = exynos_dsi_create_connector(encoder); + int ret = exynos_dsi_create_connector(dsi); if (ret) { DRM_DEV_ERROR(dsi->dev, @@ -1596,7 +1604,7 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host, if (dsi->panel) { mutex_lock(&drm->mode_config.mutex); - exynos_dsi_disable(&dsi->encoder); + exynos_dsi_bridge_disable(&dsi->bridge); dsi->panel = NULL; dsi->connector.status = connector_status_disconnected; mutex_unlock(&drm->mode_config.mutex); @@ -1702,12 +1710,16 @@ static int exynos_dsi_bind(struct device *dev, struct device *master, drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS); - drm_encoder_helper_add(encoder, &exynos_dsi_encoder_helper_funcs); - ret = exynos_drm_set_possible_crtcs(encoder, EXYNOS_DISPLAY_TYPE_LCD); if (ret < 0) return ret; + ret = drm_bridge_attach(&dsi->encoder, &dsi->bridge, NULL, 0); + if (ret) { + drm_encoder_cleanup(&dsi->encoder); + return ret; + } + in_bridge_node = of_graph_get_remote_node(dev->of_node, DSI_PORT_IN, 0); if (in_bridge_node) { in_bridge = of_drm_find_bridge(in_bridge_node); @@ -1723,10 +1735,9 @@ static void exynos_dsi_unbind(struct device *dev, struct device *master, void *data) { struct exynos_dsi *dsi = dev_get_drvdata(dev); - struct drm_encoder *encoder = &dsi->encoder; - - exynos_dsi_disable(encoder); + exynos_dsi_bridge_disable(&dsi->bridge); + drm_encoder_cleanup(&dsi->encoder); mipi_dsi_host_unregister(&dsi->dsi_host); } @@ -1821,6 +1832,12 @@ static int exynos_dsi_probe(struct platform_device *pdev) pm_runtime_enable(dev); + dsi->bridge.funcs = &exynos_dsi_bridge_funcs; + dsi->bridge.of_node = dev->of_node; + dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; + + drm_bridge_add(&dsi->bridge); + ret = component_add(dev, &exynos_dsi_component_ops); if (ret) goto err_disable_runtime; @@ -1835,6 +1852,10 @@ static int exynos_dsi_probe(struct platform_device *pdev) static int exynos_dsi_remove(struct platform_device *pdev) { + struct exynos_dsi *dsi = platform_get_drvdata(pdev); + + drm_bridge_remove(&dsi->bridge); + pm_runtime_disable(&pdev->dev); component_del(&pdev->dev, &exynos_dsi_component_ops); From patchwork Sun Jul 4 09:02:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 12357313 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=-18.2 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 26ADBC07E95 for ; Sun, 4 Jul 2021 09:07:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E695D60241 for ; Sun, 4 Jul 2021 09:07:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E695D60241 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PAoJWiNrGNNfJMBMgEU5stTOOfGmE/x4CarHRyG9l2g=; b=M+sA+TitFEQV86 1OlvZ78FrK/qudlf3t32eSm26yTjoh/nEb8MwiTq61OsUh1oacFuBqhH3m4/byyQsD9+p164zn27J ZkIgsgBoMf5sXBS2effM3Rk/LH77EZSmQodtelSndZa5sAVsxNtaNC0uSazhZBVtUznXFrDNmPSoe NvJG5njorFr6GAfMrhQ5Iy5V5gNU71N1Mh8f5cPVXwi0qTSISA38+eCunI8Sju0zKVGGhyOBOAkol SCKe2BICdcsmDGEkX0+i66fZfOkWpu4aDZznm7W019DPfVUzRL08q2fST1pNnT9Y2VLb/m6dTIjxH Z/YHhOgDHmCjvKKt3ldA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzy3H-0060gL-Lq; Sun, 04 Jul 2021 09:04:35 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzy34-0060dy-Sf for linux-arm-kernel@lists.infradead.org; Sun, 04 Jul 2021 09:04:24 +0000 Received: by mail-pj1-x102a.google.com with SMTP id b8-20020a17090a4888b02901725eedd346so6544328pjh.4 for ; Sun, 04 Jul 2021 02:04:22 -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=pHZlmXfHQZBPoJbCqWFCiDNyc3ufmjpnvtmCga+L6Lg=; b=HdKfCR+M9d8PAb5qcM+B5/p30gYnobuh3hmVKGu66n+5Te/7kFF+1lP4+iNzezvBXj nQLuibZhWBa3njTRNVsRtL/8/fY5PVM4ZuxYwmuzeR4cd+7FStR+b9aXLsAGzUMvPdPU AdrdVMUiQlcbBkZfQmjM1C5jKQ8kZESByQsjI= 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=pHZlmXfHQZBPoJbCqWFCiDNyc3ufmjpnvtmCga+L6Lg=; b=PFUopTkuzU2VHaYsB8UwMAg4y/Tet1CEIF5H/MfeucHEgIwDPheeQsExEYoCZ78IlO EQ7+AoieRslqK/7FogkAMrut10tDM/Oykmqa96lXgu5FBIN+QejEJDNpxf32RqPYZNc+ cJYbRz4hrPXxj2fNDfcQi9kbQSl97AA6UWqULxv2WAfRSiXJglpJ2+d+tnEyD4i7IMPu K9UZYT9arg1xWZZjih+v8Y3QDDzoF6mnLNT7HvTL11QUxMcRylcW50k5x4J2V9kaOQFa PqNdffyf2zIzIPUnQp1ayd5UqxnQsegHsiJMujm/k7PAt+DTyZoo+oZm0DIJhmv0SFRk sA5g== X-Gm-Message-State: AOAM531QnXxYUGOEzhYJ43Zakm5IkHqDwsdMLq52jFw3N82UW5WPgAbV nfih3BqliJnv+oMJgjbbc6nscw== X-Google-Smtp-Source: ABdhPJxISoBSmwp9LoTH6IvRjyAvOsFcHPaz0y+FHrOnPHhyh4+PNywwGDOghPqT55xz0PLyiOXSPg== X-Received: by 2002:a17:903:22c4:b029:129:8878:f872 with SMTP id y4-20020a17090322c4b02901298878f872mr132297plg.74.1625389462131; Sun, 04 Jul 2021 02:04:22 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a884:1ae9:772f:6f0f:3e24]) by smtp.gmail.com with ESMTPSA id m24sm3360793pgd.60.2021.07.04.02.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 02:04:21 -0700 (PDT) From: Jagan Teki To: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Frieder Schrempf , Daniel Vetter , Marek Vasut , Krzysztof Kozlowski , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [RFC PATCH 02/17] drm/exynos: dsi: Handle drm_device for bridge Date: Sun, 4 Jul 2021 14:32:15 +0530 Message-Id: <20210704090230.26489-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210704090230.26489-1-jagan@amarulasolutions.com> References: <20210704090230.26489-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210704_020422_964988_35314305 X-CRM114-Status: GOOD ( 18.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now the exynos dsi driver supports bridge and legacy encoder. In order to support drm_device in both the implementations it is required to preserve the drm_device in a private structure and use it accordingly. 1. encoder case, the bind will assign the drm_device into encoder->dev, so preserve the drm_device in the bind call. 2. bridge case, the drm_bridge_attach will assign the drm_device into bridge->dev, so preserve the drm_device in the bridge_attach function call. Signed-off-by: Jagan Teki Acked-by: Sam Ravnborg --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 90d2ce2c3055..d7d60aee465b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -259,6 +259,7 @@ struct exynos_dsi { struct list_head bridge_chain; struct drm_bridge bridge; struct drm_bridge *out_bridge; + struct drm_device *drm; struct device *dev; void __iomem *reg_base; @@ -1495,11 +1496,11 @@ static const struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs .get_modes = exynos_dsi_get_modes, }; -static int exynos_dsi_create_connector(struct exynos_dsi *dsi) +static int exynos_dsi_create_connector(struct exynos_dsi *dsi, + struct drm_device *drm) { struct drm_encoder *encoder = &dsi->encoder; struct drm_connector *connector = &dsi->connector; - struct drm_device *drm = encoder->dev; int ret; connector->polled = DRM_CONNECTOR_POLL_HPD; @@ -1526,6 +1527,10 @@ static int exynos_dsi_create_connector(struct exynos_dsi *dsi) static int exynos_dsi_bridge_attach(struct drm_bridge *bridge, enum drm_bridge_attach_flags flags) { + struct exynos_dsi *dsi = bridge_to_dsi(bridge); + + dsi->drm = bridge->dev; + return 0; } @@ -1542,7 +1547,7 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, { struct exynos_dsi *dsi = host_to_dsi(host); struct drm_encoder *encoder = &dsi->encoder; - struct drm_device *drm = encoder->dev; + struct drm_device *drm = dsi->drm; struct drm_bridge *out_bridge; out_bridge = of_drm_find_bridge(device->dev.of_node); @@ -1551,7 +1556,7 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, dsi->out_bridge = out_bridge; list_splice_init(&encoder->bridge_chain, &dsi->bridge_chain); } else { - int ret = exynos_dsi_create_connector(dsi); + int ret = exynos_dsi_create_connector(dsi, drm); if (ret) { DRM_DEV_ERROR(dsi->dev, @@ -1600,7 +1605,7 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host, struct mipi_dsi_device *device) { struct exynos_dsi *dsi = host_to_dsi(host); - struct drm_device *drm = dsi->encoder.dev; + struct drm_device *drm = dsi->drm; if (dsi->panel) { mutex_lock(&drm->mode_config.mutex); @@ -1728,6 +1733,8 @@ static int exynos_dsi_bind(struct device *dev, struct device *master, of_node_put(in_bridge_node); } + dsi->drm = drm_dev; + return mipi_dsi_host_register(&dsi->dsi_host); } From patchwork Sun Jul 4 09:02:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 12357387 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=-18.2 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 B17B4C07E95 for ; Sun, 4 Jul 2021 09:07:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 82149610CC for ; Sun, 4 Jul 2021 09:07:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82149610CC 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CpoHmqxZVjFG9V9fWKDv+19Yha6OmkrMpc+rtB0oyA8=; b=p2gHKFbbsSj9aY qCnfXnogF3wZ2vpA7L21LOiMt2tlh4x9ZVIc1rOFaNm9FhM2Fir0Ok8O3KzbvTcQChITjk+bBKKHC mLyOYpFvSYldeI9ASgHQIb0AI4MzSFvDtPjZNFOngITvlM+UW4pSsNZfkZJMi75ombw2QTiXeIvDb sxcJk+TmjVDa19/kNDrYX3W7APDTdmN0XbefPm8xkEEAf+Xfd64GDV9kdMdcisSnkdFjpQQw36Bfo atJM68MhB/XfYZo7sLjualruvioseVZyyZ0n9gPou1vfNXoHfJ6nEXmUcYafNX6qwXFZYvbiAn8pm 6ydmQP8X1MGaO5ZifsJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzy3R-0060iT-U5; Sun, 04 Jul 2021 09:04:46 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzy3B-0060fG-7Z for linux-arm-kernel@lists.infradead.org; Sun, 04 Jul 2021 09:04:31 +0000 Received: by mail-pl1-x62b.google.com with SMTP id s13so5331155plg.12 for ; Sun, 04 Jul 2021 02:04:28 -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=YYvjehx8GEd3VqeKDnJWcND/IGzW5rqaRSV1TBb6rec=; b=FpsLt0e/gEh/TsvI+PQqq8HHbShAeGPxizZN1+ZrblR37mi0TM659pulHef70Ns14S 8X6vyrvesg7AHKh9ZkUfZQLV+XDG+dM/yFMJEMsjOLyxGmNfyi0qiWcJgiLXNfkY89It 8TjMAPrpk1Rhy9wwxEHf5x5z/iXdENX7zmQXE= 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=YYvjehx8GEd3VqeKDnJWcND/IGzW5rqaRSV1TBb6rec=; b=WqIDQZAFi/2UGyQb45APs9+6jPKd1ddpSbeI4sJLbtX3ih/hojGQxwxe/a+yKZknW2 mHkFkNGiwaTjax+N4wHUiXuqWsEkIUJ+nPCZwjCuDLpq+Qrr+COgyc0jutcIa2LOfN03 LOgy7JcewxIksjzd03Ba6alJg0ZtAcIHKFoRX6CFUyX6IEVICYsYsbRlnHbaNm4p8zdY 2BVngODJLojz08fUxRbVja5qkJPVrGl1j9mLu3a7GmP3RqSWLz/eHXacfzxb9pWVvA3B pPZIrvhTTKSPu1YVEIK91Yd5Vrw86b3l15U1KrPj9zWNGIYPzjKymG1rWz1mcU8CaOsx uS4g== X-Gm-Message-State: AOAM533A2h96PM7qdLhT4e8q6uUw8fR1Ff/w8WYSQPXtCZ0/znTrvKKA DLGekpGfUQ59ehn9fzEZj6Akiw== X-Google-Smtp-Source: ABdhPJyNCzxsA9x9Vp0nNEO5H/xrDOauiajqjc3ZOIcheU67qLC4rDoFfVlAWPvVqLulg93qjiTGfg== X-Received: by 2002:a17:90a:7843:: with SMTP id y3mr8584990pjl.190.1625389468533; Sun, 04 Jul 2021 02:04:28 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a884:1ae9:772f:6f0f:3e24]) by smtp.gmail.com with ESMTPSA id m24sm3360793pgd.60.2021.07.04.02.04.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 02:04:28 -0700 (PDT) From: Jagan Teki To: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Frieder Schrempf , Daniel Vetter , Marek Vasut , Krzysztof Kozlowski , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [RFC PATCH 03/17] drm/exynos: dsi: Use the drm_panel_bridge API Date: Sun, 4 Jul 2021 14:32:16 +0530 Message-Id: <20210704090230.26489-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210704090230.26489-1-jagan@amarulasolutions.com> References: <20210704090230.26489-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210704_020429_318089_6E875B9C X-CRM114-Status: GOOD ( 20.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use drm_panel_bridge to replace manual panel and bridge_chain handling code. This makes the driver simpler to allow all components in the display pipeline to be treated as bridges by cleaning the way to generic connector handling. Signed-off-by: Jagan Teki --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 167 ++++-------------------- 1 file changed, 23 insertions(+), 144 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index d7d60aee465b..24f0b082ac6d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -254,9 +254,6 @@ struct exynos_dsi_driver_data { struct exynos_dsi { struct drm_encoder encoder; struct mipi_dsi_host dsi_host; - struct drm_connector connector; - struct drm_panel *panel; - struct list_head bridge_chain; struct drm_bridge bridge; struct drm_bridge *out_bridge; struct drm_device *drm; @@ -287,7 +284,6 @@ struct exynos_dsi { }; #define host_to_dsi(host) container_of(host, struct exynos_dsi, dsi_host) -#define connector_to_dsi(c) container_of(c, struct exynos_dsi, connector) static inline struct exynos_dsi *bridge_to_dsi(struct drm_bridge *b) { @@ -1379,7 +1375,6 @@ static void exynos_dsi_unregister_te_irq(struct exynos_dsi *dsi) static void exynos_dsi_bridge_enable(struct drm_bridge *bridge) { struct exynos_dsi *dsi = bridge_to_dsi(bridge); - struct drm_bridge *iter; int ret; if (dsi->state & DSIM_STATE_ENABLED) @@ -1393,134 +1388,51 @@ static void exynos_dsi_bridge_enable(struct drm_bridge *bridge) dsi->state |= DSIM_STATE_ENABLED; - if (dsi->panel) { - ret = drm_panel_prepare(dsi->panel); - if (ret < 0) - goto err_put_sync; - } else { - list_for_each_entry_reverse(iter, &dsi->bridge_chain, - chain_node) { - if (iter->funcs->pre_enable) - iter->funcs->pre_enable(iter); - } - } - exynos_dsi_set_display_mode(dsi); exynos_dsi_set_display_enable(dsi, true); - if (dsi->panel) { - ret = drm_panel_enable(dsi->panel); - if (ret < 0) - goto err_display_disable; - } else { - list_for_each_entry(iter, &dsi->bridge_chain, chain_node) { - if (iter->funcs->enable) - iter->funcs->enable(iter); - } - } - dsi->state |= DSIM_STATE_VIDOUT_AVAILABLE; return; - -err_display_disable: - exynos_dsi_set_display_enable(dsi, false); - drm_panel_unprepare(dsi->panel); - -err_put_sync: - dsi->state &= ~DSIM_STATE_ENABLED; - pm_runtime_put(dsi->dev); } static void exynos_dsi_bridge_disable(struct drm_bridge *bridge) { struct exynos_dsi *dsi = bridge_to_dsi(bridge); - struct drm_bridge *iter; if (!(dsi->state & DSIM_STATE_ENABLED)) return; dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE; - drm_panel_disable(dsi->panel); - - list_for_each_entry_reverse(iter, &dsi->bridge_chain, chain_node) { - if (iter->funcs->disable) - iter->funcs->disable(iter); - } - exynos_dsi_set_display_enable(dsi, false); - drm_panel_unprepare(dsi->panel); - - list_for_each_entry(iter, &dsi->bridge_chain, chain_node) { - if (iter->funcs->post_disable) - iter->funcs->post_disable(iter); - } dsi->state &= ~DSIM_STATE_ENABLED; pm_runtime_put_sync(dsi->dev); } -static enum drm_connector_status -exynos_dsi_detect(struct drm_connector *connector, bool force) -{ - return connector->status; -} - -static void exynos_dsi_connector_destroy(struct drm_connector *connector) +static int exynos_dsi_panel_or_bridge(struct exynos_dsi *dsi, + struct device_node *node) { - drm_connector_unregister(connector); - drm_connector_cleanup(connector); - connector->dev = NULL; -} - -static const struct drm_connector_funcs exynos_dsi_connector_funcs = { - .detect = exynos_dsi_detect, - .fill_modes = drm_helper_probe_single_connector_modes, - .destroy = exynos_dsi_connector_destroy, - .reset = drm_atomic_helper_connector_reset, - .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, - .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, -}; - -static int exynos_dsi_get_modes(struct drm_connector *connector) -{ - struct exynos_dsi *dsi = connector_to_dsi(connector); - - if (dsi->panel) - return drm_panel_get_modes(dsi->panel, connector); - - return 0; -} + struct drm_bridge *panel_bridge; + struct drm_panel *panel; -static const struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs = { - .get_modes = exynos_dsi_get_modes, -}; + panel_bridge = of_drm_find_bridge(node); + if (!panel_bridge) { + panel = of_drm_find_panel(node); + if (!IS_ERR(panel)) { + panel_bridge = drm_panel_bridge_add(panel); + if (IS_ERR(panel_bridge)) + return PTR_ERR(panel_bridge); + } + } -static int exynos_dsi_create_connector(struct exynos_dsi *dsi, - struct drm_device *drm) -{ - struct drm_encoder *encoder = &dsi->encoder; - struct drm_connector *connector = &dsi->connector; - int ret; + of_node_put(node); - connector->polled = DRM_CONNECTOR_POLL_HPD; + dsi->out_bridge = panel_bridge; - ret = drm_connector_init(drm, connector, &exynos_dsi_connector_funcs, - DRM_MODE_CONNECTOR_DSI); - if (ret) { - DRM_DEV_ERROR(dsi->dev, - "Failed to initialize connector with drm\n"); - return ret; - } + if (!dsi->out_bridge) + return -EPROBE_DEFER; - connector->status = connector_status_disconnected; - drm_connector_helper_add(connector, &exynos_dsi_connector_helper_funcs); - drm_connector_attach_encoder(connector, encoder); - if (!drm->registered) - return 0; - - connector->funcs->reset(connector); - drm_connector_register(connector); return 0; } @@ -1531,7 +1443,8 @@ static int exynos_dsi_bridge_attach(struct drm_bridge *bridge, dsi->drm = bridge->dev; - return 0; + return drm_bridge_attach(bridge->encoder, dsi->out_bridge, bridge, + flags); } static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = { @@ -1546,32 +1459,12 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, struct mipi_dsi_device *device) { struct exynos_dsi *dsi = host_to_dsi(host); - struct drm_encoder *encoder = &dsi->encoder; struct drm_device *drm = dsi->drm; - struct drm_bridge *out_bridge; - - out_bridge = of_drm_find_bridge(device->dev.of_node); - if (out_bridge) { - drm_bridge_attach(encoder, out_bridge, NULL, 0); - dsi->out_bridge = out_bridge; - list_splice_init(&encoder->bridge_chain, &dsi->bridge_chain); - } else { - int ret = exynos_dsi_create_connector(dsi, drm); - - if (ret) { - DRM_DEV_ERROR(dsi->dev, - "failed to create connector ret = %d\n", - ret); - drm_encoder_cleanup(encoder); - return ret; - } + int ret; - dsi->panel = of_drm_find_panel(device->dev.of_node); - if (IS_ERR(dsi->panel)) - dsi->panel = NULL; - else - dsi->connector.status = connector_status_connected; - } + ret = exynos_dsi_panel_or_bridge(dsi, device->dev.of_node); + if (ret) + return ret; /* * This is a temporary solution and should be made by more generic way. @@ -1607,19 +1500,6 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host, struct exynos_dsi *dsi = host_to_dsi(host); struct drm_device *drm = dsi->drm; - if (dsi->panel) { - mutex_lock(&drm->mode_config.mutex); - exynos_dsi_bridge_disable(&dsi->bridge); - dsi->panel = NULL; - dsi->connector.status = connector_status_disconnected; - mutex_unlock(&drm->mode_config.mutex); - } else { - if (dsi->out_bridge->funcs->detach) - dsi->out_bridge->funcs->detach(dsi->out_bridge); - dsi->out_bridge = NULL; - INIT_LIST_HEAD(&dsi->bridge_chain); - } - if (drm->mode_config.poll_enabled) drm_kms_helper_hotplug_event(drm); @@ -1770,7 +1650,6 @@ static int exynos_dsi_probe(struct platform_device *pdev) init_completion(&dsi->completed); spin_lock_init(&dsi->transfer_lock); INIT_LIST_HEAD(&dsi->transfer_list); - INIT_LIST_HEAD(&dsi->bridge_chain); dsi->dsi_host.ops = &exynos_dsi_ops; dsi->dsi_host.dev = dev; From patchwork Sun Jul 4 09:02:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 12357393 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=-18.2 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 989F7C07E96 for ; Sun, 4 Jul 2021 09:08:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 6B907610CC for ; Sun, 4 Jul 2021 09:08:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B907610CC 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dzabmM+xsV/XLba+bdhDi1JeFqWE2ytvwYLHJD6nzis=; b=yJ9rCFgXtRhumX GlAUVR3GRHTmt0bRgdq/mUBnC2CZw9LUiibv5FcmOXxvBlEXkD0gwCZMsTkDjDuqFUyouuchrkg3k ubc33HNdZ1k6zGKjLWGqOIDWL4cl2qiMbZGJCbKyVH4obmhyEtFsofz/lH8Od8yWefH+aHm4x+KWp lRr8AfXA48TSmS/Py+cdlMls/3VqxGzKxFVWkT3YcpJrfUTIAcu8smZN0WOjjxXp9AhXbY5WNhKaE YfW6WGDSbct8O/0McYEKPkkGrfFiuWiHqxfykFZ0RLk6/cTgtRW/qciQJMFLo+t5Psxbfx7LIvFH3 uUc19We13DwYePSeYLDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzy3h-0060m2-8E; Sun, 04 Jul 2021 09:05:01 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzy3H-0060gP-9P for linux-arm-kernel@lists.infradead.org; Sun, 04 Jul 2021 09:04:36 +0000 Received: by mail-pg1-x52e.google.com with SMTP id m26so15035485pgb.8 for ; Sun, 04 Jul 2021 02:04:35 -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=y9Aly6nJLJSN3b2bUvikDgpkvqF9hImc8XWMkPBqpXI=; b=TdmLonvKL3YQ4lTciPW2d5BOkfnDv1G7HGporYX1pWNlZ1aGEL+Eq8M7tmO8uBv+mf S7ULb87R3+34zvp3osimpLFs7hdpiemCCUQQLsKO4xiLBT2mPUks1MQ/LMUKarkFnES2 I24uenpZy8PqVrpzNQlkvafBaBR5l0ByYLzRE= 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=y9Aly6nJLJSN3b2bUvikDgpkvqF9hImc8XWMkPBqpXI=; b=XFbM7bJ62MBaYm1rCR6ORGn40XE3tBpoURkmRqa69rNr4evN62N5ZDawFEgm8YW7FV tWb4ByATtRliesVMTufxnCkrlzll3ySWUgieZp4OP3mN5pGsOrQGT9rGS2sfss7j8VmP 4/5X9FqWekdzGYDU+a8EDuDorOsoXoa7mnwdcOWbI1c7XNRUrm7S+Bo1W82fTJlq8Ssl u0UuZUWZvu2jha8u3g6CU8cRI8wYV5AZWtuox1cAj3iP5YkLCZEh78JsjoCb/QVS1R6o Ak3tmqjZuktYK9KCP3i1Tzw7aboy/RpSe5KRdNTUwYkZnatPqmPqXewhBxwWYxMqT43b ulIA== X-Gm-Message-State: AOAM531uG2YXCH1teSUg2ltamtRFqpOz9Y/Av01oCwLPAj7mtehBGBrq xk85qRZv1iJqtE2pNSy/icf/1w== X-Google-Smtp-Source: ABdhPJweFhSs5QChPSwb0B5wADBPo78G77JyeMZ39XaIlV7lSuuZY45FOdIQsUxegraD1I9JmgaImQ== X-Received: by 2002:aa7:8003:0:b029:2eb:2f8f:a320 with SMTP id j3-20020aa780030000b02902eb2f8fa320mr9221995pfi.70.1625389474612; Sun, 04 Jul 2021 02:04:34 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a884:1ae9:772f:6f0f:3e24]) by smtp.gmail.com with ESMTPSA id m24sm3360793pgd.60.2021.07.04.02.04.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 02:04:34 -0700 (PDT) From: Jagan Teki To: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Frieder Schrempf , Daniel Vetter , Marek Vasut , Krzysztof Kozlowski , Fabio Estevam Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [RFC PATCH 04/17] drm/exynos: dsi: Create bridge connector for encoder Date: Sun, 4 Jul 2021 14:32:17 +0530 Message-Id: <20210704090230.26489-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210704090230.26489-1-jagan@amarulasolutions.com> References: <20210704090230.26489-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210704_020435_370341_803876C8 X-CRM114-Status: GOOD ( 16.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use drm_bridge_connector_init to create a connector for display pipelines that use drm_bridge for encoder implementation. This allows splitting connector operations across multiple bridges when necessary, instead of having the last bridge in the chain creating the connector and handling all connector operations internally. Signed-off-by: Jagan Teki --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 24f0b082ac6d..d828be07c325 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -24,6 +24,7 @@ #include