drm/i915: MIPI PPS delays added
authorShobhit Kumar <shobhit.kumar@intel.com>
Mon, 14 Apr 2014 05:48:26 +0000 (11:18 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 15 May 2014 20:44:21 +0000 (22:44 +0200)
Added as generic parameters which will be initialized in the panel
driver and are specific to panels.

Backlight delays have also kept as placeholders and will be used used
once we have MIPI backlight enabling support

Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dsi.c
drivers/gpu/drm/i915/intel_dsi.h

index 09b931881f95bcebe4b99e3ce98cb6dc47d59a9d..0d4dd548d8d78c0761b048801a0e85a4f9835f8c 100644 (file)
@@ -185,6 +185,8 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder)
        /* put device in ready state */
        intel_dsi_device_ready(encoder);
 
+       msleep(intel_dsi->panel_on_delay);
+
        if (intel_dsi->dev.dev_ops->panel_reset)
                intel_dsi->dev.dev_ops->panel_reset(&intel_dsi->dev);
 
@@ -301,6 +303,9 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder)
 
        if (intel_dsi->dev.dev_ops->disable_panel_power)
                intel_dsi->dev.dev_ops->disable_panel_power(&intel_dsi->dev);
+
+       msleep(intel_dsi->panel_off_delay);
+       msleep(intel_dsi->panel_pwr_cycle_delay);
 }
 
 static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
index be132c54cc463e635f250cb8d599d45b3fddceb9..e3f4e91c526f6693940c0cd1322e794b2dc43693 100644 (file)
@@ -116,6 +116,13 @@ struct intel_dsi {
        u16 clk_hs_to_lp_count;
 
        u16 init_count;
+
+       /* all delays in ms */
+       u16 backlight_off_delay;
+       u16 backlight_on_delay;
+       u16 panel_on_delay;
+       u16 panel_off_delay;
+       u16 panel_pwr_cycle_delay;
 };
 
 static inline struct intel_dsi *enc_to_intel_dsi(struct drm_encoder *encoder)