lkml.org 
[lkml]   [2021]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-12-03 15:38    [W:0.089 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site