On 07/03/2025 10:15, Tejas Vipin wrote:
Introduces mipi_dsi_dual_msleep to make it easier to use msleep in the
case of a double-DSI panel.

Signed-off-by: Tejas Vipin <tejasvipi...@gmail.com>
---
  include/drm/drm_mipi_dsi.h | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index bd40a443385c..d9bc0d79dd82 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -306,6 +306,12 @@ ssize_t mipi_dsi_generic_read(struct mipi_dsi_device *dsi, 
const void *params,
                        usleep_range(min, max); \
        } while (0)
+#define mipi_dsi_dual_msleep(ctx1, ctx2, delay) \
+       do {                                                            \
+               if ((!(ctx1)->accum_err) || (!(ctx2)->accum_err)) \
+                       msleep(delay);                                  \
+       } while (0)
+
  /**
   * enum mipi_dsi_dcs_tear_mode - Tearing Effect Output Line mode
   * @MIPI_DSI_DCS_TEAR_MODE_VBLANK: the TE output line consists of V-Blanking

Reviewed-by: Neil Armstrong <neil.armstr...@linaro.org>

Reply via email to