From patchwork Tue Aug 11 00:46:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkateshwar Rao Gannavarapu X-Patchwork-Id: 11708389 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 793FC13B1 for ; Tue, 11 Aug 2020 00:46:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 4BBEA206C3 for ; Tue, 11 Aug 2020 00:46:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="mwW/ZH4j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BBEA206C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 98E1E6E0D1; Tue, 11 Aug 2020 00:46:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2061.outbound.protection.outlook.com [40.107.92.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id 185B26E0D1 for ; Tue, 11 Aug 2020 00:46:45 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gu+spdjZMCIOPHV8NuIUXRCfXckS6SHuqDy5jHw1P+fZKo/g+049ipv3IKZMCCT/7qhFS+iiI9kgpAHtbUmBR8yVP18FoweNlR9kBOzbU6ixVGqXdfua69iRABqGgOku1JDPsqN3bB6RwYzpew8OQ8zVyuM8L6HUtNPlavw5GMvrFagcP2W5xM8BEYkgz56n+Zx/7s/HCPWLt/Himu1vfmBH/f+xlEt+LpmuO9FVtmSfwfWOg13ZRA8YE50mZ37KDnPtTOmP/2hZwkbps1rVhHj3QhYU1g0oiv7e6j82ZBzeQWykYYhdSgrxICL94kyJPSo4ve4NnZgRoofFfhIcfA== 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=Ip3lgg/POb498WWKn3xfUREB68HW0ma/uBuwhD4XZzw=; b=ZenBgj0OvUEkauqBWRl8kUpxPzGsZVPHKjkM/GhMxbVpFbjmBvrltRBy4gEmAQvWzLP9AQDUm0/JNY6n0eYmgX6/yBN+lkqyb79sFgQaCVpq0tNFr0IcM/7RdgpgdWp3qRIdX6UEKWlqHX89vYW8gswBtE413NLY6CzJnDTCSbphPAfxblUd+4m5gN4mIIBogQDwl0n7FGgQH8RFibH4rm1mLwWvI0E9GMckrNodcSEchyU0NJ1+u+wkv+3u4/Ldvxbhw5j4cOueW4osure8+baV3MRErSIanva8pHMeZZqPIYkMW9r+tWFHwBwil4TtoWb50BWSRFnR2LSplvwuEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ip3lgg/POb498WWKn3xfUREB68HW0ma/uBuwhD4XZzw=; b=mwW/ZH4j9yOWsWqaJ9tOVHu2IVHOleOrJN8PzH6Gqc9S4IG/2H2jaCYRzG3GMy6Lpo/IvJyTSJbbe0gviEuazcUugPj5Xf5FEcsLCWP9AElcY4sIPmV6RL4RYGqFbyZ1y1dXTCnRjmI9vvgYHWEEBwWskF3G5Pl1wwfDyi69DsM= Received: from DM5PR13CA0065.namprd13.prod.outlook.com (2603:10b6:3:117::27) by CH2PR02MB6022.namprd02.prod.outlook.com (2603:10b6:610:2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.22; Tue, 11 Aug 2020 00:46:41 +0000 Received: from DM3NAM02FT007.eop-nam02.prod.protection.outlook.com (2603:10b6:3:117:cafe::b3) by DM5PR13CA0065.outlook.office365.com (2603:10b6:3:117::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.7 via Frontend Transport; Tue, 11 Aug 2020 00:46:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by DM3NAM02FT007.mail.protection.outlook.com (10.13.4.88) with Microsoft SMTP Server id 15.20.3261.19 via Frontend Transport; Tue, 11 Aug 2020 00:46:41 +0000 Received: from [149.199.38.66] (port=39388 helo=smtp.xilinx.com) by xsj-pvapsmtpgw01 with esmtp (Exim 4.90) (envelope-from ) id 1k5IR0-0006Xz-UN; Mon, 10 Aug 2020 17:46:34 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1k5IR7-0000Bj-Bj; Mon, 10 Aug 2020 17:46:41 -0700 Received: from xsj-pvapsmtp01 (mailman.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 07B0kaYW005602; Mon, 10 Aug 2020 17:46:36 -0700 Received: from [172.23.155.151] (helo=xhdengvm155151.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1k5IR1-00009x-I1; Mon, 10 Aug 2020 17:46:35 -0700 From: Venkateshwar Rao Gannavarapu To: hyun.kwon@xilinx.com, laurent.pinchart@ideasonboard.com, dri-devel@lists.freedesktop.org Subject: [RFC PATCH V2 2/2] drm: xlnx: dsi: driver for Xilinx DSI TX subsystem Date: Tue, 11 Aug 2020 06:16:17 +0530 Message-Id: <1597106777-30913-3-git-send-email-venkateshwar.rao.gannavarapu@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1597106777-30913-1-git-send-email-venkateshwar.rao.gannavarapu@xilinx.com> References: <1597106777-30913-1-git-send-email-venkateshwar.rao.gannavarapu@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 21b91aa6-0c10-405a-2196-08d83d900381 X-MS-TrafficTypeDiagnostic: CH2PR02MB6022: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 90cwHUN82xDEcVLL2nDvzAgai28NyamyEctyhdL9yU3kL05GEeD4AjvZCdd2Yr3Ijltc8VdcZmOfwxybLgAT7bUEn4iMyphg5Awpz5srl0TBmUN/8NvvIfGHVZdsfRpvHgKdW0VWpHDnOL+IaxOM1LpXSTkNv9oJCsIyf0hV1qGGAmRqoghORJLbulWpRrQjZo0X2Xs4YEWC3PGAUcxoEwpH6mexepeVas/6SL9FXlRQi/SGayMMW1S0Ipoyt7Og7O+efz2Pk5EPPS7Oz5Xuice7aDAMhC2DXJ1lGM3lXGcqe1pMHu5nu+4FvW5Xx1aMBzE6U5D28F/XxMY4m06hj3ZV0xA71tv4BRT6K0ephl9WwYjpzrOMslo5ZU3smwSQQeY7klJ1ZnvHfGvUkfadRA== X-Forefront-Antispam-Report: CIP:149.199.60.83; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapsmtpgw01; PTR:unknown-60-83.xilinx.com; CAT:NONE; SFTY:; SFS:(396003)(39860400002)(136003)(376002)(346002)(46966005)(316002)(5660300002)(7696005)(9786002)(6666004)(26005)(82740400003)(478600001)(47076004)(2616005)(70206006)(70586007)(83380400001)(426003)(356005)(81166007)(2906002)(82310400002)(107886003)(186003)(30864003)(36756003)(8936002)(8676002)(336012)(4326008); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 00:46:41.6114 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21b91aa6-0c10-405a-2196-08d83d900381 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT007.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR02MB6022 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sandipk@xilinx.com, Venkateshwar Rao Gannavarapu , airlied@linux.ie, linux-kernel@vger.kernel.org, vgannava@xilinx.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The Xilinx MIPI DSI TX subsystem soft IP is used to display video data from AXI-4 stream interface. It supports upto 4 lanes, multiple RGB color formats, video mode and command mode. The driver provides the kernel mode setting and MIPI DSI host functionalities. Signed-off-by: Venkateshwar Rao Gannavarapu --- drivers/gpu/drm/xlnx/Kconfig | 11 + drivers/gpu/drm/xlnx/Makefile | 2 + drivers/gpu/drm/xlnx/xlnx_dsi.c | 701 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 714 insertions(+) create mode 100644 drivers/gpu/drm/xlnx/xlnx_dsi.c -- 1.8.3.1 This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately. diff --git a/drivers/gpu/drm/xlnx/Kconfig b/drivers/gpu/drm/xlnx/Kconfig index aa6cd88..991bb37 100644 --- a/drivers/gpu/drm/xlnx/Kconfig +++ b/drivers/gpu/drm/xlnx/Kconfig @@ -11,3 +11,14 @@ config DRM_ZYNQMP_DPSUB This is a DRM/KMS driver for ZynqMP DisplayPort controller. Choose this option if you have a Xilinx ZynqMP SoC with DisplayPort subsystem. + +config DRM_XLNX_DSI + tristate "Xilinx DRM DSI Subsystem Driver" + select DRM_MIPI_DSI + select DRM_PANEL + select DRM_PANEL_SIMPLE + help + DRM KMS driver for Xilinx programmable DSI subsystem controller. + Choose this option if you have a Xilinx MIPI DSI-TX in video + pipeline. The driver provides the kernel mode settings and MIPI + DSI host functionalities. diff --git a/drivers/gpu/drm/xlnx/Makefile b/drivers/gpu/drm/xlnx/Makefile index 2b844c6..b7ee6ef 100644 --- a/drivers/gpu/drm/xlnx/Makefile +++ b/drivers/gpu/drm/xlnx/Makefile @@ -1,2 +1,4 @@ zynqmp-dpsub-objs += zynqmp_disp.o zynqmp_dpsub.o zynqmp_dp.o obj-$(CONFIG_DRM_ZYNQMP_DPSUB) += zynqmp-dpsub.o + +obj-$(CONFIG_DRM_XLNX_DSI) += xlnx_dsi.o diff --git a/drivers/gpu/drm/xlnx/xlnx_dsi.c b/drivers/gpu/drm/xlnx/xlnx_dsi.c new file mode 100644 index 0000000..3231043 --- /dev/null +++ b/drivers/gpu/drm/xlnx/xlnx_dsi.c @@ -0,0 +1,701 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Xilinx FPGA MIPI DSI Tx Controller driver + * + * Copyright (C) 2017 - 2019 Xilinx, Inc. + * + * Authors: + * - Saurabh Sengar + * - Venkateshwar Rao Gannavarapu + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include