linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Kevin Tang <kevin3.tang@gmail.com>
Cc: maarten.lankhorst@linux.intel.com, sean@poorly.run,
	airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org,
	mark.rutland@arm.com, pony1.wu@gmail.com, orsonzhai@gmail.com,
	zhang.lyra@gmail.com, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v7 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver
Date: Fri, 3 Dec 2021 15:37:34 +0100	[thread overview]
Message-ID: <20211203143734.pn4q6wft4s37ckut@houat> (raw)
In-Reply-To: <CAFPSGXbWv94vShNAQ9xfkDZRKgZTdjRzH9i60ak1NYaPW-OKgA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

On Fri, Dec 03, 2021 at 08:34:50PM +0800, Kevin Tang wrote:
> Maxime Ripard <maxime@cerno.tech> 于2021年12月3日周五 18:38写道:
> >
> > On Mon, Oct 25, 2021 at 05:34:18PM +0800, Kevin Tang wrote:
> > > @@ -618,9 +619,25 @@ static void sprd_crtc_mode_set_nofb(struct drm_crtc *crtc)
> > >  {
> > >       struct sprd_dpu *dpu = to_sprd_crtc(crtc);
> > >       struct drm_display_mode *mode = &crtc->state->adjusted_mode;
> > > +     struct drm_encoder *encoder;
> > > +     struct mipi_dsi_device *slave;
> > > +     struct sprd_dsi *dsi;
> > >
> > >       drm_display_mode_to_videomode(mode, &dpu->ctx.vm);
> > >
> > > +     drm_for_each_encoder(encoder, crtc->dev) {
> > > +             if (encoder->crtc != crtc)
> > > +                     continue;
> >
> > encoder->crtc is deprecated. You should be using
> > encoder->drm_for_each_encoder_mask, using the encoder_mask in
> > encoder->drm_crtc_state.
> 
> Use drm_for_each_encoder_mask to replace drm_for_each_encoder? like this:
> drm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask) {
>     dsi = encoder_to_dsi(encoder);
>     slave = dsi->slave;
> 
>     if (slave->mode_flags & MIPI_DSI_MODE_VIDEO)
>         dpu->ctx.if_type = SPRD_DPU_IF_DPI;
>     else
>          dpu->ctx.if_type = SPRD_DPU_IF_EDPI;
> }

Yes

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2021-12-03 14:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  9:34 [PATCH v7 0/6] Add Unisoc's drm kms module Kevin Tang
2021-10-25  9:34 ` [PATCH v7 1/6] dt-bindings: display: add Unisoc's drm master bindings Kevin Tang
2021-10-25  9:34 ` [PATCH v7 2/6] drm/sprd: add Unisoc's drm kms master Kevin Tang
2021-11-26 14:03   ` Maarten Lankhorst
2021-12-03  8:47     ` Kevin Tang
2021-10-25  9:34 ` [PATCH v7 3/6] dt-bindings: display: add Unisoc's dpu bindings Kevin Tang
2021-10-25  9:34 ` [PATCH v7 4/6] drm/sprd: add Unisoc's drm display controller driver Kevin Tang
2021-12-03 10:27   ` Maxime Ripard
2021-10-25  9:34 ` [PATCH v7 5/6] dt-bindings: display: add Unisoc's mipi dsi controller bindings Kevin Tang
2021-10-25  9:34 ` [PATCH v7 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver Kevin Tang
2021-12-03 10:38   ` Maxime Ripard
2021-12-03 12:34     ` Kevin Tang
2021-12-03 14:37       ` Maxime Ripard [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=20211203143734.pn4q6wft4s37ckut@houat \
    --to=maxime@cerno.tech \
    --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=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 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).