diff mbox series

[V3] drm/i915: Add icl mipi dsi properties

Message ID 20190627152457.26146-1-vandita.kulkarni@intel.com (mailing list archive)
State New, archived
Headers show
Series [V3] drm/i915: Add icl mipi dsi properties | expand

Commit Message

Kulkarni, Vandita June 27, 2019, 3:24 p.m. UTC
Add scaling and panel orientation properties for
icl mipi dsi.

v2: Add platform specific function (Ville)
v3: Remove redundant check and update scaler call (Jani, Ville)

Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
---
 drivers/gpu/drm/i915/display/icl_dsi.c | 22 ++++++++++++++++++++++
 drivers/gpu/drm/i915/display/vlv_dsi.c |  4 ++--
 2 files changed, 24 insertions(+), 2 deletions(-)

Comments

Ville Syrjala July 9, 2019, 2:36 p.m. UTC | #1
On Thu, Jun 27, 2019 at 08:54:57PM +0530, Vandita Kulkarni wrote:
> Add scaling and panel orientation properties for
> icl mipi dsi.
> 
> v2: Add platform specific function (Ville)
> v3: Remove redundant check and update scaler call (Jani, Ville)
> 
> Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>

Pushed to dinq. Thanks for the patch.

> ---
>  drivers/gpu/drm/i915/display/icl_dsi.c | 22 ++++++++++++++++++++++
>  drivers/gpu/drm/i915/display/vlv_dsi.c |  4 ++--
>  2 files changed, 24 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..3cf95c34143c 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -1508,6 +1508,26 @@ 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;
> +
> +	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 +1621,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;
>  
> -- 
> 2.21.0.5.gaeb582a
Kulkarni, Vandita July 9, 2019, 2:56 p.m. UTC | #2
> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Tuesday, July 9, 2019 8:06 PM
> To: Kulkarni, Vandita <vandita.kulkarni@intel.com>
> Cc: intel-gfx@lists.freedesktop.org; Nikula, Jani <jani.nikula@intel.com>
> Subject: Re: [V3] drm/i915: Add icl mipi dsi properties
> 
> On Thu, Jun 27, 2019 at 08:54:57PM +0530, Vandita Kulkarni wrote:
> > Add scaling and panel orientation properties for icl mipi dsi.
> >
> > v2: Add platform specific function (Ville)
> > v3: Remove redundant check and update scaler call (Jani, Ville)
> >
> > Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
> 
> Pushed to dinq. Thanks for the patch.

Thank you.
-Vandita
> 
> > ---
> >  drivers/gpu/drm/i915/display/icl_dsi.c | 22 ++++++++++++++++++++++
> > drivers/gpu/drm/i915/display/vlv_dsi.c |  4 ++--
> >  2 files changed, 24 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..3cf95c34143c 100644
> > --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> > +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> > @@ -1508,6 +1508,26 @@ 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;
> > +
> > +	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 +1621,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;
> >
> > --
> > 2.21.0.5.gaeb582a
> 
> --
> Ville Syrjälä
> Intel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
index b8673debf932..3cf95c34143c 100644
--- a/drivers/gpu/drm/i915/display/icl_dsi.c
+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
@@ -1508,6 +1508,26 @@  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;
+
+	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 +1621,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;