Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp173615pxa; Fri, 14 Aug 2020 00:17:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyTiWUgqSwbV7lWW3BCtXHDcmd/KtS5TSZwhxAIVqgs7gxZXRZL5E/pOGIWfGHqyjLy/ca X-Received: by 2002:aa7:c408:: with SMTP id j8mr995706edq.83.1597389441120; Fri, 14 Aug 2020 00:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597389441; cv=none; d=google.com; s=arc-20160816; b=A8WTjyHnBCpkRgbAF8+xagY0qVnQGoT4MRKRxT2D11+YyJoJVQIvrX0WxoZ2Vw6B7N hyy/QBzMAj2VnDqYEtnuwL8N0Ug+s5g4rNqhhqgqXKX1WpTNP1wWlC46dZvbynqUzMwz BKaQaohMPlY18I0b1z+C7IbD8y9xox2EHM5pS+LoOKlQRuEVR2nEOzTDLMVX9v2SERHP 7HQqcauU9pVt05k0aOOfImNwKsd+C1XTtT1C48S+aSemQZ8nrf41EJVZ9OUmXF/YE0sF Ty8VJ3RkpjTUNXLITJi5rNMptREsSeboT5uHkB4KZAOg+fhI0U2VDvlaDaR6aCIUN7KI Csqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Xdw36FEdfbjrpmm/25wdOBNJsrHP+0pR/IpHGiG6feo=; b=B5mFdi7e2Qm5X/+tT+9FY/ikJUGdemO/SNGKkDyqaWCSN1HMx6fw2htfkVQKQsVrZu LV4gR1LlhsdczDDA3YTHG0x/jDWgppyxPhIDM4Z+WKUgb8Cio8Mg6mv+klzeCE/RrAC1 bvSUSis0GADdavZbIKHVAf5lz/0fY8i/XyM5nXPI8YWpFswub/x9IL/WtP2KNuxkqONg X0FfkObmSuS4kc6xZbldxP8bGd1waXHEJWvTLM3rMvUZ6i8dq8FVGpwwLqfe0K+9c9VV 9mACjiFm/UcPQIcfkCB1wuYd/CP2HXs7znvE/VFL9RlDPm+ww3COdTlNvQHomB0dGsp0 3NTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QfzWjQE7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l26si3437311eje.138.2020.08.14.00.16.58; Fri, 14 Aug 2020 00:17:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QfzWjQE7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727779AbgHNHPF (ORCPT + 99 others); Fri, 14 Aug 2020 03:15:05 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:14627 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726741AbgHNHNX (ORCPT ); Fri, 14 Aug 2020 03:13:23 -0400 X-UUID: 0ad4a1a3a62948b5bd23b581caf5419d-20200814 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=Xdw36FEdfbjrpmm/25wdOBNJsrHP+0pR/IpHGiG6feo=; b=QfzWjQE7raE+lDntAjTl8x2zrNlGkQBIQ8wCDoEsNEJQBcOa1L5xfLm7ZVUG8m5ChdExEOb9YsZeR6qHeUKLMZ49kf5OWuXGf04z+luV5qbDiezyO1dn/vmj+YILNC+X72mi6SGqjLP/05+kO8vkwhzgjG6R3YoYOS1wm2N7zgo=; X-UUID: 0ad4a1a3a62948b5bd23b581caf5419d-20200814 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1411788834; Fri, 14 Aug 2020 15:13:17 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 14 Aug 2020 15:13:14 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 14 Aug 2020 15:13:13 +0800 From: Xia Jiang To: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Rick Chang CC: , , , , , Marek Szyprowski , Tomasz Figa , , , , , , Xia Jiang Subject: [PATCH v12 10/29] media: platform: Cancel the last frame handling flow Date: Fri, 14 Aug 2020 15:11:43 +0800 Message-ID: <20200814071202.25067-12-xia.jiang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200814071202.25067-1-xia.jiang@mediatek.com> References: <20200814071202.25067-1-xia.jiang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhlcmUgaXMgbm8gbmVlZCB0byBxdWV1ZSBhbiBlbXB0eSBidWZmZXIgZm9yIHNpZ25hbGluZyBh IGxhc3QgZnJhbWUsDQpiZWNhdXNlIGFsbCBmcmFtZXMgYXJlIHNlcGFyYXRlIGZyb20gZWFj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