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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75487C433FE for ; Mon, 13 Dec 2021 08:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232186AbhLMIkx (ORCPT ); Mon, 13 Dec 2021 03:40:53 -0500 Received: from mailgw01.mediatek.com ([60.244.123.138]:45992 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231538AbhLMIkv (ORCPT ); Mon, 13 Dec 2021 03:40:51 -0500 X-UUID: a631a786f5a04c128010e934aacb8b1e-20211213 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=GSzSVKBHcCIP8i05vY1cn8G54b7JCcScJgo+oQsDzPk=; b=F2dkMt2udbtHKEpQhJqdxNPXJ9KPy+IQfOHeyO9/8BHnGmjz5QczFDKs1PsMMYuN+EIIuxH1lvM2+33AqQt8QRKiF13RWhXg03JrMm23i2/D4IztzbA5hLOhNygVEXU7zLPIcbBTKUPhGXKXLvTQwjd2zFRRAo9XIdi6Gq6TkvQ=; X-UUID: a631a786f5a04c128010e934aacb8b1e-20211213 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 804574782; Mon, 13 Dec 2021 16:40:48 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 13 Dec 2021 16:40:47 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 13 Dec 2021 16:40:46 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 13 Dec 2021 16:40:45 +0800 Message-ID: <87c70b080162b63454609d647ff1e2b39d06d406.camel@mediatek.com> Subject: Re: [PATCH v12, 06/19] media: mtk-vcodec: Add to support multi hardware decode From: "yunfei.dong@mediatek.com" To: Steve Cho CC: Alexandre Courbot , Hans Verkuil , Tzung-Bi Shih , "Tiffany Lin" , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa , Hsin-Yi Wang , "Fritz Koenig" , Dafna Hirschfeld , Benjamin Gaignard , Daniel Vetter , dri-devel , Irui Wang , AngeloGioacchino Del Regno , , , , , , , Date: Mon, 13 Dec 2021 16:40:47 +0800 In-Reply-To: References: <20211202034544.2750-1-yunfei.dong@mediatek.com> <20211202034544.2750-7-yunfei.dong@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgU3RldmUsDQoNClRoYW5rcyBmb3IgeW91ciBzdWdnZXN0aW9uLA0KT24gVGh1LCAyMDIxLTEy LTA5IGF0IDE1OjI5IC0wODAwLCBTdGV2ZSBDaG8gd3JvdGU6DQo+IEZldyBjb21tZW50cyBhbmQg cXVlc3Rpb25zLg0KPiANCj4gT24gV2VkLCBEZWMgMSwgMjAyMSBhdCA3OjQ2IFBNIFl1bmZlaSBE b25nIDx5dW5mZWkuZG9uZ0BtZWRpYXRlay5jb20+DQo+IHdyb3RlOg0KPiA+IA0KPiA+IFRoZXJl IGFyZSBtb3JlIHRoYW4gdHdvIGhhcmR3YXJlcy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WZpbGUNCj4gPiArKysgYi9kcml2ZXJzL21lZGlhL3BsYXRmb3JtL210ay12Y29kZWMv TWFrZWZpbGUNCj4gPiBAQCAtMiw3ICsyLDggQEANCj4gPiANCj4gPiAgb2JqLSQoQ09ORklHX1ZJ REVPX01FRElBVEVLX1ZDT0RFQykgKz0gbXRrLXZjb2RlYy1kZWMubyBcDQo+ID4gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbXRrLXZjb2RlYy1lbmMubyBcDQo+ID4gLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbXRrLXZjb2RlYy1jb21tb24ubw0K PiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG10ay12Y29kZWMtY29t bW9uLm8gXA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG10ay12 Y29kZWMtZGVjLWh3Lm8NCj4gPiANCj4gPiAgbXRrLXZjb2RlYy1kZWMteSA6PSB2ZGVjL3ZkZWNf aDI2NF9pZi5vIFwNCj4gPiAgICAgICAgICAgICAgICAgdmRlYy92ZGVjX3ZwOF9pZi5vIFwNCj4g PiBAQCAtMTYsNiArMTcsOCBAQCBtdGstdmNvZGVjLWRlYy15IDo9IHZkZWMvdmRlY19oMjY0X2lm Lm8gXA0KPiA+ICAgICAgICAgICAgICAgICBtdGtfdmNvZGVjX2RlY19zdGF0ZWxlc3MubyBcDQo+ ID4gICAgICAgICAgICAgICAgIG10a192Y29kZWNfZGVjX3BtLm8gXA0KPiA+IA0KPiA+ICttdGst dmNvZGVjLWRlYy1ody15IDo9IG10a192Y29kZWNfZGVjX2h3Lm8NCj4gPiArDQo+ID4gIG10ay12 Y29kZWMtZW5jLXkgOj0gdmVuYy92ZW5jX3ZwOF9pZi5vIFwNCj4gPiAgICAgICAgICAgICAgICAg dmVuYy92ZW5jX2gyNjRfaWYubyBcDQo+ID4gICAgICAgICAgICAgICAgIG10a192Y29kZWNfZW5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S0+aXNf c3ViZGV2X3N1cHBvcnRlZCkNCj4gPiArICAgICAgICAgICAgICAgcmV0dXJuIDA7DQo+ID4gKw0K PiA+ICsgICAgICAgZGV2LT5kZWNfaXJxID0gcGxhdGZvcm1fZ2V0X2lycShwZGV2LCAwKTsNCj4g PiArICAgICAgIGlmIChkZXYtPmRlY19pcnEgPCAwKSB7DQo+ID4gKyAgICAgICAgICAgICAgIGRl dl9lcnIoJnBkZXYtPmRldiwgImZhaWxlZCB0byBnZXQgaXJxIG51bWJlciIpOw0KPiA+ICsgICAg ICAgICAgICAgICByZXR1cm4gZGV2LT5kZWNfaXJxOw0KPiA+ICsgICAgICAgfQ0KPiA+ICsNCj4g PiArICAgICAgIGlycV9zZXRfc3RhdHVzX2ZsYWdzKGRldi0+ZGVjX2lycSwgSVJRX05PQVVUT0VO KTsNCj4gPiArICAgICAgIHJldCA9IGRldm1fcmVxdWVzdF9pcnEoJnBkZXYtPmRldiwgZGV2LT5k ZWNfaXJxLA0KPiA+ICsgICAgICAgICAgICAgICBtdGtfdmNvZGVjX2RlY19pcnFfaGFuZGxlciwg MCwgcGRldi0+bmFtZSwgZGV2KTsNCj4gPiArICAgICAgIGlmIChyZXQpIHsNCj4gPiArICAgICAg ICAgICAgICAgZGV2X2VycigmcGRldi0+ZGV2LCAiZmFpbGVkIHRvIGluc3RhbGwgZGV2LT5kZWNf aXJxIA0KPiA+ICVkICglZCkiLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIGRldi0+ZGVj X2lycSwgcmV0KTsNCj4gPiArICAgICAgICAgICAgICAgcmV0dXJuIHJldDsNCj4gPiArICAgICAg IH0NCj4gPiArDQo+ID4gKyAgICAgICByZXQgPSBtdGtfdmNvZGVjX2luaXRfZGVjX3BtKHBkZXYs ICZkZXYtPnBtKTsNCj4gPiArICAgICAgIGlmIChyZXQgPCAwKSB7DQo+ID4gKyAgICAgICAgICAg ICAgIGRldl9lcnIoJnBkZXYtPmRldiwgImZhaWxlZCB0byBnZ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LA0KPiA+IC0gICAgICAgICAgICAg ICAgICAgICAgIHJldCk7DQo+ID4gLSAgICAgICAgICAgICAgIGdvdG8gZXJyX3JlczsNCj4gPiAr ICAgICAgICAgICAgICAgZGV2X2VycigmcGRldi0+ZGV2LCAiRmFpbGVkIHRvIGluaXQgZGVjDQo+ ID4gcmVzb3VyY2VzIik7DQo+ID4gKyAgICAgICAgICAgICAgIGdvdG8gZXJyX2RlY19wbTsNCj4g PiAgICAgICAgIH0NCj4gPiANCj4gPiAgICAgICAgIG11dGV4X2luaXQoJmRldi0+ZGVjX211dGV4 KTsNCj4gPiBAQCAtMzI5LDYgKzM2OSwxNSBAQCBzdGF0aWMgaW50IG10a192Y29kZWNfcHJvYmUo c3RydWN0DQo+ID4gcGxhdGZvcm1fZGV2aWNlICpwZGV2KQ0KPiA+ICAgICAgICAgICAgICAgICBn b3RvIGVycl9ldmVudF93b3JrcTsNCj4gPiAgICAgICAgIH0NCj4gPiANCj4gPiArICAgICAgIGlm IChkZXYtPnZkZWNfcGRhdGEtPmlzX3N1YmRldl9zdXBwb3J0ZWQpIHsNCj4gPiArICAgICAgICAg ICAgICAgcmV0ID0gb2ZfcGxhdGZvcm1fcG9wdWxhdGUocGRldi0+ZGV2Lm9mX25vZGUsIE5VTEws DQo+ID4gTlVMTCwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAmcGRldi0+ZGV2KTsNCj4g PiArICAgICAgICAgICAgICAgaWYgKHJldCkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg IG10a192NGwyX2VycigiTWFpbiBkZXZpY2UNCj4gPiBvZl9wbGF0Zm9ybV9wb3B1bGF0ZSBmYWls ZWQuIik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgZ290byBlcnJfZXZlbnRfd29ya3E7 DQo+ID4gKyAgICAgICAgICAgICAgIH0NCj4gPiArICAgICAgIH0NCj4gPiArDQo+ID4gICAgICAg ICBpZiAoZGV2LT52ZGVjX3BkYXRhLT51c2VzX3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