Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2770688pxv; Mon, 12 Jul 2021 01:15:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLRTWIggC/EiB2x6TLqxNUEGNJmImSiXCd0PVt5aKx11okDhB5cRsLykoltGGnAHYOsDMg X-Received: by 2002:a17:906:69b:: with SMTP id u27mr12674057ejb.338.1626077715533; Mon, 12 Jul 2021 01:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626077715; cv=none; d=google.com; s=arc-20160816; b=hbesl5UqyrKvHZnsNNZmp8R4c+iskT8WV38MQnJKvEqjFGkft6djZYTDk7FITjbfE9 V7d+ZqaU9gkqzFYIBv3gmXOVh7czkqiaI2yFBRarv43OPcz+62PvcNlI4U+rZjQ+Bqtv iwbZIXZgWwlmaeqE/jfp6nW91vzUQFrCzJOrs8sd6GXoo31IryoEdyyZllumqk7seICK k0tts2fV/2AU5rER2EIo+pf1wQS6PC6OnubvyTBIsSZBlFFokqzYskiSrwKcWljpIOsG ezo8Y5APzyLrTJQtDRJOg6n2cMpAG+d9UC9X6BxVhpeQ4unUH0BpXaXDOGEg6ZyPSsQV TMVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=RaHR82D17SfxYYxbMS4VegTIpCJoSq06AsIDCLpUfYU=; b=f2QgZjnGumQTglxznqqiNxGfI9ILOwAIW+Vh1fpP4SYmyav5uCxmbJ1tayXiIqYhBK YCnOQ1BATbpVbjEwGfUkdnlpeI3HkCNFt0zMNAYKq7SU7rQ8XeweVwA7h+83OFmmTc6E L/ZEgTgAO4OenL02qnCYx6mQVn5FKaeTXNJOYkVUMl+GRr0ES8KJFsbMtAdXpCVzFwim lW7kWxFKNuug3bme9hV7W7rwN14RlhGuUj4dSVeHtVL0rV9+m1oV96TOL+aB7Peb/oPc vg4QdPcZi5GV5Idc0vMKzbCeBsEbIhbYHqBLN+na1RVo28hbiahI7V82eWTbMznkv4rS ATKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=HJVBmBfr; 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 7si16118497ejh.506.2021.07.12.01.14.51; Mon, 12 Jul 2021 01:15:15 -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=HJVBmBfr; 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 S231967AbhGLILN (ORCPT + 99 others); Mon, 12 Jul 2021 04:11:13 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:55226 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1346430AbhGLHau (ORCPT ); Mon, 12 Jul 2021 03:30:50 -0400 X-UUID: ad7cb11227124d7e999b49f5d9e630b8-20210712 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=RaHR82D17SfxYYxbMS4VegTIpCJoSq06AsIDCLpUfYU=; b=HJVBmBfrR1ybFuWzNlz0CloXWENT2m2CUD410UaVGwjGERcmGetrtC2bLranNJrSoObX5cl9NXLpWnICndcybmpfygR3QmPX6Tgz31kTzFBFDqi99sMzvHIFd36Fx02B/Tbc/DonLAzzhlO+UQy5PgdXKDPV7GtR3ZAJmv/8Td4=; X-UUID: ad7cb11227124d7e999b49f5d9e630b8-20210712 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1845177520; Mon, 12 Jul 2021 15:27:58 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 12 Jul 2021 15:27:56 +0800 Received: from [10.17.3.153] (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 12 Jul 2021 15:27:55 +0800 Message-ID: <1626074875.7221.15.camel@mhfsdcap03> Subject: Re: [PATCH v1, 07/14] media: mtk-vcodec: Add msg queue feature for lat and core architecture From: mtk12024 To: Tzung-Bi Shih 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 , Irui Wang , , , , , , , Date: Mon, 12 Jul 2021 15:27:55 +0800 In-Reply-To: References: <20210707062157.21176-1-yunfei.dong@mediatek.com> <20210707062157.21176-8-yunfei.dong@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgVHp1bmctQmksDQoNClRoYW5rcyBmb3IgeW91ciBkZXRhaWwgZmVlZGJhY2suDQpJIGFkZCB0 aGUgZGVzY3JpcHRpb24gYWNjb3JkaW5nIHRvIH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tPmxh dF9idWZbaV07DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICBsYXRfYnVmLT53ZG1hX2Vycl9h ZGRyLnNpemUgPSBWREVDX0VSUl9NQVBfU1pfQVZDOw0KPiA+ICsgICAgICAgICAgICAgICBlcnIg PSBtdGtfdmNvZGVjX21lbV9hbGxvYyhjdHgsICZsYXRfYnVmLT53ZG1hX2Vycl9hZGRyKTsNCj4g PiArICAgICAgICAgICAgICAgaWYgKGVycikgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg IG10a192NGwyX2VycigiZmFpbGVkIHRvIGFsbG9jYXRlIHdkbWFfZXJyX2FkZHIgYnVmWyVkXSIs IGkpOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRU5PTUVNOw0KPiA+ICsg ICAgICAgICAgICAgICB9DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICBsYXRfYnVmLT5zbGlj ZV9iY19hZGRyLnNpemUgPSBWREVDX0xBVF9TTElDRV9IRUFERVJfU1o7DQo+ID4gKyAgICAgICAg ICAgICAgIGVyciA9IG10a192Y29kZWNfbWVtX2FsbG9jKGN0eCwgJmxhdF9idWYtPnNsaWNlX2Jj X2FkZHIpOw0KPiA+ICsgICAgICAgICAgICAgICBpZiAoZXJyKSB7DQo+ID4gKyAgICAgICAgICAg ICAgICAgICAgICAgbXRrX3Y0bDJfZXJyKCJmYWlsZWQgdG8gYWxsb2NhdGUgd2RtYV9hZGRyIGJ1 ZlslZF0iLCBpKTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVOT01FTTsN Cj4gPiArICAgICAgICAgICAgICAgfQ0KPiA+ICsNCj4gPiArICAgICAgICAgICAgICAgbGF0X2J1 Zi0+cHJpdmF0ZV9kYXRhID0ga3phbGxvYyhwcml2YXRlX3NpemUsIEdGUF9LRVJORUwpOw0KPiA+ ICsgICAgICAgICAgICAgICBpZiAoIWxhdF9idWYtPnByaXZhdGVfZGF0Y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