linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guillaume Ranquet <granquet@baylibre.com>
To: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-mediatek@lists.infradead.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v1 4/4] drm/mediatek: add mt8195 hdmi TX support
Date: Thu, 30 Sep 2021 11:30:16 -0400	[thread overview]
Message-ID: <CABnWg9th7ZFqa48jKcjqs4u+27t663H-zD7yn3oFRMEsGzbMGg@mail.gmail.com> (raw)

Hi Chun-Kuang.

Thank you for your input.
I have tried to find commonalities between the two drivers but I didn't
find enough shared code to warrant that architecture.
I'll have another look, especially now that I'm more familiar with the
driver.

Regarding 2, I have removed as much functionalities as I could from the
original vendor tree (like hdcp, hdr, cec...) to keep only HDMI audio and
video TX.

There might be some more things to remove, but I'm no expert in the domain
and I'm working without access to mediatek datasheets and documentation.

Though, at this stage I could split the patch in two with video first and
then audio.

I will try to work something out for a V2.

Thx,
Guillaume.

Quoting Chun-Kuang Hu (2021-09-30 15:36:42)
> Hi, Guillaume:
>
> This is a big patch, and I'm not familiar with this driver, so the
> review process would be long. So I tell you about how I review this
> patch, and if you could process according to my way, the process would
> be more short.
>
> 1. Find the common part of all hdmi driver.
> Even though mt8195 hdmi has many difference with other mediatek soc
> hdmi driver, I would like to find the common part and have just one
> copy of the common part. I expect there would three file finally:
>
> mtk_hdmi.c               (the common part)
> mtk_hdmi_mt8173.c (each soc special part)
> mtk_hdmi_mt8195.c (each soc special part)
>
> But this would be difficult in this stage, so you could temporarily
> have these three file:
>
> mtk_hdmi_common.c (the common part)
> mtk_hdmi.c                 (each soc special part)
> mtk_hdmi_mt8195.c   (each soc special part)
>
> When review is almost done, then change the file name as I wish.
>
> 2. The first patch has only basic function, separate advance function
> to another patch.
> When comparing mt8195 hdmi driver with other hdmi driver, if mt8195
> hdmi driver has some function that other hdmi does not have, I would
> think that function is advance function and should be separate to
> another patch.
>
> If you follow this way, I think the review process would be short.
> Because this patch is big, I would just review partial part each time.
>
> Regards,
> Chun-Kuang.
>
>
> Guillaume Ranquet <granquet@baylibre.com> 於 2021年9月29日 週三 下午5:47寫道:
> >
> > Add basic hdmi TX support for the mediatek mt8195 SoCs
> >
> > Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
> > ---
> >  drivers/gpu/drm/mediatek/Kconfig              |   10 +
> >  drivers/gpu/drm/mediatek/Makefile             |    4 +-
> >  drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c    | 2293 +++++++++++++++++
> >  drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h    |  128 +
> >  .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c    |  530 ++++
> >  .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h    |   20 +
> >  .../gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h   |  329 +++
> >  7 files changed, 3313 insertions(+), 1 deletion(-)
> >  create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c
> >  create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h
> >  create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c
> >  create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h
> >  create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h
> >
> > diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
> > index 2976d21e9a34a..517d065f0511b 100644
> > --- a/drivers/gpu/drm/mediatek/Kconfig
> > +++ b/drivers/gpu/drm/mediatek/Kconfig
> > @@ -28,3 +28,13 @@ config DRM_MEDIATEK_HDMI
> >         select PHY_MTK_HDMI
> >         help
> >           DRM/KMS HDMI driver for Mediatek SoCs
> > +
> > +config DRM_MEDIATEK_HDMI_MT8195_SUSPEND_LOW_POWER
> > +       tristate "DRM HDMI SUSPEND LOW POWER Support for Mediatek mt8195 SoCs"
> > +       depends on DRM_MEDIATEK_HDMI
> > +       help
> > +         DRM/KMS HDMI SUSPEND_LOW_POWER for Mediatek SoCs.
> > +         Choose this option if you want to disable/enable
> > +         clock and power domain when platform enter suspend,
> > +         and this config depends on DRM_MEDIATEK_HDMI.
> > +
> > diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek/Makefile
> > index 29098d7c8307c..736f0816083d0 100644
> > --- a/drivers/gpu/drm/mediatek/Makefile
> > +++ b/drivers/gpu/drm/mediatek/Makefile
> > @@ -18,6 +18,8 @@ obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o
> >
> >  mediatek-drm-hdmi-objs := mtk_cec.o \
> >                           mtk_hdmi.o \
> > -                         mtk_hdmi_ddc.o
> > +                         mtk_hdmi_ddc.o \
> > +                         mtk_mt8195_hdmi.o \
> > +                         mtk_mt8195_hdmi_ddc.o \
> >
> >  obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o
> > diff --git a/drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c b/drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c
> > new file mode 100644
> > index 0000000000000..46c7c8af524ac
> > --- /dev/null
> >

             reply	other threads:[~2021-09-30 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 15:30 Guillaume Ranquet [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-08 13:30 [PATCH v1 4/4] drm/mediatek: add mt8195 hdmi TX support Guillaume Ranquet
2021-10-08 14:37 ` Chun-Kuang Hu
2021-10-08 14:49   ` Guillaume Ranquet
     [not found] <20210929094425.745-1-granquet@baylibre.com>
2021-09-29  9:44 ` Guillaume Ranquet
2021-09-30 13:36   ` Chun-Kuang 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=CABnWg9th7ZFqa48jKcjqs4u+27t663H-zD7yn3oFRMEsGzbMGg@mail.gmail.com \
    --to=granquet@baylibre.com \
    --cc=airlied@linux.ie \
    --cc=chunkuang.hu@kernel.org \
    --cc=daniel@ffwll.ch \
    --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 \
    --cc=p.zabel@pengutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).