Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp6567pxa; Mon, 3 Aug 2020 20:45:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBfS0w1E7A4XBhA0cESCvtx0pBlejxMIR1+gurRQcxzQcD8D17snkoTaYs/JH/4KQ4H8SG X-Received: by 2002:a17:906:401b:: with SMTP id v27mr9163686ejj.300.1596512700740; Mon, 03 Aug 2020 20:45:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596512700; cv=none; d=google.com; s=arc-20160816; b=cuNSKO9gmPNebUs5BWm1K/jO3KjX3pJd+agB32uXbi3tFx8n/V9h3rF4c0unXedZN4 lVDzgloaL4C4ubc6L7kMGEc30ncm3Z99jj5W+gGRCpwefZhX2JjRn2/T231UDcoKMxLQ ZjpUOCmouyWFYTLot9uMBewJqUEktglzqKRULsFsdFYfDnIkoNMzgSfdkGsk1tiZmuCY bhdNaAW4pXkgYLM2YfxlvYfINKgLQxV8MJF5SnKERJY7P3s+ZOlSa+nsKP2s6e/Kiz1Y 7B0SDqQF5zSxtjDammmJT8RAhAdV0i431CmZzVHVKmRa7CRVWqMgYhEW+/uaCqE8T9sD V4lA== 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=6ZJJUs7Asf8iPVD6xYLi1hRZ04UPNqzEg5H8d7w95mc=; b=knTXPUNxbLeyHvbD2tRy2O/p6jKHqh146bTrja2g1jLtb9SFTWsq+vh1bz2M4luOJr zjT8wdjb8a10Y26mFEehpg3FQbQXyVYlbnB1EqN2UXrI66/T6kJrVGCW2WsP6A05ImJb 7MBqXAlS9UXTKSQkVBU+kijaYmuqPAVNubWCsDFNZIeQtts/PGJop+UE06Ssjjo2KTL9 kF14Rx21d1Hc1aodUOydrJHnx6pZBt7RwdMPFcAAAUkUEU8ULSnK/whpB///viC3u47T BN8U4dHd8I9LSFi4amkq3nHI4SJGCRh+gn0dz8Rjre8cuh07GomgCquRDtrlI5EhrMGt 6wqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=gT+OAvpz; 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 by9si11185780edb.241.2020.08.03.20.44.38; Mon, 03 Aug 2020 20:45:00 -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=gT+OAvpz; 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 S1730660AbgHDDn3 (ORCPT + 99 others); Mon, 3 Aug 2020 23:43:29 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:37455 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729709AbgHDDl4 (ORCPT ); Mon, 3 Aug 2020 23:41:56 -0400 X-UUID: 9c845ab9fe514562a93b9add7913e803-20200804 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=6ZJJUs7Asf8iPVD6xYLi1hRZ04UPNqzEg5H8d7w95mc=; b=gT+OAvpzq7TNcrCjZX81WSbJdynL5WqZN+r+PwE4x27Ccfg/u0oTqXzuEQpuysrNTTwSwjAuwzCW+PutnDqQTAZ4uaCZ8Fa/ypuj3+oeUTMwlOo4qbsFGv/xhSbGNQc4u5wb60AxM8negVC1THlwV4gCVOBM8tOVYFeRZH/P5L0=; X-UUID: 9c845ab9fe514562a93b9add7913e803-20200804 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1540465036; Tue, 04 Aug 2020 11:41:53 +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; Tue, 4 Aug 2020 11:41:52 +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; Tue, 4 Aug 2020 11:41:51 +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 v11 09/28] media: platform: Cancel the last frame handling flow Date: Tue, 4 Aug 2020 11:40:43 +0800 Message-ID: <20200804034102.22983-10-xia.jiang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200804034102.22983-1-xia.jiang@mediatek.com> References: <20200804034102.22983-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 IGxhc3QgZnJhbWUsDQpiZWNhdXNlIGFsbCBmcmFtZXMgYXJlIHNlcGFyYXRlIGZyb20gZWFjaCBv dGhlciBpbiB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