All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Deepak M <m.deepak@intel.com>,
	Shobhit Kumar <shobhit.kumar@intel.com>,
	Gaurav K Singh <gaurav.k.singh@intel.com>
Subject: Re: [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT
Date: Fri, 19 Feb 2016 16:03:22 +0200	[thread overview]
Message-ID: <87egc8x0et.fsf@intel.com> (raw)
In-Reply-To: <1455881334-3295-2-git-send-email-m.deepak@intel.com>

On Fri, 19 Feb 2016, Deepak M <m.deepak@intel.com> wrote:
> From: Gaurav K Singh <gaurav.k.singh@intel.com>
>
> New sequences are added in the mipi sequence block of the
> VBT from version 3 onwards. The sequences are added to
> make the code more generic as the panel related info
> are placed in the VBT.
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
> Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
> Signed-off-by: Deepak M <m.deepak@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 48 ++++++++++++++++++++++++++++++
>  1 file changed, 48 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> index c6e18fe..db8e210 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> @@ -1035,12 +1035,60 @@ static int vbt_panel_get_modes(struct drm_panel *panel)
>  	return 1;
>  }
>  
> +static int vbt_panel_power_on(struct drm_panel *panel)
> +{
> +	generic_exec_sequence(panel, MIPI_SEQ_POWER_ON);
> +
> +	return 0;
> +}
> +
> +static int vbt_panel_power_off(struct drm_panel *panel)
> +{
> +	generic_exec_sequence(panel, MIPI_SEQ_POWER_OFF);
> +
> +	return 0;
> +}
> +
> +static int vbt_panel_backlight_on(struct drm_panel *panel)
> +{
> +	generic_exec_sequence(panel, MIPI_SEQ_BACKLIGHT_ON);
> +
> +	return 0;
> +}
> +
> +static int vbt_panel_backlight_off(struct drm_panel *panel)
> +{
> +	generic_exec_sequence(panel, MIPI_SEQ_BACKLIGHT_OFF);
> +
> +	return 0;
> +}
> +
> +static int vbt_panel_get_info(struct drm_panel *panel,
> +					struct drm_connector *connector)
> +{
> +	struct intel_connector *intel_connector =
> +				to_intel_connector(connector);
> +
> +	if (intel_connector) {
> +		connector->display_info.width_mm =
> +				intel_connector->panel.fixed_mode->width_mm;
> +		connector->display_info.height_mm =
> +				intel_connector->panel.fixed_mode->height_mm;
> +	}
> +	return 0;

I think we could do this part in the ->get_modes hook. For all the other
displays, it's the ->get_modes hook that reads the EDID, and ultimately
sets the display_info from EDID. We wouldn't need a new hook at all.

Also, this should be a separate change. If we can get the size
information from the fixed mode from VBT, we should do that in
->get_modes, and backport this fix for stable kernels. It's sorely
needed for BYT/CHV too.


BR,
Jani.


> +}
> +
>  static const struct drm_panel_funcs vbt_panel_funcs = {
>  	.disable = vbt_panel_disable,
>  	.unprepare = vbt_panel_unprepare,
>  	.prepare = vbt_panel_prepare,
>  	.enable = vbt_panel_enable,
>  	.get_modes = vbt_panel_get_modes,
> +	.power_on = vbt_panel_power_on,
> +	.power_off = vbt_panel_power_off,
> +	.backlight_on = vbt_panel_backlight_on,
> +	.backlight_off = vbt_panel_backlight_off,
> +	.get_info = vbt_panel_get_info,
>  };
>  
>  struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id)

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

  reply	other threads:[~2016-02-19 14:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 11:28 [PATCH 1/2] drm: Add few more wrapper functions for drm panel Deepak M
2016-02-19 11:28 ` [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT Deepak M
2016-02-19 14:03   ` Jani Nikula [this message]
2016-02-19 12:37 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm: Add few more wrapper functions for drm panel Patchwork
2016-02-19 13:53 ` [PATCH 1/2] " Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2016-02-29 11:45 Deepak M
2016-02-29 11:45 ` [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT Deepak M

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=87egc8x0et.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=gaurav.k.singh@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=m.deepak@intel.com \
    --cc=shobhit.kumar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.