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]
Message-ID: <aef8182ffa2142f2c8ed6bda463d3c127530deae.camel@mediatek.com>
Date:   Mon, 16 Aug 2021 09:05:54 +0800
From:   houlong wei <houlong.wei@...iatek.com>
To:     Eizan Miyamoto <eizan@...omium.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "wenst@...omium.org" <wenst@...omium.org>,
        "Yong Wu (吴勇)" <Yong.Wu@...iatek.com>,
        "enric.balletbo@...labora.com" <enric.balletbo@...labora.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
        "Andrew-CT Chen (陳智迪)" 
        <Andrew-CT.Chen@...iatek.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        "Minghsiu Tsai (蔡明修)" 
        <Minghsiu.Tsai@...iatek.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>, <houlong.wei@...iatek.com>
Subject: Re: [PATCH v6 2/9] mtk-mdp: add driver to probe mdp components

On Mon, 2021-08-02 at 20:12 +0800, Eizan Miyamoto wrote:
> Broadly, this patch (1) adds a driver for various MTK MDP components
> to
> go alongside the main MTK MDP driver, and (2) hooks them all together
> using the component framework.
> 
> (1) Up until now, the MTK MDP driver controls 8 devices in the device
> tree on its own. When running tests for the hardware video decoder,
> we
> found that the iommus and LARBs were not being properly configured.
> To
> configure them, a driver for each be added to mtk_mdp_comp so that
> mtk_iommu_add_device() can (eventually) be called from
> dma_configure()
> inside really_probe().
> 
> (2) The integration into the component framework allows us to defer
> the
> registration with the v4l2 subsystem until all the MDP-related
> devices
> have been probed, so that the relevant device node does not become
> available until initialization of all the components is complete.
> 
> Some notes about how the component framework has been integrated:
> 
> - The driver for the rdma0 component serves double duty as the
> "master"
>   (aggregate) driver as well as a component driver. This is a non-
> ideal
>   compromise until a better solution is developed. This device is
>   differentiated from the rest by checking for a "mediatek,vpu"
> property
>   in the device node.
> 
> - The list of mdp components remains hard-coded as
> mtk_mdp_comp_dt_ids[]
>   in mtk_mdp_core.c, and as mtk_mdp_comp_driver_dt_match[] in
>   mtk_mdp_comp.c. This unfortunate duplication of information is
>   addressed in a following patch in this series.
> 
> - The component driver calls component_add() for each device that is
>   probed.
> 
> - In mtk_mdp_probe (the "master" device), we scan the device tree for
>   any matching nodes against mtk_mdp_comp_dt_ids, and add component
>   matches for them. The match criteria is a matching device node
>   pointer.
> 
> - When the set of components devices that have been probed
> corresponds
>   with the list that is generated by the "master", the callback to
>   mtk_mdp_master_bind() is made, which then calls the component bind
>   functions.
> 
> - Inside mtk_mdp_master_bind(), once all the component bind functions
>   have been called, we can then register our device to the v4l2
>   subsystem.
> 
> - The call to pm_runtime_enable() in the master device is called
> after
>   all the components have been registered by their bind() functions
>   called by mtk_mtp_master_bind(). As a result, the list of
> components
>   will not change while power management callbacks mtk_mdp_suspend()/
>   resume() are accessing the list of components.
> 
> Signed-off-by: Eizan Miyamoto <eizan@...omium.org>
> ---
> 

Reviewed-by: Houlong Wei <houlong.wei@...iatek.com>

> (no changes since v1)
> 
[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ