From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, ville.syrjala@intel.com
Subject: Re: [V2] drm/i915: Add icl mipi dsi properties
Date: Wed, 26 Jun 2019 16:59:08 +0300 [thread overview]
Message-ID: <20190626135908.GS5942@intel.com> (raw)
In-Reply-To: <877e98se2o.fsf@intel.com>
On Wed, Jun 26, 2019 at 03:53:19PM +0300, Jani Nikula wrote:
> On Wed, 26 Jun 2019, Vandita Kulkarni <vandita.kulkarni@intel.com> wrote:
> > Add scaling and panel orientation properties for
> > icl mipi dsi.
> >
> > v2: Add platform specific function (Ville)
> >
> > Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
> > ---
> > 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.
>
> >
> > 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.
> > 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.
>
> Otherwise LGTM, maybe Ville has more nitpicks? ;)
My only other nitpick is that this was cc:d to my wrong address.
>
> 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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-06-26 13:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 9:27 [V2] drm/i915: Add icl mipi dsi properties Vandita Kulkarni
2019-06-26 11:35 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-06-26 12:04 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-26 12:53 ` [V2] " Jani Nikula
2019-06-26 13:59 ` Ville Syrjälä [this message]
2019-06-26 15:08 ` Kulkarni, Vandita
2019-06-26 20:25 ` ✓ Fi.CI.IGT: success for " Patchwork
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=20190626135908.GS5942@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=ville.syrjala@intel.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