Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2609670rdd; Fri, 12 Jan 2024 15:43:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZ4ISAzRboX7nwSQjkTjiJulV/mAUbLjKLhkiUfizBOAQOjyphUVK8MFeUISUubcdypeWb X-Received: by 2002:a17:906:2bdb:b0:a2c:57dd:4bb8 with SMTP id n27-20020a1709062bdb00b00a2c57dd4bb8mr1144184ejg.49.1705103001761; Fri, 12 Jan 2024 15:43:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705103001; cv=pass; d=google.com; s=arc-20160816; b=yKb+nXytobZxcfNn4Wl6+uIs65Rt/hVIKJwsQbiazaNo7XGTWvb3oiESlGbiGEExzJ mtnjU9YdL1DApytf10eHjIb0n4Ue6wB91mhtz1qEwNjJtcATKf1DdJyf9nhfzD3Ya07G xsv85ecHYeBGHc9sZrt5/CdxH9+6qDltQZrUVGnWrtNaKzqmU7H2COCWnV9qQjvaApKi QN/8nzaW0Mt1N3d25n8JaM1jwbFSi+fZuEUTFEur+fXhWS7haau5LivNHoOTGhkTeuQb eXXzamaAkGiHLtKr3Y+N+2GUPSFpJuK0aKtABbt3AbBa4bq/742w3QqIirAyAtGcWfa9 gZig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=QJSd29Z+ZrfAwCFTwgETttHBvJJA6uoq53jzh2OsD/Y=; fh=rF57AgvMrLxj8O0ts2KvK1OMlfkXv3jlBwSVETyRr5o=; b=mr1nB3lyQjsoURzgFvxsvhxtoIkLNzF2ztoBBBmgZM7lcWU3JxH806nXdioWuV+S/l 0jvAeMB2Uh0+26Fpy4Nr65oaYnWlTrw8FwtLldarPM0I2FvkJtg812bm3prBOiptAC8A mEiprI9cGGw8X+wQZVGLv+ycu207CAJSxdWHcXPk1Ak+hVRCmjwXgyMe3wxCO/XWMa/L ryK+JfVziXkbUCu9op0evZjLPGxhyFwuM7Viun+vCcZoVZ6bwpWh5GDZCBIsaGMbpiPE PDVZOT9+iRinDI/lUM6lNgmADo73xLqyOI4PiS6J6N8D9qLSFCf11Gju5E6ALtYNfnvy 1Ilg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="I6ER/h4A"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-25111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bx12-20020a170906a1cc00b00a2d0d311720si274270ejb.530.2024.01.12.15.43.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 15:43:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25111-linux.lists.archive=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="I6ER/h4A"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-25111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25111-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 58C681F23D59 for ; Fri, 12 Jan 2024 23:43:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7907A1BDC4; Fri, 12 Jan 2024 23:42:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="I6ER/h4A" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2085.outbound.protection.outlook.com [40.107.223.85]) (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 3AF401A5A8 for ; Fri, 12 Jan 2024 23:42:29 +0000 (UTC) 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=GTdh0TYAW9YSJcocg+gL1GqfKMHVCQZFOeXZQ+gEPBm3ixAJI92D8UpoK+lRT40fMeX4/6AR6dSmKXi+IHy6UjXItMqCJsFV1goz5YHNa21CsE4I/01ghcBE2aLXKD6hOeCi9KJf1ECp4iLTWYVQgDQOYX67zFgZU7apkPXsYD/oziwcxnm4nGauuhYIRkcwghDntdAB8uP5L8oF9XZBBW8Q3cg/ODGywIfbHcfEirPeYa7RW6Hy7x7wG0ZmiPVHU1aiOuOTq8tZTePyaer/W9kk/aALINfoaova5iAo5u9NdPHkjKI9iydF4i3YueKG0I2mnBHHBD4EV4bOe6hCGQ== 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=QJSd29Z+ZrfAwCFTwgETttHBvJJA6uoq53jzh2OsD/Y=; b=JEWowwowOweh3DCNaFWbGqcOnuIb8gTrN1Ewqc8J/PWz2wKfKX3GOfMCgzruGutgiTo4LgX5taWLmZa4zhgeSIxBu+VA24cHKlFA9SSId/hUmhQZ62EQlNZOXNYUPkuJRTuZAIzEByMk1ZW40tCbtuiE+xqv4wpMPHPxar5PdcqhxfshgCwF0+Qj/uhWod7/+dIF9ROT8qJMmBufteNzx3IOdtImdJc92gJOjWsICHXKApU29bm9sLhZSzkM482YnVHm2TyShVucvW+hCVEFee5mEnxNRbB0QUlMetGLtxOcTpjMgL65h+2c9hH8LAyMRZ7Hg6utoFOt+G8Sinxtvw== 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=QJSd29Z+ZrfAwCFTwgETttHBvJJA6uoq53jzh2OsD/Y=; b=I6ER/h4AEEXJgrunS8lVsN3zCPuxaAJS2fmzknRNQAq7OKMQ4zPdKaVX/dOS7EKo0IXUAxKIuk9BlD+Kh/79p/dNWu+ae283zym2aWmj3dDajBO7F49MLEpH14Z7eI8MDyZR3qNypUMnjnrR3oke2cKwmhgdnT8djzKRrbxUNf8= Received: from PH0PR07CA0013.namprd07.prod.outlook.com (2603:10b6:510:5::18) by MN0PR12MB5858.namprd12.prod.outlook.com (2603:10b6:208:379::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.24; Fri, 12 Jan 2024 23:42:27 +0000 Received: from SN1PEPF000252A1.namprd05.prod.outlook.com (2603:10b6:510:5:cafe::bc) by PH0PR07CA0013.outlook.office365.com (2603:10b6:510:5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23 via Frontend Transport; Fri, 12 Jan 2024 23:42:27 +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 SN1PEPF000252A1.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7181.13 via Frontend Transport; Fri, 12 Jan 2024 23:42:27 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Fri, 12 Jan 2024 17:42:26 -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; Fri, 12 Jan 2024 17:42:25 -0600 From: Anatoliy Klymenko To: , , , , , , , , , Subject: [PATCH 3/4] drm: xlnx: zynqmp_dpsub: Don't generate vblank in live mode Date: Fri, 12 Jan 2024 15:42:21 -0800 Message-ID: <20240112234222.913138-4-anatoliy.klymenko@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240112234222.913138-1-anatoliy.klymenko@amd.com> References: <20240112234222.913138-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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000252A1:EE_|MN0PR12MB5858:EE_ X-MS-Office365-Filtering-Correlation-Id: 57ee41d7-6294-49ca-b366-08dc13c82296 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YWpH8F0YFS7fGEAbqYsXLi6PoSPKqgY8Fd1TjA50SzcQ1gd8fOAQXMyfs82QwugRpbE/82FSulZHIuJ0RqBJGTHOs7tr0pFUYuZJ2kJHuxxF9gbKyEDP0ons6wdscVwZvHjJ5MKeMnVXuYuJn7+owvV1npkN/c5ctm+xjt9EFgH+K4XO8nSeJ0fm+gngfW6KpVvmVsTBY3zd1p78mb9g3CkARtBs1j+kRgYCW4zQ3CGXUudFFvqndnsfwsV9m0qJOA/LSr4imGX6YNL3bpkWcCpgD+SPabdvfVDFAHCtDUI2fyNYzgyVXEn4Ae3+F1qUXv9tgTF0bMvEPmwArqNs4KdK9AUm0hvyXJVVPTzuQoke7XC6ocndCcMoh4vFn/QQ4+UtvEHqcOHjcc06zA2nkLrx+sGQnP3/vs0xlHsts6BfBmKk2a7YO2yQaPmuHtSthdWDFB7QX2rskJ2Hjjqyp6TpvZJ5AHr9VUJRSyzYoIx6McI50nd8mFUXhKSve0Bi/zpWqz0R5rQmKm+RK9qWgrbZYWmULMWObaySl0c8kQIx0QcdnP2uR+SGiIlROaSCGchylqZCBzM9BYQdqfT45cP3JSUXPBX2SonoylME+rpj+WdeLXsuMeTDGJP5f79kF+F9UZaAoIAxJ2gzMWaR4UFgNbsTFY2t9M1d+mNIAu8/vwPgpYIENaFx6YLaN5iP0GN9j+n0YnE+mG5PrrlD5mDYt1F/b0gumSvZBbU+7+VrHV4VMFYQllMxRDZFF/3iB4OCDLO6S4HVrG3RKdyg2fd9u2SMdyXL/rqF5dQhMVe8p3W3RTa9Jc3ZRHb6iu0tc/r1WnH9Rap1HOviueBzMQ== 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)(136003)(396003)(376002)(346002)(230922051799003)(451199024)(1800799012)(82310400011)(64100799003)(186009)(40470700004)(36840700001)(46966006)(83380400001)(921011)(2906002)(110136005)(2616005)(82740400003)(1076003)(26005)(336012)(5660300002)(8936002)(426003)(81166007)(36860700001)(41300700001)(316002)(356005)(8676002)(44832011)(6666004)(70206006)(47076005)(70586007)(478600001)(86362001)(40460700003)(40480700001)(36756003)(83996005)(2101003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 23:42:27.3831 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57ee41d7-6294-49ca-b366-08dc13c82296 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: SN1PEPF000252A1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5858 Filter out status register against interrupts' mask. Some events are being reported via DP status register, even if corresponding interrupts have been disabled. Avoid processing of such events in interrupt handler context. Signed-off-by: Anatoliy Klymenko --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index d60b7431603f..571c5dbc97e5 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -1624,8 +1624,16 @@ static irqreturn_t zynqmp_dp_irq_handler(int irq, void *data) u32 status, mask; status = zynqmp_dp_read(dp, ZYNQMP_DP_INT_STATUS); + 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 */ @@ -1634,7 +1642,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); -- 2.25.1