All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Kevin Tang <kevin3.tang@gmail.com>
Cc: Maxime Ripard <maxime@cerno.tech>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	pony1.wu@gmail.com, Orson Zhai <orsonzhai@gmail.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
	ML dri-devel <dri-devel@lists.freedesktop.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v6 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver
Date: Sun, 26 Sep 2021 18:33:18 +0200	[thread overview]
Message-ID: <YVCgznmOA97v30wG@ravnborg.org> (raw)
In-Reply-To: <CAFPSGXZbqh0f6kEoQaq_Nt677ksVS6QPdAa5==KVVAszSAuasw@mail.gmail.com>

Hi Kevin,

> > > +     reg->_0b.bits.out_sel = pll->out_sel;
> > > +     reg->_0b.bits.kint_l = pll->kint & 0xf;
> > > +     reg->_0e.bits.pll_pu_byp = 0;
> > > +     reg->_0e.bits.pll_pu = 0;
> > > +     reg->_0e.bits.stopstate_sel = 1;
> > > +     reg->_0f.bits.det_delay = pll->det_delay;
> > > +
> > > +     val = (u8 *)&reg;
> > > +
> > > +     for (i = 0; i < sizeof(reg_addr); ++i) {
> > > +             regmap_write(regmap, reg_addr[i], val[i]);
> > > +             DRM_DEBUG("%02x: %02x\n", reg_addr[i], val[i]);
> > > +     }
> > > +}
> >
> > It would be great to also convert this part to a pattern without
> > structures.
> I will try it, but our pll registers, all not have official name from
> aisc design owner.
> If need to convert it, our pll regiters macro define, it can only be
> named as reg_01, reg_02...
IT is better to use the stupid names provided by you asic design owner,
than just numbers. Add a comment explaining this is due to the asic
design owner the names are stupid and not your fault.

> > > +
> > > +     if (dsi->panel) {
> > > +             drm_panel_prepare(dsi->panel);
> > > +             drm_panel_enable(dsi->panel);
> > > +     }
> >
> > Please use the new devm_drm_of_get_bridge helper here, and use the
> > bridge API instead.
> We use drm_panel_init and drm_panel_add API to add panel, so here is a
> panel device, not a bridge.

The new way to do this is to always wrap the panel in a bridge. We will
start to slowly migrate away from direct use of the panel API, and let
display drivers always wrap the panles in a bridge.
So please do as Maxime suggests.

	Sam

  reply	other threads:[~2021-09-26 16:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 14:52 [PATCH v6 0/6] Add Unisoc's drm kms module Kevin Tang
2021-08-13 14:52 ` [PATCH v6 1/6] dt-bindings: display: add Unisoc's drm master bindings Kevin Tang
2021-08-13 14:52 ` [PATCH v6 2/6] drm/sprd: add Unisoc's drm kms master Kevin Tang
2021-08-13 14:52 ` [PATCH v6 3/6] dt-bindings: display: add Unisoc's dpu bindings Kevin Tang
2021-08-13 14:53 ` [PATCH v6 4/6] drm/sprd: add Unisoc's drm display controller driver Kevin Tang
2021-09-17 14:58   ` Maxime Ripard
2021-09-26 13:44     ` Kevin Tang
2021-09-26 13:44       ` Kevin Tang
2021-08-13 14:53 ` [PATCH v6 5/6] dt-bindings: display: add Unisoc's mipi dsi controller bindings Kevin Tang
2021-08-13 14:53 ` [PATCH v6 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver Kevin Tang
2021-09-17 15:40   ` Maxime Ripard
2021-09-26 14:31     ` Kevin Tang
2021-09-26 14:31       ` Kevin Tang
2021-09-26 16:33       ` Sam Ravnborg [this message]
2021-10-06 18:25         ` Kevin Tang
2021-09-28  9:28       ` Maxime Ripard
2021-10-06 17:54         ` Kevin Tang
2021-10-20 10:09         ` Kevin Tang
2021-10-21  8:00           ` Maxime Ripard

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=YVCgznmOA97v30wG@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kevin3.tang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mark.rutland@arm.com \
    --cc=maxime@cerno.tech \
    --cc=orsonzhai@gmail.com \
    --cc=pony1.wu@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean@poorly.run \
    --cc=zhang.lyra@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.