Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6798864ybf; Fri, 6 Mar 2020 04:51:48 -0800 (PST) X-Google-Smtp-Source: ADFU+vuQ6iq+wHJ/yNrs/pBbxbCKFr+LcNKAlPH8bazGIUcv1y9JuoIFI9+66yn2oxfUEMSfhLXd X-Received: by 2002:a05:6808:a08:: with SMTP id n8mr2475456oij.91.1583499108439; Fri, 06 Mar 2020 04:51:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1583499108; cv=pass; d=google.com; s=arc-20160816; b=F9SY0dF1DbIMdN17qqMZSh4UIk+jKuyXfVyPL/ozAb0bb6EN/HAFqWzcgSN1cFF7ni HyDS61+qYFdouF69CAGkEvRFdhFutLeXHtCjM+B1nKkuc4Y3M2UUWaOqcr1tXg6gu1BA QY24Xct+BT1DCGyCCQsntQat+KC8B9CiQFeGS4yK8ZIyhLn7IXv2vzg/fIJFWgXmOGIW g8ClVsqF9kOGjBD98MIH04OEz4lPCaRL0lNMS9bYu7P22jn3rMG4wj7dQG9Dl+30Pj0g emuEskZ13IZYAQjcqD0VUEV1doqubaj6WSdqPXb4Y87OYZOPCGSwJsrATgn/DJen5Sn0 PskQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=CNLXeyBcpces7IihoLXFLB1vS7qwMWWqV+o1Emzawbs=; b=OD1+/Aoz4aGq/5X8ohAVIS/wsHupzgu3ngf4YJxFkwCKO0Fi5b8b6yWMUFrgGsNE+h dyxXHjdzWTmvtEuMHaE7HiG4H3PK79QKYXeERLu8crWt7xQs9tS7NvGONbS6GxORKhb2 1uk7oQnKJj4Js8FWap/HcVg1h9nbaJL2LuJXKgACZ30o8/x/gnqpmepAB/SifZrOkbI4 /45uYeWxznokiM4+T6l+Xq/4mxHqkwzyh5jZuwzJSqa4kOdNhMbN1wSnTLQ5Iye3KGIw GZa4mwKyet3LLlCIClQTpJ920fEl8bqrD3p487f5G8Y5KhmbkpKaE6Hm5tqy9QTB8+Zl XGqQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Twf5tJHB; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w124si1145877oie.167.2020.03.06.04.51.36; Fri, 06 Mar 2020 04:51:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Twf5tJHB; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726704AbgCFMuK (ORCPT + 99 others); Fri, 6 Mar 2020 07:50:10 -0500 Received: from mail-vi1eur05on2047.outbound.protection.outlook.com ([40.107.21.47]:6030 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726382AbgCFMuK (ORCPT ); Fri, 6 Mar 2020 07:50:10 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VcN6a2a4HRv6E9HVGIhHvNbz1oVs0KjzptPcvucYbjzWWJ3lR1y+Hu4FqSISzCmf9F1/+4YmQXKvDdpU1fLRkepmFTLiI+jV8pd5stO00Lc2VcfElfAo/NdLt7X6XH5hElJDhBMiqq6PXmFSqT6qBQphi+uwSaWa8yZjGkcPwn4PEAUG1CNCRW38anL1AwkqG61Lrzp1O9a+65272Zm3y4acbHvWBE2iiAdTxFWWlRKO9wAlGEJN1nNfWiuLt96f5sxUgHQXe/Ly5QjW2hzXeebVaf2kA6HuWjcNShhs03Ggh15q9hQdEnfmtdo8X5on0/4rwi219z9OXDoOghQJlA== 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=CNLXeyBcpces7IihoLXFLB1vS7qwMWWqV+o1Emzawbs=; b=I5s2VTcLxQprhUc745WtatlQ2XCy07M61Ppw4YZ673w4sWFzCxwsTchgKioNz24HjHMN9TT0BbVe3M/lGhfetVTlV3CgaXOZQicMBOXcJOZoBBz7pPz1ASWMsr77YLhEecfZNvGXV/n58Qd6HL3eCUcmdvcBvfWQzVcQPxPa0S0Q0tCY+yOvo4wwnKP8F+7HAeicdidKlYyjydluGy1S7MiP+Q/4wPY+aaP2nGSS3dHviGdGBCIdEvGpst0YU+c40YWbVaGa4miosXa3Oew4qKRNRwN3N/p8KnEX4M4g9NRTN1xcXMZdljqI9u2WdjzqXJbZmfVxHzhPf9VRD8DL3Q== 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=CNLXeyBcpces7IihoLXFLB1vS7qwMWWqV+o1Emzawbs=; b=Twf5tJHBgsxiT0IxAV5IMEVBUUX3QjVlnnlgc6XN6q2ocg2I5kVVWDvHYs/gAuLOqdq1Ec+Bg5UBmw5o03j96aBcNjt5hpoCq16qDnFvTpc6vK+ctkPZuxOlYdXFlxeAiywYq08CiGLo227qb48szVCNcVCNS2HLw4kXhlUY6+M= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=laurentiu.palcu@oss.nxp.com; Received: from VI1PR04MB5775.eurprd04.prod.outlook.com (20.178.126.145) by VI1PR04MB6846.eurprd04.prod.outlook.com (52.133.244.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.16; Fri, 6 Mar 2020 12:50:04 +0000 Received: from VI1PR04MB5775.eurprd04.prod.outlook.com ([fe80::8542:a5b7:a83:6ff1]) by VI1PR04MB5775.eurprd04.prod.outlook.com ([fe80::8542:a5b7:a83:6ff1%3]) with mapi id 15.20.2772.019; Fri, 6 Mar 2020 12:50:04 +0000 From: Laurentiu Palcu To: Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Cc: l.stach@pengutronix.de, lukas@mntmn.com, agx@sigxcpu.org, linux-kernel@vger.kernel.org, laurentiu.palcu@oss.nxp.com Subject: [PATCH v4 0/4] Add support for iMX8MQ Display Controller Subsystem Date: Fri, 6 Mar 2020 14:49:24 +0200 Message-Id: <20200306124930.20978-1-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain; charset="us-ascii" X-ClientProxiedBy: AM0PR01CA0096.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::37) To VI1PR04MB5775.eurprd04.prod.outlook.com (2603:10a6:803:e2::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fsr-ub1864-141.ea.freescale.net (89.37.124.34) by AM0PR01CA0096.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15 via Frontend Transport; Fri, 6 Mar 2020 12:50:03 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [89.37.124.34] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a1995ce5-6da0-420d-e6bc-08d7c1cce3ff X-MS-TrafficTypeDiagnostic: VI1PR04MB6846:|VI1PR04MB6846: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-Forefront-PRVS: 0334223192 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(346002)(39860400002)(396003)(376002)(366004)(136003)(189003)(199004)(81166006)(8936002)(81156014)(186003)(110136005)(8676002)(2906002)(44832011)(26005)(2616005)(956004)(4326008)(16526019)(6506007)(1076003)(52116002)(6666004)(86362001)(66946007)(6512007)(6486002)(5660300002)(478600001)(316002)(66556008)(66476007)(32563001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB6846;H:VI1PR04MB5775.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:0; Received-SPF: None (protection.outlook.com: oss.nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5t72fPTjFKYkITp0eeaxFFcktKe1Rq7qzlnO+M8IvITuyzbwOBIPKf8bpQWDk1sy7IPETnQYpHlslJuTdrqm821tDl5NS8hzZd26O94e1bCm2oFngoDiIQFa8vOMR9MmcY6QjvwtI2/GBoEV+1QzeB+tBMlGIr/sZnImcJIby+K3AvVnXuuhffYOsEhcfIOrVSWO243W6xwg+0zAIm7xMKwgrHX96khyljuhekw+uwiLJLm2aRgPbX4lDjN3sEXMEOakC+hx7L3j+9Ff2qiGQmxkOJG2bCXaOwr1zS5nz/eVYQRHQHidrNFbor0g+PkxM9TektBwrTtgLWf5y2bJIXcLcn7VCfsRiG2Phz9PfNkdcpZ6ENKf0Jlghfcd7KGVkQfI8kz2vp7JLUxn4bxnKL9SgiF1j2UUBnja9ZK+YeOv4q3mUzqJQPet9MDh62NDx5Rjd9KJ1eHh+rId7H3YB19Pe9HdYF75dXBmMuj39O5FFnTGKliQ1Uz+3Hdu2Ec/ X-MS-Exchange-AntiSpam-MessageData: D5HzvIC/VqPRZyuE21PvvhtnPzxagJys3T+4nCTWlt1lULIdhHIYaA3r1GYrl72ZP1JFjXlJip97ld1/vLafDf4Rt36p2Issgr5MTDflGGc4Qi86oTFpRVA5/W9OfGE9Xkt60csMAKl0XVIHyxxZYg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1995ce5-6da0-420d-e6bc-08d7c1cce3ff X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2020 12:50:04.1171 (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: vcLLOrn5tqEZG444pE80ejRc7kifCNXYOYXlF/g0G50rIvCwIq7xyRSTKxorwVi8Mk0fH9yOmktAIejJai9KVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6846 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurentiu Palcu Hi, This patchset adds initial DCSS support for iMX8MQ chip. Initial support includes only graphics plane support (no video planes), no HDR10 capabilities, no graphics decompression (only linear, tiled and super-tiled buffers allowed). Support for the rest of the features will be added incrementally, in subsequent patches. The patchset was tested with both HDP driver (not yet upstreamed) and MIPI-DSI (drivers already on the dri-devel ML). Thanks, Laurentiu Changes in v4: * Addressed Lucas and Philipp's comments: * Added DRM_KMS_CMA_HELPER dependency in Kconfig; * Removed usage of devm_ functions since I'm already doing all the clean-up in the submodules_deinit(); * Moved the drm_crtc_arm_vblank_event() in dcss_crtc_atomic_flush(); * Removed en_completion variable from dcss_crtc since this was introduced mainly to avoid vblank timeout warnings which were fixed by arming the vblank event in flush() instead of begin(); * Removed clks_on and irq_enabled flags since all the calls to enabling/disabling clocks and interrupts were balanced; * Removed the custom atomic_commit callback and used the DRM core helper and, in the process, got rid of a workqueue that wasn't necessary anymore; * Fixed some minor DT binding issues flagged by Philipp; * Some other minor changes suggested by Lucas; * Removed YUV formats from the supported formats as these cannot work without the HDR10 module CSCs and LUTs. Will add them back when I will add support for video planes; Changes in v3: * rebased to latest linux-next and made it compile as drmP.h was removed; * removed the patch adding the VIDEO2_PLL clock. It's already applied; * removed an unnecessary 50ms sleep in the dcss_dtg_sync_set(); * fixed a a spurious hang reported by Lukas Hartmann and encountered by me several times; * mask DPR and DTG interrupts by default, as they may come enabled from U-boot; Changes in v2: * Removed '0x' in node's unit-address both in DT and yaml; * Made the address region size lowercase, to be consistent; * Removed some left-over references to P010; * Added a Kconfig dependency of DRM && ARCH_MXC. This will also silence compilation issues reported by kbuild for other architectures; Laurentiu Palcu (4): drm/imx: compile imx directory by default drm/imx: Add initial support for DCSS on iMX8MQ dt-bindings: display: imx: add bindings for DCSS arm64: dts: imx8mq: add DCSS node .../bindings/display/imx/nxp,imx8mq-dcss.yaml | 85 ++ arch/arm64/boot/dts/freescale/imx8mq.dtsi | 23 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/imx/Kconfig | 2 + drivers/gpu/drm/imx/Makefile | 1 + drivers/gpu/drm/imx/dcss/Kconfig | 9 + drivers/gpu/drm/imx/dcss/Makefile | 6 + drivers/gpu/drm/imx/dcss/dcss-blkctl.c | 73 ++ drivers/gpu/drm/imx/dcss/dcss-crtc.c | 206 +++++ drivers/gpu/drm/imx/dcss/dcss-ctxld.c | 431 +++++++++ drivers/gpu/drm/imx/dcss/dcss-dev.c | 277 ++++++ drivers/gpu/drm/imx/dcss/dcss-dev.h | 172 ++++ drivers/gpu/drm/imx/dcss/dcss-dpr.c | 562 ++++++++++++ drivers/gpu/drm/imx/dcss/dcss-drv.c | 183 ++++ drivers/gpu/drm/imx/dcss/dcss-dtg.c | 413 +++++++++ drivers/gpu/drm/imx/dcss/dcss-kms.c | 188 ++++ drivers/gpu/drm/imx/dcss/dcss-kms.h | 43 + drivers/gpu/drm/imx/dcss/dcss-plane.c | 405 +++++++++ drivers/gpu/drm/imx/dcss/dcss-scaler.c | 826 ++++++++++++++++++ drivers/gpu/drm/imx/dcss/dcss-ss.c | 180 ++++ 20 files changed, 4086 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml create mode 100644 drivers/gpu/drm/imx/dcss/Kconfig create mode 100644 drivers/gpu/drm/imx/dcss/Makefile create mode 100644 drivers/gpu/drm/imx/dcss/dcss-blkctl.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-crtc.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-ctxld.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-dev.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-dev.h create mode 100644 drivers/gpu/drm/imx/dcss/dcss-dpr.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-drv.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-dtg.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-kms.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-kms.h create mode 100644 drivers/gpu/drm/imx/dcss/dcss-plane.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-scaler.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-ss.c -- 2.17.1