From patchwork Tue Jul 21 10:20:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 11675335 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 622B36C1 for ; Tue, 21 Jul 2020 10:22:26 +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 2E31320714 for ; Tue, 21 Jul 2020 10:22:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o+KZRXrF"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="iiRs7122" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E31320714 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=du6S+NnRVN49ZnCM8tGVT/Ykau+XinfpPIgD6TO2loM=; b=o+KZRXrFYoEQPQ1uYFy3itPw3 rbJOHGfLvd3bv4j6jkehJCnhwwnqERjrVMCjBS7JsC4j0xF8MxQ0HcGylXyB6fV8YsyPhXGIuEaMW Lu4NdGVzcfbLBkBNrdyZwCfEUsWkyYXkor8oEfypJ75kY2JV0K/wHdA+57xsV71MenKhsJg7Ihx9v 6pnemdppjNF0Bw6pKFmzLLcyY1/V3cYWj04NmPuule5/J8Yh/pJw/oGBmtwYdak2kD9RhAMEo5BMZ cDxFm4MAEychN+cKvLA4k2S1fymrizmvffaTTR+M3ao4i831nu9xdhPJV5tda+tBYiW9UbfI2Soja daU7uKrfQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxpOD-0000qV-Ji; Tue, 21 Jul 2020 10:20:50 +0000 Received: from mail-eopbgr30065.outbound.protection.outlook.com ([40.107.3.65] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxpO8-0000os-3M for linux-arm-kernel@lists.infradead.org; Tue, 21 Jul 2020 10:20:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=heeqLk0lumC29d7mqSJwHfPZRNtC7sSxXFGE3j4dRPwG6zpZXY3dZabcPip/88oa+QaywZYmRv3Crngk5fatWuu5StFeJbbTNvymzs0ddZQH97WPGSBcaIu2zbOU0Na0ajjtR0GVUnxZUqATiTMmVzcHbhPyOyMkaPKJrFf3jZqZtRiGjTBGJD56C40Z0JT8rDr61ur8bqIALXajSktOKk8l3S0OK3q8wQSuMoBWJKGLh1HFPvm5U9aA5uicO8Dn6ZeP3UxqV94FBdkycx+MLGLKx2N3pK1eo5Anqg/yanz1KMd3gVEd4sTkJJVaEBitLtWXHGufEJ+cnSVGBPw4rQ== 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=D2uXRfjlTeWpExV8Sgs+LYmbLtalszmro9CG33eQzI4=; b=EDNNIC8DMfOz/vn/d3fT3vjHwBi8WnU5HGYUVq1gYNehbi2kGHvBbVSiIWxbCqzfKhJSC73DwpeoQz4DJGB3BQ0lcyXDk2P9LZ9+DiDgX/59/7qUMmuTi1CT8xnJdVuHryM1caI8t6gzSQUscextewdds6iR7fdrVQBegfgZqcHuwKiDqICWLS7FCV+t7b6Wn1l5xzpKeu3Zcpt7HmhzLkU4OqqpHqMr+OgZjnWnchu96pNDygDUKkJBr0C/FKtfFjqA5PqaWDbd41cSz2zb8TwW5d1CD+cU9r563ArOZjY2xXSFVJINQIagBo+lQaljLqXPQGK3+9pLQ/vX8arWNA== 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=D2uXRfjlTeWpExV8Sgs+LYmbLtalszmro9CG33eQzI4=; b=iiRs7122SS+vN2Dt8a4u09SxEWtIEu5ZWIN65y7VCVCERb6GGMLEunGDw4TDAHQuspEZodasSM3QMjHUMMyFvybnYGna6vB4B1nOCOx9xrKSxEPumjQyi1xzpTMejigmCevUvUjSgBEBNqvm6/BcubQYpbsLD3j4GxEvppD4jsE= 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 VI1PR0402MB2735.eurprd04.prod.outlook.com (2603:10a6:800:b5::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.25; Tue, 21 Jul 2020 10:20:41 +0000 Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::4c0:79dd:b734:9ea7]) by VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::4c0:79dd:b734:9ea7%5]) with mapi id 15.20.3195.026; Tue, 21 Jul 2020 10:20:41 +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 v7 3/5] drm/imx/dcss: use drm_bridge_connector API Date: Tue, 21 Jul 2020 13:20:02 +0300 Message-Id: <20200721102007.18368-4-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721102007.18368-1-laurentiu.palcu@oss.nxp.com> References: <20200721102007.18368-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AM3PR07CA0138.eurprd07.prod.outlook.com (2603:10a6:207:8::24) 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 AM3PR07CA0138.eurprd07.prod.outlook.com (2603:10a6:207:8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.15 via Frontend Transport; Tue, 21 Jul 2020 10:20:39 +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: 1b68a325-6f91-437a-8823-08d82d5fb842 X-MS-TrafficTypeDiagnostic: VI1PR0402MB2735: 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: qviEy/fgdNRK1qRgW47sJzdsRRC/ct5z/69hHzMiJd3W5XPDZ+JM34DS+02nkzzq9zpnbgeVMqlFJr4ekslxMQH8fewdoiYyOdBeTjadvKUwk0xiTXIWSAE86DLZSShV+IWIBWQwLLnyk0lUiSR+o/WzxjI7QkgQFKplpsaTEQbhHOfIUHAgQxxZZPRrWzguRxjVlelj3zPhtMqI69P0z2sFLLXj0umeuUylK9WwUAzp013sioB/FthdHsFTgq1iEq4k1wSdErrmB8vSVJ+WEd5NwLerjc8y/2MiSuNxLdVkLdt45yHfKGJUFaBXOQwpJ43vPUFnnjfT6Gzz4i+0rQ== 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)(396003)(366004)(136003)(376002)(346002)(26005)(4326008)(66476007)(66946007)(66556008)(6512007)(2906002)(5660300002)(478600001)(1076003)(8936002)(7416002)(6506007)(110136005)(8676002)(52116002)(54906003)(316002)(956004)(6666004)(86362001)(44832011)(2616005)(16526019)(6486002)(83380400001)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: DNdRKIJCRbKCoI2Pri8zygkOQu0ERYxZgjT3EWku4RTPGrQyAKSJ02KnsgbhGje2KAtRcOkN43Obvp7fr09VMtxjPWZHh6xtuC/tzkpfge9Uw9fU2mXhxLEFaFhO3HOe/aSS+dEsFuftfSLlJgwmJ/rBNOM2442QfmLN/UdavoClewGYjLzISbybhqzx1OUrSh/scNf1SLBYlXgDqecAk+4qVVqIZIabrBoFiheEKrfmbo4kY0qghbkEtGH9z63kzIDqWoKKVlCyVJ8qaVg4XYESga7K7GCZ4xFRjSv261wgK7hHf4mTMKjLMAEs6Ldd+ORNsjTBCWrZ1VsQ/09tZtCREAJkFWWzjuIYOsdcUecuPGI6uT2mEQjGxTapv5wgfIaRDY1GRKI2rM2+fpx79i1r20ZhiiZCHMrGSq0pqCkF7/vzKe5AVh/d3TGJQ0qeJbu4ivuvR2+TMBCoaJ8nWZFUHO5UiU32HoZH+b+ubO0= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b68a325-6f91-437a-8823-08d82d5fb842 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3902.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2020 10:20:41.1824 (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: MR4XzBMXsAxMpis7sfMrTHoSTxV6rtj8QKa71/CINaI2gDlKmDsmXgAcJIO6DMx91TAot8xpWCGCzbenPhpxmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB2735 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_062044_226484_0EF59B74 X-CRM114-Status: GOOD ( 19.23 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.3.65 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.3.65 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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, Laurent Pinchart , laurentiu.palcu@oss.nxp.com, Sam Ravnborg , 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 CC: Sam Ravnborg CC: Laurent Pinchart --- 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 Tue Jul 21 10:20:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 11675337 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 48AC66C1 for ; Tue, 21 Jul 2020 10:22:27 +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 146C120714 for ; Tue, 21 Jul 2020 10:22:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wGfQmeRM"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="E59PGy6g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 146C120714 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=GvWDQjyWezldfz0h91BoD+nIZyvnLc0Zfp2uu/K9q6w=; b=wGfQmeRMehix3W4bnY1FuSzPT PPGA4oZSL1vgHfkNDe096fkgyBZyiIz5bzgZ9s4mS6MJpo9CunPwbfUAy0wsNc6VcQpT5dn1RSM7T bth2MsMAz5jXnouolQ9cyMkMZN5Ct8S3PeGPwDnQzBZ7UzD9azmI+Q7RQdnYYicVS/F35uqpx0bTc uEqPPna8RVQaNimA9khNm0AZdi/eGad1CFxfqawJN+84fejlS5czgtGxCeauDTB0HuJwXmp0Yu54C CWqaDTv073bo9MeM9VqyVwexOGpbhOCLcmOLBFlB5yMWyL+tqnAlbyZjN52+ed9XP6qhhTrkKDTuk znBc3YwGw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxpOL-0000s0-Cc; Tue, 21 Jul 2020 10:20:57 +0000 Received: from mail-eopbgr30065.outbound.protection.outlook.com ([40.107.3.65] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxpOA-0000os-84 for linux-arm-kernel@lists.infradead.org; Tue, 21 Jul 2020 10:20:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jcRqM7/FtUH89pXv7/7TZT+e+s5adOUiZwB5T9WAqBmxGK5UhiNuei3JvNOy7oKkEZYo8X5ht0mYd3NKSOaq/zXI7zsrWB+t3WEpRpjOSPNCTSV27ZCwQqfn2O/OSwMpdqswnzFOEfg8NnW/rs5uVZ4DKD+V2c4u5KWUbH2dHgT/YmTaqlUU7lBpn9eeovI63GyYunthXviKdygjgWTgJAscMjpjuqr+KMDpAnJSL3SFdb43GxXehrLtN4FFrc2jFRxGK0Oy5Vf7p4c1n2UE3QyngbZMO+UkHFAoHtm+Dyfo+BDFEU3vFTZAlVtgm+iUjzEvz7f3hXDrgvDbQiBxiw== 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=m9daiHRo1mxt5cacqv8wV10od6W29rxvawkioiNZ+kE=; b=mbrDjIO1n2Fldqh3TVPaHRxTPdN9/jcKfd92mq4mCKfCe6I+FIptJOYH073rYeCENBn5/+6u4qxsnMJhpHOZt3Z2RFiOsu/I0wg6aENbBWd9FD0UsuNQc3TIVvjREIH+wFsoyRX+RUidpWVYnKor5kK9kFjUPNlHZI9uOGEoUrrib/4z6h+32uFxRWaKM2OvY5UJ2ioC6ZEt0HvED3ZN/hSVWrIz0zvtPfbCcyr2E11ATIPHb8wfJwI53hd7P/jiZQ2OdBcdrlwe44WtyyQhvlLqsN5n1VrHGcfPDyLLEpeBJ/YZQpw1/Bj+xHLeJFKYlZZHOmcep705iZ4EsnvGRQ== 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=m9daiHRo1mxt5cacqv8wV10od6W29rxvawkioiNZ+kE=; b=E59PGy6gPZSju3Udf5UR0qkB1tf/MpMZ0N7QqGmL6QnMKCqnoIhSAh/1Eipy7jZ5Uf1il0c78+mA3bZPwzRqOr5zNkPhzi0+QMoY8InhKv6RkkX6UNM9/WyaDLUJJ2WGYmXWurPpvzYiHtrl/CLr778JQg4jlsXaBYy9zNLX8bs= 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 VI1PR0402MB2735.eurprd04.prod.outlook.com (2603:10a6:800:b5::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.25; Tue, 21 Jul 2020 10:20:44 +0000 Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::4c0:79dd:b734:9ea7]) by VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::4c0:79dd:b734:9ea7%5]) with mapi id 15.20.3195.026; Tue, 21 Jul 2020 10:20:44 +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 v7 5/5] dt-bindings: display: imx: add bindings for DCSS Date: Tue, 21 Jul 2020 13:20:04 +0300 Message-Id: <20200721102007.18368-6-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721102007.18368-1-laurentiu.palcu@oss.nxp.com> References: <20200721102007.18368-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AM3PR07CA0138.eurprd07.prod.outlook.com (2603:10a6:207:8::24) 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 AM3PR07CA0138.eurprd07.prod.outlook.com (2603:10a6:207:8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.15 via Frontend Transport; Tue, 21 Jul 2020 10:20:43 +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: df7006a5-ddac-4e88-9126-08d82d5fba6c X-MS-TrafficTypeDiagnostic: VI1PR0402MB2735: 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:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PdxoxZtFO03W+qIZdpeJpRVESvQTO1bThuxB15+XHAIxfQ1lL/Npp799rXqO9LmILitjfp8SyINHnnw2o/Cbg/bCCe6C2I5dmbWfDYUKTIWapJ46fyRCYtfA+30u4xpGhASDqv5CZ7TcNq3iS6eFU5bm05A18hPUPzZV8k7G35UpqG1weCMgKGdgUugUQ2PVSeEhztigrnLhXhlLilIX7UMeV5PTs/WZ5ffRHsV/e8sJf0KlfINTDAfJd3kDmZfw8F/LjCkMlAg5YKNzilByWWPEFZv9SSwL9EExf+UmfUxAaFUL71rnZJypndM/VUnKF5LaRLxFTCB2KtrUDR5bZOyr68WBcDLvKc5UDIkqtwUYLmU39P+JcQWJK/qZBFDyLhgFxrkoHEDix6u6/Qthxx0TfcuT/8bZSc76/0LRZ6PJlmfnmACOHOGcTPaVJ/UW 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)(396003)(366004)(136003)(376002)(346002)(26005)(4326008)(66476007)(66946007)(66556008)(6512007)(2906002)(5660300002)(478600001)(1076003)(8936002)(7416002)(6506007)(110136005)(8676002)(52116002)(316002)(956004)(6666004)(86362001)(44832011)(2616005)(16526019)(6486002)(83380400001)(186003)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: BEasuGRCZ9SlMcj7DL2sdJZmctX6VXSf+kK7IbL8E1mTiUzJ3MnG/YaYsGYoHOXgqOsyoTDFx9SceP9yx6Y9OLoz1IKTL4ZMoXO4LAdzd4gmkeKmmM09Ouwd4eGu6AiWhmGnrtuBjjqAEHu7ZlxBokjR8ia/vC8Zv+i1vx2JwgDoodBeRYsL7RjHnAeI23DsE/mTiIjXaQuxT0IRIVNH3ZkGcryprWAoIatU3X6qZKTWf5utzwlqSbdOaWSASfh3t0p7BynJLw/kTUHXiAJC3uwFwoIpOzct0jK0MvnE0Iz0MSAkTzYk+1vn3uZ3KtzRMIF87sjii/lmLxoQN5E3oQIACkWgOo6rmDnv1Jzfbhda8m4JILQz4OEorz5urFixdahKTTDHWpuz2MxjiXPjOL9WlQcnG16LFTWaKb5LyL22PkkjZxbM453HlLUaAd7oq+p1ypPZvBQrh9XYPyyD/dZr6+UKuag+h6SuZ2JH3Po= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: df7006a5-ddac-4e88-9126-08d82d5fba6c X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3902.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2020 10:20:44.7104 (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: DfJVIL9ReUHDzhwnKJlNAMECJP6VJwZ+mZu6cVV/emFO5Tj4Jyg4DMjFyMmao7Xro+VeQJhXJF663BhmCQH/qQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB2735 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_062046_393413_78FD4287 X-CRM114-Status: GOOD ( 14.57 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.3.65 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.3.65 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: Rob Herring --- .../bindings/display/imx/nxp,imx8mq-dcss.yaml | 104 ++++++++++++++++++ 1 file changed, 104 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..68e4635e4874 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml @@ -0,0 +1,104 @@ +# 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: + - | + 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 248>, <&clk 247>, <&clk 249>, + <&clk 254>,<&clk 122>; + clock-names = "apb", "axi", "rtrm", "pix", "dtrc"; + assigned-clocks = <&clk 107>, <&clk 109>, <&clk 266>; + assigned-clock-parents = <&clk 78>, <&clk 78>, <&clk 3>; + assigned-clock-rates = <800000000>, + <400000000>; + port { + dcss_out: endpoint { + remote-endpoint = <&hdmi_in>; + }; + }; + }; +