From patchwork Tue Dec 17 04:51:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "jackson.lee" X-Patchwork-Id: 13910971 Received: from PUWP216CU001.outbound.protection.outlook.com (mail-koreasouthazon11020132.outbound.protection.outlook.com [52.101.156.132]) (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 2DCBB155A25; Tue, 17 Dec 2024 04:51:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.156.132 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734411109; cv=fail; b=eD5FSm3Pt2JbCz0PqmiaG8JuLwKTtzcoTf/tc5dyyI89aOs+xetlOT/rRAQdDE/Bip9Awnys6hvNUl4BDjc56dSW/Tn0ocqZXJoCNFGFdcaqN7PGbqWZgwBAm3HZZh0WT8nDWk7/dDSWqjYcYa+0ad4+ZwJyd0uBB/kYsfjnoNQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734411109; c=relaxed/simple; bh=N/kDL/M46APGpERYI5QNOsggYxKWL6GSnib2hhV1woM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=BkayCUZpxt+uPn+6cDYq7AZktGdJhFlZx78JJVBLM2Hq3MhyK5mNchqrXPvI/QFDo9Q4vUcq2M5upLL8VTr/jwF07Hc6BOJuoJG6QDbcSN5uHA2ZqodbwktMZuOzr5yPWhSC9sMopSbY7ikgzDhcND3HW/yvGRDCgq9UphqJ1p0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chipsnmedia.com; spf=fail smtp.mailfrom=chipsnmedia.com; dkim=pass (1024-bit key) header.d=chipsnmedia.com header.i=@chipsnmedia.com header.b=fvr1bt+W; arc=fail smtp.client-ip=52.101.156.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chipsnmedia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=chipsnmedia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chipsnmedia.com header.i=@chipsnmedia.com header.b="fvr1bt+W" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mZRz0NfUE/l2Prq/uBl5pwIcn/f8uKneNdZfaxa4gjqJyh+EgX9YCUAejPhfafavtJ93iTkXbbEV+x3M8cVtb6zdcaWVQjuffjBzfQlMeKd7vWETMc8r5wskOVFkBlkCy+Zb9mBTXiTpA12mU8IQZwgRAk517V8Hb3TDhw9qTaAw9LAEU7saYGSbYneWdFG6ZYGpyft+l3ZJmagj/tqMYmblb4hAGS/Gat8F7hOG8mf/1CEvxJJ4TLjyeq3kTnpoZw1x/Nq2aOtbT2yPQZCeuc+jV4yvm0AtYI/t4GFRs5Ioz8kMm6OOvkWwt1TwIhjveBYTCttLriC3Xb+TL/Bi7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=703e1Q6GHj9NjwCtlnBJViw8CAo/jXD+TKCrZJ7WoLw=; b=fE0ER6rlABvgV7cVibFdaic8saA621bF6CaViVNR2AiD/pyCaubVLxyjbzuvwxJhh5xHPKwe+PPNy2dpn9VgTlo0mvkujysZ2zl3JokMaojhjsQQuNeUb6XEJ3d2Jd0HYtJwf4C1WBAXkPWmu2sg5hSJcjfjJWzbpzin0E1jaw868way/fVc+sPPRVTgmBZF9phvLgGq0iS+Ksqq1x3Z6UwuTK9ogLZL8OctcsZI+MLC7WGee27APsPAByOUcew1KoHeoylnlpCLVLOE7x8h+fmQgYo+8GDLzwWwR5nGA61V0qq5Z6xqJnVW2vYrsLduircJ3u9gJGmAR5X2ZfNywA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=chipsnmedia.com; dmarc=pass action=none header.from=chipsnmedia.com; dkim=pass header.d=chipsnmedia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chipsnmedia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=703e1Q6GHj9NjwCtlnBJViw8CAo/jXD+TKCrZJ7WoLw=; b=fvr1bt+WwlgT9IMYBAWxIg9lNUiktGz1DfzUlhBOIk4+T5VcQzSEpVrVWqinGVlHhEe8zBWEGu4zsXXKW0cMiidgRoIM39psjyGSkWLKROkVi/Ac+bAKS+yQN64FAo4oBz0uPBcZBIVSqPM8Q9GzXjn9uXpgYGd/4lyrrArAQTM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=chipsnmedia.com; Received: from SE1P216MB1303.KORP216.PROD.OUTLOOK.COM (2603:1096:101:15::5) by PU4P216MB1872.KORP216.PROD.OUTLOOK.COM (2603:1096:301:109::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.22; Tue, 17 Dec 2024 04:51:36 +0000 Received: from SE1P216MB1303.KORP216.PROD.OUTLOOK.COM ([fe80::b711:5ab1:b5a4:d01b]) by SE1P216MB1303.KORP216.PROD.OUTLOOK.COM ([fe80::b711:5ab1:b5a4:d01b%3]) with mapi id 15.20.8251.015; Tue, 17 Dec 2024 04:51:36 +0000 From: "Jackson.lee" To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl, sebastian.fricke@collabora.com, nicolas.dufresne@collabora.com, bob.beckett@collabora.com, dafna.hirschfeld@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, jackson.lee@chipsnmedia.com, lafley.kim@chipsnmedia.com, b-brnich@ti.com, hverkuil@xs4all.nl, nas.chung@chipsnmedia.com Subject: [PATCH v2 1/4] media: chips-media: wave5: Fix to display gray color on screen Date: Tue, 17 Dec 2024 13:51:22 +0900 Message-Id: <20241217045125.58-2-jackson.lee@chipsnmedia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217045125.58-1-jackson.lee@chipsnmedia.com> References: <20241217045125.58-1-jackson.lee@chipsnmedia.com> X-ClientProxiedBy: SL2P216CA0103.KORP216.PROD.OUTLOOK.COM (2603:1096:101:3::18) To SE1P216MB1303.KORP216.PROD.OUTLOOK.COM (2603:1096:101:15::5) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SE1P216MB1303:EE_|PU4P216MB1872:EE_ X-MS-Office365-Filtering-Correlation-Id: ba6d0d87-2760-4080-1a6f-08dd1e567c7c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|7416014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: 6iZ35ThxvuIF3Pw4aDP9uPHGuS0lUuC15kWb6FQHdgTm6XszV2/+N5IKUNR8qyRwSZeMSory1n7lVtvsP/9ssh3/lJSo33L8IKU8wE6de/GUVl71mqWdYK6iS4DuQui8y+AhAe3F/sd5bdVx9MNdKBcK1sBlG5paN1iw2Aa2fKKkXBIiOcxF5sFFZsXCM3tDa+QIo9lBPLw1uovwHEs5rwAxgEnOdM6WkJyowmGwcqaD1uGdUAswBAilwwAGuzG4KshAs4wagFUUyRyzhcMLq0B3eaffUDjb4g65SxqeoxGJn6kXIr58LUPimcraUPExljDMYaRy+QaartMvGocC4RXFP7TCmddpJpgntnDDmsbltdXHdOLRvi2TNhytoU8qAIRvvkyfAcsCgQPmJxvmvF2s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255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SE1P216MB1303.KORP216.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(7416014)(376014)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nB3YrZW/YKSQnIXm1+E0BTxNhpXhEOF79xhM+Qmvac3hu0fVxLTsk66PlzT7qskoSnNdMDBWBtZdTYVWV6ULZRi/8wKxZtAsSr8F1x8YABnsZynj7+i/BE9Cw7y1iELXG4ZBLIOEPRuHvzMOOMWzgxmPETcpSmpw0CgpeKtQq6MGsmC3JBHLVcPHH0lMgvpdOpq7x4PIluzpEMU9/YUZzw/XLytfQebMMAod0jWN+7pLuf4asnHqlV8EIQ3B7vMUzgI9F2aV3XgCYzR72lZCpSU/Q8RzrT2xlBQ2/p194nqc9HBku6F4X8Dwl2lhGSpmWALeJz/dwv/0jX++QIGhzQq9+/FcZM5tmJ+0m5zu9FuXFQgKfsnX3AQGQHg1DeJw4QqaZSZKuGu/qz2VZD4GMe7PbmrWvq/y7CFQfjLxAzRa/GrC51CmLhk0IW0AbYnjTzGhQxDdd1UfM+iB/Cm9i1FpQyremNuDx7F2aqZ28iezOqrIFnj7kevSTsE5JMC9CmZzps6GR/UYPpsSkkJB8PCfSNtcSaZvR1S+WrKtF8Klpzov8/jn1aFq80BBjfK4MphZGbnMTNCMVJptUfcbxRQ+E3UoiuhboYqhjWsuGTvxDaPXdAnKYpIaWHGKf16c9OlvkZE+TPC8civjm+QDTxOWmwrR4llqxEHRgbUSX4YTE/V9XQYNjZSF46rZlVsluCg+t1OAKlZgZYJ/HQyHhJW86oHklQAfr5MjsVQ4zZt4DD/hkE90OmjmCSyxMP117KqsHWBwCg1A7PGArN+nI024Z8SzLxjx3KYjuJaUm/o15wCnzehU0gu1VAjnIbWSXnQz8Szb+Gug0KcyspXwo9R/+rf/AD0vKN/N6AgDfQPnzLq1YRubDoCbBmPUJRGJeOcMRuBmPILVF3t8ZoAO8xq1SednVquFof0ak9Gv10SePbGc2sgdahyEbZY6bGXGl3sTYN7t7Dh+Lw1zbKwHMektqg0GWGpS+G3H6gq1g9CwnkUQ07zlZiWcYvCcb6YuA4v9Bw5x+On31SiTXue4Vyz10hql82mFBs2why+7V3EMiOp5+WoJiyj3GLgnm2hRUjawg4E/0Vm6QhWaDr6MLpwg0BPxtymBTL250UKtMgW+NJRXDLuXbS+VdUwshMeVX/At6rjOBqq/nBQ/0AOiDIS7QmdfEAx2h1kLevI5IIJH1RY5BvH7hk++cI3btZhXdLgqnZuVnwp8Sd8TyYxryX65qYLHbLP9mFC8T+/SCY+OmEWSpCQAO/Baad892EjWMyWZkVhTWWGhgyUdm8qJkkhZ6zKpJUH6rwju2VJLQXJ9VzZk3OtvzLe1A1/58j6LBNntyPM9YhqNbhcJh4XkkZ6nQz5aMV8vP1rnJWrwrZ5pmwePUyg3PM88K3rvpsfnVGlKMePBALdnHmT4hJyBUyWg0/J64LAEwmVuUlI0OADBbiTcdhNgQRPfhvdjLZZrNirQjrN204tGp2P7StS/cHl0x9d0fRuHfVLnnLHBudNBfL/yA5dhtNx5OgWFlRG1lUPZZndaJzlZU7LKgGFBaxI91aXRZHcQvYbUTp0+sBqXeb9xSUjHC8u/SsVf9T29Qj+qiUHNrjYFCDkDTWPrug== X-OriginatorOrg: chipsnmedia.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba6d0d87-2760-4080-1a6f-08dd1e567c7c X-MS-Exchange-CrossTenant-AuthSource: SE1P216MB1303.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2024 04:51:36.2130 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4d70c8e9-142b-4389-b7f2-fa8a3c68c467 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2RdyETGAmDz7Yw9+/3wpqLqKSwKJNuixKhfg5nRdW07cs8pIG3gfnHgLrIO5eiC/BXKjFAFQS+l5zZ6kYR8ziOYj/pqhntL2Dm1bmdzXP5I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU4P216MB1872 When a decoder instance is created, W5_CMD_ERR_CONCEAL register should be initialized to 0. If not set to 0, gray color can occasionally be displayed on screen while decoding. Signed-off-by: Jackson.lee Signed-off-by: Nas Chung Reviewed-by: Nicolas Dufresne --- drivers/media/platform/chips-media/wave5/wave5-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/chips-media/wave5/wave5-hw.c b/drivers/media/platform/chips-media/wave5/wave5-hw.c index c8a905994109..d94cf84c3ee5 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-hw.c +++ b/drivers/media/platform/chips-media/wave5/wave5-hw.c @@ -585,7 +585,7 @@ int wave5_vpu_build_up_dec_param(struct vpu_instance *inst, vpu_write_reg(inst->dev, W5_CMD_NUM_CQ_DEPTH_M1, WAVE521_COMMAND_QUEUE_DEPTH - 1); } - + vpu_write_reg(inst->dev, W5_CMD_ERR_CONCEAL, 0); ret = send_firmware_command(inst, W5_CREATE_INSTANCE, true, NULL, NULL); if (ret) { wave5_vdi_free_dma_memory(vpu_dev, &p_dec_info->vb_work); From patchwork Tue Dec 17 04:51:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "jackson.lee" X-Patchwork-Id: 13910970 Received: from PUWP216CU001.outbound.protection.outlook.com (mail-koreasouthazon11020132.outbound.protection.outlook.com [52.101.156.132]) (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 4FEFE1531D5; Tue, 17 Dec 2024 04:51:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.156.132 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734411108; cv=fail; b=VMEChkFF5gjbIK4RFbVl9DuJ3l27lFRSUVSBFVZh4CV68kLdAZ6tabIFGuYIDZdngrvgAvYIbbOySWtvcH4E9twqTmyoECLw5AOLbdcnBuK+AxrwjenXHoP4O+cuEeIx12gQRRvvhTP/2eu38x8Uc5rYgAyt404crRa8Jdv0+vA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734411108; c=relaxed/simple; bh=vVBu55Ig+PYsFFq9QKpfR6QOFBgXjzSqWXsnUVmJ0Xk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=dv3ld1/rRDWcinsyQDtps00VV/GBzfZVdQQ+Ki3ccPYAiZQa3tp6Uhes3g/caCEyDIJBnbWt/q2jTasyeEtL7nOhBicpD3drV4hQN/tNWniZiVVvXIEgiANmLUdTGtjiZLchSY3vXRD+DMISt/Wq03ok7JzuXaieMRHSvVfvo3U= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chipsnmedia.com; spf=fail smtp.mailfrom=chipsnmedia.com; dkim=pass (1024-bit key) header.d=chipsnmedia.com header.i=@chipsnmedia.com header.b=X0PKllmW; arc=fail smtp.client-ip=52.101.156.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chipsnmedia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=chipsnmedia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chipsnmedia.com header.i=@chipsnmedia.com header.b="X0PKllmW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SOoRibyxfrZtlPoYKTSZ0XsQtxAtI3VO97S2yMA6+F1NwGr8caHAB9LxigmgoN6lGfe7eZXDrxg1brZc//wHVjgxeSaosbbWJJwKzQfcYe5452LsjBgCp1cqtYaXJ3KgG4gh9Neb1MXhH7cv0S2NN4aReOKGYWzzHwmAtGcOnI7ISgA17JL6JxPJ23Ql2ydwBimn0cFpyJFqZZA73KKGo1BvQ9+mATKMBjYX45VgRbRgOWItBbn1d+n7bej610KCPWXj9DldK8G0Vw91iNgXnhZ54H9xovU5o2ELynZHWUGLucKxqIevEIICCxDrm8xIngh7iW0r29p2KaAYkTHgbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=mYy+GSU2vLdo/1ssMs8tywbX+RBJvozv/3j96s2GLzM=; b=ufet/Op1swPq0/lLkTGaM2lmSK7YYqqfGodJIPD9Tb1ydooG0cDt28xULXe7XrQ8GvAGnKlNPXKNJAG4jWFa9MvQ9U9a1xVRwfy0t2HBcM0546R9HBp9xi5qW4dSzU0nlV7UY5rSa9IJYYsuxUKn6gnIshVspPqo78lwlHYI0kAMN4gUJwUuSnQR4fNQHe9giuXSfbJ4EhPjOYWeIT8jPXXBiFebl38I/ma9WI+dmkTpYMeCO1HQZUlZosHwpQjhauKoef7xzZo2ht3WkRkzLR4WB00FKLnkOSV3wdadZJbPMtjRt0q1gCqUFbWC+Ov0g7+OD681+x3kzKbdzpym/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=chipsnmedia.com; dmarc=pass action=none header.from=chipsnmedia.com; dkim=pass header.d=chipsnmedia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chipsnmedia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mYy+GSU2vLdo/1ssMs8tywbX+RBJvozv/3j96s2GLzM=; b=X0PKllmWQRb7CVItRo1uJnl4ueajo3gQ6gNz0N6a+wZoAmlHhL8FnqHOZExo3KvkOmx7jH7mCBWh/vR8HfScpmXTj/rld1v+W3XycpSO4Un15Hr/goyb7VSVDu8O4v/DAjEs29Lwmb7yUcFqJ4vwnWEguWL6Di5u02sXyA6Z31k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=chipsnmedia.com; Received: from SE1P216MB1303.KORP216.PROD.OUTLOOK.COM (2603:1096:101:15::5) by PU4P216MB1872.KORP216.PROD.OUTLOOK.COM (2603:1096:301:109::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.22; Tue, 17 Dec 2024 04:51:36 +0000 Received: from SE1P216MB1303.KORP216.PROD.OUTLOOK.COM ([fe80::b711:5ab1:b5a4:d01b]) by SE1P216MB1303.KORP216.PROD.OUTLOOK.COM ([fe80::b711:5ab1:b5a4:d01b%3]) with mapi id 15.20.8251.015; Tue, 17 Dec 2024 04:51:36 +0000 From: "Jackson.lee" To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl, sebastian.fricke@collabora.com, nicolas.dufresne@collabora.com, bob.beckett@collabora.com, dafna.hirschfeld@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, jackson.lee@chipsnmedia.com, lafley.kim@chipsnmedia.com, b-brnich@ti.com, hverkuil@xs4all.nl, nas.chung@chipsnmedia.com Subject: [PATCH v2 2/4] media: chips-media: wave5: Avoid race condition for interrupt handling Date: Tue, 17 Dec 2024 13:51:23 +0900 Message-Id: <20241217045125.58-3-jackson.lee@chipsnmedia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217045125.58-1-jackson.lee@chipsnmedia.com> References: <20241217045125.58-1-jackson.lee@chipsnmedia.com> X-ClientProxiedBy: SL2P216CA0103.KORP216.PROD.OUTLOOK.COM (2603:1096:101:3::18) To SE1P216MB1303.KORP216.PROD.OUTLOOK.COM (2603:1096:101:15::5) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SE1P216MB1303:EE_|PU4P216MB1872:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ab016bd-07cb-4b11-c531-08dd1e567cab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|7416014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: I8lmjhC6JMIbWtQqvo2ussAB+HAAfns1ARd88nG++hUltp+5IA5reAwch71+dwcZMgvtRzO4WodqUCaEUYeYHHYojwm7z3c77EWYCqN68cpvM20EWtgPdYaOrttcsh/XYND3IfgdYnqJqhyI5CFaneAmx5zTCj6+qh+cZc/QN0oc9AoqAQYeuOR6EMStfMfQD8/QUeRoW5MPLOxTr3jlvcmckQFrydeo8Zf9PG26ycoNraUkTR7LXsOEyXi7y3P2vyq6RV9q3PYG2/Mq31kqn8lcluh3UeHd5lqByjRvvxWWVnDkdmxqi5Hy/Epc74aqCcaXIGCN2OvSPqPH23C2+sBPuERuIxUmf24rPfvwIOOg2uKmnitZFGzebWbga071an+vAIcb+mJYN1sUeOFO1QlA4DRuOefaLFBNhLhBdWh1O+2aF2mgXfNrhyUZCzau0R3V/c0Q06wm9p4ASuBms1WIZW1todW87uCkASLGZy53aQbSwN/o8DaTJGQJNfP9x5PNy3iU8dw3ep3PLnYlXOC0k8mvKqC0i4JHiMtkEBR/+xlGFvVRPPxRCcraDqksscbRbTC+JPLsgSEQBaKgljTlJwmJUvsARNUNPKPT7U4vlQ2w/4QoxhyFTYDl6jNSTggyQNlNr3tDJmSH6UO78H+UK9OvNQJHqo1jo5vXQtH1jg9IloTJOfcRUzSB8mLx7gew6jCC4TvY2p3vh5GBh5q/aEcYMH/WnRqLZ1WJZmIFR/6y65hJ4RRUiq14fvtfZklyvdbXzSXuK9LeSDehTLnYFkpKVM4GwSKf9okO+yZdnGkGNzZrrd5iZtUFmmrvtvjL+CSRK6r9F0Pq7rifPr+0tGBJ6qzdAJWD/xx9Qx8w8JV3bmWLuzpfk5rWTFKsSen+8SKpab2bO/oLciYH+T61dhnJ0ske2zYru82ea1b0+7MSDU8016AjqTcIiojMvAhI3fWRZtscxv/aCl56jzzJFLLTFK0JQJESB+h3Atkav4cuyV9fiNsJ4X/y6Spoc1DnD8RHud1aondz8zb3sRJS/u7OtyIqcW6cWNOheK7HbfMr0oAXjFyf6CcThjS/BuYLBYDLzi1+Zlm9vHgRSn53HBe/fz+l/NUqMAfjkqvTxLJQfZRp7krMbY4KmzUsg44FOlgJAaiiWBT9uq7YO6Z3D8f0B2+iTDjaSkUzd3FfkYrBlkBKoSYqxE2EUEXirECuxmrwRFOzKkZsqn1payota6ziNjysbsKhBh/gfuAH1pDVH+OyFnOPJHLsDbUz50r5ACvuIdLNyGrkWrHFko3OVsFKcMQyuJzLiTXg/vWG5JHC6QXv1vyCq6GvybaDgSrbpTxRZyCRVYsEnvsrRHTn7p0oerRBv9KeUAWPEm914U/PTYTWMHxMfSS1ZcyYiJYrlAbI5JGAQs0vdUF7o4ckcAHKHo40LCbCXtz5suiiC4Pm/6DMXir28OPN9gIM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SE1P216MB1303.KORP216.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(7416014)(376014)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Btrdds7/IfS5xK6szhS0uM06maGMEOj2wNc3lfA75j+hPWTzfmdTqe4Q8XuEqlGwKup9AUCOdGYWkgM8bwSfRtfPyBJXTzRQjYfV5WydbEd2fotf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OIafNG7biIkmoiGutbFs+BtCTHw3YKKRYEMH6efxKc5+dE6msq6lXVsIpDF/TSz0B34ANXu2Gq82Rw/MEGPdLX9DBfHGERd9ek3wsD4bg4XdnoyQUn0wnY7Ky82Wx/T8+qGKYJrWHFjRAUcTmE7Kue5GaWL6ey1/W24XDdXBqUnnF1t2W2XIf8zxgX4gXYy7qjRw7O/OmJyp6PYfMeGxCPMNsvG973AH4iw1Z1vcQLnhM28Q+Wy9umaA0pRpTlDGzy4TlsMFd+7qaXfCXn2nIusaOReEzFe7agyrD524xzhPmRlkXRCaitoKUoJRVjfGnElFkN/WvkKEzrs8gszBNpOh5oLjOlxSIzhTnjEotdQbcyLU5Yw661PlSxrtKMSvOcMISIbg8aucgCN34iQNNCKJNWoVkcj6v/ji7WqDHmqFpJMbL2R7oKTF25Wj1n/NrgI2AAg== X-OriginatorOrg: chipsnmedia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ab016bd-07cb-4b11-c531-08dd1e567cab X-MS-Exchange-CrossTenant-AuthSource: SE1P216MB1303.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2024 04:51:36.5382 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4d70c8e9-142b-4389-b7f2-fa8a3c68c467 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZxTytnpyilLb7z1Dqq4xlGwfhnj3LM7v05ZCpXV7ZeOSpGZfLw6M5EXOSVZoNdzs2Gc0HR8kSpXoNV8dBV8HkminpACynYiBAC3U+d5fZRI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU4P216MB1872 In case of multi instance, interrupts can occur for other instances as soon as interrupt is cleared. If driver reads the instance_info after clearing the interrupt, it is not guaranteed that the instance_info is valid for the current interrupt. Read the instance_info register for each interrupt before clearing the interrupt. Signed-off-by: Jackson.lee Signed-off-by: Nas Chung Reviewed-by: Nicolas Dufresne --- drivers/media/platform/chips-media/wave5/wave5-vpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.c b/drivers/media/platform/chips-media/wave5/wave5-vpu.c index 6b294a2d6717..63a607d10433 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c @@ -55,12 +55,12 @@ static void wave5_vpu_handle_irq(void *dev_id) struct vpu_device *dev = dev_id; irq_reason = wave5_vdi_read_register(dev, W5_VPU_VINT_REASON); + seq_done = wave5_vdi_read_register(dev, W5_RET_SEQ_DONE_INSTANCE_INFO); + cmd_done = wave5_vdi_read_register(dev, W5_RET_QUEUE_CMD_DONE_INST); wave5_vdi_write_register(dev, W5_VPU_VINT_REASON_CLR, irq_reason); wave5_vdi_write_register(dev, W5_VPU_VINT_CLEAR, 0x1); list_for_each_entry(inst, &dev->instances, list) { - seq_done = wave5_vdi_read_register(dev, W5_RET_SEQ_DONE_INSTANCE_INFO); - cmd_done = wave5_vdi_read_register(dev, W5_RET_QUEUE_CMD_DONE_INST); if (irq_reason & BIT(INT_WAVE5_INIT_SEQ) || irq_reason & BIT(INT_WAVE5_ENC_SET_PARAM)) { From patchwork Tue Dec 17 04:51:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "jackson.lee" X-Patchwork-Id: 13910972 Received: from PUWP216CU001.outbound.protection.outlook.com (mail-koreasouthazon11020132.outbound.protection.outlook.com [52.101.156.132]) (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 1D6E3158874; Tue, 17 Dec 2024 04:51:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.156.132 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734411111; cv=fail; b=rYAZxvBT4ADCb9ENip8kG2vxDRn5xyiYQBSLiZhXYgLXRf6EUowv9mGVq1pIHoW6mZ8p6E3LA7EDa9ZOcu4uhGBej51NKOhcJP2lyF4plrqdBJg9rX4F902T+sZfxdbgssnK8XD4NH46p3Frq28+pDElHZiiQ5Zsp3VZkPBbjvY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734411111; c=relaxed/simple; bh=PpGRPcDYw3QLIbKbHUBr+GCMCmX1BO0ojtmN0s+PlW4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=kkDTqVhZI57lS+cYL+z5F2P4IQETXK7fEXYb9bT5W2saCzCGfYd/4F2SbRCSZ35PmrQkahwaDegS/laxhhLFdCoRAQYkfnaXFtrie9JxyZAXMf2aGouJWvoIkkP7rOfKOuvQ4jOKa5yDrBVwQn3b4UxdXJTrp3yiJljzDRBp2DM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chipsnmedia.com; spf=fail smtp.mailfrom=chipsnmedia.com; dkim=pass (1024-bit key) header.d=chipsnmedia.com header.i=@chipsnmedia.com header.b=XNst5IAV; arc=fail smtp.client-ip=52.101.156.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chipsnmedia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=chipsnmedia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chipsnmedia.com header.i=@chipsnmedia.com header.b="XNst5IAV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iBxEIfpc86EwkGNe1YrduaqNUQDDxobY1EdcnojoBO5T7W+XXfulhX3RHtUTK1+1K5/rBctrkPlhrakpZmS3NW9Pqbcf0d+T7Q3tq5J7qkpc9/9H/IkQEI2SGo238Yi8SjVweZoi87O+6P9mnC8i8/V5GcxmDOuFGbfBAUGp6zC0wtsKVggTE5b5r/Fxt8MF5zCKokBAuPDycKObJcoCQj3TdubgYxV8tu/ldvz42x9gYnzJm4VgkCLKX5VRHk/mFEb66dWnQKAsZXt774/+uvb0Awu2D/0YV+Ft6wcUBmDTDHze38FP34O5ETkGQZgUQrKKWhqtwXlSOCxeztGRjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=PX+FXFVjWw3VkbMzjqzg+8ZzYcYBYulPRbTnDwoScNk=; b=aP02oPKLtLNq68Jl/SKeky31kPRKyjUwhJAIVH9Ye/5/EfK6BvLNcB3RCLnjkSrdtEdx2IhBDRCEOT+Orbovmp0HgWsNkK7l2rTkWoqZpkqBaZWH4ggJ6lux7vg1v4BOcHT+rX8uaalyN7jY0lmQUBO3rJ5G7m7dyqLZ8OFRWilUGPucDZoyjt/zhw7M7DYZPL+SUt8zGUmaRU47kZG64iJt8urNgOOIBQoiro9MBWALaGxnXXUhpWEav6lHPNdoO90wIimNXHLkWCX0+m1s3Zs039EjlOJMBsRJP0Pf88L68WG2KFoB2gnjIwJRGXyEzNGtNtDEGGc098jm+LoQnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=chipsnmedia.com; dmarc=pass action=none header.from=chipsnmedia.com; dkim=pass header.d=chipsnmedia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chipsnmedia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PX+FXFVjWw3VkbMzjqzg+8ZzYcYBYulPRbTnDwoScNk=; b=XNst5IAVS7lIe/eAN/h0te1nghGrMtIGsCIIMYTAczOXBNjsN+w4E8LdA6KdOVEixrpoy4A6+78jdjlR8snYYzQucoe20LoqqGtwVdeEHpikA1N8Fc3CghXZpOj0puAInYf93gGeBIse6WykrV58UZA7xablpxHDSwmT7Q79uzM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=chipsnmedia.com; Received: from SE1P216MB1303.KORP216.PROD.OUTLOOK.COM (2603:1096:101:15::5) by PU4P216MB1872.KORP216.PROD.OUTLOOK.COM (2603:1096:301:109::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.22; Tue, 17 Dec 2024 04:51:36 +0000 Received: from SE1P216MB1303.KORP216.PROD.OUTLOOK.COM ([fe80::b711:5ab1:b5a4:d01b]) by SE1P216MB1303.KORP216.PROD.OUTLOOK.COM ([fe80::b711:5ab1:b5a4:d01b%3]) with mapi id 15.20.8251.015; Tue, 17 Dec 2024 04:51:36 +0000 From: "Jackson.lee" To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl, sebastian.fricke@collabora.com, nicolas.dufresne@collabora.com, bob.beckett@collabora.com, dafna.hirschfeld@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, jackson.lee@chipsnmedia.com, lafley.kim@chipsnmedia.com, b-brnich@ti.com, hverkuil@xs4all.nl, nas.chung@chipsnmedia.com Subject: [PATCH v2 3/4] media: chips-media: wave5: Fix hang after seeking Date: Tue, 17 Dec 2024 13:51:24 +0900 Message-Id: <20241217045125.58-4-jackson.lee@chipsnmedia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217045125.58-1-jackson.lee@chipsnmedia.com> References: <20241217045125.58-1-jackson.lee@chipsnmedia.com> X-ClientProxiedBy: SL2P216CA0103.KORP216.PROD.OUTLOOK.COM (2603:1096:101:3::18) To SE1P216MB1303.KORP216.PROD.OUTLOOK.COM (2603:1096:101:15::5) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SE1P216MB1303:EE_|PU4P216MB1872:EE_ X-MS-Office365-Filtering-Correlation-Id: 297ab52b-fbd6-4ff5-3240-08dd1e567cdd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|7416014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: rP3PnqfDi6IeiORybqX0Tkp0t4B4Lb8pUWGioxphp7IOsdnAGq+xoeAp1yLtHttIBs1wAb1NTzAmDtz/GDUaswwDVnF3Ro6CLttSJOxV8SDNO48hZVbrhNUkI2+s9xGBb96Sxq+GMU97Tzzu6cmIfDhMnq3bzWzxhfEZuOEOFKkjYidA6LTTLad6aACz/7cO5ZohxGIBcMXpNl2yvFmQznV984lnpgWG9VUiQNs0zs5XhCYARTi1jj9dlDOmOE8UIhR6gaD6pHM0QxnaBN/iALKZUtX3MnyGFG81wmo/pMSpCPowODsEJ5Knl33p44ChkXKWCVrvaZ2KvoOQuK1SAxPtVWG8XPm3qyUGg/hjfOkgBqXDGZ9reZvB0KWqbtLagJa9e54cpnNkLm+L/gtw0UW9YTgLstxnzbJi9G1bHX4tMDLedrOSaCvkvrVT2SYS8PnurZ5X/u9UpEA/Kb5fUUc+1p5jdgm8bwK/TmFFpFNTibbgwI7chOVs1V8/M/fjU2kOJP6O7gmDUKE1wuyFaFy6WlBx39OsSlmj0S1VFfAlBCBJ8tcJTA52mNAzmYXpU+5HuvDzfzvyevVsSHjNzOgoX8fH4ZULAYzRyDvlb/rd4IsimVX+32cFwoqxLF0b42jNEzn8pMdWqsG7iS9IiKjqTPHFsocaSE7ekfT3b+iePT/S1ITGYV2ba5MkE1/Q3HYfxM3n9Rqj7GpcgYmOT0NO1ypPmlclXWLFRvknuXaDQ8nfZML3EYrUqDRxWvuOwrfnBOnYLkIA/T3N4fI/ab84pk4ijh75VGLMt9Fm9GJQu+cIbbNM8vK+0LjPJTQ2VN1qr62mtN01BbYdRGCTTH4v2OcpIBmHd0hEOkZzMMlJue8D7S5TXP3mc/8l3pKBpVJ3qCJcJUkr8is1GG2GKIKYJVf7pwcAm1b16XerjjIxMIyjEQWCRBeC6NHQiKng3mzbdKyzUZv7TpnXa9n/yxO5C2VQZo5tmILDTDf4zZBcV7tXgLnTtZyWbAKe9b5x9xdpUOgxdvpt8D05/sFkcsOcsypEpnfjAUEJww/qphs26wYitp8AwepSbd3z3YCTq7gGTmzsO2Qs7mRaoVjwZqWk9S5/NF4HLMWxq8MhrF+TedrhEqy/LQ39LcdOTyOdIOxgaJJ3KN/mYftBynmD/2s0XmAjAhq+zo0G5xgR2nELH1Hvcp/uUoJuK+QKZ/HYnwJQlqrNIOoEDP19LW7TaFioR7afK7++QzHPnqzCjjGzP4guMxlhEFsI2g9t9NNDksFj/xda+UgZTAjHEbdEvkAxyxMqDEhTAssKUk/rhRDG0y9XF0UaduXrAJJgUTpQeELjj2MaPq66HoaVkrDN95Mo4wR+NOTt7KB/4WdpWXm4dSgL7o8u55uFDAy+8JQBPwQAWZl9qdRxO/ZMXPmhot+pUk8B7yd5Zuhrm9vOnyoBMSDW9Dx1wNO22zjc0Q/d X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SE1P216MB1303.KORP216.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(7416014)(376014)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ea0s7BtSBj4PN3NItyoE49NnQKYWE9a9g/lINDgiQl1LdElTBEl0BICjlU8sVGssTykFHouAyGMNVdX48aNeQUGHI4ZlRVvtJ7J7hCUoJwfKIo/Fr/ooHxrrsIjL9dirVB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EC2EVmHXBOwAQOsAFhCAuGeo2AorugNXRhK+s/VMmIREu7J3Ce/nEAayRPoCzk2u1Dp61RlsCpFv0YCEZFRR4y+PrEE8F7vKZAu/sH/NZqGaW4EZmNgFWMZDch91FbViMbxhaHIhhsclMXi77LDKNxuoPU2wEX/OVfJvRf7UYZy26tqcH1g9RQm4Eu5CdxnxHTrfwIVJsmRn5Jf0HJLcq73oNnye51LWxI3GLHEJNkkUZu0MDEi9X29qCqn62y2M6aYvH1FcKO0vW0a9/ycokwHie5U28X9vzUKpcvSqMhP4rdTGcPOn00Z8ea2d/hHoiP5Lma2VXGM0Az12f3Fq/YvDcteSweWOhaDXvJshKbY1ElNK/q3lYhKPC5dlgJcVH53H5soWiuzdKHMkOBPbkdEg9oVpsvFSKPU07ttg== X-OriginatorOrg: chipsnmedia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 297ab52b-fbd6-4ff5-3240-08dd1e567cdd X-MS-Exchange-CrossTenant-AuthSource: SE1P216MB1303.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2024 04:51:36.8406 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4d70c8e9-142b-4389-b7f2-fa8a3c68c467 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HV/yAN27QqJ6b7g/3wSmtS0y1FszO8NZvmLrkZ6MBGbDids2FbUwmzoCOHzC9pIHEtSLoMpRaDFFp1iBWMB0l3QAvkyOon38f7clFIP/S+E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU4P216MB1872 While seeking, driver calls flush command. Before flush command is sent to VPU, driver should handle display buffer flags and should get all decoded information from VPU if VCORE is running. Signed-off-by: Jackson.lee Signed-off-by: Nas Chung Reviewed-by: Nicolas Dufresne --- .../platform/chips-media/wave5/wave5-vpu-dec.c | 17 ++++++++++++++++- .../platform/chips-media/wave5/wave5-vpuapi.c | 10 ++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c index d3ff420c52ce..882d5539630f 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c @@ -1369,6 +1369,16 @@ static int streamoff_output(struct vb2_queue *q) struct vb2_v4l2_buffer *buf; int ret; dma_addr_t new_rd_ptr; + struct dec_output_info dec_info; + unsigned int i; + + for (i = 0; i < v4l2_m2m_num_dst_bufs_ready(m2m_ctx); i++) { + ret = wave5_vpu_dec_set_disp_flag(inst, i); + if (ret) + dev_dbg(inst->dev->dev, + "%s: Setting display flag of buf index: %u, fail: %d\n", + __func__, i, ret); + } while ((buf = v4l2_m2m_src_buf_remove(m2m_ctx))) { dev_dbg(inst->dev->dev, "%s: (Multiplanar) buf type %4u | index %4u\n", @@ -1376,6 +1386,11 @@ static int streamoff_output(struct vb2_queue *q) v4l2_m2m_buf_done(buf, VB2_BUF_STATE_ERROR); } + while (wave5_vpu_dec_get_output_info(inst, &dec_info) == 0) { + if (dec_info.index_frame_display >= 0) + wave5_vpu_dec_set_disp_flag(inst, dec_info.index_frame_display); + } + ret = wave5_vpu_flush_instance(inst); if (ret) return ret; @@ -1459,7 +1474,7 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q) break; if (wave5_vpu_dec_get_output_info(inst, &dec_output_info)) - dev_dbg(inst->dev->dev, "Getting decoding results from fw, fail\n"); + dev_dbg(inst->dev->dev, "there is no output info\n"); } v4l2_m2m_update_stop_streaming_state(m2m_ctx, q); diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c index e16b990041c2..e5e879a13e8b 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c @@ -75,6 +75,16 @@ int wave5_vpu_flush_instance(struct vpu_instance *inst) inst->type == VPU_INST_TYPE_DEC ? "DECODER" : "ENCODER", inst->id); mutex_unlock(&inst->dev->hw_lock); return -ETIMEDOUT; + } else if (ret == -EBUSY) { + struct dec_output_info dec_info; + + mutex_unlock(&inst->dev->hw_lock); + wave5_vpu_dec_get_output_info(inst, &dec_info); + ret = mutex_lock_interruptible(&inst->dev->hw_lock); + if (ret) + return ret; + if (dec_info.index_frame_display > 0) + wave5_vpu_dec_set_disp_flag(inst, dec_info.index_frame_display); } } while (ret != 0); mutex_unlock(&inst->dev->hw_lock); From patchwork Tue Dec 17 04:51:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "jackson.lee" X-Patchwork-Id: 13910973 Received: from PUWP216CU001.outbound.protection.outlook.com (mail-koreasouthazon11020132.outbound.protection.outlook.com [52.101.156.132]) (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 180D715D5B8; Tue, 17 Dec 2024 04:51:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.156.132 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734411113; cv=fail; b=eUvNoklPc0e02C6R+qoSxm3bqdk6kStBcFNRe2dbIMI0Bm15gzHhjwUByDeH0R0hsvLZYpWqb0qPjzOXZnQCoNllXqMbQ+WW2R4Pu6R+dMPEI8KgSKqEL0vJzDVgsGBadNCrbsSgxfPslMmvKqwFB0lCzDyJrHVsvG6M8iZswZA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734411113; c=relaxed/simple; bh=GwCyJykW/j7mm1IYILfLg3lCqLDdoNYN7BmqDvz2d9E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=TbvRTaKydnY+TQcSw28n1qhI75Qz8Bh/3tM9ZC9sd2TwQ2/OqJpIQC20VGMpM5b53DSISEAZcI9iqvyfU60wrzIlKIgyJEvPN3KAvcgEG3XYiGCK+Z9via1/NEegzihFR0eTncxR3e63KnJ+bzuUukC50I3FWLG3zqiYxzcxPBw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chipsnmedia.com; spf=fail smtp.mailfrom=chipsnmedia.com; dkim=pass (1024-bit key) header.d=chipsnmedia.com header.i=@chipsnmedia.com header.b=H8bRCOwm; arc=fail smtp.client-ip=52.101.156.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chipsnmedia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=chipsnmedia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chipsnmedia.com header.i=@chipsnmedia.com header.b="H8bRCOwm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aCfw9jtj52h4lXnfa5sOoCH4QJi8tUeqKwqd+fGaPlQ+v/1gkfYdpY7ROQoCruzyJLblo7yGdMJ+EnbzrAjS4jgjgf2tGEbaJgQDl1bfVDki0Vw/wsZ4Df3dFz6Ga119HtWAbz/KfyHLg19a+OYTr0rxBLClWovyQbdPCVSY/twhPHFkgOjf4VOPFOQ2uw1tz7lc6b5tWvS9d1Cr8jGnxU4XeT+IlmrRvY0XIT3iQLcBlU/+2Jkyo+KPwwzkqysFE0XUwrnabk/mqIHUrQcESFsyczSf3XqZiuMo3ufE4u+9AcLRi5DjbGvwhqONhKDZq6kXyQciAfT4OQOK4aahBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=mGOcEZ9ZD7xca8dvy0mYczqK8/P23isIo3fwi5c2Z7k=; b=rKX1YVZvpHJmZJdHfKGPl4KBZJ+Q7CBtLwWDGnJQTR1MHSTY2HHIH9P6bgihkXoig5TYN6zHUepGXDmWiGk2BUGsrEi/TIHzuaZNdK9g3y4GHLTfB6Zqct0BBRLVHKMROpDsgchgO4p/1j8rg8h9unIjbOiW2gLNmn5HrCpG2MttivxolzdTmg1gmX4GmLyr05T6OpvdHaKtrWwXej1PHz5xB5+JycNyMApf6roJeUDqYd8G5tzAqPcZDUtmNfJdtnA7ssG6q+zeDMobbgLYmmlstrEq2jeS3ROg0uGDjcr6o0x1AWwu6LXNE3Iw9n+MFsaPNLUn9gRGj11nn6om0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=chipsnmedia.com; dmarc=pass action=none header.from=chipsnmedia.com; dkim=pass header.d=chipsnmedia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chipsnmedia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mGOcEZ9ZD7xca8dvy0mYczqK8/P23isIo3fwi5c2Z7k=; b=H8bRCOwm6Bl0drTwQJjMb2sbEDi7QNfrlqGFGyeZgFHKUVBfv5mLZFSmM/1PE1m8QlgAQNi8Db1UYHyJrJpcxOtsGQwYDfqphHqqeR3QFjfCqDHY0DjXtDDUM3l6Dvc6My2b15d2vgHn8+6T9R1GlPjxNi1ZrO0GFZhNOAPHtY8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=chipsnmedia.com; Received: from SE1P216MB1303.KORP216.PROD.OUTLOOK.COM (2603:1096:101:15::5) by PU4P216MB1872.KORP216.PROD.OUTLOOK.COM (2603:1096:301:109::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.22; Tue, 17 Dec 2024 04:51:37 +0000 Received: from SE1P216MB1303.KORP216.PROD.OUTLOOK.COM ([fe80::b711:5ab1:b5a4:d01b]) by SE1P216MB1303.KORP216.PROD.OUTLOOK.COM ([fe80::b711:5ab1:b5a4:d01b%3]) with mapi id 15.20.8251.015; Tue, 17 Dec 2024 04:51:37 +0000 From: "Jackson.lee" To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl, sebastian.fricke@collabora.com, nicolas.dufresne@collabora.com, bob.beckett@collabora.com, dafna.hirschfeld@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, jackson.lee@chipsnmedia.com, lafley.kim@chipsnmedia.com, b-brnich@ti.com, hverkuil@xs4all.nl, nas.chung@chipsnmedia.com Subject: [PATCH v2 4/4] media: chips-media: wave5: Fix timeout while testing 10bit hevc fluster Date: Tue, 17 Dec 2024 13:51:25 +0900 Message-Id: <20241217045125.58-5-jackson.lee@chipsnmedia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217045125.58-1-jackson.lee@chipsnmedia.com> References: <20241217045125.58-1-jackson.lee@chipsnmedia.com> X-ClientProxiedBy: SL2P216CA0103.KORP216.PROD.OUTLOOK.COM (2603:1096:101:3::18) To SE1P216MB1303.KORP216.PROD.OUTLOOK.COM (2603:1096:101:15::5) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SE1P216MB1303:EE_|PU4P216MB1872:EE_ X-MS-Office365-Filtering-Correlation-Id: 5bd88f19-8382-418c-030e-08dd1e567d37 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|7416014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: WUb9o6RM+8ZrEq3TX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xfZxf+DOYdJ3Goq/yA3TkpyQk+/nA3L68NI7XGw5ELkXPbROQOE+AaKBrqqChhZaaQQCWtrEe5DbRXKvh0xfcPJDiTgfyK/VZ78hMcWsNsdmaRUrOoGBR7Q7IFtJohVgBeNERnV0tubTebdP4+jM91eOPG8akIaSTVKIiP9UfQ2f1w5tvwUUHbGVz4Gwu5RfW3rbIsZ2zsC3D5/qvZjtsBCMWMd7OhYUv0By4Zy407nFsTg3jQGi9MOseEcP2mPYBkQIviaTtsyfg4aTnyUogygV4Kj6QCaKEmiMlYZ0IvF8f9L40ul+Q3OOMtymyg4cfRO9//4dGCPUu8f1GG8+gdwusSWMrQArzJmNG2aC4HeIMzdzSPHe X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SE1P216MB1303.KORP216.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(7416014)(376014)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: R9PStP4WTjtswFv56FjkaD/WDxJJGTOaBjhqByE1ZTSjJzMgPS+TtVRWw6qEkdKY1ivXzoKdY64WJjOLr9xJ94v60u9Xq71/52T8FsC4Z1KtF1luTvSBaw+1j3wkFGJ8z7qup2b3QFgpd9UlCbhXytcTZo43lt1G3Z1H8Q1ZmF2u407oI4x8gUghrVaByWACXb0ndeg0gXuvTgPFzegrK5Bqzp+mcvBYJ4ZP3q1YLWPxjVKT2CPGw1bQ62+9By7i/6IqVj/qE76xXfw+eMRo3qxhPhvlcOyvKRHTaL6GqSZT33P0JJP8iVOeMmEKXGjmi9srBGkTmTJvV8c2F6c2YCcCELCT9A65r1iJlTL45Aej4Hi3fejHPfJCCngxPhFNuPFi71eli4DwCPImn33IvpDSQWScIHeuFb+p1Wsyv/p97bBI5W0rO/+LdPjY9YLgTJn9EDPm8UdB5Ub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eq05fQPWWTz87ancI7IBwDaDjdQmpozxeTV81LkOC7eRTPQbjdtGk2OF+O4Y1tTOdv8qkQ== X-OriginatorOrg: chipsnmedia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5bd88f19-8382-418c-030e-08dd1e567d37 X-MS-Exchange-CrossTenant-AuthSource: SE1P216MB1303.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2024 04:51:37.4232 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4d70c8e9-142b-4389-b7f2-fa8a3c68c467 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pclAdXDbm1iDYXRRPdaQTzmajh6aT+LyXTL3/HSaDusvKRRBpTI4Ibt7Wclt/ss8ruHcv3Vyqvkcj4H6a6L3m6OE2vXf1zbSjiRBobSLFe8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU4P216MB1872 521C Wave5 variant does not support 10 bit. When 10 bit support for 515 variant was added, the code which returns an error was removed. While testing 10bit hevc fluster on the 521C hw, timeout happened. Fixes: 143e7ab4d9a0 ("media: chips-media: wave5: support decoding HEVC Main10 profile") Signed-off-by: Jackson.lee Signed-off-by: Nas Chung Reviewed-by: Nicolas Dufresne --- .../platform/chips-media/wave5/wave5-vpu-dec.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c index 882d5539630f..fd71f0c43ac3 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c @@ -1345,10 +1345,24 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count if (ret) goto free_bitstream_vbuf; } else if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { + struct dec_initial_info *initial_info = + &inst->codec_info->dec_info.initial_info; + if (inst->state == VPU_INST_STATE_STOP) ret = switch_state(inst, VPU_INST_STATE_INIT_SEQ); if (ret) goto return_buffers; + + if (inst->state == VPU_INST_STATE_INIT_SEQ && + inst->dev->product_code == WAVE521C_CODE) { + if (initial_info->luma_bitdepth != 8) { + dev_info(inst->dev->dev, "%s: no support for %d bit depth", + __func__, initial_info->luma_bitdepth); + ret = -EINVAL; + goto return_buffers; + } + } + } pm_runtime_mark_last_busy(inst->dev->dev); pm_runtime_put_autosuspend(inst->dev->dev);