lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 10 Jun 2021 09:53:33 +0200
From:   Matthias Brugger <matthias.bgg@...il.com>
To:     Yong Wu <yong.wu@...iatek.com>, Hsin-Yi Wang <hsinyi@...omium.org>
Cc:     Joerg Roedel <joro@...tes.org>, Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Evan Green <evgreen@...omium.org>,
        Robin Murphy <robin.murphy@....com>,
        Tomasz Figa <tfiga@...omium.org>,
        Will Deacon <will.deacon@....com>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>, srv_heupstream@...iatek.com,
        Devicetree List <devicetree@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>,
        iommu@...ts.linux-foundation.org, youlin.pei@...iatek.com,
        Nicolas Boichat <drinkcat@...omium.org>,
        Matthias Kaehlcke <mka@...omium.org>, anan.sun@...iatek.com,
        chao.hao@...iatek.com, ming-fan.chen@...iatek.com,
        yi.kuo@...iatek.com, eizan@...omium.org,
        Alexandre Courbot <acourbot@...omium.org>,
        Tiffany Lin <tiffany.lin@...iatek.com>,
        Irui Wang <irui.wang@...iatek.com>
Subject: Re: [PATCH v5 13/16] media: mtk-vcodec: Get rid of
 mtk_smi_larb_get/put

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 <yong.wu@...iatek.com> 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 <tiffany.lin@...iatek.com>
>>> CC: Irui Wang <irui.wang@...iatek.com>
>>> Signed-off-by: Yong Wu <yong.wu@...iatek.com>
>>> Reviewed-by: Evan Green <evgreen@...omium.org>
>>> Acked-by: Tiffany Lin <tiffany.lin@...iatek.com>
>>> ---
>>>  .../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
>>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ