From: Kevin Tang <kevin3.tang@gmail.com> To: Maxime Ripard <maxime@cerno.tech> 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 20:34:50 +0800 [thread overview] Message-ID: <CAFPSGXbWv94vShNAQ9xfkDZRKgZTdjRzH9i60ak1NYaPW-OKgA@mail.gmail.com> (raw) In-Reply-To: <20211203103841.vkl3sjsbaohsviou@houat> 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; } > > > +static int sprd_dsi_probe(struct platform_device *pdev) > > +{ > > + struct device *dev = &pdev->dev; > > + struct sprd_dsi *dsi; > > + > > + dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL); > > + if (!dsi) > > + return -ENOMEM; > > + > > + dev_set_drvdata(dev, dsi); > > + > > + dsi->host.ops = &sprd_dsi_host_ops; > > + dsi->host.dev = dev; > > + mipi_dsi_host_register(&dsi->host); > > + > > + return component_add(&pdev->dev, &dsi_component_ops); > > component_add must be run in the mipi_dsi_host.attach hook. Got it, will be fixed on patch v8. > > Maxime
WARNING: multiple messages have this Message-ID (diff)
From: Kevin Tang <kevin3.tang@gmail.com> To: Maxime Ripard <maxime@cerno.tech> Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, airlied@linux.ie, pony1.wu@gmail.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, robh+dt@kernel.org, zhang.lyra@gmail.com, orsonzhai@gmail.com, sean@poorly.run Subject: Re: [PATCH v7 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver Date: Fri, 3 Dec 2021 20:34:50 +0800 [thread overview] Message-ID: <CAFPSGXbWv94vShNAQ9xfkDZRKgZTdjRzH9i60ak1NYaPW-OKgA@mail.gmail.com> (raw) In-Reply-To: <20211203103841.vkl3sjsbaohsviou@houat> 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; } > > > +static int sprd_dsi_probe(struct platform_device *pdev) > > +{ > > + struct device *dev = &pdev->dev; > > + struct sprd_dsi *dsi; > > + > > + dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL); > > + if (!dsi) > > + return -ENOMEM; > > + > > + dev_set_drvdata(dev, dsi); > > + > > + dsi->host.ops = &sprd_dsi_host_ops; > > + dsi->host.dev = dev; > > + mipi_dsi_host_register(&dsi->host); > > + > > + return component_add(&pdev->dev, &dsi_component_ops); > > component_add must be run in the mipi_dsi_host.attach hook. Got it, will be fixed on patch v8. > > Maxime
next prev parent reply other threads:[~2021-12-03 12:38 UTC|newest] Thread overview: 20+ 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-11-26 14:03 ` Maarten Lankhorst 2021-12-03 8:47 ` Kevin Tang 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-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-10-26 7:55 ` kernel test robot 2021-12-03 10:38 ` Maxime Ripard 2021-12-03 10:38 ` Maxime Ripard 2021-12-03 12:34 ` Kevin Tang [this message] 2021-12-03 12:34 ` Kevin Tang 2021-12-03 14:37 ` Maxime Ripard 2021-12-03 14:37 ` 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=CAFPSGXbWv94vShNAQ9xfkDZRKgZTdjRzH9i60ak1NYaPW-OKgA@mail.gmail.com \ --to=kevin3.tang@gmail.com \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=devicetree@vger.kernel.org \ --cc=dri-devel@lists.freedesktop.org \ --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: linkBe 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.