Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1710433rbb; Mon, 26 Feb 2024 20:47:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX123Dn8yWu685lmOUIBl5zeWJraZB7v8wjb+WV+g0MQgLiAzBKSZew0TSC3Ms9xLCYpTu5MWFAdKa5KaqU5bxza5yafLvQZVhq5DqV7Q== X-Google-Smtp-Source: AGHT+IFiqaB/4ChyMUjqEIXeLunZKFuHnnetu2avYNZztDllIBhY/iMqxOymLSlFtTv3ghhqo3bn X-Received: by 2002:aa7:cb13:0:b0:566:2a1c:9c0f with SMTP id s19-20020aa7cb13000000b005662a1c9c0fmr1120492edt.16.1709009220060; Mon, 26 Feb 2024 20:47:00 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s14-20020a056402036e00b00565f73a1ebdsi366113edw.172.2024.02.26.20.47.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 20:47:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82704-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="T7UNKP/Q"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-82704-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82704-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0B7A81F22A04 for ; Tue, 27 Feb 2024 04:46:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5D0C52F8D; Tue, 27 Feb 2024 04:44:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="T7UNKP/Q" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2052.outbound.protection.outlook.com [40.107.220.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EAEC524D1 for ; Tue, 27 Feb 2024 04:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.52 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709009092; cv=fail; b=D+SflOTQVOW/zJQvzvb7xxrW6HMBCs3eULECYwkBCIXXww9mLqN5Zl3ghWeZNWx9tSsZPCYdcv1go0rmFLP9/VDdx+O2HoXyecUNbAeMU30rkhq27828PHhx472UTKY/dvtoPHyoSwakwPNtA3oNXOK0k+ulrPpnVzKXrxPEYDs= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709009092; c=relaxed/simple; bh=K1qFsPtwFx3lSt2S3zKA+fw2x+d7A1JDrP48m1zVeNU=; h=From:Subject:Date:Message-ID:MIME-Version:Content-Type:To:CC; b=mvm4vk7C+Oyiw8aocZPtHuf2kGfl8kb+zuJTQf+BEnozRlmeEzPMjV/r7SDE+Fxb4OyVUIXD0M8XEm+ihH22VWqzDJ4zDskLiTLw5967p+9vohJfAoZ/L66uSkl9iXue7JkBRzLBbWUHkfNt3lhbX+xSeYLxyvImdgAQrMz2azE= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=T7UNKP/Q; arc=fail smtp.client-ip=40.107.220.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W2MZK7zth1G5To0mergEyxdJ0J47hqDKluHgCzDFjwNoYVntpYyhq63QKtx4qqJFoZxqZArMTptb2egk4khvPn1e9oP5wHODap0ZbghEZYwStiJw0zKRyTD5OOGL6O3O0MPlMIQcekqdLwJ5pcCYUDQ9UuNqFecGK+mLJoR1XRyl2m9vk55/LhVl9sKlrnALXy/hiobkXAAUpuRy21e7fZBLTq2wjCqExfcQtcLIRFLIhzi8+XMeBgr3g5xoEcE6gUhR4u2HcFlU6IAevxixvlD6S0Oq4vOddbnCAylNWfSBdBkVM6vInb5ZX85vbzpSQGwOWb5U5vyslXNAeDqMAg== 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=oe+X+W+ARwGtqVkJTlJFM4EWlLatO5T/57/b00K3lV0=; b=IsXjFAQGa0fVT1Tel2fZV7Bj5JZKMRn6jXmbSWCBjTGq9+mq0vIwSKekaWgSWZ5LSH3S5dKUWvXsjZS9mArI1Po/QQIUwZk/Zqvjdsd7ipdD2+SbjyLrIMGk16S4P25Iqw0V1GPeYMtMcRzYQ5AYdVj+8TK3UvNZU+I6fXAuIEzSA/G+skxTJ4hFEvQxA2x7YeSUCh0cwSnkalrZThVWjPCguZdn6xOUAI0rIxgofwepSpCDZ+pG9PHvBg3+1C57Cmnz0uYQCf2BdSV8E3thynmHdS9eDcFxxXvNLM5ttWITKmIBjhvGmOmHXzO6gomsZ9HCw/yXWKwHijKw9Lekow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=ffwll.ch 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=oe+X+W+ARwGtqVkJTlJFM4EWlLatO5T/57/b00K3lV0=; b=T7UNKP/QfNpuNSvJjPxxaU1YNXgXQrMXhU4yCYT2THYfPOTMXrdLHBSC7u/mOgMuu1EShemPjcvxqHo7UypbO4RA0jN1LmaD+zMe02En+WttFAPnG/UPhiHE8cuPwBWyPbT1nlLrr2aLl3K0OUfMrTM6ali2XaR5mCkBbQcmKE0= Received: from MW4PR04CA0067.namprd04.prod.outlook.com (2603:10b6:303:6b::12) by LV8PR12MB9232.namprd12.prod.outlook.com (2603:10b6:408:182::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.33; Tue, 27 Feb 2024 04:44:48 +0000 Received: from CO1PEPF000044F5.namprd05.prod.outlook.com (2603:10b6:303:6b:cafe::78) by MW4PR04CA0067.outlook.office365.com (2603:10b6:303:6b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.50 via Frontend Transport; Tue, 27 Feb 2024 04:44:48 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1PEPF000044F5.mail.protection.outlook.com (10.167.241.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Tue, 27 Feb 2024 04:44:48 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 26 Feb 2024 22:44:47 -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.35 via Frontend Transport; Mon, 26 Feb 2024 22:44:45 -0600 From: Anatoliy Klymenko Subject: [PATCH 0/4] Setting live video input format for ZynqMP DPSUB Date: Mon, 26 Feb 2024 20:44:41 -0800 Message-ID: <20240226-dp-live-fmt-v1-0-b78c3f69c9d8@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIALlo3WUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDIyMz3ZQC3ZzMslTdtNwSXTMTQ1Nzc+Mk00QzCyWgjoKi1LTMCrBp0bG 1tQAILsqTXQAAAA== To: Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Michal Simek , "Andrzej Hajda" , Neil Armstrong , Robert Foss , Jonas Karlman , "Jernej Skrabec" CC: , , , Anatoliy Klymenko X-Mailer: b4 0.12.4 Received-SPF: None (SATLEXMB03.amd.com: anatoliy.klymenko@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F5:EE_|LV8PR12MB9232:EE_ X-MS-Office365-Filtering-Correlation-Id: 91f2c835-3b3e-4702-6b1b-08dc374ed3e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iBxB9KelphFWmp075UmIZ7EYwqorCWPaE46KdJv9MQDNAoCycEcmnB8j6NqBlnDt8vd+vSpYxp8cVqDteXk5Q/8omHSZpIYnVb3wd3beGBk5TLRMkhUXRNZWVNuw3bTUfyEvRDbYIqMQxR7rZs6qQnhK90DYk3Hw/6yRFMIxGVibt400UzaFiTTyRqNTlVdRIdpAoq6L9PLZCi2JRXMvNFET1esxd+2oX4JmfcXWi1QITtkX9IvdMjezPhES+4dWUWf4E1xyrN/dhR4Tk4m/Gueq3Xpe6KB5mIXXE8v6/S6xOvdv6ObVKcTjgf7+IQ+vMkSP0RDOOP6TmXAA61y7vIvYZ9Sv7TFSM8IUbiFcV6++yzKSpr9tS3p0aQL7MfjDOy0PCBYu23I1rM7tdGX/TDXsx90Zrt1du8XersZRQvFT1ZyxQ8O/L3FDNjboVp+HaI2VJTvH6ZmHhXja1nfb85ql8hHoqew5Wm9RJ082zZ69nLuO7UMxOOLkIdZ0JWS7l/JeL89GdWpMjbMtmufZo1LVOfJscMwRSFqyPAPB0BuRZncbQSo20HMLzJEPUUMWecVu1t4z2ExN4VNU63lo/He6zER+rn32Xt1SOdTXDnnQW50RnlMXRwZ1BxYH+gdBiCh6SXG1X66RF/iojjDDPFKQOC9mWXul9MDYHCFEK9iHFGqR0hLLSmjo/GxOzcefI913aMsob9PGlJfsSwUGd+6Ff6PtB7Q/JLMoiBvz4dFKXDN0qI8QrgbE1ZlYJ81ei+KdZF3Zuntf70FPCM6kXA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(36860700004)(82310400014)(921011);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 04:44:48.0184 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 91f2c835-3b3e-4702-6b1b-08dc374ed3e7 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044F5.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9232 Implement live video input format setting for ZynqMP DPSUB. ZynqMP DPSUB can operate in 2 modes: DMA-based and live. In the live mode, DPSUB receives a live video signal from FPGA-based CRTC. DPSUB acts as a DRM encoder bridge in such a scenario. To properly tune into the incoming video signal, DPSUB should be programmed with the proper media bus format. This patch series addresses this task. Patch 1/4: Set the DPSUB layer mode of operation prior to enabling the layer. Allows to use layer operational mode before its enablement. Patch 2/4: Announce supported input media bus formats via drm_bridge_funcs.atomic_get_input_bus_fmts callback. Patch 3/4: Program DPSUB live video input format based on selected bus config in the new atomic bridge state. Patch 4/4: New optional CRTC atomic helper proposal that will allow CRTC to participate in DRM bridge chain format negotiation and impose format restrictions. Incorporate this callback into the DRM bridge format negotiation process. Signed-off-by: Anatoliy Klymenko --- Anatoliy Klymenko (4): drm: xlnx: zynqmp_dpsub: Set layer mode during creation drm: xlnx: zynqmp_dpsub: Anounce supported input formats drm: xlnx: zynqmp_dpsub: Set input live format drm/atomic-helper: Add select_output_bus_format callback drivers/gpu/drm/drm_bridge.c | 19 +++++- drivers/gpu/drm/xlnx/zynqmp_disp.c | 109 +++++++++++++++++++++++++++++-- drivers/gpu/drm/xlnx/zynqmp_disp.h | 25 +++---- drivers/gpu/drm/xlnx/zynqmp_disp_regs.h | 8 +-- drivers/gpu/drm/xlnx/zynqmp_dp.c | 16 +++-- drivers/gpu/drm/xlnx/zynqmp_kms.c | 2 +- include/drm/drm_modeset_helper_vtables.h | 31 +++++++++ 7 files changed, 182 insertions(+), 28 deletions(-) --- base-commit: bfa4437fd3938ae2e186e7664b2db65bb8775670 change-id: 20240226-dp-live-fmt-6415773b5a68 Best regards, -- Anatoliy Klymenko