From patchwork Wed Jan 24 02:53:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Klymenko, Anatoliy" X-Patchwork-Id: 191324 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp745801dyi; Tue, 23 Jan 2024 19:07:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZBtzeBYpY85ZB7bV88LeqPwKuiGQBdpB0NPeavO7Wi+xB/9iqAR0b5ND+6wBa16D+GXWf X-Received: by 2002:a05:6a20:7293:b0:19c:523a:8787 with SMTP id o19-20020a056a20729300b0019c523a8787mr303079pzk.20.1706065626591; Tue, 23 Jan 2024 19:07:06 -0800 (PST) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q36-20020a635c24000000b005cdfe08f428si10479817pgb.645.2024.01.23.19.07.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 19:07:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36357-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=kCgZ5qjj; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-36357-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36357-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id EEEB5B289F8 for ; Wed, 24 Jan 2024 02:55:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63F34C12F; Wed, 24 Jan 2024 02:54:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="kCgZ5qjj" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2079.outbound.protection.outlook.com [40.107.93.79]) (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 2FCF646B4 for ; Wed, 24 Jan 2024 02:54:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064849; cv=fail; b=Pxcxwl2c7MIHwx305jJHLo5ZnKU39eEQfAwnY67kA/gQzRmGw2SxAJeMy78G1c5TQq6jHLOPXHs2iZ+xesq038bGhAjmp4QFJIzgA/oNLIXlRIHI+HL3x70cPeEeDCMnXgxwZR5Sbf83V9x0mPc8M7+Cr0EZcJsurZ/ra99sIGI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064849; c=relaxed/simple; bh=sVcDNeUh7fsYktx5246lAlf0oeTGsGFaF2eU6dNKmQI=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=t9grCZRWckc/q28Sn/vmH5u2Xh4bnK4er8CfPz+2+fPYQzWmzTMIs0IuNvJtVA4bAao56akwYA2mVCrRTx88URKElzO+gP6w8WoFwSQW26qYZWsRQfYmbAL3vycyWdoXFXzDe6JbhJw5AVst1UZ+IWMT/6jkPI/E8xaW+5RDyyM= 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=kCgZ5qjj; arc=fail smtp.client-ip=40.107.93.79 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=hyz0iFS7y2JSRV3QTsSHYUjW5CZKXDyMB7bOOpPJT36Yq2kcqvSZTCf3HYgrtnWB+NZS0i2ytDiotiH7ZJMQUXgHlGTwVcGFkHp3ZmvCG4ho31/4TcDwt8b/edmBW7zb6mz0MVNECVLUTJtaXym46hweXEfUI6n2cdmJSxYPdtesDEyRLlt9DYEFqQaTqYn1n52o3czVPgl0oXETBuu87v6+ljlgOwRyYEA2Rnjhh9c5QPf9h998M6JuouEKggCAj6qk0QaRbqX8GvwQG6z0nIZMMXsNVtuaib0Tw8bqkFj/CaNSa6LJHd625xhHRO3Q2Eo3j0hL9QfSnWyangyWBw== 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=A078BbaAGY/zU6JL5BJwe7eSaF1X+L8idnxCjUVxvc0=; b=boYcr/A5dH7+lSOnUrYs3xfTis10xyz/7l79V4wfq2RsJVBWbqkU8s2qoR+BoeqfR33/9Q98hJeOMN0OSGCBQYvs2UnR2jugmW0jbZQrryOy27ZPzEPKJ7CbPmymIvquCeRx3c96crg22Yj5UxVcvp1+Pt2rxsdk4jq0+rjn80yfy/KWqllQxaYn19O7UQLCJ06MM8pZd4xCG3xoj/ndwIbBU+15wycsOblMMWE2kajCzUfxMKTE98Z+5pc6P4hQeltrmDgHJp4jvp15XaPPO+SsUeFWSA5I4iE+96NblrSrMLuLN11AFGJr7WvJ/Ld6m5cCdfAhNCTASPRpC924Bw== 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=A078BbaAGY/zU6JL5BJwe7eSaF1X+L8idnxCjUVxvc0=; b=kCgZ5qjjNuqma8svSnKn7rCMmU31W4k+4FkFovItRy7BltmQE2agAYg6XANeHdpCl06KuxxwL3lCXhQnRHDe+2EhCdAOJy06PZmmjmC9q9B8jK9B/zQtBJeQHmuji4oCUOaYiLyi5yoMxU1y1BXENkDwSA8jxBqUcACFENBuux0= Received: from SN7PR04CA0110.namprd04.prod.outlook.com (2603:10b6:806:122::25) by CH2PR12MB4938.namprd12.prod.outlook.com (2603:10b6:610:34::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Wed, 24 Jan 2024 02:54:06 +0000 Received: from SN1PEPF0002636C.namprd02.prod.outlook.com (2603:10b6:806:122:cafe::98) by SN7PR04CA0110.outlook.office365.com (2603:10b6:806:122::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22 via Frontend Transport; Wed, 24 Jan 2024 02:54:05 +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 SN1PEPF0002636C.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Wed, 24 Jan 2024 02:54:05 +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.34; Tue, 23 Jan 2024 20:54:04 -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; Tue, 23 Jan 2024 20:54:04 -0600 From: Anatoliy Klymenko To: , , , , , , , , , Subject: [PATCH v3 1/5] drm: xlnx: zynqmp_dpsub: Make drm bridge discoverable Date: Tue, 23 Jan 2024 18:53:58 -0800 Message-ID: <20240124025402.373620-2-anatoliy.klymenko@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240124025402.373620-1-anatoliy.klymenko@amd.com> References: <20240124025402.373620-1-anatoliy.klymenko@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636C:EE_|CH2PR12MB4938:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e32c268-01e2-4c48-a3c6-08dc1c87bac1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MSWJ4t/kOnLJPwzzEwsglrVEjJ/C7vV5PRKZviuj0eZrJArZf5k2nDipz8TTenkXoN8ddr3HqRkkJFSzJWfkh6tpcFxte3HlQ+/DWMGktRW4yWgg81lEAeID6C+3xN36Q7TYuC/ofKGNJFXUrC5HEpMsLEbJ8uv9taTFx73VCYHC4LXB2uCjfpmxzOP2IuqQDaW6gO9xyEDkHBmCYoo0hGG/vsyQAjYHcqRPZ8vwTtCCYb6mPhsGs25FE6XAIWD8LN/xposJ7lSdiA5AhGbrZYDOqzN0eWICd/7Ei/OJgWcDEAPoJoTc3/9209ApJdQTvkm0AnQnBxOHBMzis82HlhXZbiKdhx0hQtd+tg5GvSiSeXfa+PjwJNINC9vYkawf6gX+CvR00RBZ9HN/ZO2rlJIzbNwGUW+0ZQKPK9E7+we5azIW3Vdaf2rKrAq8N81wVW/cEE0o4x4cVkiuQwTRc4X5e5t5xpEURa26fVqJ9YuxcAfgMY3twOo5oNfn57cs0/jePuX+t2lfD4YMPk9Okd+nRGKPbhb5EQhcm7JQRoY8XLrlI8+8yFoOwKMYSo5gNL7i1jFW5pDALoQADT1/TJFcevk02hVuZ2b8MVE24uRkGxautbeWsKqHalasw1YIjg5eQiZBjEOKhjwBOCAfCo9Q6VlvWZNMfa6N8+SHYPxw13ty7/8S18EBQwmqj7ujWYlbIupRUOVo07hX4ZD+PmizAcndAGB0B9uYPJkaEAsaCeOwqpm4dR4UzwkYLA5/NNst1glp5wHX41UUCJQSwE33NBFgyDAXy2cbbPdB+VkArlzOXu9j+H8697Nftv6LEpqw6PIRmFQ27AYWUDXUjJGQ0yUCdWk+7zVJugUYGsbaxw7CXNTpWW3aCwwizeZ+ 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)(4636009)(346002)(396003)(39860400002)(376002)(136003)(230173577357003)(230273577357003)(230922051799003)(82310400011)(186009)(64100799003)(451199024)(1800799012)(40470700004)(46966006)(36840700001)(70206006)(110136005)(41300700001)(316002)(70586007)(82740400003)(478600001)(6666004)(356005)(86362001)(40460700003)(81166007)(40480700001)(36756003)(2616005)(336012)(1076003)(26005)(426003)(44832011)(2906002)(36860700001)(5660300002)(921011)(47076005)(8676002)(8936002)(83380400001)(83996005)(36900700001)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 02:54:05.8558 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e32c268-01e2-4c48-a3c6-08dc1c87bac1 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: SN1PEPF0002636C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4938 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788939470252749841 X-GMAIL-MSGID: 1788939470252749841 ZynqMP DPSUB supports 2 input modes: DMA based and live video. In the first mode, the driver implements CRTC and DP encoder DRM bridge to model the complete display pipeline. In this case, DRM bridge is being directly instantiated within the driver, not using any bridge discovery mechanisms. In the live video input mode video signal is generated by FPGA fabric and passed into DPSUB over the connected bus. In this mode driver exposes the DP encoder as a DRM bridge, expecting external CRTC to discover it via drm_of_find_panel_or_bridge() or a similar call. This discovery relies on drm_bridge.of_node being properly set. Assign device OF node to the bridge prior to registering it. This will make said bridge discoverable by an external CRTC driver. Reviewed-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Anatoliy Klymenko --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index a0606fab0e22..d60b7431603f 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -1721,6 +1721,7 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub) bridge->ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_HPD; bridge->type = DRM_MODE_CONNECTOR_DisplayPort; + bridge->of_node = dp->dev->of_node; dpsub->bridge = bridge; /* From patchwork Wed Jan 24 02:53:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Klymenko, Anatoliy" X-Patchwork-Id: 191310 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp741685dyi; Tue, 23 Jan 2024 18:56:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOYPRTOJxNZtJ2kuNKjoNdiC6X1Zf2HP+skv9AoJfxRoLhUR5N8mZdUtS6TxhusATlFvDC X-Received: by 2002:a05:622a:254:b0:42a:471e:9020 with SMTP id c20-20020a05622a025400b0042a471e9020mr1756953qtx.29.1706064985709; Tue, 23 Jan 2024 18:56:25 -0800 (PST) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b3-20020ac87fc3000000b0042a47ad5666si4301300qtk.700.2024.01.23.18.56.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 18:56:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36360-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gG16RFnf; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-36360-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36360-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 724B41C215AB for ; Wed, 24 Jan 2024 02:56:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8BFCF9D1; Wed, 24 Jan 2024 02:54:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="gG16RFnf" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2087.outbound.protection.outlook.com [40.107.93.87]) (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 9DCF2BA24 for ; Wed, 24 Jan 2024 02:54:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.87 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064854; cv=fail; b=mL2ng8iZq79ocG+OESeN1BBVErhWSEyO1FYS4g13cwInEqpvOAKSJSZWtbl5p0dJAa99CuOpGd7T4gaT32gN372hFeDMmhMy/kF5VeqGiJcmtJfSeInOOVL1PBGKWWw2XT8KZEk27ZmhstXZ03KerQwyW50hH/KfoeHCIuEDvv0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064854; c=relaxed/simple; bh=PRmfjapv2gmPIQcMTytu3GqdUj/t4O/CYovSgnQrTN4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OSiA6yUqQgwR3yRKVe86Qnfr7zlrRRF1Ck7P4IXc9fNekrnXlHxnpzwOCFu6nyU6sTVms8gt1tXeETp5i+gec0swmiC56MjLqCK4HxBx/7JKB/YsCMKlV3XgJHELGnNPHtiZ2zmglMoRC0+hHPocUmPWsphr9jOK7BeoQRyk/As= 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=gG16RFnf; arc=fail smtp.client-ip=40.107.93.87 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=RJbUX/jKB3HPJtMw/zVk7mzJF7Yj+hGHbMXnawP02y5SuZ4pNyEf91avnGJB15aXxy9wxqq81W43UmYP3Zs6QgBZLx0Exal+yLhTT6/iVzjpe5gYDGS8JauG+1L5+R7lpNTDS7MP97IJvh7sWrO1xfgBBHyyELA9gB4WUxz60Cs0BS1tyuX9zjtEoDm8j1LdzTI0Ay++czZc1bpe2xLb4EokFCRuE4uX7wcMkGbVlW1Z5sQVphTsd5V9/IOZj4l38s7wSBreypxPnCerGuyzPBLZ+T8EMltloNjYpXLlBxgsQK7TfaGxaF9wtY7hFjuoXyQOMs5A0DpPcJV6VvL8ew== 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=sbYhtGPpxSXx/5jQiSZ/ohKOZc6mALk5xxnOCV2OPeg=; b=AR0uVJCEAyvUUsMo0oUo17EIUoaI+WIy+yO8C4iDJ7cr38rLVjxSU5SsgUA/KV/rua1RDbwOlkqeIBYQ2nWLTzIapN/9Bjm//5DYnVdY31OtDkpKlIJ+GeGaBki9zg5UzOeU6WviSCuUwmSP5stPQoygqYCt84gQHoHswlOzARJeWt8RWYK9+1HiR5dZialqa+k/2dW7pvo0sk4i3++AQIiF38WMIlE6mnkFhrOielU5SPOZor4t8e12qG0ZmxjrXC2+fAxXDbtaNxHbrJTdlCK5K2gbmR6Ct0ngzp9C/uEhImFtpdbSB9cOfOmSy7g5b2c3n92XVprB7i1ow/wWNQ== 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=sbYhtGPpxSXx/5jQiSZ/ohKOZc6mALk5xxnOCV2OPeg=; b=gG16RFnfzOGTfEGg37mlF6KvRzS1GEhvMBq/CoZWdG7QQpBeKmXiAjYQGvleF1xV0J3MU2aTSTG3OLpgR8l4aZIEIVekCCP3J0VUNAIlPYIWTJIptrbAmEMxjbuKQkymaVzRYV7BqiwCufhJv5Nd+pJfXijs2sSvv6tId5obVm8= Received: from SN7PR04CA0097.namprd04.prod.outlook.com (2603:10b6:806:122::12) by IA0PR12MB7723.namprd12.prod.outlook.com (2603:10b6:208:431::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Wed, 24 Jan 2024 02:54:07 +0000 Received: from SN1PEPF0002636C.namprd02.prod.outlook.com (2603:10b6:806:122:cafe::47) by SN7PR04CA0097.outlook.office365.com (2603:10b6:806:122::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22 via Frontend Transport; Wed, 24 Jan 2024 02:54:06 +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 SN1PEPF0002636C.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Wed, 24 Jan 2024 02:54:06 +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.34; Tue, 23 Jan 2024 20:54:05 -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; Tue, 23 Jan 2024 20:54:05 -0600 From: Anatoliy Klymenko To: , , , , , , , , , Subject: [PATCH v3 2/5] drm: xlnx: zynqmp_dpsub: Fix timing for live mode Date: Tue, 23 Jan 2024 18:53:59 -0800 Message-ID: <20240124025402.373620-3-anatoliy.klymenko@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240124025402.373620-1-anatoliy.klymenko@amd.com> References: <20240124025402.373620-1-anatoliy.klymenko@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636C:EE_|IA0PR12MB7723:EE_ X-MS-Office365-Filtering-Correlation-Id: 77602114-7b14-434c-618a-08dc1c87bb61 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WNFYDaIxSNik4kLjU/J0cxkF+LY9cpRtGOIpGkFKhFEK9XWVNBb2l+5A/gf4ANv7uJKOXQmoNiSFbOht0DEu5saw/Pi6jdfS6bmaX5ii4UNU3Za0FKPLo9WtvIGsLNdqsooZ79m5RrOdg+IDQzoj1kCOo2vVXkX8YoI6dWtG68sJHab333687dHV9oTml0eGMPPuUMOKC1NBW5e0wPpXTLjvp3cXUTTlkhU1l1LKELyGW12HgU/WuP1q7NYwf6xbIMnMFarPC3vIJsfmaCpqsSCqnmKmrp//h4zC8G77hZcUf86lR9u/X++HVKb70+RF7PhwoliFUWG2qHB2zVHA7tGrBvk3590jkbgCDhGpxd2jHEyBZhUJ7IbjX7+yg/eS+bvEMdTT2q43rxDXxg4WGXzMFNEE2G6PoP/nyM9EnOPkf0fK2fR4QRmi6mONAsIHqIBUx0In9MH4Tl6aKNUACmi+gCB1jfICIb31DtJje5kBCqbUONa5Tn0vP7A+duGQXxkfov9twL/2vyr6IOhRIwqC4L9bx2fV9zUSMAGv+RCRQvE1U/HqnZGVpRPkbVf4KxsfxqryDXfk3IUchEofHwqTqb2vRm+qfSiitR8OBYbv5aQB/MgwOfLlWg5TUjMl+uovDNlMcC4oVX70/ONOiVEqlwtBNnR7S4e1u+KbAgiWrMw2J7MH75Icmgpo929VRQNWLdHbHAO3wU3LE4zAulHltStzmbT4Ov0HTWHHidgP1QK18wDjhC+UjpKQc+/7dSa2bAF+yjYWmfahOUIlPXcdrs/6vhxHpFUBAFnkfLdas+nqyQXkINJ1eCmdWnrt7Q0uVM1JhnztjsWHzOPKhc+jqyM7Zt1lsH+SO6oeOyD5CRvfV8qMQ9gnMqtk0IED 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)(4636009)(39860400002)(396003)(136003)(376002)(346002)(230922051799003)(230173577357003)(230273577357003)(1800799012)(64100799003)(451199024)(82310400011)(186009)(40470700004)(46966006)(36840700001)(41300700001)(336012)(426003)(1076003)(921011)(40460700003)(40480700001)(26005)(47076005)(36860700001)(36756003)(478600001)(6666004)(2616005)(83380400001)(81166007)(82740400003)(356005)(44832011)(5660300002)(2906002)(4744005)(110136005)(86362001)(70586007)(70206006)(316002)(8676002)(8936002)(2101003)(36900700001)(83996005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 02:54:06.9183 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77602114-7b14-434c-618a-08dc1c87bb61 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: SN1PEPF0002636C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7723 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788938798849359590 X-GMAIL-MSGID: 1788938798849359590 Expect external video timing in live video input mode, program DPSUB acordingly. Reviewed-by: Tomi Valkeinen Signed-off-by: Anatoliy Klymenko Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index 407bc07cec69..8a39b3accce5 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -1166,7 +1166,7 @@ void zynqmp_disp_enable(struct zynqmp_disp *disp) /* Choose clock source based on the DT clock handle. */ zynqmp_disp_avbuf_set_clocks_sources(disp, disp->dpsub->vid_clk_from_ps, disp->dpsub->aud_clk_from_ps, - true); + disp->dpsub->vid_clk_from_ps); zynqmp_disp_avbuf_enable_channels(disp); zynqmp_disp_avbuf_enable_audio(disp); From patchwork Wed Jan 24 02:54:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Klymenko, Anatoliy" X-Patchwork-Id: 191325 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp746068dyi; Tue, 23 Jan 2024 19:07:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlI/w4RFajWWq/9C3bonzIPQmgkmbuK9VFb4Vk1oDEi9tZacJ97/koLryB0u5P8e8WhkD8 X-Received: by 2002:a05:6358:5783:b0:176:91cd:1a94 with SMTP id m3-20020a056358578300b0017691cd1a94mr25192rwf.33.1706065665145; Tue, 23 Jan 2024 19:07:45 -0800 (PST) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b22-20020a63cf56000000b005cdf7f2f98asi10845553pgj.50.2024.01.23.19.07.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 19:07:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36361-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=4ZIbFqKS; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-36361-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36361-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3CFBFB29019 for ; Wed, 24 Jan 2024 02:56:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8A8AF9E8; Wed, 24 Jan 2024 02:54:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="4ZIbFqKS" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2052.outbound.protection.outlook.com [40.107.223.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 EAC19BE6C for ; Wed, 24 Jan 2024 02:54:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064854; cv=fail; b=dJkkRJKBZxc8ugjnlsvRttwwuRWxGDwNPXIZZvMIZPUzPOMzf0o1/0dauLTl6DoIyfpK9tWRfZMekU32OG2VJw/j9p93Sb0yQl6HgPNkR3mijMzD3M/30928EH+JOJmM9Dt1aT+DKvkD2+5Iy85tCPWTaJshO1RKkOUxJA9teuo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064854; c=relaxed/simple; bh=ra7hWVIshtkN8L+Jd7aAe9gka5Q53HlK5E2NVa9ivuw=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=n1ag5mmqTqmA6zqVbdaNENWqC8I8pWAKPVuVPQGuHznlg6oNxtk7uEK8OvJIbTnKDnmrQl7l1zQL/a2nf3C2PEuAo97QEV6yY56nChhaUNzFDTe5Gt7hME1ytz+Oa78yCGPPOXtBRHRGV2sjo2zRqK76jHXNkcgxHIeAXBl/AWc= 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=4ZIbFqKS; arc=fail smtp.client-ip=40.107.223.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=J+wbTqG48SuPFZ7BOIGuOJq0Sy+/4Ej7ROUh4xSWr8FEsa293Poihf/yLMS5gQ/XebZ2F4KY1douCWEM1Rtp+izrB2yrLFkXbxORZdLJ4nhS4+nWEk3/Ojlhr4s0h7GMnsvIVDLxkv9O46gSKueXgv/2pqxfzM0hpfcVUl4Hk5uL5OwPYRqTwvTwf7LO0GMd9yDdXLYuXg4gO9Z7dWXHahg3AdJWpW7pba5Qkc8eQ7FJtndlh1tpHfbQWVq6/lLBzYZDrGCSafMP+kHwxRwSuIFyH9/MAEGf2sh00CkMoAZUAW+lOWuzz60CGRcrhvH341zFfl920ij3d8AxXiTbJg== 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=F5xjs/9hM8nZIBy2hz4SFYtAqsSXJjAP3hbwy3NWpmw=; b=f6frGkoJFhiuFZiDxWjsUIXwFt9Ki2Xc7kh5+8C31jkhuvU41D/x4l/gnF4W2Sb2PcDLGqFsMWO8HA0jpDhXjnK2bRwrmAwAQNh/U1nEgLVd8yd+k96S13TwF5iTX+lUqgS7zCFsxIpxygtAxcJVQwEZVjycCw4NZV1Goz9oGJZdy166yQOBJsmzmQuvnBlIMvGpWhxCTPHaqv+tMINKX+H73PPvZL5puvyVrrQ2kVk/yBYkNhPOG02TgnUEEGWPQiG/pux7ZqTriR1fIW0HWm0YJ+/VAwYcVAacSpYqdqz6OJt5HBqMGZhR8vN/hSUFBOjuwO61WYH2yRDN+1/1sw== 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=F5xjs/9hM8nZIBy2hz4SFYtAqsSXJjAP3hbwy3NWpmw=; b=4ZIbFqKS/PT86x3YIQWfGYprnVMpEl8ASPjp1KU8uQ4b+U4++tWynZuXeMUNC3vvw6LHlAbMcpdb+1e4ppFlVYhCjktINU00dcOR1CVI2+9WkZoWcqh6be9AHqSJrnDDXT2McVsNRO46ap/xXw6QkvpYb2tsqy2Y8CC7FPpmYrI= Received: from SJ0PR03CA0113.namprd03.prod.outlook.com (2603:10b6:a03:333::28) by PH0PR12MB7079.namprd12.prod.outlook.com (2603:10b6:510:21d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Wed, 24 Jan 2024 02:54:10 +0000 Received: from SJ5PEPF000001CA.namprd05.prod.outlook.com (2603:10b6:a03:333:cafe::3d) by SJ0PR03CA0113.outlook.office365.com (2603:10b6:a03:333::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37 via Frontend Transport; Wed, 24 Jan 2024 02:54:10 +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 SJ5PEPF000001CA.mail.protection.outlook.com (10.167.242.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Wed, 24 Jan 2024 02:54:10 +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; Tue, 23 Jan 2024 20:54:07 -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; Tue, 23 Jan 2024 20:54:06 -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; Tue, 23 Jan 2024 20:54:06 -0600 From: Anatoliy Klymenko To: , , , , , , , , , Subject: [PATCH v3 3/5] drm: xlnx: zynqmp_dpsub: Clear status register ASAP Date: Tue, 23 Jan 2024 18:54:00 -0800 Message-ID: <20240124025402.373620-4-anatoliy.klymenko@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240124025402.373620-1-anatoliy.klymenko@amd.com> References: <20240124025402.373620-1-anatoliy.klymenko@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001CA:EE_|PH0PR12MB7079:EE_ X-MS-Office365-Filtering-Correlation-Id: 93895552-df44-4d6e-d085-08dc1c87bd6c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1205liwW61G2sjzowYbc1cl96pfYPBPUlhtinsO8WX3rnDmYMFyXNVpDOhbSOAQdRc1t9Ncxs3IF9yMXkJU7nqeVpYjV8Mgzmql/+kkkj4daQe1L1ChdSqsrLwPCPGIBQ4Qq1ev3xrUrlQzOg6RLaYhrwaMciEIUGDzItBRLdXpqmWgDiRJa/vbobXVitvwTL2hMPDCu99NHDh7byjwmfTq+iwmb06ckxIDYEvEiuUSZlMOYOXUVFuWWpN/fjB8u9X/6p3WnNfjxe0IoGDBB8xv1375qHj1NB0x0/Ln0wsv/g9PUCBjZWcXMNW9vxoKOrXgppn55NNuKS8GZa5cYdtVHRG3AaQvekuFm14dv7pwnYj/1NxPZ44xN/7qhIqG35C4/SR0w32pFxfcSYLYyV9S3Pdky7NWDevZ6J/yhSzlshTIz555M69cElZSErjT86LC5ce46uqzVCjH7nRFqC5zGCY4HTYU78qdinsyWqowvNndV8skjfjrwXe0l1UDPBfeBgzXN8FhNrEy8Rh3Py+QThdyWFY9gQdzj4+vPuKaDjGKW7qyN/XlFCYjD+FWkjWVWasOwiuOefDmtJ4JYagIhCGgwEWx275YLxUvnmi9fJrej9HYIbF5z6X3E7W4EHaEGvzmrF2M9rpwy/UKHDFIk0J8jx/Ov55dnYjsmmNZWseXLkd8Kqb2yW7UafajdUhp40pA/C5M8Zpk1mC8TzvfimLDNlx2yT8nqUz6qFa5KGl4nqNLCJ7O3j8HU3uNnF+Jnbe56edsokL1Y4hkW8FyRPpC27n3PhdjyhiZ7BeyrkkpJf2kLNG4gtXFoeOri1sfQIN+4IlMRZwctigLEBQ== 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)(39860400002)(396003)(376002)(136003)(346002)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(82310400011)(36840700001)(40470700004)(46966006)(966005)(426003)(36860700001)(82740400003)(356005)(2906002)(86362001)(41300700001)(36756003)(47076005)(81166007)(70586007)(70206006)(110136005)(8936002)(6666004)(316002)(478600001)(5660300002)(2616005)(336012)(8676002)(83380400001)(26005)(1076003)(44832011)(921011)(40480700001)(40460700003)(2101003)(83996005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 02:54:10.2705 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93895552-df44-4d6e-d085-08dc1c87bd6c 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: SJ5PEPF000001CA.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7079 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788939511105128868 X-GMAIL-MSGID: 1788939511105128868 Clear status register as soon as we read it. Addressing comments from https://lore.kernel.org/dri-devel/beb551c7-bb7e-4cd0-b166-e9aad90c4620@ideasonboard.com/ Signed-off-by: Anatoliy Klymenko Reviewed-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index d60b7431603f..5a3335e1fffa 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -1624,6 +1624,8 @@ static irqreturn_t zynqmp_dp_irq_handler(int irq, void *data) u32 status, mask; status = zynqmp_dp_read(dp, ZYNQMP_DP_INT_STATUS); + /* clear status register as soon as we read it */ + zynqmp_dp_write(dp, ZYNQMP_DP_INT_STATUS, status); mask = zynqmp_dp_read(dp, ZYNQMP_DP_INT_MASK); if (!(status & ~mask)) return IRQ_NONE; @@ -1634,8 +1636,6 @@ static irqreturn_t zynqmp_dp_irq_handler(int irq, void *data) if (status & ZYNQMP_DP_INT_CHBUF_OVERFLW_MASK) dev_dbg_ratelimited(dp->dev, "overflow interrupt\n"); - zynqmp_dp_write(dp, ZYNQMP_DP_INT_STATUS, status); - if (status & ZYNQMP_DP_INT_VBLANK_START) zynqmp_dpsub_drm_handle_vblank(dp->dpsub); From patchwork Wed Jan 24 02:54:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Klymenko, Anatoliy" X-Patchwork-Id: 191309 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp741662dyi; Tue, 23 Jan 2024 18:56:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMgrYG/eoWZfwYhI1byziJ0cRUAK7j1nIcrxEbwLbmTiuW7YLmiKw3kZXRzuOkJegG5yid X-Received: by 2002:a05:620a:1223:b0:783:a929:a3f0 with SMTP id v3-20020a05620a122300b00783a929a3f0mr2161742qkj.154.1706064981260; Tue, 23 Jan 2024 18:56:21 -0800 (PST) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x25-20020a05620a099900b007833c5d6b6csi9016154qkx.713.2024.01.23.18.56.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 18:56:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36359-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=D0lfzwor; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-36359-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36359-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 03EE01C21687 for ; Wed, 24 Jan 2024 02:56:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CCBEC2C7; Wed, 24 Jan 2024 02:54:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="D0lfzwor" Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2046.outbound.protection.outlook.com [40.107.100.46]) (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 097988F72 for ; Wed, 24 Jan 2024 02:54:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064853; cv=fail; b=JkTEjtutZAkMJ0zmr4zGDEOV+60n5DrFXG9ak2RSbT+dqJZI5CgrOqNW4Xm3+VRisU+yqIjB5l4XfE+IFyRUzdP7DuEtMbqEiw3DWwGOkiY5Vq7a7rOa+5TtMnHZrnoy2WzIjuG+aRYQdy7mbmhi8WlRQLWUegTtYeh5mq+lYH8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064853; c=relaxed/simple; bh=9/havw7LIG0Jl1MG9ZI1Dbj2ihv66OxA4H1z6+06zK4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CuGM15lC26nKFpnOEhjIZWPWNLIaqEkX9rcLa3/CSr5RmunKwUfaUtfdJdSt24puppRQM03syRb/X7zl0fAZF1hlzresUd3TaE9irfWpGIqH6CIeN8/3Jld94VuKCaJJU0ZCdsQqs/SS6G76+32d6CL2uqu5DfLC/YgmQvhs9Mo= 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=D0lfzwor; arc=fail smtp.client-ip=40.107.100.46 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=ZJ05E4X0S8HxCKFSQDogyX+tx7ukuL6L43WmTNJdcVphTWTadtckbWGCYJSIOnGpxKI9VUiOUG8RPe89p0yHKndjqrEaB5sH6xp5gE1fURM/l+v/S9tnay/3wNzy0cTr5lhV1mgF3OutwPWbyf6KWDK4JC90haNzJGlVwJw0FWJa0naTTdXRnHq4rtwLHSZ7S4D2uW4bW2PtR8L6Qcv4Wjua5+nv45hzRzx/LlYUYSpZKd0SC9DP4C0zrQm3pYo+aJs6nJ6LZyfehi67Avf1fkjDDmMpdgP2hgn9U4eC4o44mdFNY4cYl9no5rV0SoViIPxx5yT/c4dntnWgar2rWg== 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=Ro1x0XU0Vy+Jr6q29q7S5YrkHI5kVh8EnU6b+srSyEU=; b=iur3kL0sL9i/xCEvSGBOzhah9lafCWdj9ABZ9YtNW7/UrHqw3gSOGw7nxlFNKdEXoCYJzy5xY8HzjJoo6noo/+atXtu8IG93CIggkOWqkeHEc+uvDxlS3+1V9pTSFp8JwsKZt47ebR3SFYd1wKKkUDy5WM+jtYpHiVXbpSzs4VHU9gTrfJUeNxmOnPZj5rI0gUKB+wNKd/hzKEFVmU9JqSbQEd16X0JaPNj0aLPXFRckbv8pRky5qJW/VoqPSwRTLsxRtWK9V13BzsvFzpbXi2DhI10bIVNhc1BbPEzOMFDnlFGOOkCzHp6xZFyEZN/d01f84PA6ctPAabW3+jObFw== 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=Ro1x0XU0Vy+Jr6q29q7S5YrkHI5kVh8EnU6b+srSyEU=; b=D0lfzworJQ0Txd+MPmTrVqQaiW42+i9sgT8umbO0kcZrSdlTYg9IRlA6aHqVP1xZjKbnFS7XaBPOZYEIR6a99wgNxRl0imwnEi7Dq1Gwhh1abKfgwe2uvcgZWA4QlrTrtmJYdREvOjisexWT5wAR463ryO7zbJfdQ1yeaCVlYLA= Received: from DM6PR07CA0076.namprd07.prod.outlook.com (2603:10b6:5:337::9) by SJ2PR12MB8183.namprd12.prod.outlook.com (2603:10b6:a03:4f4::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Wed, 24 Jan 2024 02:54:08 +0000 Received: from SN1PEPF0002636D.namprd02.prod.outlook.com (2603:10b6:5:337:cafe::91) by DM6PR07CA0076.outlook.office365.com (2603:10b6:5:337::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.38 via Frontend Transport; Wed, 24 Jan 2024 02:54:08 +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 SN1PEPF0002636D.mail.protection.outlook.com (10.167.241.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Wed, 24 Jan 2024 02:54:08 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) 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.34; Tue, 23 Jan 2024 20:54:07 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 23 Jan 2024 18:54:07 -0800 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; Tue, 23 Jan 2024 20:54:06 -0600 From: Anatoliy Klymenko To: , , , , , , , , , Subject: [PATCH v3 4/5] drm: xlnx: zynqmp_dpsub: Filter interrupts against mask Date: Tue, 23 Jan 2024 18:54:01 -0800 Message-ID: <20240124025402.373620-5-anatoliy.klymenko@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240124025402.373620-1-anatoliy.klymenko@amd.com> References: <20240124025402.373620-1-anatoliy.klymenko@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636D:EE_|SJ2PR12MB8183:EE_ X-MS-Office365-Filtering-Correlation-Id: dce21088-766d-4d7d-9e93-08dc1c87bc47 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: odM+Yc3cLGG8DTtI/A9rC9xp60KpdTBtqCFTotbh/DXm0b4wOYcAtoFzofuR5jQ4IL9xlTOV8NNEDJTKah4Gt7Tw3XkfVcA1lQ7lpW6azA75rV+xrSMjNNphtslLKkp/LtcCbFByTkyq7BSAWN80LIOEofzGiPpakW1gmx79xjUlhEmR1fkHqntmuN+jnj9EbZ8W4WNfwvDdNAbs/t6q7ZPNc2BmaYpVatLk65Cq96VtyKxOoIuAiSAipeLtyRhdwuo2d28t3y43QU752MxQ6hqa8mkMVmoIgIVK6M6DzF46qZ+UhOuCIP47Gv0ukq8AxvdDmmhM9Yx7AGWK8LS5exQavd7erf9B9q2kH4POCj+hrmLxKPvy6MxRY4cDux71q80QJL/WDOXVpC80PzPKnbqaxq4iP8PCATVrlt4AABtrKUoYhe5d7cflh4W/TTf74bIHdrX28ZNDxF+0HuVjDpFytNOSbyP0jFQvRsu5Xfrt2d140Hfbp3x+AAS4mIbEXAOklpPvmLT58SqSGkmLC1GbNemdpbsNBFhlnaBMTHhYmyGU7tb/Db7aBQVZXZHXVCuwXeSb+/H0ARiLQFNay4f7KCtaAMWFohmYNDcG+Joz7s2XNNT+YzXozvF1upckU13qJW1i9nUEKWJS2bN7QO214u1BuFeXQXPeR41vdkt1c1cDy9YawgdkdewlVDu1zGdFQDL+lZt8WLxwRH9LoFhAcJvTlESsj3nGsibboeMBb7TYS5lkVlGNvguz9ffrTS9tZZ2MNSi6eJ0SUKAW6Wyj0hZVQYsyCsLAULHKNjBsiDqMJBhEIsMbW2z757g1xvboZVTansUrrZjWaiLFmw== 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)(4636009)(136003)(376002)(396003)(39860400002)(346002)(230922051799003)(82310400011)(451199024)(1800799012)(64100799003)(186009)(36840700001)(46966006)(40470700004)(40480700001)(83380400001)(40460700003)(1076003)(921011)(47076005)(26005)(82740400003)(8676002)(8936002)(44832011)(356005)(70206006)(70586007)(110136005)(5660300002)(316002)(86362001)(478600001)(336012)(81166007)(2906002)(426003)(36860700001)(2616005)(41300700001)(36756003)(6666004)(83996005)(2101003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 02:54:08.4115 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dce21088-766d-4d7d-9e93-08dc1c87bc47 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: SN1PEPF0002636D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8183 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788938793950264301 X-GMAIL-MSGID: 1788938793950264301 Filter out status register against the interrupts' mask. Some events are being reported via DP status register, even if corresponding interrupts have been disabled. One instance of such event leads to generation of VBLANK when the driver is in DRM bridge mode, which in turn results in NULL pointer dereferencing. We should avoid processing such events in an interrupt handler context. This problem is less noticeable when the driver operates in DMA mode, as in this case we have DRM CRTC object instantiated and DRM framework simply discards unwanted VBLANKs in drm_handle_vblank(). Signed-off-by: Anatoliy Klymenko Reviewed-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index 5a3335e1fffa..9f48e5bbcdec 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -1627,7 +1627,14 @@ static irqreturn_t zynqmp_dp_irq_handler(int irq, void *data) /* clear status register as soon as we read it */ zynqmp_dp_write(dp, ZYNQMP_DP_INT_STATUS, status); mask = zynqmp_dp_read(dp, ZYNQMP_DP_INT_MASK); - if (!(status & ~mask)) + + /* + * Status register may report some events, which corresponding interrupts + * have been disabled. Filter out those events against interrupts' mask. + */ + status &= ~mask; + + if (!status) return IRQ_NONE; /* dbg for diagnostic, but not much that the driver can do */ From patchwork Wed Jan 24 02:54:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Klymenko, Anatoliy" X-Patchwork-Id: 191312 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp741905dyi; Tue, 23 Jan 2024 18:57:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZgXp9bxteIjuaX0qxDpjMkO9+XMJ0Gsip2Wl9IAJdFVtvhxNgstxC7N1fTBt1TqQQm1kI X-Received: by 2002:a05:600c:480f:b0:40e:5f22:34ed with SMTP id i15-20020a05600c480f00b0040e5f2234edmr692730wmo.211.1706065041477; Tue, 23 Jan 2024 18:57:21 -0800 (PST) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c10-20020a0564021f8a00b0055967c65c49si9740877edc.196.2024.01.23.18.57.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 18:57:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36362-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=qqvEriiw; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-36362-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36362-ouuuleilei=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 514001F238AA for ; Wed, 24 Jan 2024 02:56:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EDCEDF4C; Wed, 24 Jan 2024 02:54:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="qqvEriiw" Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2062.outbound.protection.outlook.com [40.107.212.62]) (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 4F29ADF41 for ; Wed, 24 Jan 2024 02:54:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064857; cv=fail; b=bQc0hj7Jp7Su8PhUUCPCNLxQNtHkmF/xCFhGrB2QE+0+HOXuJ4s0DpT67twd1yv3QVSJCo4F7aBQ2cKqw8EqVDHXFcESIeKR99DsfVCgizsveAN8k7yaqF9AGcp80CXoMibMzLa7swPu2miH8eiUuM9kXitf8TjxQOmgb8Qt3c8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706064857; c=relaxed/simple; bh=nqdEVoQXn3yi41EkUOwuknCt0skREEBF3fPRklLzn64=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MfXABE46wHjbjf0LOF8F+rwrnOU40N/mppbJTLMgLRAtPZjTF0aZYF0LnHW086Qwn+BHHR5D6uCoo0jgvSIkTX1jkPXcIUKtEo/yBNSasoh0O5UUyeHzwLI84kVr2+ngQ03YdA9riuY1Yqh3QuhrTWz6gZipj+23XPd/jld3ovM= 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=qqvEriiw; arc=fail smtp.client-ip=40.107.212.62 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=CpPo1KL4SfyxHnEpr5d3B56Iwt4+NqLjafW1KEztp6WvI2N/9f8fbogHqnQ1midaCZvj+bNjYq/uHVFFs4r6QSHkzItGrUiPhSYYDX5eJqR4utg2ViUkkzyiJtvyi7BJgEOIVhJR17dFlaWV6J4M1g2zbzQDZL2bXo6t793VfdcW5+n+HvcVhcu21atSmtltz5A3IHsNIO+N35A4CD+3y77AyLaqcbxqH3b4NpfYbEjKczxUmcmKULN+pCVXlprom0x/Zm41S4/Pc6T4DkobgnWOgmS87MvCDe1guFa6jwRVMHU7JgSgnM51LY6eZ73k4NjzuUbmmuAgTSplTQhzvQ== 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=9mh8SYDYtZS4FEJxEJLtuXOIRmITcFUz9I9YrWBMw7k=; b=Nd6osq90nxS1RimFZlyfhxa/vgN8w44nCiGbqoNzPv2Fc5aC1foMmjHRnZllZDK1IGynFhR1jjAekJtUiqnwnMfVVXU/Tv5IpY+0jfM8lNEvMgZT1Yh1uA1+nxMEQfgW01KG2L1+tByrJlCsdzY6aCk+IZB+n0/5h83Qhr1Bt/1EWORfJPsYW3Wvfv2Ms7gNbGP84GARqfRxP8ypQqTWrpZ1XqaWwR3ffZ6EEabIk7ULQOmx2XLPgqP6xJA1UbXEPzs0wGMO4IDd+G4pjM6EUDe7yaSLRpu3eynYcEjq0DxVbxGamy992MiOXJY2QgeG8ETaWs2Uq/tYKH/S/+0X5A== 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=9mh8SYDYtZS4FEJxEJLtuXOIRmITcFUz9I9YrWBMw7k=; b=qqvEriiwXk5Q1AYH4snZ1DlrFxAiVhGCjbBXtYPwePoHQG03YcFm16Pu87nm2bgluxuakt5iACaqluoy2jwkdaSwpn8CnJqh2W3eeT6ZR1MW4blSWNvbLVzmxYkb3LBT4UGLGOHdPvf+5dsWhWKqN2ZyodW0mXVyoRQPgavuN94= Received: from SJ0PR03CA0117.namprd03.prod.outlook.com (2603:10b6:a03:333::32) by BN9PR12MB5340.namprd12.prod.outlook.com (2603:10b6:408:105::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Wed, 24 Jan 2024 02:54:12 +0000 Received: from SJ5PEPF000001CA.namprd05.prod.outlook.com (2603:10b6:a03:333:cafe::7f) by SJ0PR03CA0117.outlook.office365.com (2603:10b6:a03:333::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37 via Frontend Transport; Wed, 24 Jan 2024 02:54:12 +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 SJ5PEPF000001CA.mail.protection.outlook.com (10.167.242.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Wed, 24 Jan 2024 02:54:12 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) 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; Tue, 23 Jan 2024 20:54:09 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 23 Jan 2024 20:54:08 -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; Tue, 23 Jan 2024 20:54:07 -0600 From: Anatoliy Klymenko To: , , , , , , , , , Subject: [PATCH v3 5/5] drm: xlnx: zynqmp_dpsub: Set live video in format Date: Tue, 23 Jan 2024 18:54:02 -0800 Message-ID: <20240124025402.373620-6-anatoliy.klymenko@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240124025402.373620-1-anatoliy.klymenko@amd.com> References: <20240124025402.373620-1-anatoliy.klymenko@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001CA:EE_|BN9PR12MB5340:EE_ X-MS-Office365-Filtering-Correlation-Id: fcd51ae2-9da4-4251-99e6-08dc1c87be9b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zR5u6b4E2R6SgJ/+tCwfKyfUjaJf3llIWKwTUcC3c86oJWGGmennL6a5HTpgwEZxMluyhr7TferzfKNZOuB/lGOvVUKNM5LrckY+ZhjQ++NlrxuGH/IPvm8dxSLre0j1ofTqv7yQqrofnKEfVNsvX/TZavFrfugDomc32OPjVKhgYhiwu7S5NFq64rv4amFTFHYD5YA+FauFcyzCx3FOChLb+443Rn9BFlhsKrUciAS0tNUSCOrBRTufH4bT85WxaSVgk0z2r1AL+OwJZuj5POSh0CnaL1lMCTFRH28S9h0isD/z8wsCCKVRZC3pbbB8aUVCRpmAHkk4J92cAIoEr8ibbXjNz9tg2w7zjzP/Yro0nshHG3C2pzUGnJl3T/wKJMBME0pqyxw8AJTcZFBVHdyIJLv543xLK4WHrc5SojQPjQxsSS6XnwLpvZ5rusTWs5gp9UFaUkrhhZ+dLffwfsM7Szy2ntEyTSqyi7EwtMxvE97gSpcZZexVttD9TA673qL/nhOVPVYORMEGwn7nqmn82amR/z6JKxHEsSD54nknVXSmQzJXpibEkaudfj6jqXZPQvEviG91pTGNF9YdcB1qywhBl6kOW2mA4OrPF+AhyOpZCIieUPynWp7AtdcynIE1iU5xXwYEZWgoCU845x0Xm7Ldmm43S678NZWmU9v9VGevBDDO51vIVXv3EhIogGfqM7jzVqCCEKJAg+UArylk7EC7ob5H283E/Y9M5lxvRg6ZxVGMpZEBtzyNdpulOhxN2ofE3yKRTvLeURyl7Jnz7d5bTvAc6TUu+wABFhQ6NVYdIwX9K97uvHJAJKYm1+cXcvhfSlLoUbImdYDOoIExpn9OWIU46/QjWSJ+ecq4VV5S7ldUZU1TqPPAI9Yq 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)(346002)(136003)(396003)(39860400002)(376002)(230922051799003)(230273577357003)(230173577357003)(186009)(64100799003)(82310400011)(1800799012)(451199024)(40470700004)(36840700001)(46966006)(921011)(70206006)(110136005)(40480700001)(40460700003)(2906002)(30864003)(70586007)(5660300002)(44832011)(316002)(8676002)(8936002)(81166007)(356005)(478600001)(36756003)(82740400003)(86362001)(26005)(47076005)(426003)(336012)(6666004)(1076003)(36860700001)(83380400001)(2616005)(41300700001)(36900700001)(83996005)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 02:54:12.2549 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fcd51ae2-9da4-4251-99e6-08dc1c87be9b 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: SJ5PEPF000001CA.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5340 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788938857301378383 X-GMAIL-MSGID: 1788938857301378383 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. DPSUB supports multiple input data formats. In order to properly operate exact media bus format should be negotiated between external CRTC and DPSUB bridge. DRM framework provides a mechanism to negotiate media bus formats between bridges connected into a chain, but not between CRTC and encoder (first bridge in the chain). This change mitigates the issue for FPGA based CRTC, which would typically have a single fixed media bus format. Expect live video input format to be set as "bus-format" property in connected remote endpoint. Set display layer mode in the layer creation context. Signed-off-by: Anatoliy Klymenko --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 109 ++++++++++++++++++++++-- drivers/gpu/drm/xlnx/zynqmp_disp.h | 3 +- drivers/gpu/drm/xlnx/zynqmp_disp_regs.h | 8 +- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- drivers/gpu/drm/xlnx/zynqmp_kms.c | 2 +- 5 files changed, 107 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index 8a39b3accce5..a7115321b3fb 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -18,8 +18,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -67,12 +69,16 @@ /** * struct zynqmp_disp_format - Display subsystem format information * @drm_fmt: DRM format (4CC) + * @bus_fmt: Live video media bus format * @buf_fmt: AV buffer format * @swap: Flag to swap R & B for RGB formats, and U & V for YUV formats * @sf: Scaling factors for color components */ struct zynqmp_disp_format { - u32 drm_fmt; + union { + u32 drm_fmt; + u32 bus_fmt; + }; u32 buf_fmt; bool swap; const u32 *sf; @@ -354,6 +360,16 @@ static const struct zynqmp_disp_format avbuf_gfx_fmts[] = { }, }; +/* TODO: add support for different formats */ +static const struct zynqmp_disp_format avbuf_live_vid_fmts[] = { + { + .bus_fmt = MEDIA_BUS_FMT_UYVY8_1X16, + .buf_fmt = ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_BPC_8 | + ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YUV422, + .sf = scaling_factors_888, + } +}; + static u32 zynqmp_disp_avbuf_read(struct zynqmp_disp *disp, int reg) { return readl(disp->avbuf.base + reg); @@ -369,6 +385,34 @@ static bool zynqmp_disp_layer_is_video(const struct zynqmp_disp_layer *layer) return layer->id == ZYNQMP_DPSUB_LAYER_VID; } +/** + * zynqmp_disp_avbuf_set_live_format - Set live input format for a layer + * @disp: Display controller + * @layer: The layer + * @fmt: The format information + * + * Set the live video input format for @layer to @fmt. + */ +static void zynqmp_disp_avbuf_set_live_format(struct zynqmp_disp *disp, + struct zynqmp_disp_layer *layer, + const struct zynqmp_disp_format *fmt) +{ + u32 reg, i; + + reg = zynqmp_disp_layer_is_video(layer) + ? ZYNQMP_DISP_AV_BUF_LIVE_VID_CONFIG + : ZYNQMP_DISP_AV_BUF_LIVE_GFX_CONFIG; + zynqmp_disp_avbuf_write(disp, reg, fmt->buf_fmt); + + for (i = 0; i < ZYNQMP_DISP_AV_BUF_NUM_SF; ++i) { + reg = zynqmp_disp_layer_is_video(layer) + ? ZYNQMP_DISP_AV_BUF_LIVD_VID_COMP_SF(i) + : ZYNQMP_DISP_AV_BUF_LIVD_GFX_COMP_SF(i); + zynqmp_disp_avbuf_write(disp, reg, fmt->sf[i]); + } + layer->disp_fmt = fmt; +} + /** * zynqmp_disp_avbuf_set_format - Set the input format for a layer * @disp: Display controller @@ -902,15 +946,12 @@ u32 *zynqmp_disp_layer_drm_formats(struct zynqmp_disp_layer *layer, /** * zynqmp_disp_layer_enable - Enable a layer * @layer: The layer - * @mode: Operating mode of layer * * Enable the @layer in the audio/video buffer manager and the blender. DMA * channels are started separately by zynqmp_disp_layer_update(). */ -void zynqmp_disp_layer_enable(struct zynqmp_disp_layer *layer, - enum zynqmp_dpsub_layer_mode mode) +void zynqmp_disp_layer_enable(struct zynqmp_disp_layer *layer) { - layer->mode = mode; zynqmp_disp_avbuf_enable_video(layer->disp, layer); zynqmp_disp_blend_layer_enable(layer->disp, layer); } @@ -950,11 +991,12 @@ void zynqmp_disp_layer_set_format(struct zynqmp_disp_layer *layer, layer->disp_fmt = zynqmp_disp_layer_find_format(layer, info->format); layer->drm_fmt = info; - zynqmp_disp_avbuf_set_format(layer->disp, layer, layer->disp_fmt); - - if (!layer->disp->dpsub->dma_enabled) + /* Live format set during layer creation */ + if (layer->mode == ZYNQMP_DPSUB_LAYER_LIVE) return; + zynqmp_disp_avbuf_set_format(layer->disp, layer, layer->disp_fmt); + /* * Set pconfig for each DMA channel to indicate they're part of a * video group. @@ -1083,7 +1125,7 @@ static int zynqmp_disp_layer_request_dma(struct zynqmp_disp *disp, unsigned int i; int ret; - if (!disp->dpsub->dma_enabled) + if (layer->mode == ZYNQMP_DPSUB_LAYER_LIVE) return 0; for (i = 0; i < layer->info->num_channels; i++) { @@ -1104,6 +1146,43 @@ static int zynqmp_disp_layer_request_dma(struct zynqmp_disp *disp, return 0; } +/** + * zynqmp_disp_get_live_fmt - Get live video format + * @disp: Display controller + * @layer: Display layer + * + * Parse connected remote endpoint and retrieve configured bus-format + * + * Return: live format pointer on success, NULL otherwise + */ +static const struct zynqmp_disp_format *zynqmp_disp_get_live_fmt(struct zynqmp_disp *disp, + struct zynqmp_disp_layer *layer) +{ + struct device_node *local, *remote, *dpsub = disp->dev->of_node; + int rc, i; + u32 fmt; + + local = of_graph_get_endpoint_by_regs(dpsub, layer->id, -1); + if (!local) + return NULL; + + remote = of_graph_get_remote_endpoint(local); + of_node_put(local); + if (!remote) + return NULL; + + rc = of_property_read_u32(remote, "bus-format", &fmt); + of_node_put(remote); + if (rc) + return NULL; + + for (i = 0; i < ARRAY_SIZE(avbuf_live_vid_fmts); ++i) + if (avbuf_live_vid_fmts[i].bus_fmt == fmt) + return &avbuf_live_vid_fmts[i]; + + return NULL; +} + /** * zynqmp_disp_create_layers - Create and initialize all layers * @disp: Display controller @@ -1130,9 +1209,15 @@ static int zynqmp_disp_create_layers(struct zynqmp_disp *disp) for (i = 0; i < ARRAY_SIZE(disp->layers); i++) { struct zynqmp_disp_layer *layer = &disp->layers[i]; + const struct zynqmp_disp_format *disp_fmt; layer->id = i; layer->disp = disp; + /* For now we assume dpsub works in either live or non-live mode for both layers. + * Hybrid mode is not supported yet. + */ + layer->mode = disp->dpsub->dma_enabled ? ZYNQMP_DPSUB_LAYER_NONLIVE + : ZYNQMP_DPSUB_LAYER_LIVE; layer->info = &layer_info[i]; ret = zynqmp_disp_layer_request_dma(disp, layer); @@ -1140,6 +1225,12 @@ static int zynqmp_disp_create_layers(struct zynqmp_disp *disp) goto err; disp->dpsub->layers[i] = layer; + + if (layer->mode == ZYNQMP_DPSUB_LAYER_LIVE) { + disp_fmt = zynqmp_disp_get_live_fmt(disp, layer); + if (disp_fmt) + zynqmp_disp_avbuf_set_live_format(disp, layer, disp_fmt); + } } return 0; diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.h b/drivers/gpu/drm/xlnx/zynqmp_disp.h index 123cffac08be..f3357b2d5c09 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.h +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.h @@ -62,8 +62,7 @@ void zynqmp_disp_blend_set_global_alpha(struct zynqmp_disp *disp, u32 *zynqmp_disp_layer_drm_formats(struct zynqmp_disp_layer *layer, unsigned int *num_formats); -void zynqmp_disp_layer_enable(struct zynqmp_disp_layer *layer, - enum zynqmp_dpsub_layer_mode mode); +void zynqmp_disp_layer_enable(struct zynqmp_disp_layer *layer); void zynqmp_disp_layer_disable(struct zynqmp_disp_layer *layer); void zynqmp_disp_layer_set_format(struct zynqmp_disp_layer *layer, const struct drm_format_info *info); diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp_regs.h b/drivers/gpu/drm/xlnx/zynqmp_disp_regs.h index f92a006d5070..926e07c255bb 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp_regs.h +++ b/drivers/gpu/drm/xlnx/zynqmp_disp_regs.h @@ -165,10 +165,10 @@ #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_BPC_10 0x2 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_BPC_12 0x3 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_BPC_MASK GENMASK(2, 0) -#define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_RGB 0x0 -#define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YUV444 0x1 -#define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YUV422 0x2 -#define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YONLY 0x3 +#define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_RGB 0x00 +#define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YUV444 0x10 +#define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YUV422 0x20 +#define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YONLY 0x30 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_MASK GENMASK(5, 4) #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_CB_FIRST BIT(8) #define ZYNQMP_DISP_AV_BUF_PALETTE_MEMORY 0x400 diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index 9f48e5bbcdec..6fd7eab0f6db 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -1295,7 +1295,7 @@ static void zynqmp_dp_disp_enable(struct zynqmp_dp *dp, /* TODO: Make the format configurable. */ info = drm_format_info(DRM_FORMAT_YUV422); zynqmp_disp_layer_set_format(layer, info); - zynqmp_disp_layer_enable(layer, ZYNQMP_DPSUB_LAYER_LIVE); + zynqmp_disp_layer_enable(layer); if (layer_id == ZYNQMP_DPSUB_LAYER_GFX) zynqmp_disp_blend_set_global_alpha(dp->dpsub->disp, true, 255); diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c b/drivers/gpu/drm/xlnx/zynqmp_kms.c index db3bb4afbfc4..43bf416b33d5 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_kms.c +++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c @@ -122,7 +122,7 @@ static void zynqmp_dpsub_plane_atomic_update(struct drm_plane *plane, /* Enable or re-enable the plane if the format has changed. */ if (format_changed) - zynqmp_disp_layer_enable(layer, ZYNQMP_DPSUB_LAYER_NONLIVE); + zynqmp_disp_layer_enable(layer); } static const struct drm_plane_helper_funcs zynqmp_dpsub_plane_helper_funcs = {