Skip to content

Commit 6fdb335

Browse files
committed
drm/i915/dsi: Use unconditional msleep for the panel_on_delay when there is no reset-deassert MIPI-sequence
Commit 25b4620 ("drm/i915/dsi: Skip delays for v3 VBTs in vid-mode") added an intel_dsi_msleep() helper which skips sleeping if the MIPI-sequences have a version of 3 or newer and the panel is in vid-mode; and it moved a bunch of msleep-s over to this new helper. This was based on my reading of the big comment around line 730 which starts with "Panel enable/disable sequences from the VBT spec.", where the "v3 video mode seq" column does not have any wait t# entries. Given that this code has been used on a lot of different devices without issues until now, it seems that my interpretation of the spec here is mostly correct. But now I have encountered one device, an Acer Aspire Switch 10 E SW3-016, where the panel will not light up unless we do actually honor the panel_on_delay after exexuting the MIPI_SEQ_PANEL_ON sequence. What seems to set this model apart is that it is lacking a MIPI_SEQ_DEASSERT_RESET sequence, which is where the power-on delay usually happens. Fix the panel not lighting up on this model by using an unconditional msleep(panel_on_delay) instead of intel_dsi_msleep() when there is no MIPI_SEQ_DEASSERT_RESET sequence. Fixes: 25b4620 ("drm/i915/dsi: Skip delays for v3 VBTs in vid-mode") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201118124058.26021-1-hdegoede@redhat.com
1 parent ec9c2e0 commit 6fdb335

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

drivers/gpu/drm/i915/display/vlv_dsi.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,10 +812,20 @@ static void intel_dsi_pre_enable(struct intel_atomic_state *state,
812812
intel_dsi_prepare(encoder, pipe_config);
813813

814814
intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
815-
intel_dsi_msleep(intel_dsi, intel_dsi->panel_on_delay);
816815

817-
/* Deassert reset */
818-
intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
816+
/*
817+
* Give the panel time to power-on and then deassert its reset.
818+
* Depending on the VBT MIPI sequences version the deassert-seq
819+
* may contain the necessary delay, intel_dsi_msleep() will skip
820+
* the delay in that case. If there is no deassert-seq, then an
821+
* unconditional msleep is used to give the panel time to power-on.
822+
*/
823+
if (dev_priv->vbt.dsi.sequence[MIPI_SEQ_DEASSERT_RESET]) {
824+
intel_dsi_msleep(intel_dsi, intel_dsi->panel_on_delay);
825+
intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
826+
} else {
827+
msleep(intel_dsi->panel_on_delay);
828+
}
819829

820830
if (IS_GEMINILAKE(dev_priv)) {
821831
glk_cold_boot = glk_dsi_enable_io(encoder);

0 commit comments

Comments
 (0)