From patchwork Tue Jan 26 04:00:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Meng Yi X-Patchwork-Id: 8118831 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A8272BEEE5 for ; Tue, 26 Jan 2016 08:48:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7827B20279 for ; Tue, 26 Jan 2016 08:48:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B8F592026D for ; Tue, 26 Jan 2016 08:48:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B7E96E1A0; Tue, 26 Jan 2016 00:48:48 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0070.outbound.protection.outlook.com [157.56.110.70]) by gabe.freedesktop.org (Postfix) with ESMTPS id 655B46E1E2 for ; Mon, 25 Jan 2016 20:09:17 -0800 (PST) Received: from BY2PR03CA009.namprd03.prod.outlook.com (10.255.93.26) by DM2PR0301MB1263.namprd03.prod.outlook.com (10.160.219.28) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 26 Jan 2016 04:09:14 +0000 Received: from BN1AFFO11FD009.protection.gbl (10.255.93.4) by BY2PR03CA009.outlook.office365.com (10.255.93.26) with Microsoft SMTP Server (TLS) id 15.1.390.13 via Frontend Transport; Tue, 26 Jan 2016 04:09:14 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD009.mail.protection.outlook.com (10.58.52.69) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Tue, 26 Jan 2016 04:09:13 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u0Q491B3003500; Mon, 25 Jan 2016 21:09:11 -0700 From: Meng Yi To: , , , Subject: [PATCH 4/4] drm/layerscape: Add HDMI driver for freescale DCU Date: Tue, 26 Jan 2016 12:00:33 +0800 Message-ID: <1453780833-32289-4-git-send-email-meng.yi@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1453780833-32289-1-git-send-email-meng.yi@nxp.com> References: <1453780833-32289-1-git-send-email-meng.yi@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 130982549542910195; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD009; 1:4HG9IwNubjETNJMzOzCdR6OWQ4+t6IisUprMy0fCrlSyJOunZIRPiq2x3nbLKIKDRQYRPQu8+UTWDAXfn8x+scxHMrl2Pl12KMb1hfLgMtmkVVNDnWMHc2E4f0/lbeRQH4Eut8ge4l0UMycg10DdFhLCY8JZ6THQKKaIC0xp0VdOlOUzK1kMjESeaZroBqGPU47VgBwF+SdI3qRVAzdmQ1z0zFcbA6n7h9pRJlfDC+UYAuBYXuzHX3+ZoYt6K8S2txWRDju6h4SxWFnxt2tTv8+Xizc4v4TzIA35uhzNSn0HwojlUfCfFG8NdTa42ZEOlaWzG9CNgTYoi5h9mXhqlag16w1GiRu0Pub5MvfmVwzzabtcIzKHlqyJLvkvYnY5sTTccGXzqkpW5V9ueXe9mUa6axnw2ObO7gwtIjkP6viJmbfW0lfZyZ4JhIPId4rnxIOzBEgxPYQ2j71RWq+NA/aRiOI9aT/tAN982Qs017KOdmK8RywGSrI+HHoitb/Pm00xZglwdNtsos7XDCB1NhaKMl1un+b/Bkk/0ZiLePlGh0gzSWawagAPNvf06Y2q3HYyH/w66yAfvMtQTCL9pw== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(5001960100002)(106466001)(2950100001)(1096002)(104016004)(77096005)(1220700001)(229853001)(11100500001)(586003)(85426001)(189998001)(50986999)(76176999)(97736004)(5008740100001)(81156007)(48376002)(19580395003)(47776003)(105606002)(6806005)(5001770100001)(50466002)(87936001)(2201001)(2906002)(19580405001)(4326007)(5003940100001)(36756003)(50226001)(5890100001)(92566002)(575784001)(86362001)(33646002)(7059030)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB1263; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1263; 2:w9vs+yZhbIG3x1dk8qXEkGx5tz3hNwgMW7I5wCiomEYyqrn4UhToCbX8r5Aoxhh6Ao5KvL4csXJhFGVd8wgx1L3ODIFSBCpKglAQQengkLbUGE5VJrj1ts4b6X3BfCa8w5117QTiNEucmBDGcQW5Pw==; 3:ODRnPlBNlYDMP3c2BImq7RI0Byc8jmRDu3Jpn9tBuu7ZenexzdZhfbR4Q5t8uisSGEVouv+9dEn5K7mAAmgdUtMI/5q/qJJu0n4NMeYt9iYGoVyborOe7kZIeKdkdQ6h0h4gPX1Feo2NQW/ur0bLY+ZcRPqPIKEbfUcuL5L+HIJdkVLaBkGePoka6MvtWuXioT2sgVM+bag1eJVJ/w9NchHudvZ8D2qGl/MYZg6rdDg=; 25:8jSQuhkriSgor1dsJ3Q3hlvKCw4Mr2Lfly96mmrUj1juz8kv0RPQ8RTmqiOQiVsM0YE3CN1jEU7yvnvXGV7qYoi9tEsPuedrbcOKW4JO5jJ/FdCP5uKnpPI1heppBJrJp3pI/EhVqqhl1VXWHmQ+Lpg19bYXC9Kg+TmBmKS6SPPvDi8sd6vXlbSq+TOLehFNvCPOhS9RQGYmDDG+zWNG95jx4r0pG1+XSkeiakJnU1SNn805ESZa5MV54QbO7kYf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1263; X-MS-Office365-Filtering-Correlation-Id: 0042218f-3bff-4d3b-adeb-08d3260673ab X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13018025)(13024025)(13015025)(520078)(13023025)(13017025)(10201501046)(3002001); SRVR:DM2PR0301MB1263; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB1263; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1263; 4:pcE4ItonP1aL2q8dJOcTBG51aWHnSWlpzlZhIGNUEg5ZWRBgKlOfZ2H5h6BgSfOOBBsZi5oUnbeKIg2hj47NT/Zt2oA7AlAEVEQ9MZ13oRnZbPB2OoDgvOhk4bDNSrSgeNlTnm3GlGZQxisHe+D+WsWh5iHdCYtxXrs4j99JSk+BjOeFoR4GPYgxrdgWZVK72M3RmbD2nAcx1bgUdLe8AnZ8Mnu1Q9aONfX8umi4ugi71ak7vRVBLnS/XLqTeKcB/ytN7DHhdBef91yhrIGgFbDnB/5m6I29sEFHuzZeS5m79L50Zc5raaQOn/j26QIO/LsWkBnl4pa8H5QBM3SAL0YZ1pFzbUyH8rQEAm/xhOpw12eyY0w4+JR5YUHUMZL79O5XCYMIB3FqEqkRp5HXU9PlddYYTadCBGAmSylaskS6P516vaY/1XNwL2Gg9kWQDfbVKNCtMUuc3jTT0AuUfvwzE8x32TG114AY+vA271IqC1uX2foXfOVaYH+LQatGNyjptdSF5HQpKZrnWyroxw== X-Forefront-PRVS: 08331F819E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB1263; 23:lqtzozfj/lFxHMsekpzI951w5YUZTlCNMgukKOE?= =?us-ascii?Q?i0KEF+L/Iw6IFN3e2LJbdShxA83GyQmCdv2ZrYi+oxSML2bv4Yb/tRXvmbJ+?= =?us-ascii?Q?OxmcCEEmGjjDxeE9h4mjgwIbi/YL3j2wLV1PJgcxz+ndF7jVUdj4wBL0v+OV?= =?us-ascii?Q?FAMDjEUFBPJ/7XPoGfpfoqTO47eAHLX+0HiLYlfbEhB73269P4qTrh3QJVrM?= =?us-ascii?Q?fbHYrhihs2eRX/Vyqmt5Ld/rAQW21krTlqLoWhgGaCp7R83IFptSErvsU++d?= =?us-ascii?Q?bbziiizChlzGSB7X2sdeMVERIlqv+I4jq7tM0YOWh1/Vl69taAv8CPDUMcK8?= =?us-ascii?Q?Rb1sTofuaArnEpUSxc8qXQwct5Jcbm405Sr36KcmTOb6UMwetyuullgiCAIa?= =?us-ascii?Q?HBZEmFrsbfIyKe18KO9B2WAlwpP3IViYB7L6DGz1OpfuLJBgTqYoy84PI/Mb?= =?us-ascii?Q?g7DVXMmv3gGuyiEM71cpjkKczlnLSUCFtJZko9EiIMmS+u83TuAogMQldnx+?= =?us-ascii?Q?S7/F82HTV6VArEXevQsiFBxxqu4m/nuIAaPn5sBg+bt2P9wFTF6lIsXFAH6v?= =?us-ascii?Q?ktEqKPZRg8eqgbNgFV1RMQ/+g4WXL4wFrymV0lNuSJyod+Dx7y/NOy9gFtzB?= =?us-ascii?Q?a9RhbbIRV5a1crvmnfBuT9iZHEhgGKjBZc55BCiPLuBmnNsHpADN27iXQ2XT?= =?us-ascii?Q?7LCKb5g+CkUqMzawWY3H5rc7UR17+dpCyi4EgQkyYVHFGUKhA3jrQUZIazeU?= =?us-ascii?Q?xLMEFqnpz8nRO6zZpBpmL5LN4QjTd7IV7HAL8xMVV3JR6WFPLBDu+cTiGo9y?= =?us-ascii?Q?H171ENe36Dv3IFHOxbXfoH0W1a/uIGdWyC+NxwJfctvm2X0PXZkutCzRLoR9?= =?us-ascii?Q?dK+4bgRzrvO1G9aJZoL5LhbP7tSDiMSPMB21XBxgj78Z5m/qfzVF+tuaibWc?= =?us-ascii?Q?X7gN4D6exT3W+nfKuE7RV8UMejHt7zuAImNx6otqFlySrSBh/AUK/Ve4Nz5v?= =?us-ascii?Q?BP9JaKt6IJLdxYyjKLraawsjhiVhTkJYAQ54WYRZXd1OZSUxbh9vGU3nJhoo?= =?us-ascii?Q?kEh3FOOJYirI9l10kooEXWigEC2zjiS6yt2oDUIjcSenFEUBNb7xIxlmeeGC?= =?us-ascii?Q?8stzLh82awTnxWXepVnXV0EG1mpnPFP0pET0j4lRBXfD6Z7fO4E99E4246u8?= =?us-ascii?Q?Cl0k9e3to8hHBmdLpdQTgOZTD9Ya7Scxg71a9?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1263; 5:4g476Q3dIxMzpuKIzoA7VywwcvrU6yUdXjgaXMZG1Be6Us9+s7l+tQxC4cI9jkp7LmxDkJ7SySz9oXlpVbGE4AUSKfPaaD1O9MvWfSbeEKIP3mcyHO3zR5wlEBwFPengtEjzpdBgvuAjrez1ocb4UlLNS5ix2NoY1sXg0tN+he8=; 24:YKsyhAqiYL5UovXrjnG45Kh54gcSyiNT6Sadh9lJQeJC+NAXAOe6207oTh9LsVPmZZStv6sdFeKFXP9cslJQ/In9JI2E7FLA4LmLt31Wye4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2016 04:09:13.9790 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1263 X-Mailman-Approved-At: Tue, 26 Jan 2016 00:48:47 -0800 Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Meng Yi X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DCU is the shortcut of 'display controller unit', some HDMI transmitter attached to DCU, such as sii9022a, and this driver add the relavent functions to DRM framewrok. Signed-off-by: Meng Yi --- .../bindings/display/bridge/sil,sii9022a.txt | 40 +++ drivers/gpu/drm/fsl-dcu/Makefile | 1 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 1 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c | 271 +++++++++++++++++++++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 10 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 11 + 6 files changed, 334 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/sil,sii9022a.txt create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c diff --git a/Documentation/devicetree/bindings/display/bridge/sil,sii9022a.txt b/Documentation/devicetree/bindings/display/bridge/sil,sii9022a.txt new file mode 100644 index 0000000..32a726a --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/sil,sii9022a.txt @@ -0,0 +1,40 @@ +Device-Tree bindings for the SiI902x hdmi transmitter. +----------------------------------------- + +The SiI9022A is an ultra low-power HDMI transmitter. It supports resolutions from +standard definition 480i/p and 576i/p all the way to high-definition 720p, 1080i, +and 1080p, the highest resolution supported by HDTVs today. It also supports all +PC resolutions up to UXGA for netbooks + +Required properties: +- compatible: Should be "sil,sii9022a". +- reg: The I2C address of the device. +- interrupts: Interrupt number to the cpu. + +Required nodes: + +The sii9022 has one video ports. Its connection is modelled using the OF +graph bindings specified in Documentation/devicetree/bindings/graph.txt. + +- Video port 0 for the HDMI output + +Example: +------- + + sii9022: hdmi@39 { + compatible = "sil,sii9022a"; + reg = <0x39>; + interrupts = ; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <1>; + sii9022_out: endpoint { + remote-endpoint = <&hdmi_con>; + }; + }; + }; + }; diff --git a/drivers/gpu/drm/fsl-dcu/Makefile b/drivers/gpu/drm/fsl-dcu/Makefile index 6ea1523..98cacc2 100644 --- a/drivers/gpu/drm/fsl-dcu/Makefile +++ b/drivers/gpu/drm/fsl-dcu/Makefile @@ -1,6 +1,7 @@ fsl-dcu-drm-y := fsl_dcu_drm_drv.o \ fsl_dcu_drm_kms.o \ fsl_dcu_drm_rgb.o \ + fsl_dcu_drm_hdmi.o \ fsl_dcu_drm_plane.o \ fsl_dcu_drm_crtc.o \ fsl_dcu_drm_fbdev.o diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h index 579b9e4..3c85072 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h @@ -187,6 +187,7 @@ struct fsl_dcu_drm_device { struct drm_fbdev_cma *fbdev; struct drm_crtc crtc; struct drm_encoder encoder; + struct drm_encoder_slave *slave; struct fsl_dcu_drm_connector connector; const struct fsl_dcu_soc_data *soc; }; diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c new file mode 100644 index 0000000..0b06060 --- /dev/null +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c @@ -0,0 +1,271 @@ +/* + * Copyright 2015 Freescale Semiconductor, Inc. + * + * Freescale DCU drm device driver + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include