From patchwork Fri Apr 29 08:57:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 12831666 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8F29C433F5 for ; Fri, 29 Apr 2022 09:14:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=OaxdnAP8BHWmEr3el+FUgY4SuDizxbIpWmlwTIAK1yo=; b=sDwtMNm1NNZaKZ 98dOQ0vkLxTygMjqra+vBLxKls8tTJ2BvyXHBsbkX0UMDdp/iVb/i0JqBD2Wm+nFwaMqcUo4G1omN WH3Q+hcWAZ0rbXGevN67DRm+dwr3l/UgOjiATgyZ29ANdF8czCgN2bE6oqIFfin2zYWpM8/1apY/l 25El4Pgqzi8xcSE7H/A6JpoMd4A4L2GO6jW3kNfvxKT5Cdz6qHwAeVLuYtDnAgzy3x3mHOKFH0QeN xApg1h9J5gzuKEMDlTe9OlG/BksE0aDRA8HpSw5SY33oJvmQctJTpr6uqw8cezxprVCjXSe94phd/ 99teYgD4wRQqEu8gn15w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkMgo-00AKvT-Pu; Fri, 29 Apr 2022 09:13:26 +0000 Received: from mail-db5eur01on061f.outbound.protection.outlook.com ([2a01:111:f400:fe02::61f] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkMgm-00AKtI-0L for linux-arm-kernel@lists.infradead.org; Fri, 29 Apr 2022 09:13:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mI2saKNr7iOzfk9U4EYXht46c76Y2EQc2gobwCbc3D0mN1a8akLcFZYUq5akyLmi2F7OmVOAVREyDASsGqZb8yrP4NVHoCuwdxmAgykXZ+pk7BT7/7W6R08dOdaL/JCdzTriJSS7qQx15FcACS+wTy+guguB9IVUmfgcUut8JzagYSPqeQXbrppFwMW9kxRebQV2ZVmryOhU6k1QiR3OoU1U2mBpAH/fd0CJlJEpCGkqT/tyAZ31PKp77heWet+DuVx5VroPYDUNC0f0pJ/R8VoxQQn1SPzi8DVNDqWn0w1bLEFBdvIHfXivTvBjCmeA1XSIBEnYCnrEFYLqP8ofMA== 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=P7RRaTFjmSbM7HSEuXXR41ASDpyb5tfKFaR191EujIA=; b=ho7txe9P94AyH+4wmeKZMo/X8TtCMwcIi8BSSh1hqfk485rN/aK5v4+Dn/ozmwhGbTZWfGa/h0KmwY/UM7mK4iM8ZMdxQRcmscU7nbr29287h8Eo4+iCC+MDeS6HpHk/Hl7NMY7ETQFawPE7bXnJ9LLKp1XWCtghgu8emYwuGqNXsHJiYZw/zIAxJTZdfdkLUo3WE/AkxZwyooGvtfXgMSOy7UcYywyIsLlxV3Jl7mUUw2eZmfJc1hmHsCKYr4iKrsfO6efjmMUstbiVve6laWSdCeY0xVJhEPMpLFqHEDIZOI2AV3iYe1xtZuHDN7bEDwRzfbyTDfJkWB4LO7/qEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P7RRaTFjmSbM7HSEuXXR41ASDpyb5tfKFaR191EujIA=; b=AsdAUXeuz+wzM+KtSnh5pg4g+tTza651uzTFB2k/SObTss/+s6TTgAOCZHTdKhdNQ9Ng+xxzXuCXaL0YWXbW/wn5MX2E4oDkY9Jh+IqlLQJq3QJ0G1wqySnssB/ejeiwreliNpJorUM9uBRMDLsOzR0BsKN3YaKYYsq+qVJKPag= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by DB7PR04MB5225.eurprd04.prod.outlook.com (2603:10a6:10:20::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.26; Fri, 29 Apr 2022 08:58:15 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::ed87:b085:802d:2390]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::ed87:b085:802d:2390%6]) with mapi id 15.20.5206.013; Fri, 29 Apr 2022 08:58:15 +0000 From: Ming Qian To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] media: amphion: wake up when error occurs Date: Fri, 29 Apr 2022 16:57:57 +0800 Message-Id: <20220429085757.18443-1-ming.qian@nxp.com> X-Mailer: git-send-email 2.36.0 X-ClientProxiedBy: SI2PR02CA0020.apcprd02.prod.outlook.com (2603:1096:4:195::7) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2ed51219-1d7e-4af3-3c8f-08da29be6563 X-MS-TrafficTypeDiagnostic: DB7PR04MB5225:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PI8ml+9+0CYAYycpU2k1xNI7Cmd+CdLhO6gg/E2AS7dk/0DrdGKfROMi+zlL2I5naaENwmwtV5gEgPs2k6ubyQuxUiCGRvF7ngOruHrDC3fVjcV/fe5MkOwlVMYdOEKKO+peQvTjjaIgxnoI+VTyCEtYIds454F1CkoFwVxJgU8nbsppbTDQVm1nJyE6Dv4Ymf2uUjcivCpmtd2kdQVXjXHHLqzxIUAAqhdZoXma4TPjNK/qTeccSm8BOJKyGoHFCDuQTjS0/S6POCTZHA8BSF/vtqZmQHdfW10lT3NxxCIGRMEYIyAIVsV0nUgGCwMZ1u3favn5rhIgEVqO2ToSOlJcG/f+x35MXeBFLoO4WzxynUGvDGKXLbflpS59727CaEwVMIYVVcmP8wUCuf1Pq6guuZgZQcbdmFOB3sSHHgIeNq59CYckoH44SZX94U/uyWkRIDlKUfZG0JL4ZQUlBAKpVjC0qaXxcK27jbzcaGjx7sSnITUWiJCYs44E+D50yVeAOHzVOIOefyPEEBx3gRf4XguS+EoU4yTB7Nf0LQ0opoWeQOSzeKgE+cqd/EBV82iwpjBAoX3Rm85yh2ZH16+QuZxSAK5M/i6gs0vqP/8tV0bRogB0jWBHrKI2KFXw87+81etQGfovLyKGdzttpBPvcKY+hl3S1Do9IwVtc174pfYctJroUfS9rFCg9c+UBBUk1Z+y7QjcgYIN2HxKSQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6341.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(186003)(1076003)(2616005)(86362001)(38350700002)(38100700002)(83380400001)(316002)(36756003)(5660300002)(8676002)(4744005)(44832011)(7416002)(4326008)(8936002)(66946007)(66556008)(66476007)(2906002)(52116002)(6506007)(26005)(6512007)(6666004)(508600001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Bo4UtZB+0FlhiRm88WAQmqwkFoteJzBs5L3SEX5MGqgddetqzA+9YB39yrC1lKSWm+wbnGpN+fxRt4/CdK5lzyEFCBNPQvKbHtgHx2Fy8Dq79hOcWP6ruqwC4XlSiWC1H1C56IeSz1rjNhcSXxOwJhIwnLael8AszgEHh/qRFllBHe02uHNDVF5B8wRVKwFSMSHkyVE03JvIo10Z96JR2J9O9MqCifx34efNcCORK0X5wJA7mNbq6EvjioSqRvdLLp2xAD7NOIc2eM2t05iAzd1CLt0enmuEx+gPVpFB5FtkBqoPsUR4Znui5ybRPlTlgLqkEZJ4PwcXTekjhjnMWiKlW+iHccACSXWGzuZvvwQ5r8VjlZnb/yAl2QtSIPD3YiAEX0kUsPOtZDQVpYj9bU7duD3RNEXxDuKl/+ffPhhzj7Tz+qvojt0rAhIch7eIxcSkpkeyTveo7o2WyPE5Df9PB8hZjxXIJpldbFtQqidkwMicpSOA4dWYtGdCyOKcc5K9KzSf+eH0Ivj9AWAm+02LNHEaqgGDLU9ig1yvKCvHVQZBbwp7vb/ndNXqvjZboHfXtC28h35GkJux8ibmrWXZql9iFQM/A8mH+HLf3350tjw+j6o3XEnWshPHAtXFhKspw5pT5uyXFNhp3QDoDy9X8i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7X+hNwvl+cMCqCMwbg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ed51219-1d7e-4af3-3c8f-08da29be6563 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2022 08:58:15.1311 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: x3kKSVRNCiqryBH5KItaZoZf8vQ8uByjgWYpkckXrT0gemYuLyQjsdbymDUWlwlPgdluzuKkaHm3aw9msq6J+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5225 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220429_021324_230661_5810E86E X-CRM114-Status: UNSURE ( 8.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org when error occurs, driver set error flag, and driver need to wake up the poll wait Signed-off-by: Ming Qian --- drivers/media/platform/amphion/vpu_v4l2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/amphion/vpu_v4l2.c b/drivers/media/platform/amphion/vpu_v4l2.c index 49747e0ee96e..a5de72f644a1 100644 --- a/drivers/media/platform/amphion/vpu_v4l2.c +++ b/drivers/media/platform/amphion/vpu_v4l2.c @@ -73,10 +73,10 @@ void vpu_v4l2_set_error(struct vpu_inst *inst) if (inst->fh.m2m_ctx) { src_q = v4l2_m2m_get_src_vq(inst->fh.m2m_ctx); dst_q = v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx); - if (src_q) - src_q->error = 1; - if (dst_q) - dst_q->error = 1; + src_q->error = 1; + dst_q->error = 1; + wake_up(&src_q->done_wq); + wake_up(&dst_q->done_wq); } vpu_inst_unlock(inst); }