From: Jani Nikula <jani.nikula@intel.com>
To: Vandita Kulkarni <vandita.kulkarni@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: ville.syrjala@intel.com
Subject: Re: [V2] drm/i915: Add icl mipi dsi properties
Date: Wed, 26 Jun 2019 15:53:19 +0300 [thread overview]
Message-ID: <877e98se2o.fsf@intel.com> (raw)
In-Reply-To: <20190626092731.26041-1-vandita.kulkarni@intel.com>
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;
> 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? ;)
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
next prev parent reply other threads:[~2019-06-26 12:50 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 ` Jani Nikula [this message]
2019-06-26 13:59 ` [V2] " Ville Syrjälä
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=877e98se2o.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=vandita.kulkarni@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