[PATCH 2/2] drm/i915/dsi: Return early if MIPI control unchanged
Mika Kahola
mika.kahola at intel.com
Thu Aug 31 07:59:41 UTC 2017
Return early if we try to send the same MIPI control two ro more
time in a row.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102404
Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index b48b9b7..6001753 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -258,12 +258,12 @@ static int dpi_send_cmd(struct intel_dsi *intel_dsi, u32 cmd, bool hs,
else
cmd |= DPI_LP_MODE;
- /* clear bit */
- I915_WRITE(MIPI_INTR_STAT(port), SPL_PKT_SENT_INTERRUPT);
-
/* XXX: old code skips write if control unchanged */
if (cmd == I915_READ(MIPI_DPI_CONTROL(port)))
- DRM_ERROR("Same special packet %02x twice in a row.\n", cmd);
+ return 0;
+
+ /* clear bit */
+ I915_WRITE(MIPI_INTR_STAT(port), SPL_PKT_SENT_INTERRUPT);
I915_WRITE(MIPI_DPI_CONTROL(port), cmd);
--
2.7.4
More information about the Intel-gfx-trybot
mailing list