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>] [day] [month] [year] [list]
Message-ID: <b5356aa9f85caba681e0dd62697d1cf588a4064d.camel@mediatek.com>
Date:   Fri, 6 Oct 2023 07:09:06 +0000
From:   CK Hu (胡俊光) <ck.hu@...iatek.com>
To:     "amergnat@...libre.com" <amergnat@...libre.com>,
        Jason-JH Lin (林睿祥) 
        <Jason-JH.Lin@...iatek.com>,
        "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
        "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>,
        "eugen.hristev@...labora.com" <eugen.hristev@...labora.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Singo Chang (張興國) 
        <Singo.Chang@...iatek.com>,
        Johnson Wang (王聖鑫) 
        <Johnson.Wang@...iatek.com>,
        Jason-ch Chen (陳建豪) 
        <Jason-ch.Chen@...iatek.com>,
        Shawn Sung (宋孝謙) 
        <Shawn.Sung@...iatek.com>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        Project_Global_Chrome_Upstream_Group 
        <Project_Global_Chrome_Upstream_Group@...iatek.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v5 2/2] drm/mediatek: Fix iommu fault during crtc enabling

Hi, Jason:

On Wed, 2023-08-09 at 20:57 +0800, Jason-JH.Lin wrote:
> The difference between drm_atomic_helper_commit_tail() and
> drm_atomic_helper_commit_tail_rpm() is
> drm_atomic_helper_commit_tail() will commit plane first and
> then enable crtc, drm_atomic_helper_commit_tail_rpm() will
> enable crtc first and then commit plane.
> 
> Before mediatek-drm enables crtc, the power and clk required
> by OVL have not been turned on, so the commit plane cannot be
> committed before crtc is enabled. That means OVL layer should
> not be enabled before crtc is enabled.
> Therefore, the atomic_commit_tail of mediatek-drm is hooked with
> drm_atomic_helper_commit_tail_rpm().
> 
> Another reason is that the plane_state of drm_atomic_state is not
> synchronized with the plane_state stored in mtk_crtc during crtc
> enablng,
> so just set all planes to disabled.

Reviewed-by: CK Hu <ck.hu@...iatek.com>

> 
> Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC
> MT8173.")
> Signed-off-by: Jason-JH.Lin <jason-jh.lin@...iatek.com>
> Reviewed-by: Alexandre Mergnat <amergnat@...libre.com>
> Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@...labora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> index d40142842f85..51d10e65004e 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> @@ -410,6 +410,9 @@ static int mtk_crtc_ddp_hw_init(struct
> mtk_drm_crtc *mtk_crtc)
>  		unsigned int local_layer;
>  
>  		plane_state = to_mtk_plane_state(plane->state);
> +
> +		/* should not enable layer before crtc enabled */
> +		plane_state->pending.enable = false;
>  		comp = mtk_drm_ddp_comp_for_plane(crtc, plane,
> &local_layer);
>  		if (comp)
>  			mtk_ddp_comp_layer_config(comp, local_layer,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ