Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp70059pxb; Wed, 29 Sep 2021 21:27:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuGJvHbJXXCXE92bkHdQ6rvQ02aNO43YLBiGr9T634TTcBsavVrTJJoEtCYVn4b3aycRmQ X-Received: by 2002:a63:1d5c:: with SMTP id d28mr3087656pgm.143.1632976079558; Wed, 29 Sep 2021 21:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632976079; cv=none; d=google.com; s=arc-20160816; b=kP9Pkt86KYmtgX5HHc2X4dX8Q5Y1WTCJHfq663ITmiEF6gTcTtNJO4rl1mc7yMuIXY ZplKZMx7oJDqcSWhW+ihShtUh4kYNf/dQ6Ozm775fAIBeJe7WtvFni57Gs1yRPBPPzft W4Z8Aozx4h1ykwNIEPhhvMeSNjjRPsrpHlgSadMHgv3xYw7UCRDW6hg3ywW9N80Wu49Z OwdOkGvrvDBRAGkF4LAY5QezsuDbiCpdeD71oDMUNiTI7TSDre/WXO5XB8Ft6boh1gB9 eqQmraAzvQyZ/cTwlQa2xwDveMQ/BWtruUk+fSVdWLXkdTJKqonFDeB/pY/4SmO+AGSq +leg== 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=PUbrJ3OGRNIhFg0lP0OUuhqkMUmrG7lCbGwhX9NNv8I=; b=x50pXxofSi9djNUmvIS5JI1epgD/N8T/zwdHLhAsJpyQ8oLhoRJJwA++rrOnnRYwY4 B6CquWSn5egoXDC1IV6ftysKhfmYBxSIn4FZ3jQ26CmfyY76FkzDvxjT3BRxxuukgprN AtsB5XGaaIM1nSDmYisWnlcJVVMndJ7pXs0U4Z6iGHItHQGlDfWCLoz74nouqMeNuJaY aqN4zOQuMbEzdM2F5fsYXzsnpFX+qFMcdAH1UQ8E+OGFesOoUXt15tCNDm6MN8IpENQx 6EMqfKL6aQywkRTHY9uHY3kT+jPYTUmeHuDh4UfnrJqG5/Zh+lXgz8mOjSDdwBjtFUHS Lq/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=fyhWP3a8; 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 k26si1932820pfa.269.2021.09.29.21.27.47; Wed, 29 Sep 2021 21:27:59 -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=fyhWP3a8; 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 S1347750AbhI3DaG (ORCPT + 99 others); Wed, 29 Sep 2021 23:30:06 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:44094 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S244576AbhI3DaB (ORCPT ); Wed, 29 Sep 2021 23:30:01 -0400 X-UUID: 7f99426116984e4e82f32662b5e1824b-20210930 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=PUbrJ3OGRNIhFg0lP0OUuhqkMUmrG7lCbGwhX9NNv8I=; b=fyhWP3a8ryvYzvl/+BcS1BevoTk8b7BSv/6fXTrv/0FJHzhAzSJ9EvZsZZOdtHQCJpzPezquq8qd8ib5G+etIueXIhiV6osK9o/XNzlJRd14yCGqik5DCS7rzqn/9x2GItVxSYy7jrBQPSt1k+koUgmZjtjH7drpKIqvXeprZhA=; X-UUID: 7f99426116984e4e82f32662b5e1824b-20210930 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1737133217; Thu, 30 Sep 2021 11:28:11 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Thu, 30 Sep 2021 11:28:11 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 30 Sep 2021 11:28:09 +0800 Message-ID: <79cbf64491273797f218f417234b8c95936bd3b1.camel@mediatek.com> Subject: Re: [PATCH v8 09/12] media: mtk-vcodec: Get rid of mtk_smi_larb_get/put From: Yong Wu To: Dafna Hirschfeld , Matthias Brugger , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , David Airlie , "Mauro Carvalho Chehab" CC: Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , , , , , , , , Matthias Kaehlcke , , , , , , "Daniel Vetter" , Chun-Kuang Hu , "Philipp Zabel" , Tiffany Lin , Hsin-Yi Wang , Eizan Miyamoto , , Frank Wunderlich , Irui Wang Date: Thu, 30 Sep 2021 11:28:12 +0800 In-Reply-To: <02f444d5-9633-3f9c-2d1f-97ce073d1180@collabora.com> References: <20210929013719.25120-1-yong.wu@mediatek.com> <20210929013719.25120-10-yong.wu@mediatek.com> <02f444d5-9633-3f9c-2d1f-97ce073d1180@collabora.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 SGkgRGFmbmEsDQoNClRoYW5rcyB2ZXJ5IG11Y2ggZm9yIHRoZSByZXZpZXcuDQoNCk9uIFdlZCwg MjAyMS0wOS0yOSBhdCAxNDoxMyArMDIwMCwgRGFmbmEgSGlyc2NoZmVsZCB3cm90ZToNCj4gDQo+ IE9uIDI5LjA5LjIxIDAzOjM3LCBZb25nIFd1IHdyb3RlOg0KPiA+IE1lZGlhVGVrIElPTU1VIGhh cyBhbHJlYWR5IGFkZGVkIHRoZSBkZXZpY2VfbGluayBiZXR3ZWVuIHRoZQ0KPiA+IGNvbnN1bWVy DQo+ID4gYW5kIHNtaS1sYXJiIGRldmljZS4gSWYgdGhlIHZjb2RlYyBkZXZpY2UgY2FsbCB0aGUN Cj4gPiBwbV9ydW50aW1lX2dldF9zeW5jLA0KPiA+IHRoZSBzbWktbGFyYidzIHBtX3J1bnRpbWVf Z2V0X3N5bmMgYWxzbyBiZSBjYWxsZWQgYXV0b21hdGljYWxseS4NCj4gPiANCj4gPiBDQzogVGlm ZmFueSBMaW4gPHRpZmZhbnkubGluQG1lZGlhdGVrLmNvbT4NCj4gPiBDQzogSXJ1aSBXYW5nIDxp cnVpLndhbmdAbWVkaWF0ZWsuY29tPg0KPiA+IFNpZ25lZC1vZmYtYnk6IFlvbmcgV3UgPHlvbmcu d3VAbWVkaWF0ZWsuY29tPg0KPiA+IFJldmlld2VkLWJ5OiBFdmFuIEdyZWVuIDxldmdyZWVuQGNo cm9taXVtLm9yZz4NCj4gPiBBY2tlZC1ieTogVGlmZmFueSBMaW4gPHRpZmZhbnkubGluQG1lZGlh dGVrLmNvbT4NCj4gPiBSZXZpZXdlZC1ieTogRGFmbmEgSGlyc2NoZmVsZCA8ZGFmbmEuaGlyc2No ZmVsZEBjb2xsYWJvcmEuY29t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