From patchwork Fri Jan 19 05:54:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Klymenko, Anatoliy" X-Patchwork-Id: 13523335 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F1950C4725D for ; Fri, 19 Jan 2024 05:55:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vjclN/ADKH37EKEUG7Lt6cFoM1NZFYNNNj2IDJtQvlY=; b=jI+Ero9KI1GnXQ pd+0vOKlFe88qped3BsUVeIbQTq60W77OY93FTGmeeyofcd1Lp/fyybHTikWbAiYlARc3w2kDgGqe vWjjgodswiEzh3XrnrpBkS2Mw8sLjqM4j+PEDwx+vi00VezGU3gLsyDPDPPiqMxcM8rZB4sRGdcTr KAhdlwI7NzCQUl4kAFYa6o2YXjjHonTX7H6Ogzi5YmgUJ/xbOK9lmMPi4lkZeohYZVdLmoaHpQ1Nc AyOHJwqjvyMS9h+41Ca+vJA48bV5OzvWwJcgNYZOmq2hF91O/gSnejFN9dnC5ctwR54CRERbjO16F rSzoDEgiTkv0fm4YR2vw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQhqG-004YSq-0G; Fri, 19 Jan 2024 05:55:00 +0000 Received: from mail-bn8nam04on20601.outbound.protection.outlook.com ([2a01:111:f403:2408::601] helo=NAM04-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQhqB-004YQd-1T for linux-arm-kernel@lists.infradead.org; Fri, 19 Jan 2024 05:54:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aRujc5Ftm1prXFrjjEaAM5Xu3R9YTG1IZZZyqJybV6JyUJDuRJzaKS4oHhjIo889YAtBDGieyV3fwOouhsAhmSdMOsJNt+2P/BxblszI15sJkajd7AiS/gaeYfLbaiyT+5iYvsQRZkQEh7lOVj4KzmabMq7gGhBQV2aVRUgn7NUaVYAd+8iAqPt1IpAyd1trXq8DhlF7kNILy+4xN2s74FRN08ayDSP8fDuwHrg4pT6gLs1Qfb+yq3aGhbv3SZvQ8KOPJD50qhPwnmkfn7ZaeYSDdBggSLc7s8pJqNUhb0ogMvfxkM/UgDepMDAE7abAHyWbgc1dAXoPoxS57Lu6mQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WEhKkNPNY/gcwq9DcVM5e7tty+lzGg1BCdl7549XHR0=; b=dmNckWunBq2ZLPWWBV8mhyrV3uBEP+A0kflnNJ9NS8EJgACIiaB+8LAsc1Vo7SShRkKqUFSauFULKC0JKrndiXpacxJ7tNBlz50tCohv2B611LMc6ZzbuDurdA9liVTQ+xYukLVw3cxqc6J+/iPHglWjB6zQvIWOcStL5hU3N3PlJUDdcOrSkfx1AWnvl/2Iv6jqHNDNABuzHKa6BpH3DtO4alr65usfONHB/wU68ti+KDPUplMbp8HgBXxwQVfHsJK7Wqrj5mUxbOmCBK1TOwrg+cmK0NpPwiX3uVAwRsiewPqOA7KaFSzUv2F9dKV1IOPAq48xjjSg8AK/bh91uQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=ideasonboard.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WEhKkNPNY/gcwq9DcVM5e7tty+lzGg1BCdl7549XHR0=; b=kUjKusND7c8L7n1WHTqDEtqRyZkx+nU/wC4Ko4OfeRbfrNCIsVS4khPFA8XqKRtxW0Bc6vsm8VvqGPSFdiKPjzG6LaIgkCdT2alThqXdzr4+1vDZNMirWP6tcMXiDt6Z7RiUtqBNtSlkHMocFer1BYiUrGXQButClLc6K5ARJXg= Received: from DS7PR05CA0043.namprd05.prod.outlook.com (2603:10b6:8:2f::22) by DM6PR12MB4563.namprd12.prod.outlook.com (2603:10b6:5:28e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.26; Fri, 19 Jan 2024 05:54:50 +0000 Received: from DS3PEPF000099DC.namprd04.prod.outlook.com (2603:10b6:8:2f:cafe::d8) by DS7PR05CA0043.outlook.office365.com (2603:10b6:8:2f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.8 via Frontend Transport; Fri, 19 Jan 2024 05:54:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS3PEPF000099DC.mail.protection.outlook.com (10.167.17.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Fri, 19 Jan 2024 05:54:49 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 18 Jan 2024 23:54:49 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 18 Jan 2024 23:54:38 -0600 Received: from xsjanatoliy50.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Thu, 18 Jan 2024 23:54:37 -0600 From: Anatoliy Klymenko To: , , , , , , , , , Subject: [PATCH v2 0/4] Fixing live video input in ZynqMP DPSUB Date: Thu, 18 Jan 2024 21:54:33 -0800 Message-ID: <20240119055437.2549149-1-anatoliy.klymenko@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DC:EE_|DM6PR12MB4563:EE_ X-MS-Office365-Filtering-Correlation-Id: 2166c234-51f4-4422-48e0-08dc18b3263c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EW2SGMcmjW1fN2wyTIuLX8t1q6N7kALkF53ZVHaaBJHtoAavYKOmycG3BlUom/52VE6bq1NlHl9dKG/ihWk9/kARoHst8FvALjp92Yetvwxss+zlNi1DZgkjemuJdonQZLa6/3Y3couzDSBmwa804dNm+0um8Ht+k4h3Ae+2wBDbxu388nY3M+t028T/pDZBOF2cRqq2fQ+Qlad9dB2yW1qMcKq6b36DYyBPUBe0Rpy50vJ4TTPUyuNG+Bk28WfpJGzKFwryuTW6MInmdLcHwOHHLtZhRepOv+qYvRcf8T712MBCCgD0TVjIIWd9JUtAU3ONc9zIJjdDqnpZ4PPYKkpq5Qq+PgIr5E7rgS0NMmdvkfA72vj52tptOikVjuzwmyUHBNXCjHndN6A9Gp8eEcFfLfuZE5NYkYKeVaqAHlChAKM+v6x96dvppwW9EJmmlFzTjjp6tWDlmzFgecm+cWQmX243xC/UR0rQ4quAT0fq/myVsro5quaLSG0rSGRB3ppPQc9NhvFQv6FvgSbTzW3CVCpDtR+wmHGboB/Ga2xv9Vv6sGLpyHAZ9B3QBzdo0pGiCDGyqPk53b1NBrZWS7KBz7xMbgrzCJ4SEVfCjfcksPY7VtRO0DXfgJfBIH9LjINDkEoc/SSS4HyAYlCiHpJXCGnkGZRmLrop8i+YhOF0xl7JhkzrXIZrFwnIoQyTaBZ1CfczDEL81o7VPGGRLAzp/imwoGQbr6CLL2QLgdzV0NkIu0zKbIuBQ2UYfT9iIRvvrWncYRKBW0YmiINJ8BkUObq+ELdAIXJlPxnuIX3nVUPdQtWS7CnOCrfl1aGU/12EcCAZQVsV+8Vqe7YXL8fuF4oiPaxz7yWZHEFkqINE22jAZ2Z1NOX6TFAwON7w X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(136003)(346002)(376002)(39860400002)(396003)(230173577357003)(230273577357003)(230922051799003)(1800799012)(82310400011)(451199024)(186009)(64100799003)(46966006)(36840700001)(40470700004)(921011)(40480700001)(40460700003)(966005)(83380400001)(2616005)(1076003)(426003)(336012)(8676002)(8936002)(5660300002)(47076005)(316002)(110136005)(6666004)(70206006)(70586007)(478600001)(44832011)(26005)(356005)(81166007)(82740400003)(2906002)(41300700001)(86362001)(36756003)(36860700001)(83996005)(2101003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 05:54:49.8684 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2166c234-51f4-4422-48e0-08dc18b3263c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DC.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4563 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240118_215455_497260_C942F151 X-CRM114-Status: GOOD ( 13.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add few missing pieces to support ZynqMP DPSUB live video in mode. ZynqMP DPSUB supports 2 modes of operations in regard to video data input. In the first mode, DPSUB uses DMA engine to pull video data from memory buffers. To support this the driver implements CRTC and DRM bridge representing DP encoder. In the second mode, DPSUB acquires video data pushed from FPGA and passes it downstream to DP output. This mode of operation is modeled in the driver as a DRM bridge that should be attached to some external CRTC. Patches 1/4,2/4,3/4 are minor fixes. DPSUB requires input live video format to be configured. Patch 4/4: The DP Subsystem requires the input live video format to be configured. In this patch, we are assuming that the CRTC's bus format is fixed (typical for FPGA CRTC) and comes from the device tree. This is a proposed solution, as there is no API to query CRTC output bus format or negotiate it in any other way. Changes in v2: - Address reviewers' comments: - More elaborate and consistent comments / commit messages - Fix includes' order - Replace of_property_read_u32_index() with of_property_read_u32() Link to v1: https://lore.kernel.org/all/20240112234222.913138-1-anatoliy.klymenko@amd.com/ Anatoliy Klymenko (4): drm: xlnx: zynqmp_dpsub: Make drm bridge discoverable drm: xlnx: zynqmp_dpsub: Fix timing for live mode drm: xlnx: zynqmp_dpsub: Filter interrupts against mask drm: xlnx: zynqmp_dpsub: Set live video in format drivers/gpu/drm/xlnx/zynqmp_disp.c | 111 +++++++++++++++++++++--- drivers/gpu/drm/xlnx/zynqmp_disp.h | 3 +- drivers/gpu/drm/xlnx/zynqmp_disp_regs.h | 8 +- drivers/gpu/drm/xlnx/zynqmp_dp.c | 15 +++- drivers/gpu/drm/xlnx/zynqmp_kms.c | 2 +- 5 files changed, 119 insertions(+), 20 deletions(-)