drm/i915: DPI FIFO empty check is not needed
Subsystems (2)
PATCH 1/2 drm/i915: DPI FIFO empty check is not needed
While sending DPI SHUTDOWN command, we cannot wait for FIFO empty as pipes are not disabled at that time. In case of MIPI we disable port first and send SHUTDOWN command while pipe is still running and FIFOs will not be empty, causing spurious error log
--- drivers/gpu/drm/i915/intel_dsi_cmd.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/gpu/drm/i915/intel_dsi_cmd.c +0 -6
@@ -404,12 +404,6 @@ int dpi_send_cmd(struct intel_dsi *intel_dsi, u32 cmd, bool hs)else cmd |=DPI_LP_MODE ; -/* DPI virtual channel?! */ - - mask =DPI_FIFO_EMPTY ; -if (wait_for ((I915_READ (MIPI_GEN_FIFO_STAT (pipe)) & mask) == mask,50 )) -DRM_ERROR ("Timeout waiting for DPI FIFO empty.\n" ); -/* clear bit */ I915_WRITE (MIPI_INTR_STAT (pipe),SPL_PKT_SENT_INTERRUPT );
Signature · 1 line
1.9.1
PATCH 2/2 drm/i915: Update the DSI ULPS entry/exit sequence
We should keep DEVICE_READY bit set in the ULPS enter sequence. In exit sequence also we should set DEVICE_READY, but thats causing blankout for me. Also exit sequence is simplified as per hw team recommendation.
This should fix -
[drm:intel_dsi_clear_device_ready] *ERROR* DSI LP not going Low
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80818
--- drivers/gpu/drm/i915/intel_dsi.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/intel_dsi.c +15 -14
@@ -117,17 +117,18 @@ static void intel_dsi_device_ready(struct intel_encoder *encoder)/* bandgap reset is needed after everytime we do power gate */ band_gap_reset (dev_priv); +I915_WRITE (MIPI_DEVICE_READY (pipe),ULPS_STATE_ENTER ); +usleep_range (2500 ,3000 ); + val =I915_READ (MIPI_PORT_CTRL (pipe));I915_WRITE (MIPI_PORT_CTRL (pipe), val |LP_OUTPUT_HOLD );usleep_range (1000 ,1500 ); -I915_WRITE (MIPI_DEVICE_READY (pipe),DEVICE_READY |ULPS_STATE_EXIT ); -usleep_range (2000 ,2500 ); -I915_WRITE (MIPI_DEVICE_READY (pipe),DEVICE_READY ); -usleep_range (2000 ,2500 ); -I915_WRITE (MIPI_DEVICE_READY (pipe),0x00 ); -usleep_range (2000 ,2500 ); + +I915_WRITE (MIPI_DEVICE_READY (pipe),ULPS_STATE_EXIT ); +usleep_range (2500 ,3000 ); +I915_WRITE (MIPI_DEVICE_READY (pipe),DEVICE_READY ); -usleep_range (2000 ,2500 ); +usleep_range (2500 ,3000 ); }static void intel_dsi_enable (struct intel_encoder *encoder)
@@ -271,23 +272,23 @@ static void intel_dsi_clear_device_ready(struct intel_encoder *encoder)DRM_DEBUG_KMS ("\n" ); -I915_WRITE (MIPI_DEVICE_READY (pipe),ULPS_STATE_ENTER ); +I915_WRITE (MIPI_DEVICE_READY (pipe),DEVICE_READY |ULPS_STATE_ENTER );usleep_range (2000 ,2500 ); -I915_WRITE (MIPI_DEVICE_READY (pipe),ULPS_STATE_EXIT ); +I915_WRITE (MIPI_DEVICE_READY (pipe),DEVICE_READY |ULPS_STATE_EXIT );usleep_range (2000 ,2500 ); -I915_WRITE (MIPI_DEVICE_READY (pipe),ULPS_STATE_ENTER ); +I915_WRITE (MIPI_DEVICE_READY (pipe),DEVICE_READY |ULPS_STATE_ENTER );usleep_range (2000 ,2500 ); - val =I915_READ (MIPI_PORT_CTRL (pipe)); -I915_WRITE (MIPI_PORT_CTRL (pipe), val & ~LP_OUTPUT_HOLD ); -usleep_range (1000 ,1500 ); -if (wait_for (((I915_READ (MIPI_PORT_CTRL (pipe)) &AFE_LATCHOUT ) ==0x00000 ),30 ))DRM_ERROR ("DSI LP not going Low\n" ); + val =I915_READ (MIPI_PORT_CTRL (pipe)); +I915_WRITE (MIPI_PORT_CTRL (pipe), val & ~LP_OUTPUT_HOLD ); +usleep_range (1000 ,1500 ); +I915_WRITE (MIPI_DEVICE_READY (pipe),0x00 );usleep_range (2000 ,2500 );
Signature · 1 line
1.9.1
Re: [PATCH 2/2] drm/i915: Update the DSI ULPS entry/exit sequence
Quoted 10 lines · Shobhit Kumar
We should keep
DEVICE_READYbit set in the ULPS enter sequence. In exit sequence also we should setDEVICE_READY, but thats causing blankout for me. Also exit sequence is simplified as per hw team recommendation.This should fix -
[drm:intel_dsi_clear_device_ready] *ERROR* DSI LP not going LowBugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80818
Signed-off-by Shobhit Kumar <[email protected]>
They silence that warning and appears to still work,
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 2/2] drm/i915: Update the DSI ULPS entry/exit sequence
Quoted 6 lines · Chris Wilson
Quoted 5 lines · Shobhit Kumar
We should keep
DEVICE_READYbit set in the ULPS enter sequence. In exit sequence also we should setDEVICE_READY, but thats causing blankout for me. Also exit sequence is simplified as per hw team recommendation.
Quoted 8 lines
Quoted 5 lines
This should fix -
[drm:intel_dsi_clear_device_ready] *ERROR* DSI LP not going LowBugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80818
Signed-off-by Shobhit Kumar <[email protected]>They silence that warning and appears to still work,
Tested-by Chris Wilson <[email protected]>
Pushed to -fixes, thanks for the patches and testing.
BR,
Jani.
Quoted 4 lines
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center