Re: [BXT MIPI PATCH v3 14/14] drm/i915: Added BXT DSI backlight support

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

 



On Tue, 01 Sep 2015, Uma Shankar <uma.shankar@xxxxxxxxx> wrote:
> DSI backlight support for bxt is added.
>
> TODO: There is no support for backlight control in drm panel
>       framework. This will be added as part of VBT version patches
>       fixing the backlight sequence.
>
> v2: Fixed Jani's review comments from previous patch. Added the
>     BXT DSI backlight code in this patch. Backlight setup and
>     enable/disable code for backlight is added in intel_dsi.c.
>
> v3: Rebased on latest drm-nightly. Fixed Jani's review comments.

I'm not sure why these calls need to be within IS_BROXTON blocks. What
happens with the current backlight calls? Shouldn't we just have one set
of calls?

Also, I think we should get this [1] in first, and see how that affects
things.

BR,
Jani.


[1] http://mid.gmane.org/cover.1442227790.git.jani.nikula@xxxxxxxxx

>
> Signed-off-by: Uma Shankar <uma.shankar@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_dsi.c |   20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> index 08bade2..aee1539 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -438,6 +438,7 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
>  	struct drm_device *dev = encoder->base.dev;
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
> +	struct intel_connector *intel_connector = intel_dsi->attached_connector;
>  	enum port port;
>  
>  	DRM_DEBUG_KMS("\n");
> @@ -458,6 +459,11 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
>  
>  		intel_dsi_port_enable(encoder);
>  	}
> +
> +	if (IS_BROXTON(dev)) {
> +		msleep(intel_dsi->backlight_on_delay);
> +		intel_panel_enable_backlight(intel_connector);
> +	}
>  }
>  
>  static void intel_dsi_pre_enable(struct intel_encoder *encoder)
> @@ -623,10 +629,16 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
>  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
> +	struct intel_connector *intel_connector = intel_dsi->attached_connector;
>  	u32 val;
>  
>  	DRM_DEBUG_KMS("\n");
>  
> +	if (IS_BROXTON(dev_priv->dev)) {
> +		intel_panel_disable_backlight(intel_connector);
> +		msleep(intel_dsi->backlight_off_delay);
> +	}
> +
>  	intel_dsi_disable(encoder);
>  
>  	intel_dsi_clear_device_ready(encoder);
> @@ -1226,8 +1238,14 @@ void intel_dsi_init(struct drm_device *dev)
>  
>  	intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
>  
> -	return;
> +	/*
> +	 * Pipe parameter is not used for BXT.
> +	 * Passing INVALID_PIPE to adher to API requirement.
> +	 */
> +	if (IS_BROXTON(dev))
> +		intel_panel_setup_backlight(connector, INVALID_PIPE);
>  
> +	return;
>  err:
>  	drm_encoder_cleanup(&intel_encoder->base);
>  	kfree(intel_dsi);
> -- 
> 1.7.9.5
>

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux