mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
To: "CK Hu (胡俊光)" <ck.hu@mediatek.com>,
	"amergnat@baylibre.com" <amergnat@baylibre.com>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Cc: "linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
	"Johnson Wang (王聖鑫)" <Johnson.Wang@mediatek.com>,
	"Jason-ch Chen (陳建豪)" <Jason-ch.Chen@mediatek.com>,
	"Shawn Sung (宋孝謙)" <Shawn.Sung@mediatek.com>,
	"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>
Subject: Re: [PATCH v3 2/2] drm/mediatek: Fix iommu fault during crtc enabling
Date: Tue, 18 Jul 2023 15:48:47 +0000	[thread overview]
Message-ID: <7adca80c59d5c3cb8d97c24995f824cd7bf5fea2.camel@mediatek.com> (raw)
In-Reply-To: <9ba9347d4e5e05299fef80707bd1b3c5db61d657.camel@mediatek.com>

Hi CK,

Thanks for the reviews.

On Fri, 2023-07-14 at 06:57 +0000, CK Hu (胡俊光) wrote:
> Hi, Jason:
> 
> On Mon, 2023-07-10 at 17:32 +0800, Jason-JH.Lin 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.
> > 
> > Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC
> > MT8173.")
> > 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;
> 
> All plane has been disable in mtk_drm_crtc_atomic_disable(), doesn't
> it?
> 
Yes, it does.

But somehow the plane_state get from to_mtk_plane_state(mtk_crtc-
>planes[i]) is not synced to the plane_state in atomic_state.

So I think we should disable ovl layer to avoid incorrect plane_state
applying to OVL HW at the HW init stage.

Regards,
Jason-JH.Lin


> Regards,
> CK
> 
> >  		comp = mtk_drm_ddp_comp_for_plane(crtc, plane,
> > &local_layer);
> >  		if (comp)
> >  			mtk_ddp_comp_layer_config(comp, local_layer,

  reply	other threads:[~2023-07-18 15:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230710093253.32224-1-jason-jh.lin@mediatek.com>
     [not found] ` <20230710093253.32224-3-jason-jh.lin@mediatek.com>
2023-07-10  9:34   ` AngeloGioacchino Del Regno
2023-07-12 13:03   ` Alexandre Mergnat
2023-07-14  6:57   ` CK Hu (胡俊光)
2023-07-18 15:48     ` Jason-JH Lin (林睿祥) [this message]
2023-07-26  6:56       ` CK Hu (胡俊光)
2023-08-05  8:10         ` Jason-JH Lin (林睿祥)
     [not found] ` <20230710093253.32224-2-jason-jh.lin@mediatek.com>
2023-07-12 13:03   ` [PATCH v3 1/2] drm/mediatek: Fix iommu fault by swapping FBs after updating plane state Alexandre Mergnat
2023-07-14  6:38   ` CK Hu (胡俊光)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7adca80c59d5c3cb8d97c24995f824cd7bf5fea2.camel@mediatek.com \
    --to=jason-jh.lin@mediatek.com \
    --cc=Jason-ch.Chen@mediatek.com \
    --cc=Johnson.Wang@mediatek.com \
    --cc=Nancy.Lin@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Shawn.Sung@mediatek.com \
    --cc=Singo.Chang@mediatek.com \
    --cc=amergnat@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=ck.hu@mediatek.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®