Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp173451pxa; Fri, 14 Aug 2020 00:16:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwauROx30iC7lzG6fTdaBCt1OV+qmiTP7dms8BEmUmwW+hNJYQkheF9AW1fSLXvAXUejrdm X-Received: by 2002:aa7:da0e:: with SMTP id r14mr1017802eds.236.1597389418594; Fri, 14 Aug 2020 00:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597389418; cv=none; d=google.com; s=arc-20160816; b=H1NTap+JsQnaFYLjWXUj+98ksUxijFxx4UG/VZ/gNzkEAVkmO3WNtNFGeDKlehO2Jy Y9oYzTx/O0mFZYL+9y7ZaLb7B2eQAou5R/cRZs7qgCnPrp7re3+PlIOG6qgIEiOLiL0z BAJsJ1bxdbUfEEdkpZrIlEoYgZSJDf8FUaPsZjQH1xx5lqmK/bpKFazk1iMpO20RmY0L G9BicBKMa7oUIp91AFZfZRmKx7qkiQ3G7AXehBGExarsY/b36hNXyyHI+VV2Y5/u6pRA dJcew2zcOSxvkq+gRbY48+3WrNfc3A4qcEbwSSgpiytnmUMEJAYhPq9z1imphN6B60Ok daUw== 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=T4f3AdfJ+831JcRoZBcLivr+HS7QwLLcxBmM6QVRtnE=; b=jh0H3JVYLkP6mwXa73kY+HpjF18SGhIyt/fN/VuVumgCVCd1Vqnik/3SvDFvj2sMV9 MQjyLhmJpCBAvZ/4CBW0pRixykjl7As7W4BY5WLoOIelAPbNHsWcpskQF+DQCDszJ2Uj 5VAYzoaZWkUqgQAEKnYrw1CanrfMxwVmCAncU4OadC2vbLB5tw4fpOWnXJFsXfqu//Yh hykbS46B0cvszgT6n/3OVWhmd4AcWI4q4E99wMpXpCKiaGcxUhMqlxQNxbFRbOWObBTh BhWiBVbTVfmnlruRckJjDEzFMs4g5ZU3TfiE8Bfczkg34LmTyRwQBn5fXj8n/Wo/clX+ 7LJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=iw+f0z+U; 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 h1si4907728edv.192.2020.08.14.00.16.36; Fri, 14 Aug 2020 00:16:58 -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=iw+f0z+U; 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 S1727803AbgHNHPV (ORCPT + 99 others); Fri, 14 Aug 2020 03:15:21 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:32322 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726696AbgHNHNV (ORCPT ); Fri, 14 Aug 2020 03:13:21 -0400 X-UUID: b21b4f46c87745adbfb85b3b75ab2f9c-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=T4f3AdfJ+831JcRoZBcLivr+HS7QwLLcxBmM6QVRtnE=; b=iw+f0z+U6O5nD0QLvil78G6VLf5rZDkPAH7jw+4LAdFwQyz82tT1zRriAz6APYyP88YnA3UA4VbKNu7keRIFK6uTHKgiBZSekWdZi0z7QRUAMhOTeySlWZOodfS1iUoI9hAQVs8tYyfiNHXc4pE8S+MfXtUgAcyy9wD9UdxXJg8=; X-UUID: b21b4f46c87745adbfb85b3b75ab2f9c-20200814 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1728983375; Fri, 14 Aug 2020 15:13:16 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 14 Aug 2020 15:13:13 +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:12 +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 09/29] media: platform: Add mechanism to handle jpeg hardware's locking up Date: Fri, 14 Aug 2020 15:11:42 +0800 Message-ID: <20200814071202.25067-11-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 VGhlcmUgaXMgYSBkZWxheWVkIHdvcmsgc2NoZWR1bGVkIGJlZm9yZSBzdGFydGluZyB0aGUgaGFy ZHdhcmUgYW5kDQpjYW5jZWxlZCBpbiB0aGUgaW50ZXJydXB0IGhhbmRsZXIuIElmIHRoZSBkZWx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