* drm/i915/dsi: the rest of Hans' DSI patches
@ 2017-03-01 13:14 Jani Nikula
2017-03-01 13:14 ` [PATCH RESEND FOR CI 01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec Jani Nikula
` (10 more replies)
0 siblings, 11 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:14 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
Resending again to get CI...
BR,
Jani.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
@ 2017-03-01 13:14 ` Jani Nikula
2017-03-01 13:14 ` [PATCH RESEND FOR CI 02/10] drm/i915/dsi: Drop bogus MIPI_SEQ_ASSERT_RESET before POWER_ON Jani Nikula
` (9 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:14 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
Document the DSI panel enable / disable sequences from the spec,
for easy comparison between the code and the spec.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 8e97bae378f1..234592c62141 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -725,6 +725,43 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder,
struct intel_crtc_state *pipe_config);
static void intel_dsi_unprepare(struct intel_encoder *encoder);
+/*
+ * Panel enable/disable sequences from the VBT spec.
+ *
+ * Note the spec has AssertReset / DeassertReset swapped from their
+ * usual naming. We use the normal names to avoid confusion (so below
+ * they are swapped compared to the spec).
+ *
+ * Steps starting with MIPI refer to VBT sequences, note that for v2
+ * VBTs several steps which have a VBT in v2 are expected to be handled
+ * directly by the driver, by directly driving gpios for example.
+ *
+ * v2 video mode seq v3 video mode seq command mode seq
+ * - power on - MIPIPanelPowerOn - power on
+ * - wait t1+t2 - wait t1+t2
+ * - MIPIDeassertResetPin - MIPIDeassertResetPin - MIPIDeassertResetPin
+ * - io lines to lp-11 - io lines to lp-11 - io lines to lp-11
+ * - MIPISendInitialDcsCmds - MIPISendInitialDcsCmds - MIPISendInitialDcsCmds
+ * - MIPITearOn
+ * - MIPIDisplayOn
+ * - turn on DPI - turn on DPI - set pipe to dsr mode
+ * - MIPIDisplayOn - MIPIDisplayOn
+ * - wait t5 - wait t5
+ * - backlight on - MIPIBacklightOn - backlight on
+ * ... ... ... issue mem cmds ...
+ * - backlight off - MIPIBacklightOff - backlight off
+ * - wait t6 - wait t6
+ * - MIPIDisplayOff
+ * - turn off DPI - turn off DPI - disable pipe dsr mode
+ * - MIPITearOff
+ * - MIPIDisplayOff - MIPIDisplayOff
+ * - io lines to lp-00 - io lines to lp-00 - io lines to lp-00
+ * - MIPIAssertResetPin - MIPIAssertResetPin - MIPIAssertResetPin
+ * - wait t3 - wait t3
+ * - power off - MIPIPanelPowerOff - power off
+ * - wait t4 - wait t4
+ */
+
static void intel_dsi_pre_enable(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 02/10] drm/i915/dsi: Drop bogus MIPI_SEQ_ASSERT_RESET before POWER_ON
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
2017-03-01 13:14 ` [PATCH RESEND FOR CI 01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec Jani Nikula
@ 2017-03-01 13:14 ` Jani Nikula
2017-03-01 13:14 ` [PATCH RESEND FOR CI 03/10] drm/i915/dsi: Move MIPI_SEQ_POWER_ON/OFF calls together with pmic gpio calls Jani Nikula
` (8 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:14 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
intel_dsi_post_disable(), which does the MIPI_SEQ_ASSERT_RESET,
will always be called at some point before intel_dsi_pre_enable()
making the MIPI_SEQ_ASSERT_RESET in intel_dsi_pre_enable() redundant.
In addition, calling MIPI_SEQ_ASSERT_RESET in the enable path goes
against the VBT spec.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 234592c62141..f9b0767ef073 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -811,7 +811,6 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
/* put device in ready state */
intel_dsi_device_ready(encoder);
- intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_ASSERT_RESET);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_INIT_OTP);
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 03/10] drm/i915/dsi: Move MIPI_SEQ_POWER_ON/OFF calls together with pmic gpio calls
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
2017-03-01 13:14 ` [PATCH RESEND FOR CI 01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec Jani Nikula
2017-03-01 13:14 ` [PATCH RESEND FOR CI 02/10] drm/i915/dsi: Drop bogus MIPI_SEQ_ASSERT_RESET before POWER_ON Jani Nikula
@ 2017-03-01 13:14 ` Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 04/10] drm/i915/dsi: Group DPOunit clock gate workaround with PLL enable Jani Nikula
` (7 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:14 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
Now that we are no longer bound to the drm_panel_ callbacks, call
MIPI_SEQ_POWER_ON/OFF at the proper place.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index f9b0767ef073..ab905474b9dd 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -793,10 +793,10 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
intel_dsi_prepare(encoder, pipe_config);
- /* Panel Enable over CRC PMIC */
+ /* Power on, try both CRC pmic gpio and VBT */
if (intel_dsi->gpio_panel)
gpiod_set_value_cansleep(intel_dsi->gpio_panel, 1);
-
+ intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
msleep(intel_dsi->panel_on_delay);
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
@@ -811,7 +811,6 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
/* put device in ready state */
intel_dsi_device_ready(encoder);
- intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_INIT_OTP);
@@ -940,11 +939,10 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,
}
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_ASSERT_RESET);
- intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_OFF);
+ /* Power off, try both CRC pmic gpio and VBT */
msleep(intel_dsi->panel_off_delay);
-
- /* Panel Disable over CRC PMIC */
+ intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_OFF);
if (intel_dsi->gpio_panel)
gpiod_set_value_cansleep(intel_dsi->gpio_panel, 0);
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 04/10] drm/i915/dsi: Group DPOunit clock gate workaround with PLL enable
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
` (2 preceding siblings ...)
2017-03-01 13:14 ` [PATCH RESEND FOR CI 03/10] drm/i915/dsi: Move MIPI_SEQ_POWER_ON/OFF calls together with pmic gpio calls Jani Nikula
@ 2017-03-01 13:15 ` Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 05/10] drm/i915/dsi: Execute MIPI_SEQ_DEASSERT_RESET before calling device_ready() Jani Nikula
` (6 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:15 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
Move the DPOunit clock gate workaround to directly after the PLL enable.
The exact location of the workaround does not matter and there are 2
reasons to group it with the PLL enable:
1) This moves it out of the middle of the init sequence from the spec,
making it easier to follow the init sequence / compare it to the spec
2) It is grouped with the pll disable call in intel_dsi_post_disable,
so for consistency it should be grouped with the pll enable in
intel_dsi_pre_enable
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index ab905474b9dd..da798a579e11 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -791,14 +791,6 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
I915_WRITE(BXT_P_DSI_REGULATOR_TX_CTRL, 0);
}
- intel_dsi_prepare(encoder, pipe_config);
-
- /* Power on, try both CRC pmic gpio and VBT */
- if (intel_dsi->gpio_panel)
- gpiod_set_value_cansleep(intel_dsi->gpio_panel, 1);
- intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
- msleep(intel_dsi->panel_on_delay);
-
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
u32 val;
@@ -808,6 +800,14 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
I915_WRITE(DSPCLK_GATE_D, val);
}
+ intel_dsi_prepare(encoder, pipe_config);
+
+ /* Power on, try both CRC pmic gpio and VBT */
+ if (intel_dsi->gpio_panel)
+ gpiod_set_value_cansleep(intel_dsi->gpio_panel, 1);
+ intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
+ msleep(intel_dsi->panel_on_delay);
+
/* put device in ready state */
intel_dsi_device_ready(encoder);
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 05/10] drm/i915/dsi: Execute MIPI_SEQ_DEASSERT_RESET before calling device_ready()
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
` (3 preceding siblings ...)
2017-03-01 13:15 ` [PATCH RESEND FOR CI 04/10] drm/i915/dsi: Group DPOunit clock gate workaround with PLL enable Jani Nikula
@ 2017-03-01 13:15 ` Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 06/10] drm/i915/dsi: Group MIPI_SEQ_BACKLIGHT_ON/OFF with panel_[en|dis]able_backlight Jani Nikula
` (5 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:15 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
Execute MIPI_SEQ_DEASSERT_RESET before putting the device in ready
state (LP-11), this is the sequence in which things should be done
according to the spec.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index da798a579e11..b7b590d78b31 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -808,10 +808,13 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
msleep(intel_dsi->panel_on_delay);
- /* put device in ready state */
+ /* Deassert reset */
+ intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
+
+ /* Put device in ready state (LP-11) */
intel_dsi_device_ready(encoder);
- intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
+ /* Send initialization commands in LP mode */
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_INIT_OTP);
/* Enable port in pre-enable phase itself because as per hw team
@@ -915,6 +918,7 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_OFF);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DISPLAY_OFF);
+ /* Transition to LP-00 */
intel_dsi_clear_device_ready(encoder);
if (IS_BROXTON(dev_priv)) {
@@ -938,6 +942,7 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,
I915_WRITE(DSPCLK_GATE_D, val);
}
+ /* Assert reset */
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_ASSERT_RESET);
/* Power off, try both CRC pmic gpio and VBT */
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 06/10] drm/i915/dsi: Group MIPI_SEQ_BACKLIGHT_ON/OFF with panel_[en|dis]able_backlight
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
` (4 preceding siblings ...)
2017-03-01 13:15 ` [PATCH RESEND FOR CI 05/10] drm/i915/dsi: Execute MIPI_SEQ_DEASSERT_RESET before calling device_ready() Jani Nikula
@ 2017-03-01 13:15 ` Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 07/10] drm/i915/dsi: Document always using v3 SHUTDOWN / MIPI_SEQ_DISPLAY_OFF order Jani Nikula
` (4 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:15 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
Execute the MIPI_SEQ_BACKLIGHT_ON/OFF VBT sequences at the same time as
we call intel_panel_enable_backlight() / intel_panel_disable_backlight().
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index b7b590d78b31..b132841587cc 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -829,12 +829,12 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
msleep(100);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DISPLAY_ON);
- intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_ON);
intel_dsi_port_enable(encoder);
}
intel_panel_enable_backlight(intel_dsi->attached_connector);
+ intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_ON);
}
static void intel_dsi_enable_nop(struct intel_encoder *encoder,
@@ -860,6 +860,7 @@ static void intel_dsi_pre_disable(struct intel_encoder *encoder,
DRM_DEBUG_KMS("\n");
+ intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_OFF);
intel_panel_disable_backlight(intel_dsi->attached_connector);
/*
@@ -915,7 +916,6 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,
* if disable packets are sent before sending shutdown packet then in
* some next enable sequence send turn on packet error is observed
*/
- intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_OFF);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DISPLAY_OFF);
/* Transition to LP-00 */
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 07/10] drm/i915/dsi: Document always using v3 SHUTDOWN / MIPI_SEQ_DISPLAY_OFF order
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
` (5 preceding siblings ...)
2017-03-01 13:15 ` [PATCH RESEND FOR CI 06/10] drm/i915/dsi: Group MIPI_SEQ_BACKLIGHT_ON/OFF with panel_[en|dis]able_backlight Jani Nikula
@ 2017-03-01 13:15 ` Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 08/10] drm/i915/dsi: Execute MIPI_SEQ_TEAR_OFF from intel_dsi_post_disable Jani Nikula
` (3 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:15 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
According to the spec for v2 VBTs we should call MIPI_SEQ_DISPLAY_OFF
before sending SHUTDOWN, where as for v3 VBTs we should send SHUTDOWN
first.
Since the v2 order has known issues, we use the v3 order everywhere,
add a comment documenting this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index b132841587cc..5a50645c3a37 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -872,6 +872,11 @@ static void intel_dsi_pre_disable(struct intel_encoder *encoder,
I915_WRITE(MIPI_DEVICE_READY(port), 0);
}
+ /*
+ * According to the spec we should send SHUTDOWN before
+ * MIPI_SEQ_DISPLAY_OFF only for v3+ VBTs, but field testing
+ * has shown that the v3 sequence works for v2 VBTs too
+ */
if (is_vid_mode(intel_dsi)) {
/* Send Shutdown command to the panel in LP mode */
for_each_dsi_port(port, intel_dsi->ports)
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 08/10] drm/i915/dsi: Execute MIPI_SEQ_TEAR_OFF from intel_dsi_post_disable
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
` (6 preceding siblings ...)
2017-03-01 13:15 ` [PATCH RESEND FOR CI 07/10] drm/i915/dsi: Document always using v3 SHUTDOWN / MIPI_SEQ_DISPLAY_OFF order Jani Nikula
@ 2017-03-01 13:15 ` Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 09/10] drm/i915/dsi: Call MIPI_SEQ_TEAR_ON and DISPLAY_ON for cmd-mode (untested) Jani Nikula
` (2 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:15 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
For v3+ VBTs we should call MIPI_SEQ_TEAR_OFF before MIPI_SEQ_DISPLAY_OFF,
v2 VBTs do not have MIPI_SEQ_TEAR_OFF so there this is a nop.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 5a50645c3a37..7dbef67a5fa0 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -921,6 +921,8 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,
* if disable packets are sent before sending shutdown packet then in
* some next enable sequence send turn on packet error is observed
*/
+ if (is_cmd_mode(intel_dsi))
+ intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_TEAR_OFF);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DISPLAY_OFF);
/* Transition to LP-00 */
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 09/10] drm/i915/dsi: Call MIPI_SEQ_TEAR_ON and DISPLAY_ON for cmd-mode (untested)
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
` (7 preceding siblings ...)
2017-03-01 13:15 ` [PATCH RESEND FOR CI 08/10] drm/i915/dsi: Execute MIPI_SEQ_TEAR_OFF from intel_dsi_post_disable Jani Nikula
@ 2017-03-01 13:15 ` Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 10/10] drm/i915/dsi: Skip delays for v3 VBTs in vid-mode Jani Nikula
2017-03-01 13:50 ` ✗ Fi.CI.BAT: failure for series starting with [RESEND,FOR,CI,01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec Patchwork
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:15 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
According to the spec we should call MIPI_SEQ_TEAR_ON and DISPLAY_ON
on enable for cmd-mode, just like we already call their counterparts
on disable. Note: untested, my panel is a vid-mode panel.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 7dbef67a5fa0..7d5fb9d3fa64 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -822,6 +822,8 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
if (is_cmd_mode(intel_dsi)) {
for_each_dsi_port(port, intel_dsi->ports)
I915_WRITE(MIPI_MAX_RETURN_PKT_SIZE(port), 8 * 4);
+ intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_TEAR_ON);
+ intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DISPLAY_ON);
} else {
msleep(20); /* XXX */
for_each_dsi_port(port, intel_dsi->ports)
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RESEND FOR CI 10/10] drm/i915/dsi: Skip delays for v3 VBTs in vid-mode
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
` (8 preceding siblings ...)
2017-03-01 13:15 ` [PATCH RESEND FOR CI 09/10] drm/i915/dsi: Call MIPI_SEQ_TEAR_ON and DISPLAY_ON for cmd-mode (untested) Jani Nikula
@ 2017-03-01 13:15 ` Jani Nikula
2017-03-01 13:50 ` ✗ Fi.CI.BAT: failure for series starting with [RESEND,FOR,CI,01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec Patchwork
10 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 13:15 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Hans de Goede
From: Hans de Goede <hdegoede@redhat.com>
For v3 VBTs in vid-mode the delays are part of the VBT sequences, so
we should not also delay ourselves otherwise we get double delays.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 7d5fb9d3fa64..dd38b6835528 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -725,6 +725,17 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder,
struct intel_crtc_state *pipe_config);
static void intel_dsi_unprepare(struct intel_encoder *encoder);
+static void intel_dsi_msleep(struct intel_dsi *intel_dsi, int msec)
+{
+ struct drm_i915_private *dev_priv = to_i915(intel_dsi->base.base.dev);
+
+ /* For v3 VBTs in vid-mode the delays are part of the VBT sequences */
+ if (is_vid_mode(intel_dsi) && dev_priv->vbt.dsi.seq_version >= 3)
+ return;
+
+ msleep(msec);
+}
+
/*
* Panel enable/disable sequences from the VBT spec.
*
@@ -806,7 +817,7 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
if (intel_dsi->gpio_panel)
gpiod_set_value_cansleep(intel_dsi->gpio_panel, 1);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
- msleep(intel_dsi->panel_on_delay);
+ intel_dsi_msleep(intel_dsi, intel_dsi->panel_on_delay);
/* Deassert reset */
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
@@ -828,7 +839,7 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
msleep(20); /* XXX */
for_each_dsi_port(port, intel_dsi->ports)
dpi_send_cmd(intel_dsi, TURN_ON, false, port);
- msleep(100);
+ intel_dsi_msleep(intel_dsi, 100);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_DISPLAY_ON);
@@ -955,7 +966,7 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_ASSERT_RESET);
/* Power off, try both CRC pmic gpio and VBT */
- msleep(intel_dsi->panel_off_delay);
+ intel_dsi_msleep(intel_dsi, intel_dsi->panel_off_delay);
intel_dsi_exec_vbt_sequence(intel_dsi, MIPI_SEQ_POWER_OFF);
if (intel_dsi->gpio_panel)
gpiod_set_value_cansleep(intel_dsi->gpio_panel, 0);
@@ -964,7 +975,7 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,
* FIXME As we do with eDP, just make a note of the time here
* and perform the wait before the next panel power on.
*/
- msleep(intel_dsi->panel_pwr_cycle_delay);
+ intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
}
static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* ✗ Fi.CI.BAT: failure for series starting with [RESEND,FOR,CI,01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
` (9 preceding siblings ...)
2017-03-01 13:15 ` [PATCH RESEND FOR CI 10/10] drm/i915/dsi: Skip delays for v3 VBTs in vid-mode Jani Nikula
@ 2017-03-01 13:50 ` Patchwork
2017-03-01 14:02 ` Jani Nikula
10 siblings, 1 reply; 13+ messages in thread
From: Patchwork @ 2017-03-01 13:50 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [RESEND,FOR,CI,01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec
URL : https://patchwork.freedesktop.org/series/20456/
State : failure
== Summary ==
Series 20456v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/20456/revisions/1/mbox/
Test gem_exec_fence:
Subgroup await-hang-default:
incomplete -> PASS (fi-hsw-4770) fdo#99726
Test gem_exec_reloc:
Subgroup basic-write-gtt-active:
pass -> INCOMPLETE (fi-byt-j1900)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> PASS (fi-bsw-n3050)
fdo#99726 https://bugs.freedesktop.org/show_bug.cgi?id=99726
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11
fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19
fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20
fi-byt-j1900 total:96 pass:86 dwarn:0 dfail:0 fail:0 skip:9
fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31
fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16
fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50
fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18
fi-kbl-7500u total:278 pass:259 dwarn:1 dfail:0 fail:0 skip:18
fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10
fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17
fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18
fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28
fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29
73ef819d4281caf11663007299032aee4a388ad6 drm-tip: 2017y-03m-01d-11h-16m-44s UTC integration manifest
d7be9a5 drm/i915/dsi: Skip delays for v3 VBTs in vid-mode
64b2987 drm/i915/dsi: Call MIPI_SEQ_TEAR_ON and DISPLAY_ON for cmd-mode (untested)
22bb143 drm/i915/dsi: Execute MIPI_SEQ_TEAR_OFF from intel_dsi_post_disable
e6edb17 drm/i915/dsi: Document always using v3 SHUTDOWN / MIPI_SEQ_DISPLAY_OFF order
1c58d25f drm/i915/dsi: Group MIPI_SEQ_BACKLIGHT_ON/OFF with panel_[en|dis]able_backlight
a66cd5f drm/i915/dsi: Execute MIPI_SEQ_DEASSERT_RESET before calling device_ready()
7e41705 drm/i915/dsi: Group DPOunit clock gate workaround with PLL enable
26833c8 drm/i915/dsi: Move MIPI_SEQ_POWER_ON/OFF calls together with pmic gpio calls
17004c5 drm/i915/dsi: Drop bogus MIPI_SEQ_ASSERT_RESET before POWER_ON
579e545 drm/i915/dsi: Document the panel enable / disable sequences from the spec
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4015/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: ✗ Fi.CI.BAT: failure for series starting with [RESEND,FOR,CI,01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec
2017-03-01 13:50 ` ✗ Fi.CI.BAT: failure for series starting with [RESEND,FOR,CI,01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec Patchwork
@ 2017-03-01 14:02 ` Jani Nikula
0 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2017-03-01 14:02 UTC (permalink / raw)
To: intel-gfx, Hans de Goede, Paauwe, Bob J
On Wed, 01 Mar 2017, Patchwork <patchwork@emeril.freedesktop.org> wrote:
> == Series Details ==
>
> Series: series starting with [RESEND,FOR,CI,01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec
> URL : https://patchwork.freedesktop.org/series/20456/
> State : failure
>
> == Summary ==
>
> Series 20456v1 Series without cover letter
> https://patchwork.freedesktop.org/api/1.0/series/20456/revisions/1/mbox/
>
> Test gem_exec_fence:
> Subgroup await-hang-default:
> incomplete -> PASS (fi-hsw-4770) fdo#99726
> Test gem_exec_reloc:
> Subgroup basic-write-gtt-active:
> pass -> INCOMPLETE (fi-byt-j1900)
Should not have anything to do with DSI patches.
Pushed the lot, thanks for the patches and review.
BR,
Jani.
> Test kms_pipe_crc_basic:
> Subgroup suspend-read-crc-pipe-c:
> dmesg-warn -> PASS (fi-bsw-n3050)
>
> fdo#99726 https://bugs.freedesktop.org/show_bug.cgi?id=99726
>
> fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11
> fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39
> fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19
> fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20
> fi-byt-j1900 total:96 pass:86 dwarn:0 dfail:0 fail:0 skip:9
> fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31
> fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16
> fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16
> fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50
> fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18
> fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18
> fi-kbl-7500u total:278 pass:259 dwarn:1 dfail:0 fail:0 skip:18
> fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10
> fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17
> fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18
> fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10
> fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28
> fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29
>
> 73ef819d4281caf11663007299032aee4a388ad6 drm-tip: 2017y-03m-01d-11h-16m-44s UTC integration manifest
> d7be9a5 drm/i915/dsi: Skip delays for v3 VBTs in vid-mode
> 64b2987 drm/i915/dsi: Call MIPI_SEQ_TEAR_ON and DISPLAY_ON for cmd-mode (untested)
> 22bb143 drm/i915/dsi: Execute MIPI_SEQ_TEAR_OFF from intel_dsi_post_disable
> e6edb17 drm/i915/dsi: Document always using v3 SHUTDOWN / MIPI_SEQ_DISPLAY_OFF order
> 1c58d25f drm/i915/dsi: Group MIPI_SEQ_BACKLIGHT_ON/OFF with panel_[en|dis]able_backlight
> a66cd5f drm/i915/dsi: Execute MIPI_SEQ_DEASSERT_RESET before calling device_ready()
> 7e41705 drm/i915/dsi: Group DPOunit clock gate workaround with PLL enable
> 26833c8 drm/i915/dsi: Move MIPI_SEQ_POWER_ON/OFF calls together with pmic gpio calls
> 17004c5 drm/i915/dsi: Drop bogus MIPI_SEQ_ASSERT_RESET before POWER_ON
> 579e545 drm/i915/dsi: Document the panel enable / disable sequences from the spec
>
> == Logs ==
>
> For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4015/
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-03-01 14:02 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-01 13:14 drm/i915/dsi: the rest of Hans' DSI patches Jani Nikula
2017-03-01 13:14 ` [PATCH RESEND FOR CI 01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec Jani Nikula
2017-03-01 13:14 ` [PATCH RESEND FOR CI 02/10] drm/i915/dsi: Drop bogus MIPI_SEQ_ASSERT_RESET before POWER_ON Jani Nikula
2017-03-01 13:14 ` [PATCH RESEND FOR CI 03/10] drm/i915/dsi: Move MIPI_SEQ_POWER_ON/OFF calls together with pmic gpio calls Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 04/10] drm/i915/dsi: Group DPOunit clock gate workaround with PLL enable Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 05/10] drm/i915/dsi: Execute MIPI_SEQ_DEASSERT_RESET before calling device_ready() Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 06/10] drm/i915/dsi: Group MIPI_SEQ_BACKLIGHT_ON/OFF with panel_[en|dis]able_backlight Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 07/10] drm/i915/dsi: Document always using v3 SHUTDOWN / MIPI_SEQ_DISPLAY_OFF order Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 08/10] drm/i915/dsi: Execute MIPI_SEQ_TEAR_OFF from intel_dsi_post_disable Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 09/10] drm/i915/dsi: Call MIPI_SEQ_TEAR_ON and DISPLAY_ON for cmd-mode (untested) Jani Nikula
2017-03-01 13:15 ` [PATCH RESEND FOR CI 10/10] drm/i915/dsi: Skip delays for v3 VBTs in vid-mode Jani Nikula
2017-03-01 13:50 ` ✗ Fi.CI.BAT: failure for series starting with [RESEND,FOR,CI,01/10] drm/i915/dsi: Document the panel enable / disable sequences from the spec Patchwork
2017-03-01 14:02 ` Jani Nikula
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.