* Re: [PATCH v2 2/2] drm/mediatek: Fix iommu fault during crtc enabling
[not found] ` <20230709162641.6405-3-jason-jh.lin@mediatek.com>
@ 2023-07-10 3:13 ` Fei Shao
2023-07-10 8:07 ` AngeloGioacchino Del Regno
1 sibling, 0 replies; 4+ messages in thread
From: Fei Shao @ 2023-07-10 3:13 UTC (permalink / raw)
To: Jason-JH.Lin
Cc: Chun-Kuang Hu, AngeloGioacchino Del Regno, Alexandre Mergnat,
Matthias Brugger, Jason-ch Chen, Johnson Wang, Singo Chang,
Nancy Lin, Shawn Sung, dri-devel, linux-mediatek,
linux-arm-kernel, linux-kernel,
Project_Global_Chrome_Upstream_Group
Hi Jason,
On Mon, Jul 10, 2023 at 12:27 AM Jason-JH.Lin <jason-jh.lin@mediatek.com> wrote:
>
> OVL layer should not be enabled before crtc is enabled.
> The plane_state of drm_atomic_state is not sync to
> the plane_state stored in mtk_crtc during crtc enabling,
> so just set all planes to disabled.
>
Please add the "Fixes" tag before your S-o-b.
Regards,
Fei
> Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.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,
> --
> 2.18.0
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] drm/mediatek: Fix iommu fault by swapping FBs after updating plane state
[not found] ` <20230709162641.6405-2-jason-jh.lin@mediatek.com>
@ 2023-07-10 8:06 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-07-10 8:06 UTC (permalink / raw)
To: Jason-JH.Lin, Chun-Kuang Hu, Alexandre Mergnat
Cc: Matthias Brugger, Jason-ch Chen, Johnson Wang, Singo Chang,
Nancy Lin, Shawn Sung, dri-devel, linux-mediatek,
linux-arm-kernel, linux-kernel,
Project_Global_Chrome_Upstream_Group
Il 09/07/23 18:26, Jason-JH.Lin ha scritto:
> According to the comment in drm_atomic_helper_async_commit(),
> we should make sure FBs have been swapped, so that cleanups in the
> new_state performs a cleanup in the old FB.
>
> So we should move swapping FBs after calling mtk_plane_update_new_state(),
> to avoid using the old FB which could be freed.
>
> Fixes: 1a64a7aff8da ("drm/mediatek: Fix cursor plane no update")
> Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] drm/mediatek: Fix iommu fault during crtc enabling
[not found] ` <20230709162641.6405-3-jason-jh.lin@mediatek.com>
2023-07-10 3:13 ` [PATCH v2 2/2] drm/mediatek: Fix iommu fault during crtc enabling Fei Shao
@ 2023-07-10 8:07 ` AngeloGioacchino Del Regno
2023-07-10 9:32 ` Jason-JH Lin (林睿祥)
1 sibling, 1 reply; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-07-10 8:07 UTC (permalink / raw)
To: Jason-JH.Lin, Chun-Kuang Hu, Alexandre Mergnat
Cc: Matthias Brugger, Jason-ch Chen, Johnson Wang, Singo Chang,
Nancy Lin, Shawn Sung, dri-devel, linux-mediatek,
linux-arm-kernel, linux-kernel,
Project_Global_Chrome_Upstream_Group
Il 09/07/23 18:26, Jason-JH.Lin ha scritto:
> OVL layer should not be enabled before crtc is enabled.
> The plane_state of drm_atomic_state is not sync to
> the plane_state stored in mtk_crtc during crtc enabling,
> so just set all planes to disabled.
>
Please add the relevant Fixes tag and resend.
Thanks,
Angelo
> Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.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,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] drm/mediatek: Fix iommu fault during crtc enabling
2023-07-10 8:07 ` AngeloGioacchino Del Regno
@ 2023-07-10 9:32 ` Jason-JH Lin (林睿祥)
0 siblings, 0 replies; 4+ messages in thread
From: Jason-JH Lin (林睿祥) @ 2023-07-10 9:32 UTC (permalink / raw)
To: amergnat, angelogioacchino.delregno, chunkuang.hu
Cc: linux-mediatek, Singo Chang (張興國),
Johnson Wang (王聖鑫),
Jason-ch Chen (陳建豪),
Shawn Sung (宋孝謙),
linux-kernel, Nancy Lin (林欣螢),
dri-devel, Project_Global_Chrome_Upstream_Group,
linux-arm-kernel, matthias.bgg
Hi Angelo,
Thanks for the reviews.
On Mon, 2023-07-10 at 10:07 +0200, AngeloGioacchino Del Regno wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> Il 09/07/23 18:26, Jason-JH.Lin ha scritto:
> > OVL layer should not be enabled before crtc is enabled.
> > The plane_state of drm_atomic_state is not sync to
> > the plane_state stored in mtk_crtc during crtc enabling,
> > so just set all planes to disabled.
> >
>
> Please add the relevant Fixes tag and resend.
>
> Thanks,
> Angelo
OK, I'll add Fixes tag at the next version.
Regards,
Jason-JH.Lin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-10 9:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230709162641.6405-1-jason-jh.lin@mediatek.com>
[not found] ` <20230709162641.6405-3-jason-jh.lin@mediatek.com>
2023-07-10 3:13 ` [PATCH v2 2/2] drm/mediatek: Fix iommu fault during crtc enabling Fei Shao
2023-07-10 8:07 ` AngeloGioacchino Del Regno
2023-07-10 9:32 ` Jason-JH Lin (林睿祥)
[not found] ` <20230709162641.6405-2-jason-jh.lin@mediatek.com>
2023-07-10 8:06 ` [PATCH v2 1/2] drm/mediatek: Fix iommu fault by swapping FBs after updating plane state AngeloGioacchino Del Regno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®