[RESEND,4/7] drm/i915/dsi: run power on/off sequences in panel prepare/unprepare hooks

Submitted by Jani Nikula on June 13, 2016, 10:22 a.m.

Details

Message ID 1465813338-6706-4-git-send-email-jani.nikula@intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Jani Nikula June 13, 2016, 10:22 a.m.
Based on the documentation alone, it's anyone's guess when exactly we
should be running these sequences. Add them where it feels logical. The
drm panel hooks don't currently offer us more granularity anyway.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
index 7dd850760c4d..e0337a82a6b4 100644
--- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
@@ -459,6 +459,7 @@  static void generic_exec_sequence(struct drm_panel *panel, enum mipi_seq seq_id)
 static int vbt_panel_prepare(struct drm_panel *panel)
 {
 	generic_exec_sequence(panel, MIPI_SEQ_ASSERT_RESET);
+	generic_exec_sequence(panel, MIPI_SEQ_POWER_ON);
 	generic_exec_sequence(panel, MIPI_SEQ_INIT_OTP);
 
 	return 0;
@@ -466,6 +467,7 @@  static int vbt_panel_prepare(struct drm_panel *panel)
 
 static int vbt_panel_unprepare(struct drm_panel *panel)
 {
+	generic_exec_sequence(panel, MIPI_SEQ_POWER_OFF);
 	generic_exec_sequence(panel, MIPI_SEQ_DEASSERT_RESET);
 
 	return 0;

Comments

On Mon, Jun 13, 2016 at 01:22:15PM +0300, Jani Nikula wrote:
> Based on the documentation alone, it's anyone's guess when exactly we
> should be running these sequences. Add them where it feels logical. The
> drm panel hooks don't currently offer us more granularity anyway.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> index 7dd850760c4d..e0337a82a6b4 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> @@ -459,6 +459,7 @@ static void generic_exec_sequence(struct drm_panel *panel, enum mipi_seq seq_id)
>  static int vbt_panel_prepare(struct drm_panel *panel)
>  {
>  	generic_exec_sequence(panel, MIPI_SEQ_ASSERT_RESET);
> +	generic_exec_sequence(panel, MIPI_SEQ_POWER_ON);
>  	generic_exec_sequence(panel, MIPI_SEQ_INIT_OTP);

Indeed, our spec is useless here :(

What would make sense to me is

assert reset // just in case it wasn't already asserted
power on
deassert reset
init otp

>  
>  	return 0;
> @@ -466,6 +467,7 @@ static int vbt_panel_prepare(struct drm_panel *panel)
>  
>  static int vbt_panel_unprepare(struct drm_panel *panel)
>  {
> +	generic_exec_sequence(panel, MIPI_SEQ_POWER_OFF);
>  	generic_exec_sequence(panel, MIPI_SEQ_DEASSERT_RESET);

And here I'd do 

assert reset
power off

and nothing more.

This would also seem to agree with a few panel specs I have lying
around.

But of course I could be mistaken, eg. if the panel on/off sequeneces
themselves would had some kind of magic reset (de)assert already inside
them. Nothing in the spec suggests this though.

>  
>  	return 0;
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx