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:   Tue, 11 Jan 2022 11:57:47 +0100
From:   AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
To:     Yong Wu <yong.wu@...iatek.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Joerg Roedel <joro@...tes.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        David Airlie <airlied@...ux.ie>,
        Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     Dafna Hirschfeld <dafna.hirschfeld@...labora.com>,
        Chun-Kuang Hu <chunkuang.hu@...nel.org>,
        Will Deacon <will.deacon@....com>,
        dri-devel@...ts.freedesktop.org, yf.wang@...iatek.com,
        anthony.huang@...iatek.com, youlin.pei@...iatek.com,
        Evan Green <evgreen@...omium.org>,
        Eizan Miyamoto <eizan@...omium.org>,
        Matthias Kaehlcke <mka@...omium.org>,
        linux-arm-kernel@...ts.infradead.org, mingyuan.ma@...iatek.com,
        linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        Philipp Zabel <p.zabel@...gutronix.de>, libo.kang@...iatek.com,
        yi.kuo@...iatek.com, linux-mediatek@...ts.infradead.org,
        Hsin-Yi Wang <hsinyi@...omium.org>,
        Tiffany Lin <tiffany.lin@...iatek.com>, anan.sun@...iatek.com,
        srv_heupstream@...iatek.com, acourbot@...omium.org,
        linux-kernel@...r.kernel.org, Tomasz Figa <tfiga@...omium.org>,
        iommu@...ts.linux-foundation.org, Daniel Vetter <daniel@...ll.ch>,
        Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH v9 05/15] iommu/mediatek: Add device_link between the
 consumer and the larb devices

Il 12/11/21 11:54, Yong Wu ha scritto:
> MediaTek IOMMU-SMI diagram is like below. all the consumer connect with
> smi-larb, then connect with smi-common.
> 
>          M4U
>           |
>      smi-common
>           |
>    -------------
>    |         |    ...
>    |         |
> larb1     larb2
>    |         |
> vdec       venc
> 
> When the consumer works, it should enable the smi-larb's power which
> also need enable the smi-common's power firstly.
> 
> Thus, First of all, use the device link connect the consumer and the
> smi-larbs. then add device link between the smi-larb and smi-common.
> 
> This patch adds device_link between the consumer and the larbs.
> 
> When device_link_add, I add the flag DL_FLAG_STATELESS to avoid calling
> pm_runtime_xx to keep the original status of clocks. It can avoid two
> issues:
> 1) Display HW show fastlogo abnormally reported in [1]. At the beggining,
> all the clocks are enabled before entering kernel, but the clocks for
> display HW(always in larb0) will be gated after clk_enable and clk_disable
> called from device_link_add(->pm_runtime_resume) and rpm_idle. The clock
> operation happened before display driver probe. At that time, the display
> HW will be abnormal.
> 
> 2) A deadlock issue reported in [2]. Use DL_FLAG_STATELESS to skip
> pm_runtime_xx to avoid the deadlock.
> 
> Corresponding, DL_FLAG_AUTOREMOVE_CONSUMER can't be added, then
> device_link_removed should be added explicitly.
> 
> Meanwhile, Currently we don't have a device connect with 2 larbs at the
> same time. Disallow this case, print the error log.
> 
> [1] https://lore.kernel.org/linux-mediatek/1564213888.22908.4.camel@mhfsdcap03/
> [2] https://lore.kernel.org/patchwork/patch/1086569/
> 
> Suggested-by: Tomasz Figa <tfiga@...omium.org>
> Signed-off-by: Yong Wu <yong.wu@...iatek.com>
> Tested-by: Frank Wunderlich <frank-w@...lic-files.de> # BPI-R2/MT7623

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ