Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1190069ybm; Sat, 30 May 2020 01:16:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvqN6TPzjj1MIeocId0603vROIplNU4SjjCh+5WUFv8VEXm8DMVFmnNrFdFqKSmTF9SZaT X-Received: by 2002:a05:6402:306a:: with SMTP id bs10mr12374250edb.227.1590826595879; Sat, 30 May 2020 01:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590826595; cv=none; d=google.com; s=arc-20160816; b=UfIaf+Zp4y+MApjgmzTpf35tP3R1oB+YxoEjVxpx5KPiA1EWuuedBI7c4rFXJMs8B/ PUTjigwhHGfIi35nQ/B+Sj68N9TtAud6jFjvzBuNKFkKUIjCgPgImhIn7pIt5UZARBbf 1S/59mDk8Ta8HdTEYOg5PpuS411ZwPneNANhz77EXTt7Aifke9raIuhzV+Y2CUWojeWe F1NIiDX0Dvk3q6lAwu5Xs4hXuWEAwFaug7YatYUyDEbO/cdnX1igHtSpZih10WgIypv9 gmgifKJ4a409OIrfLt0wyiABo0rINpgfnsSNCK4kIZCWug20/FwK8dT6OM0lnfVIbsnQ hGZQ== 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=Fg9f1LFKGgNxd6OgKeOn+F2FgyEZvb7dw3NartpkgXk=; b=qZlaf1gDChC95RYpftTHp7DoBBwwRI+gYsjfrNXd/G45VolnSprvpqBZLWd9mytP3X 1FSoPEyPfLhUR0h9NvOI5c1zyTRBI0R7pDaYJWnY+WOCS8XxuXvRC012LrZmhWO8Msve vtET+EmrjhAdaPMmwWMHrAjkqmD1FWxupahlq7aREHUBtaTUwJiCW2yEBRO3Yh7trYZ9 t4rt2823Gjwb7nPUpT6JpC2jHQeNO8E8lRGbzm7QbhvfSu2SKIHC88URVWPoT+RlPR5S z7eBmQ8XEPEmYqr1x95fiEbQG030aP17zI7q8rYldWMfAtJkBLvegVv3xlXImyPKxulK q1ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=BtdZTpKL; 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 d3si7439488ejc.374.2020.05.30.01.16.12; Sat, 30 May 2020 01:16:35 -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=BtdZTpKL; 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 S1728986AbgE3INs (ORCPT + 99 others); Sat, 30 May 2020 04:13:48 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:60607 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725813AbgE3INq (ORCPT ); Sat, 30 May 2020 04:13:46 -0400 X-UUID: 3bef93256757426cb9f3c4254c269d07-20200530 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=Fg9f1LFKGgNxd6OgKeOn+F2FgyEZvb7dw3NartpkgXk=; b=BtdZTpKLhSOF3SC4pJUQ2NaDUZIV/SByHHJ7Z/LTnnDzMfn2tDb69apym6j3NiYTfdZaUAJBNFI0DZvh+UhEjc3b9m0ZkHSaqxoKul7LuLg59Eje+ATBtx8iVja9tBbGqZhPMGvEfmtHpShjI1CXXi6RgQuYG7xSj0VnumK7CbE=; X-UUID: 3bef93256757426cb9f3c4254c269d07-20200530 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 1288690659; Sat, 30 May 2020 16:13:41 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 30 May 2020 16:13:38 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 30 May 2020 16:13:38 +0800 From: Yong Wu To: Matthias Brugger , Joerg Roedel , Rob Herring CC: Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , , , , , , , , , Nicolas Boichat , Matthias Kaehlcke , , , , , , , Tiffany Lin Subject: [PATCH v4 09/17] media: mtk-vcodec: Get rid of mtk_smi_larb_get/put Date: Sat, 30 May 2020 16:10:10 +0800 Message-ID: <1590826218-23653-10-git-send-email-yong.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1590826218-23653-1-git-send-email-yong.wu@mediatek.com> References: <1590826218-23653-1-git-send-email-yong.wu@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 TWVkaWFUZWsgSU9NTVUgaGFzIGFscmVhZHkgYWRkZWQgdGhlIGRldmljZV9saW5rIGJldHdlZW4g dGhlIGNvbnN1bWVyDQphbmQgc21pLWxhcmIgZGV2aWNlLiBJZiB0aGUgdmNvZGVjIGRldmljZSBj YWxsI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