public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: 杨孙运 <yangsunyun1993@gmail.com>
Cc: syyang@lontium.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, andrzej.hajda@intel.com,
	neil.armstrong@linaro.org, maarten.lankhorst@linux.intel.com,
	rfoss@kernel.org, mripard@kernel.org,
	Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se,
	jernej.skrabec@gmail.com, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	xmzhu@lontium.corp-partner.google.com, tzimmermann@suse.de,
	xmzhu@lontium.com, rlyu@lontium.com, xbpeng@lontium.com
Subject: Re: [PATCH v3 2/2] drm/bridge: This patch add new DRM bridge driver for LT9611C(EX/UXD) chip
Date: Wed, 22 Apr 2026 21:56:21 +0300	[thread overview]
Message-ID: <seno7shjhledyrunl5pib323zwgshtyhi455hzyspkhuvbps4m@qb4gwwakfww7> (raw)
In-Reply-To: <CAFQXuNZG-La0YpmHgMA-TZ2ayPDLfEvkbrSJZyW-jFCzXU-mLw@mail.gmail.com>

On Wed, Apr 22, 2026 at 12:41:11PM +0800, 杨孙运 wrote:
> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2026年4月21日周二 18:48写道:
> >
> > On Tue, Apr 21, 2026 at 03:37:52PM +0800, 杨孙运 wrote:
> > > Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2026年4月20日周一 20:18写道:
> > > >
> > > > On Mon, Apr 20, 2026 at 02:16:44PM +0800, syyang@lontium.com wrote:
> > > > > From: Sunyun Yang <syyang@lontium.com>
> > >
> > > > > +
> > > > > +static int lt9611c_hdmi_audio_prepare(struct drm_bridge *bridge,
> > > > > +                                   struct drm_connector *connector,
> > > > > +                                   struct hdmi_codec_daifmt *fmt,
> > > > > +                                   struct hdmi_codec_params *hparms)
> > > > > +{
> > > > > +     struct lt9611c *lt9611c = bridge_to_lt9611c(bridge);
> > > > > +     u8 audio_cmd[6] = {0x57, 0x48, 0x36, 0x3a};
> > > > > +     u8 data[5];
> > > > > +     int ret;
> > > > > +
> > > > > +     /* Validate sample rate and width (LT9611C auto-detects but we still check) */
> > > >
> > > > What for? You don't trust ASoC / ALSA core that the rates would match
> > > > HDMI_RATES?
> > >
> > > Chip has limitations on sample_rate, sample_width, and fmt, and cannot
> > > support all formats.
> > > The validation here is to ensure that only the formats supported by
> > > the chip are used.
> >
> > Again, for sample rates, is it different from HDMI_RATES? If not, it is
> > useless protective coding.
> >
> 
> I checked the definition of HDMI_RATES and ended up doing a redundant
> validation.
> 
> #define HDMI_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\
> SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 |\
> SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |\
> SNDRV_PCM_RATE_192000)
> 
> However, if HDMI_RATES is extended in the future to include sample
> rate not supported by LT9611C, this driver would require corresponding
> updates.
> If this is not expected to happen, I can remove the redundant check.

Updating HDMI_RATES would cause enough issues for the existign drivers
which don't have this kind of a check.

> 
> > > >
> > > > > +     switch (hparms->sample_rate) {
> > > > > +     case 32000:
> > > > > +     case 44100:
> > > > > +     case 48000:
> > > > > +     case 88200:
> > > > > +     case 96000:
> > > > > +     case 176400:
> > > > > +     case 192000:
> > > > > +             break;
> > > > > +     default:
> > > > > +             return -EINVAL;
> > > > > +     }
> > > > > +
> > > > > +     switch (hparms->sample_width) {
> > > > > +     case 16:
> > > > > +     case 18:
> > > > > +     case 20:
> > > > > +     case 24:
> > > >
> > > > and no support for 32?
> > > >
> > > no support for 32
> >
> > Then check for that rather than listing all the widths. If you check the
> > hdmi-codec, you can't get 18-bit samples at all.
> >
> You are right, there is no 18-bit support.
> 
> same reason with sample rate.

Yep. Check for 32-bit, the rest is fine.

> 
> > > > > +MODULE_LICENSE("GPL v2");
> > > >
> > > >
> > > > I think, checkpatch.pl should have flagged this.
> > > >
> > > yes,  it is need use GPL?
> >
> > If it flagged the line, why didn't you fix it? What did checkpatch say?
> >
> Sorry, it is my mistake. i will fix.
> checkpatch say:
> WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db
> ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
> #1450: FILE: drivers/gpu/drm/bridge/lontium-lt9611c.c:1364:
> 

So... If there was a warning, why did you ignore it? Please don't,
unless you really know what you are doing.

> 
> > > I see that many of the latest code still use GPL v2.
> >
> > --
> > With best wishes
> > Dmitry

-- 
With best wishes
Dmitry

  reply	other threads:[~2026-04-22 18:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20  6:16 [PATCH v3 0/2] Add LT9611C(EX/UXD) DRM bridge driver and device tree syyang
2026-04-20  6:16 ` [PATCH v3 1/2] dt-bindings: bridge: This patch adds new content to the lontium, lt9611.yaml binding file syyang
2026-04-20 11:33   ` [PATCH v3 1/2] dt-bindings: bridge: This patch adds new content to the lontium,lt9611.yaml " Krzysztof Kozlowski
2026-04-20 14:15     ` Krzysztof Kozlowski
2026-04-20 14:18       ` Krzysztof Kozlowski
2026-04-21  3:39         ` 杨孙运
2026-04-23  0:19     ` Claude review: " Claude Code Review Bot
2026-04-20  6:16 ` [PATCH v3 2/2] drm/bridge: This patch add new DRM bridge driver for LT9611C(EX/UXD) chip syyang
2026-04-20 12:18   ` Dmitry Baryshkov
2026-04-21  7:37     ` 杨孙运
2026-04-21 10:48       ` Dmitry Baryshkov
2026-04-22  4:41         ` 杨孙运
2026-04-22 18:56           ` Dmitry Baryshkov [this message]
2026-04-23  0:19     ` Claude review: " Claude Code Review Bot
2026-04-20 10:45 ` [PATCH v3 0/2] Add LT9611C(EX/UXD) DRM bridge driver and device tree Dmitry Baryshkov
2026-04-20 11:05   ` 杨孙运
2026-04-21 10:49     ` Dmitry Baryshkov
2026-04-23  0:19   ` Claude review: " Claude Code Review Bot
2026-04-21  5:09 ` Jingyi Wang
2026-04-21  5:49   ` 杨孙运

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=seno7shjhledyrunl5pib323zwgshtyhi455hzyspkhuvbps4m@qb4gwwakfww7 \
    --to=dmitry.baryshkov@oss.qualcomm.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=andrzej.hajda@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=rlyu@lontium.com \
    --cc=robh@kernel.org \
    --cc=syyang@lontium.com \
    --cc=tzimmermann@suse.de \
    --cc=xbpeng@lontium.com \
    --cc=xmzhu@lontium.com \
    --cc=xmzhu@lontium.corp-partner.google.com \
    --cc=yangsunyun1993@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