From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61554C47094 for ; Thu, 10 Jun 2021 07:55:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F8A16109E for ; Thu, 10 Jun 2021 07:55:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F8A16109E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:Subject:From:References:Cc:To:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Yu+/nbeBQDZdZ80RwJLKbXxHMA4idOoPAMRfZrbiQJM=; b=geTmKlGQYzh7vaDKKny0Taum0S ++9YvJ63j0PQuBixhA/5EDJXyeBtnICxQLNQtbY6ZU+ZBh7msKhLHhepi9hKJxRA7Zufcsz31kl36 aWBqzuRJwDeuFl7waxJLyyY6lCZza914dYON3dV2tfNpwNpGifiYqAZ5HHbFD/l3bP3uPUCzzZIDs muMsLYs94vfkKlQK4OkAcbzmVXS7vLiqJxNvehN3auXydjSd3vqC14DLc6RI8ZmVzWpmWOp4aHO6N 4qs48gg2vgDcONfILsT7gvq+gbNi/7vyfbMYx3UxGDqaUAhURzfwfg7YDhMy5Mtc56BX2/E+AKCnf IUuqEz+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrFVh-00HJgr-3l; Thu, 10 Jun 2021 07:53:53 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrFVR-00HJbC-VZ; Thu, 10 Jun 2021 07:53:39 +0000 Received: by mail-wr1-x430.google.com with SMTP id q5so1115318wrm.1; Thu, 10 Jun 2021 00:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:references:from:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xJS0U9ByX0NxIuJpqaNPHe7gI5LppZzf1YoFLwdpgpQ=; b=AtutUx5F3FjGQHEtvWof9HOeTHWeBqvhVw+QiN+Sh6cWWewDfrjuaZjOgIU8GrvZla 6PSpE270aJ7Btt2qATsv9ZhQy58/0GoWWD5CnAISW5h2u03IY721oe03cmG/VhveVGw/ fIvFr3ZW60yd5JvkbVc401CsPLw/sMlHMPcEsS7+8fpbgaPGboXiVI4p2aQC0iupWWUA yvllp02g0KpE38Gh0/adERukIXbEQPWpkg5Hwp0/YamaLVTu8RR0KbFJ4rBVKtlUE2CD YXQcYwiWadJ1e0HyfnyVp6gQIJJRAngE/XVLL6ga9zNZL97Pp6Vg5oRaiPOGaMV825g7 /9Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xJS0U9ByX0NxIuJpqaNPHe7gI5LppZzf1YoFLwdpgpQ=; b=gwRhzYJhpm8GcjNkaGJeQJCMauGGzJBsySx0B3KYRS+tTWznBVQbWwdB1kJyjJl3Ym n0y/Vg48gFb9HMvyLfEAkzTzQ9+DvDpxflbkZxBoj66utNa96RilRCAUT70GzQmwzlHT imUC/7ZcV+igc4WWAZAPGwTDGyant1pJBsV6TdUH7sAryBiVSGdhjIAvfcqnMSkGHQ2U yF/41kV4R1HXaayZYJgApp3E04uBIW+3j5M15GZQ66P2MmFUM7LdhoqcP7VKlZVINtoc 9vE8GQkG8VBAz/EusWUh3cRoAnZ/JxZOjhjOFwUzgUvjEJjNq72os8ZH5JVegGYxzi64 GUEw== X-Gm-Message-State: AOAM530A0oQ8w5+5qR/7ASvIeu0Pd7r66x+J2cEnh2nHv7pBe+LI3Yhp GJHcP7cEUga9YsBuygh3N7E= X-Google-Smtp-Source: ABdhPJyWIa0BThW8wleRBOOtD6X+dU2YcMMb96LCJzvn3Y7r3nvLUwAHQC9a6Zki2vUnentp0rRZoQ== X-Received: by 2002:a5d:6082:: with SMTP id w2mr3851640wrt.209.1623311615564; Thu, 10 Jun 2021 00:53:35 -0700 (PDT) Received: from ziggy.stardust ([213.195.126.134]) by smtp.gmail.com with ESMTPSA id o6sm2696870wre.73.2021.06.10.00.53.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Jun 2021 00:53:34 -0700 (PDT) To: Yong Wu , Hsin-Yi Wang Cc: Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , "moderated list:ARM/Mediatek SoC support" , srv_heupstream@mediatek.com, Devicetree List , lkml , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, Nicolas Boichat , Matthias Kaehlcke , anan.sun@mediatek.com, chao.hao@mediatek.com, ming-fan.chen@mediatek.com, yi.kuo@mediatek.com, eizan@chromium.org, Alexandre Courbot , Tiffany Lin , Irui Wang References: <20210410091128.31823-1-yong.wu@mediatek.com> <20210410091128.31823-14-yong.wu@mediatek.com> <1620822547.2983.8.camel@mhfsdcap03> From: Matthias Brugger Subject: Re: [PATCH v5 13/16] media: mtk-vcodec: Get rid of mtk_smi_larb_get/put Message-ID: Date: Thu, 10 Jun 2021 09:53:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <1620822547.2983.8.camel@mhfsdcap03> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210610_005338_072271_799D59DF X-CRM114-Status: GOOD ( 21.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Yong, On 12/05/2021 14:29, Yong Wu wrote: > On Wed, 2021-05-12 at 17:20 +0800, Hsin-Yi Wang wrote: >> On Sat, Apr 10, 2021 at 5:14 PM Yong Wu wrote: >>> >>> MediaTek IOMMU has already added the device_link between the consumer >>> and smi-larb device. If the vcodec device call the pm_runtime_get_sync, >>> the smi-larb's pm_runtime_get_sync also be called automatically. >>> >>> CC: Tiffany Lin >>> CC: Irui Wang >>> Signed-off-by: Yong Wu >>> Reviewed-by: Evan Green >>> Acked-by: Tiffany Lin >>> --- >>> .../platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 37 ++------------- >>> .../platform/mtk-vcodec/mtk_vcodec_drv.h | 3 -- >>> .../platform/mtk-vcodec/mtk_vcodec_enc.c | 1 - >>> .../platform/mtk-vcodec/mtk_vcodec_enc_pm.c | 46 ++----------------- >>> 4 files changed, 10 insertions(+), 77 deletions(-) > > [...] > >>> @@ -108,13 +80,6 @@ void mtk_vcodec_enc_clock_on(struct mtk_vcodec_pm *pm) >>> } >>> } >>> >>> - ret = mtk_smi_larb_get(pm->larbvenc); >>> - if (ret) { >>> - mtk_v4l2_err("mtk_smi_larb_get larb3 fail %d", ret); >>> - goto clkerr; >>> - } >>> - return; >> >> You can't delete the return; here, otherwise vcodec_clk will be turned >> off immediately after they are turned on. > > Thanks very much for your review. > > Sorry for this. You are quite right. > > I checked this, it was introduced in v4 when I rebase the code. I will > fix it in next time. > Please also make sure that you add all maintainers. I realized that at least for the media/platform drivers we miss the maintainer and the corresponding mailing list. This is especially important in this series, as it spans several subsystems. Thanks a lot, Matthias >> >>> - >>> clkerr: >>> for (i -= 1; i >= 0; i--) >>> clk_disable_unprepare(enc_clk->clk_info[i].vcodec_clk); >>> @@ -125,7 +90,6 @@ void mtk_vcodec_enc_clock_off(struct mtk_vcodec_pm *pm) >>> struct mtk_vcodec_clk *enc_clk = &pm->venc_clk; >>> int i = 0; >>> >>> - mtk_smi_larb_put(pm->larbvenc); >>> for (i = enc_clk->clk_num - 1; i >= 0; i--) >>> clk_disable_unprepare(enc_clk->clk_info[i].vcodec_clk); >>> } >>> -- >>> 2.18.0 >>> > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel