From patchwork Fri Jul 31 08:18:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 11694409 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A111912 for ; Fri, 31 Jul 2020 08:21:46 +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 CA4CF2072A for ; Fri, 31 Jul 2020 08:21:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mJEMbfoo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="DkKC+mPv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA4CF2072A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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=vYJZXJOJ88Ury162kNI4I/a7PsQIpNayMQr+opJdmaA=; b=mJEMbfooyWhG4E7K5HE33GXVN zajG/qh35krdRP4CjLHLbW6dxZVhjXyeGDvVwTzz3DuGwE5UoR7S1Y9nGrjEnWVoKnEaovUkK+BLJ m1vI44XbzbO79ttD4VdA7IhavefMmsdCCKt7P3O8WBC8TyZNFxoFMKBjJLo/08cj3P01LRQq0tvLe 0CUBoUucmnmSP08/XWFj4CQW7XRJcgm4aTcXgvBut4i6fjniUaTZlsmTcuA1c1U/tOduA3hCaX92Z LVxk8juZmBIM+JBEmFuh7WaP6A9Huu8IcLu/fybWnIJh8IiwneHVVsa78gKyUrQbcJn2WK9xTYfDh O1Qk5kpkQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1QGT-00028t-PT; Fri, 31 Jul 2020 08:19:41 +0000 Received: from mail-eopbgr70052.outbound.protection.outlook.com ([40.107.7.52] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1QGG-000220-6C for linux-arm-kernel@lists.infradead.org; Fri, 31 Jul 2020 08:19:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YctHcxbiEYpfk0yY9HrNzMu9G5bPbQJh2O9xmeGIYwksvb0OPrvXkL4LW8v6aiTK4/nNi0uI5JvX/3aMyGHwupIPTs1x+KY7EpkN8evOE6h694qpwyeX0xI52duMEe5hEUbK1ByTnwBeZ69rIvokQaWCBBzlA5oQscD+OEZz54cvjlDzumxMxVmQaUmfwj6UXsLWl+rLrQdeZHN18ePDLDDKHH3dc5deR0P+QDGs7RUYNTUc2mF03CBDRTtgtTKM4eV3ix6oT6icNKES64CxFA4TmbqoTJKK+sb+XD4c64vME3Hg0FNyPyfp3KjMuwcgkdo1dFqvcSAz8rrIFi5qug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ie3hh13KyuwBTpdWRYIN0u7tCJuqDhobhjFHp+yRONs=; b=ZMYften1et+V5rRVatV1RTsIeJ0TI1fPtSKBJkV/krfjMemoxPUMsk6rWdryTcrF+EMjemG+Z5JydT0UwmOK8JO938m1kNHMmjHslX3oDJVRjpj2B2PleUyj2ojwUrdVA1n50nCvkRM+EWgPI5022wmwqWcyXff82kLlachutOT+mkIQTkYxrjnKDvqUzpSUtCCZnOJCr4IIpqZFDEml86LucDaxm+x5a4Y2R36MXliRnv47yt7LXtYlnieiXon9mZTMZfn1rUBfIF0fjfkCs0oMT4ykyY1myFny6jgWtV5p5JyiWAuWHlXZK3XySkpwVUabAwp9gjkcYcjiodQg4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ie3hh13KyuwBTpdWRYIN0u7tCJuqDhobhjFHp+yRONs=; b=DkKC+mPvFJT/N4lG+JSQrXRZG5oQj+291ShKx1CEa7cjXJe3+I7E4mpXqXB2u7pZGuHOyMD/Ju3GBqihqXHjw1JoNQ5GuTHo24fn0uWfV7gb850P2ujqD6g1fCwbJIWag8bPztp9+eIhAOzTrnnusaoZkw+6GOsb/qiWpTavuPo= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) by VI1PR04MB3024.eurprd04.prod.outlook.com (2603:10a6:802:d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16; Fri, 31 Jul 2020 08:19:18 +0000 Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::5c87:6dce:840d:d4c8]) by VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::5c87:6dce:840d:d4c8%7]) with mapi id 15.20.3216.034; Fri, 31 Jul 2020 08:19:18 +0000 From: Laurentiu Palcu To: Lucas Stach , Philipp Zabel , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH v9 3/5] drm/imx/dcss: use drm_bridge_connector API Date: Fri, 31 Jul 2020 11:18:31 +0300 Message-Id: <20200731081836.3048-4-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200731081836.3048-1-laurentiu.palcu@oss.nxp.com> References: <20200731081836.3048-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AM0PR06CA0141.eurprd06.prod.outlook.com (2603:10a6:208:ab::46) To VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fsr-ub1864-141.ea.freescale.net (83.217.231.2) by AM0PR06CA0141.eurprd06.prod.outlook.com (2603:10a6:208:ab::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.18 via Frontend Transport; Fri, 31 Jul 2020 08:19:16 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [83.217.231.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d8f95a20-8de3-4bd1-f3d2-08d8352a6b5b X-MS-TrafficTypeDiagnostic: VI1PR04MB3024: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:357; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EqAfFGiKV8z3FlcPYNgS5moUX0UVrnlxRdPVHAPDw/3tXESR2sV+BVwno+xgXy1LQMMcGQqzLxR+PUQWn3612JWjqV1OsoF3I2KvGP7j0J5tHfJUd4GQS6aWLVcInsSbVyHISVEQj7ov04xxEz0YvqqZYVGMDqhCHe7aqmVfJmN6UaJcmDuMadYPD2DXBsDIpfOYYI6yaLmqNnA4ZOMoqy7pVrfjItIBt0tOolqD1gKuPfwdK7pzhKCzKKOORvxu6iayymsJqlKFSZw7tEWUcKnu6wUoT4Ydj6AqfL+Ua8wsqqLqDc+wKXhfch6C71i/XeK28WU8/q/mylFJKq84sA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3902.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(136003)(376002)(366004)(396003)(346002)(44832011)(956004)(2616005)(5660300002)(66476007)(6666004)(1076003)(66946007)(66556008)(316002)(110136005)(2906002)(186003)(26005)(16526019)(6506007)(52116002)(83380400001)(4326008)(8676002)(6512007)(7416002)(86362001)(6486002)(478600001)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: yB2Nod6Ti31Ry33rzAjHbs4GY9rWKFUHz26HBmpkWz2GLWPwVGH0m8d+BzqYkLaYNeoRI3h266shVicwKCQxdahXHZEYjxnr6CTncXvD3CFRDdA+77w8IyjVPpkww2+BYYjpBXSmt1/HbGClEx2TaBrNksHW29VSfRht1xiXdbF9mOFkmyxbklfp/wnm68jkamAE7lHdynBXO4HTtA8CMAligP2a4Umivm81R434cECYvgUQ/4pmg2kV1fsVvvvLRzbT2ibtcjKJ3FgXzdliKbLddzowWr+ecyFxtLfDkWpCORLmo6LsGXSEHS9TBLiuNZCArOdc1KXrbQgTFgDyY0sDBaYLYQAzSibt1as1YAgaw06nxKA2ewUsSHtwiKGJnd+c00SHgqJ2PqguIGV1ytIno3HuogSJfRbnc/Gu0md1GZgUaKA5csBxVRoCny3DTzv64QuES4JlSUYNB6d/QoVHnDJNWW60lkVE+lrNcrOUNR/DkuYlj5nq0cRJZDo48QamkKcEHJyD2OQM/gjLan6TQXmcdX3s5FBZHuEAHs7ViQsYxnSBdPPnEOib5USBO4qAK+8Sqa+bcdhuJu9E35g1Fv8t+CKWtrbfivrBG/+On8UKc14ZL5v2UOsdExleiFlb4yA6GnZigZopviE1EQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8f95a20-8de3-4bd1-f3d2-08d8352a6b5b X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3902.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2020 08:19:18.0751 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZgviPg5zbmDImMCR2xDgkzzmtlE3uXCYirsWytDjFhgZk1ctnw1LqUHR4OPX3B81aDJqGhmtHFMdU5Vq69hxYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3024 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200731_041928_309463_5AD45E05 X-CRM114-Status: GOOD ( 21.77 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.7.52 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.7.52 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay 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: agx@sigxcpu.org, lukas@mntmn.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, laurentiu.palcu@oss.nxp.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Laurentiu Palcu Make use of drm_bridge_connector API to have the connector initialized by the display controller. Signed-off-by: Laurentiu Palcu --- drivers/gpu/drm/imx/dcss/dcss-dev.c | 17 +++++++++++++--- drivers/gpu/drm/imx/dcss/dcss-kms.c | 31 ++++++++++++++++++++++++----- drivers/gpu/drm/imx/dcss/dcss-kms.h | 1 + 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c index 83a4840435cf..c849533ca83e 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-dev.c +++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c @@ -8,9 +8,12 @@ #include #include #include +#include +#include #include #include "dcss-dev.h" +#include "dcss-kms.h" static void dcss_clocks_enable(struct dcss_dev *dcss) { @@ -247,9 +250,13 @@ void dcss_dev_destroy(struct dcss_dev *dcss) int dcss_dev_suspend(struct device *dev) { struct dcss_dev *dcss = dcss_drv_dev_to_dcss(dev); + struct drm_device *ddev = dcss_drv_dev_to_drm(dev); + struct dcss_kms_dev *kms = container_of(ddev, struct dcss_kms_dev, base); int ret; - drm_mode_config_helper_suspend(dcss_drv_dev_to_drm(dev)); + drm_bridge_connector_disable_hpd(kms->connector); + + drm_mode_config_helper_suspend(ddev); if (pm_runtime_suspended(dev)) return 0; @@ -266,9 +273,11 @@ int dcss_dev_suspend(struct device *dev) int dcss_dev_resume(struct device *dev) { struct dcss_dev *dcss = dcss_drv_dev_to_dcss(dev); + struct drm_device *ddev = dcss_drv_dev_to_drm(dev); + struct dcss_kms_dev *kms = container_of(ddev, struct dcss_kms_dev, base); if (pm_runtime_suspended(dev)) { - drm_mode_config_helper_resume(dcss_drv_dev_to_drm(dev)); + drm_mode_config_helper_resume(ddev); return 0; } @@ -278,7 +287,9 @@ int dcss_dev_resume(struct device *dev) dcss_ctxld_resume(dcss->ctxld); - drm_mode_config_helper_resume(dcss_drv_dev_to_drm(dev)); + drm_mode_config_helper_resume(ddev); + + drm_bridge_connector_enable_hpd(kms->connector); return 0; } diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c index 3ca49d0a3e61..135a62366ab8 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-kms.c +++ b/drivers/gpu/drm/imx/dcss/dcss-kms.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -74,7 +75,7 @@ static const struct drm_encoder_funcs dcss_kms_simple_encoder_funcs = { .destroy = drm_encoder_cleanup, }; -static int dcss_kms_setup_encoder(struct dcss_kms_dev *kms) +static int dcss_kms_bridge_connector_init(struct dcss_kms_dev *kms) { struct drm_device *ddev = &kms->base; struct drm_encoder *encoder = &kms->encoder; @@ -103,7 +104,23 @@ static int dcss_kms_setup_encoder(struct dcss_kms_dev *kms) return ret; } - return drm_bridge_attach(encoder, bridge, NULL, 0); + ret = drm_bridge_attach(encoder, bridge, NULL, + DRM_BRIDGE_ATTACH_NO_CONNECTOR); + if (ret < 0) { + dev_err(ddev->dev, "Unable to attach bridge %pOF\n", + bridge->of_node); + return ret; + } + + kms->connector = drm_bridge_connector_init(ddev, encoder); + if (IS_ERR(kms->connector)) { + dev_err(ddev->dev, "Unable to create bridge connector.\n"); + return PTR_ERR(kms->connector); + } + + drm_connector_attach_encoder(kms->connector, encoder); + + return 0; } struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss) @@ -131,18 +148,20 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss) drm->irq_enabled = true; - ret = dcss_crtc_init(crtc, drm); + ret = dcss_kms_bridge_connector_init(kms); if (ret) goto cleanup_mode_config; - ret = dcss_kms_setup_encoder(kms); + ret = dcss_crtc_init(crtc, drm); if (ret) - goto cleanup_crtc; + goto cleanup_mode_config; drm_mode_config_reset(drm); drm_kms_helper_poll_init(drm); + drm_bridge_connector_enable_hpd(kms->connector); + ret = drm_dev_register(drm, 0); if (ret) goto cleanup_crtc; @@ -152,6 +171,7 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss) return kms; cleanup_crtc: + drm_bridge_connector_disable_hpd(kms->connector); drm_kms_helper_poll_fini(drm); dcss_crtc_deinit(crtc, drm); @@ -167,6 +187,7 @@ void dcss_kms_detach(struct dcss_kms_dev *kms) struct drm_device *drm = &kms->base; drm_dev_unregister(drm); + drm_bridge_connector_disable_hpd(kms->connector); drm_kms_helper_poll_fini(drm); drm_atomic_helper_shutdown(drm); drm_crtc_vblank_off(&kms->crtc.base); diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.h b/drivers/gpu/drm/imx/dcss/dcss-kms.h index 1f51c86c6986..dfe5dd99eea3 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-kms.h +++ b/drivers/gpu/drm/imx/dcss/dcss-kms.h @@ -29,6 +29,7 @@ struct dcss_kms_dev { struct drm_device base; struct dcss_crtc crtc; struct drm_encoder encoder; + struct drm_connector *connector; }; struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss); From patchwork Fri Jul 31 08:18:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 11694397 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B7561575 for ; Fri, 31 Jul 2020 08:19:59 +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 6768F20829 for ; Fri, 31 Jul 2020 08:19:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="snzRMA61"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="c0WZ3Dkl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6768F20829 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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=WSsw2O5O1hFYnS0YUHItuo5ejDoQ/B8g/hiMhe84K1A=; b=snzRMA612ansfKikztG7/yNDG CtGLcX3ITf/i6245lMy5xs6KvcRjTpZRPuj9BVG1k7iW1UWJV1Kp0BcBpJe6OajLSVGpsq0C+rMDS +6M63PZnGMXF3f9IVfiHxIzP9juQfb03PZaozw9Fnh8oVtzuusSvhlsVczuP5jPdPR99G2XlBtD4T B8svq9hKPxNkKQF2bTVUFG6XIe4XoqVOIsh9EdJpzEvYU1UUBfN6Rfys3lPBn8b7PckwOt03WNwRi NT3gVhX6KarRcZ8zvuv/8gTZreF90r6TBJbs6sw64/8XBwo/IVgiSKkExh5kRzt7M8/IuM8j6HtuP OC9xEzNOA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1QGX-00029T-GC; Fri, 31 Jul 2020 08:19:45 +0000 Received: from mail-eopbgr70052.outbound.protection.outlook.com ([40.107.7.52] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1QGI-000220-TE for linux-arm-kernel@lists.infradead.org; Fri, 31 Jul 2020 08:19:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DT9nyI3jkUFl45ti52k2dX+hsc/7Y5apqyqX6geOqcYTisrUPPmSwsfI20anGIGW/Kdf6BMGGCYVsOheakaM74H+9rz5sSzrg5g+S13yEhAtJbjLWuftgQysWAjw2V0g4w7eFaamYoUV7GkyhnX15pCX3bkb21kL4Zl9ca2ner9lXHGMFebyhdRcF+4Ms4xPwnqJdX55zsk+SbrzAT2+Dn+aacV3s4sxQAfYJmJpKb5AZb8PGC5b9ZYGFvaSiUUqhdEsVxNcqgUZhnRaJJCzUneQNYB1xt78LXAnBfvryKNIMPAPzAFzMiNaB1M06B/IOtwa4tpfu9kthRkaNALIig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oHjBSHHpzciVQ8pgO9wjOvzE8VSmoEsYdCvPubd4aXY=; b=D0vrPEOp6YaQz377F//FJjyoJmsz51BGyvWRVtWlPbGKTxKo9ikYeWQZeG8coIS4qKn/b23ZvomyZmV74N5yAtUMyj6VPJZZxqQDUMf2M4NK1fcGhRzd9UiPtBSlmldyWCAwM8YQLKIbiellUZKCrqPbZrDqLzlCkBdMAXVLDNOuPRR7PNCAUNNav4ImPPvpx6vnJAm0IPR+1O4CpVJSEop5AEj3hCxIuovvwI7fchBX3+09Zk+fjwiTkXxqP8XkcdAlJPsf99EQ439IxK4u0Y0o9h4JsqNLNXRzbuouKUPHyWpo/Ik+p/XHAmW6IGIcH5PQjMttdflVtoSpQXGKBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oHjBSHHpzciVQ8pgO9wjOvzE8VSmoEsYdCvPubd4aXY=; b=c0WZ3DklG8ll32691LrtqUFUcv7+ozbydq5h6epl60m2h2NspjRT5epqcKR4NrOVVHpMIrlXoX+M51PopPdmNPXPh8clLAEWhmQMhQQge4oezkAtgsWYxKrl7kZfq2/LwxrBGt7DSdodQ3i/wTdg37ErKhR50NgFwxIdP+pLJww= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) by VI1PR04MB3024.eurprd04.prod.outlook.com (2603:10a6:802:d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16; Fri, 31 Jul 2020 08:19:21 +0000 Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::5c87:6dce:840d:d4c8]) by VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::5c87:6dce:840d:d4c8%7]) with mapi id 15.20.3216.034; Fri, 31 Jul 2020 08:19:21 +0000 From: Laurentiu Palcu To: Lucas Stach , Philipp Zabel , David Airlie , Daniel Vetter , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH v9 5/5] dt-bindings: display: imx: add bindings for DCSS Date: Fri, 31 Jul 2020 11:18:33 +0300 Message-Id: <20200731081836.3048-6-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200731081836.3048-1-laurentiu.palcu@oss.nxp.com> References: <20200731081836.3048-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AM0PR06CA0141.eurprd06.prod.outlook.com (2603:10a6:208:ab::46) To VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fsr-ub1864-141.ea.freescale.net (83.217.231.2) by AM0PR06CA0141.eurprd06.prod.outlook.com (2603:10a6:208:ab::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.18 via Frontend Transport; Fri, 31 Jul 2020 08:19:20 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [83.217.231.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 75800b10-bf5b-4731-fec9-08d8352a6d6a X-MS-TrafficTypeDiagnostic: VI1PR04MB3024: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t78ua61zfzI5BuAr0s+0IowvyX6kEsS7oYPHo7TFsI+yRhraqI9HVpqD1fOja+2gbm7o/0QjVYbCAWO1F1NGAXqud67hUxO1ktMpm0JCY/IJDv3mGbpp9qLud6/OKxKT5FzEledqGma2YVywjTRfidPcKKXIK8OG0D8Lu+ubTBVda66MuJb8wc4uA7Fm86RyIQtSfJhYG+e6a3dMkZRiMRskwj4P9QcgOiKnLW1343oS45FaRMO4zuXoog9eJlQrtIJrTp3uTtXAn8EFA/alhq6a9x2B5BaSTSZSDqXM6ORBj8A2ojIOYADItDWYspqq/PfGR/AmVzy7UUXmonzf1DIgOn6uKR6iT71sKvLluosQblQRTl22JQ21voDoNsy57PFfL7jR5D2c44R8Sk2eb11tP/p6mtbtR+i+XsbX1npwhrMOiHV4Bz1k7C9FIzKh X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3902.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(136003)(376002)(366004)(396003)(346002)(44832011)(956004)(2616005)(5660300002)(66476007)(6666004)(1076003)(66946007)(66556008)(316002)(110136005)(2906002)(186003)(26005)(16526019)(6506007)(52116002)(83380400001)(4326008)(8676002)(6512007)(7416002)(86362001)(6486002)(478600001)(8936002)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Q57l3Nf1JlsODGiYrI424a2mb1laEoINjDh9tJC7IPwohGnvh0mFALVkSTXhMqbwsEvN3SpY9XBm+rdIObXOUOFxUqsvjfTwzzH33NC6W6nfaDeOkIq5ErgaVQ6fcpp0/869bUUG+VD6XdL5SN4XVmRQWRbuNaRelXbueZwN6n8IpvV1FYJIxD/SpOl3Z1sDkjtlo5yl/ToBaFVlBablw0ugy3w6tg4gGbS865+33Rdd9bQmbqiTqG0ilcFH2ETy/DjbopO2gelRclmjaItLfaom7PlS1Ac/vpY0qhTENS06leimHR/2+/S30/7gPyANF1/bpkMTtBp/1Mecfh5wWF9XTzcYZCZCU5Z3kP9Ah9zQiINiDQ6eCoFelhcO+4mfdm/YnvWNtEVRPSxx3AaSyCwXXf68C6jPT355S9jxQfrUMi7PS1NeJxMlX1l5ScYrdTPrrbuQpxd8K2/pw+YRpWMd6GI2rCuJXD3Xmn6oY8emRJuchFdnCs8tv47jlzrfV5FRjnv8399xWvlgM5gL7xBp56sVaS/GAjYajggHSqmMjZhCGhY7Y36aA6f2rM+DehyPIJUJenCUr9DAelwiWdokZkOU234R2daeOAEXFLn8qkprQeBcbSrWlXh1ve4PUo6Hf0vT4EDYn5GxNM8ADQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75800b10-bf5b-4731-fec9-08d8352a6d6a X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3902.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2020 08:19:21.5121 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GXBrfDGtfDHu5hyAf1neyCgm5RJ3WNeeuDK2etKqcqioj8JfZAuXLi8enMTdRCahx6C16AV6hf3Htr+ziAvUIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3024 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200731_041931_065017_5F06CDC1 X-CRM114-Status: GOOD ( 17.46 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.7.52 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.7.52 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay 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: devicetree@vger.kernel.org, agx@sigxcpu.org, lukas@mntmn.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, laurentiu.palcu@oss.nxp.com, Laurentiu Palcu , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Laurentiu Palcu Add bindings for iMX8MQ Display Controller Subsystem. Signed-off-by: Laurentiu Palcu Reviewed-by: Guido Günther Reviewed-by: Rob Herring --- Changes in v9: * Include imx8mq-clock.h in the example so we can use clock names instead of their values; .../bindings/display/imx/nxp,imx8mq-dcss.yaml | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml diff --git a/Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml b/Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml new file mode 100644 index 000000000000..f1f25aa794d9 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml @@ -0,0 +1,108 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019 NXP +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/display/imx/nxp,imx8mq-dcss.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: iMX8MQ Display Controller Subsystem (DCSS) + +maintainers: + - Laurentiu Palcu + +description: + + The DCSS (display controller sub system) is used to source up to three + display buffers, compose them, and drive a display using HDMI 2.0a(with HDCP + 2.2) or MIPI-DSI. The DCSS is intended to support up to 4kp60 displays. HDR10 + image processing capabilities are included to provide a solution capable of + driving next generation high dynamic range displays. + +properties: + compatible: + const: nxp,imx8mq-dcss + + reg: + items: + - description: DCSS base address and size, up to IRQ steer start + - description: DCSS BLKCTL base address and size + + interrupts: + items: + - description: Context loader completion and error interrupt + - description: DTG interrupt used to signal context loader trigger time + - description: DTG interrupt for Vblank + + interrupt-names: + items: + - const: ctxld + - const: ctxld_kick + - const: vblank + + clocks: + items: + - description: Display APB clock for all peripheral PIO access interfaces + - description: Display AXI clock needed by DPR, Scaler, RTRAM_CTRL + - description: RTRAM clock + - description: Pixel clock, can be driven either by HDMI phy clock or MIPI + - description: DTRC clock, needed by video decompressor + + clock-names: + items: + - const: apb + - const: axi + - const: rtrm + - const: pix + - const: dtrc + + assigned-clocks: + items: + - description: Phandle and clock specifier of IMX8MQ_CLK_DISP_AXI_ROOT + - description: Phandle and clock specifier of IMX8MQ_CLK_DISP_RTRM + - description: Phandle and clock specifier of either IMX8MQ_VIDEO2_PLL1_REF_SEL or + IMX8MQ_VIDEO_PLL1_REF_SEL + + assigned-clock-parents: + items: + - description: Phandle and clock specifier of IMX8MQ_SYS1_PLL_800M + - description: Phandle and clock specifier of IMX8MQ_SYS1_PLL_800M + - description: Phandle and clock specifier of IMX8MQ_CLK_27M + + assigned-clock-rates: + items: + - description: Must be 800 MHz + - description: Must be 400 MHz + + port: + type: object + description: + A port node pointing to the input port of a HDMI/DP or MIPI display bridge. + +additionalProperties: false + +examples: + - | + #include + dcss: display-controller@32e00000 { + compatible = "nxp,imx8mq-dcss"; + reg = <0x32e00000 0x2d000>, <0x32e2f000 0x1000>; + interrupts = <6>, <8>, <9>; + interrupt-names = "ctxld", "ctxld_kick", "vblank"; + interrupt-parent = <&irqsteer>; + clocks = <&clk IMX8MQ_CLK_DISP_APB_ROOT>, <&clk IMX8MQ_CLK_DISP_AXI_ROOT>, + <&clk IMX8MQ_CLK_DISP_RTRM_ROOT>, <&clk IMX8MQ_VIDEO2_PLL_OUT>, + <&clk IMX8MQ_CLK_DISP_DTRC>; + clock-names = "apb", "axi", "rtrm", "pix", "dtrc"; + assigned-clocks = <&clk IMX8MQ_CLK_DISP_AXI>, <&clk IMX8MQ_CLK_DISP_RTRM>, + <&clk IMX8MQ_VIDEO2_PLL1_REF_SEL>; + assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_800M>, <&clk IMX8MQ_SYS1_PLL_800M>, + <&clk IMX8MQ_CLK_27M>; + assigned-clock-rates = <800000000>, + <400000000>; + port { + dcss_out: endpoint { + remote-endpoint = <&hdmi_in>; + }; + }; + }; +