Re: [V2] drm/i915: Add icl mipi dsi properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Sent: Wednesday, June 26, 2019 7:29 PM
> To: Nikula, Jani <jani.nikula@xxxxxxxxx>
> Cc: Kulkarni, Vandita <vandita.kulkarni@xxxxxxxxx>; intel-
> gfx@xxxxxxxxxxxxxxxxxxxxx; Syrjala, Ville <ville.syrjala@xxxxxxxxx>
> Subject: Re:  [V2] drm/i915: Add icl mipi dsi properties
> 
> On Wed, Jun 26, 2019 at 03:53:19PM +0300, Jani Nikula wrote:
> > On Wed, 26 Jun 2019, Vandita Kulkarni <vandita.kulkarni@xxxxxxxxx> wrote:
> > > Add scaling and panel orientation properties for icl mipi dsi.
> > >
> > > v2: Add platform specific function (Ville)
> > >
> > > Signed-off-by: Vandita Kulkarni <vandita.kulkarni@xxxxxxxxx>
> > > ---
> > >  drivers/gpu/drm/i915/display/icl_dsi.c | 30
> > > ++++++++++++++++++++++++++  drivers/gpu/drm/i915/display/vlv_dsi.c |
> > > 4 ++--
> > >  2 files changed, 32 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c
> > > b/drivers/gpu/drm/i915/display/icl_dsi.c
> > > index b8673debf932..002db3300f40 100644
> > > --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> > > +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> > > @@ -1255,9 +1255,14 @@ static int gen11_dsi_compute_config(struct
> intel_encoder *encoder,
> > >  					intel_connector->panel.fixed_mode;
> > >  	struct drm_display_mode *adjusted_mode =
> > >  					&pipe_config->base.adjusted_mode;
> > > +	int ret = 0;
> >
> > No ned to initialize.
Ok.
> >
> > >
> > >  	pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
> > >  	intel_fixed_panel_mode(fixed_mode, adjusted_mode);
> > > +
> > > +	ret = skl_update_scaler_crtc(pipe_config);
> > > +	if (ret)
> > > +		return ret;
> 
> This function call is not needed IIRC. The calls we already have in dp/hdmi are
> redundant. I have a branch somewhere where I remove them.
Ok. 
> 
> > >  	intel_pch_panel_fitting(crtc, pipe_config,
> > > conn_state->scaling_mode);
> > >
> > >  	adjusted_mode->flags = 0;
> > > @@ -1508,6 +1513,29 @@ static void icl_dphy_param_init(struct intel_dsi
> *intel_dsi)
> > >  	intel_dsi_log_params(intel_dsi);
> > >  }
> > >
> > > +static void icl_dsi_add_properties(struct intel_connector
> > > +*connector) {
> > > +	u32 allowed_scalers;
> > > +
> > > +	if (!connector->panel.fixed_mode)
> > > +		return;
> >
> > This is a redundant check, as the caller bails out if fixed_mode is
> > NULL.
Ok.
> >
> > Otherwise LGTM, maybe Ville has more nitpicks? ;)
> 
> My only other nitpick is that this was cc:d to my wrong address.
Dropping it.

Thanks for the reviews. Will fix and send V3.
-Vandita
> 
> >
> > BR,
> > Jani.
> >
> > > +
> > > +	allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) |
> > > +			   BIT(DRM_MODE_SCALE_FULLSCREEN) |
> > > +			   BIT(DRM_MODE_SCALE_CENTER);
> > > +
> > > +	drm_connector_attach_scaling_mode_property(&connector->base,
> > > +							allowed_scalers);
> > > +
> > > +	connector->base.state->scaling_mode = DRM_MODE_SCALE_ASPECT;
> > > +
> > > +	connector->base.display_info.panel_orientation =
> > > +			intel_dsi_get_panel_orientation(connector);
> > > +	drm_connector_init_panel_orientation_property(&connector->base,
> > > +				connector->panel.fixed_mode->hdisplay,
> > > +				connector->panel.fixed_mode->vdisplay);
> > > +}
> > > +
> > >  void icl_dsi_init(struct drm_i915_private *dev_priv)  {
> > >  	struct drm_device *dev = &dev_priv->drm; @@ -1601,6 +1629,8 @@
> > > void icl_dsi_init(struct drm_i915_private *dev_priv)
> > >  	}
> > >
> > >  	icl_dphy_param_init(intel_dsi);
> > > +
> > > +	icl_dsi_add_properties(intel_connector);
> > >  	return;
> > >
> > >  err:
> > > diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c
> > > b/drivers/gpu/drm/i915/display/vlv_dsi.c
> > > index e272d826210a..c8002ffd29e7 100644
> > > --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> > > +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> > > @@ -1644,7 +1644,7 @@ vlv_dsi_get_panel_orientation(struct
> intel_connector *connector)
> > >  	return intel_dsi_get_panel_orientation(connector);
> > >  }
> > >
> > > -static void intel_dsi_add_properties(struct intel_connector
> > > *connector)
> > > +static void vlv_dsi_add_properties(struct intel_connector
> > > +*connector)
> > >  {
> > >  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> > >
> > > @@ -1983,7 +1983,7 @@ void vlv_dsi_init(struct drm_i915_private
> *dev_priv)
> > >  	intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
> > >  	intel_panel_setup_backlight(connector, INVALID_PIPE);
> > >
> > > -	intel_dsi_add_properties(intel_connector);
> > > +	vlv_dsi_add_properties(intel_connector);
> > >
> > >  	return;
> >
> > --
> > Jani Nikula, Intel Open Source Graphics Center
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> --
> Ville Syrjälä
> Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux