mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
To: "chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"robh@kernel.org" <robh@kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"jassisinghbrar@gmail.com" <jassisinghbrar@gmail.com>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	"Moudy Ho (何宗原)" <Moudy.Ho@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>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 0/8] Add GCE support for MT8196
Date: Thu, 21 Nov 2024 11:21:35 +0000	[thread overview]
Message-ID: <778f7f7c01d395e911ae32f168c17d1f6d95ea40.camel@mediatek.com> (raw)
In-Reply-To: <72c1e62b-0bbf-4213-adbb-972caa1ebfee@collabora.com>

Hi Angelo,

On Thu, 2024-11-21 at 09:55 +0100, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> Il 21/11/24 05:25, Jason-JH.Lin ha scritto:
> > This patch series adds support for the MediaTek MT8196 SoC in the
> > CMDQ
> > driver and related subsystems. The changes include adding
> > compatible
> > names and properties, updating driver data to accommodate hardware
> > changes, and modifying the CMDQ API to support non-subsys ID
> > hardware.
> > 
> > Jason-JH.Lin (8):
> >    dt-bindings: mailbox: mediatek: Add GCE header file for MT8196
> >    dt-bindings: mailbox: mediatek: Add MT8196 support for gce-
> > mailbox
> >    mailbox: mtk-cmdq: Add driver data to support for MT8196
> >    soc: mediatek: mtk-cmdq: Add unsupported subsys ID programing
> > flow
> >    soc: mediatek: mtk-cmdq: Add mminfra_offset compatibility for
> > DRAM
> >      address
> >    soc: mediatek: Add pa_base due to CMDQ API change
> >    drm/mediatek: Add pa_base due to CMDQ API change
> >    media: mediatek: mdp3: Add pa_base due to CMDQ API change
> > 
> >   .../mailbox/mediatek,gce-mailbox.yaml         |    4 +
> >   drivers/gpu/drm/mediatek/mtk_ddp_comp.c       |    6 +-
> >   drivers/mailbox/mtk-cmdq-mailbox.c            |  107 +-
> >   .../platform/mediatek/mdp3/mtk-mdp3-cmdq.c    |    4 +-
> >   .../platform/mediatek/mdp3/mtk-mdp3-comp.h    |    4 +-
> >   drivers/soc/mediatek/mtk-cmdq-helper.c        |  133 +-
> >   drivers/soc/mediatek/mtk-mmsys.c              |    1 +
> >   drivers/soc/mediatek/mtk-mutex.c              |    2 +-
> >   .../dt-bindings/mailbox/mediatek,mt8196-gce.h | 1449
> > +++++++++++++++++
> >   include/linux/mailbox/mtk-cmdq-mailbox.h      |    3 +
> >   include/linux/soc/mediatek/mtk-cmdq.h         |   22 +-
> >   11 files changed, 1698 insertions(+), 37 deletions(-)
> >   create mode 100755 include/dt-bindings/mailbox/mediatek,mt8196-
> > gce.h
> > 
> 
> 
> Hello Jason,
> I had a fast look at the changes that you're proposing with this
> series.
> 
> The reasons behind this are more or less understood on my side, but
> the
> actual changes look a bit odd in the sense that passing a physical
> address
> like this, on a first glance, not only looks like it may be
> dangerous, but
> also looks like there's a lot of room for improvement.
> 

It's because hardware subsys ID for GCE is no longer to be used in
MT8196. So we need to put the PA into the instruction then GCE can know
where to write the configuration.

> Can you please point me at some driver/code (or a reference downsream
> kernel
> for this SoC, which would be even better) so that I can take a look
> at how
> is that being used?

Before MT8196, the most general use case is in the mtk_ddp_write(),
mtk_ddp_write_mask() at mtk_ddp_comp.c.
The client drivers will pass the `struct cmdq_client_reg` which has
stored the subsys ID, offset ans size parsing from the DTS node.

The client drivers use the subsys ID via CMDQ API to generate the
instructions. And GCE knows where the subsys ID is mapping to the
corresponding hardware register pa_base, so it can configure the
hardware register correctly.

That's the main change in this series and feel free to ask me more
details. Or if you have anything want to know rapidly.
You can find me in the Google Chat :-)

Regards,
Jason-JH.Lin

> 
> Thanks,
> Angelo

      reply	other threads:[~2024-11-21 11:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21  4:25 Jason-JH.Lin
2024-11-21  4:25 ` [PATCH 1/8] dt-bindings: mailbox: mediatek: Add GCE header file " Jason-JH.Lin
2024-11-21  8:42   ` Krzysztof Kozlowski
2024-11-21 10:51     ` Jason-JH Lin (林睿祥)
2024-11-21 11:48       ` Krzysztof Kozlowski
2024-11-21 15:47         ` Jason-JH Lin (林睿祥)
2024-11-21  4:25 ` [PATCH 2/8] dt-bindings: mailbox: mediatek: Add MT8196 support for gce-mailbox Jason-JH.Lin
2024-11-21  4:25 ` [PATCH 3/8] mailbox: mtk-cmdq: Add driver data to support for MT8196 Jason-JH.Lin
2024-11-21  4:25 ` [PATCH 4/8] soc: mediatek: mtk-cmdq: Add unsupported subsys ID programing flow Jason-JH.Lin
2024-11-21  6:38   ` CK Hu (胡俊光)
2024-11-21  7:10     ` CK Hu (胡俊光)
2024-11-21 10:41       ` Jason-JH Lin (林睿祥)
2024-11-21  4:25 ` [PATCH 5/8] soc: mediatek: mtk-cmdq: Add mminfra_offset compatibility for DRAM address Jason-JH.Lin
2024-11-21  4:26 ` [PATCH 6/8] soc: mediatek: Add pa_base due to CMDQ API change Jason-JH.Lin
2024-11-21  4:26 ` [PATCH 7/8] drm/mediatek: " Jason-JH.Lin
2024-11-21  4:26 ` [PATCH 8/8] media: mediatek: mdp3: " Jason-JH.Lin
2024-11-21  8:55 ` [PATCH 0/8] Add GCE support for MT8196 AngeloGioacchino Del Regno
2024-11-21 11:21   ` Jason-JH Lin (林睿祥) [this message]

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=778f7f7c01d395e911ae32f168c17d1f6d95ea40.camel@mediatek.com \
    --to=jason-jh.lin@mediatek.com \
    --cc=Moudy.Ho@mediatek.com \
    --cc=Nancy.Lin@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Singo.Chang@mediatek.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    /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®