[PATCH v2 5/8] drm/mipi-dsi: add set column/page multi helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Introduce mipi_dsi_dcs_set_column_address_multi() and
mipi_dsi_dcs_set_page_address_multi() helpers.

Signed-off-by: Caleb Connolly <caleb@xxxxxxxxxxxxxxxx>
---
 include/drm/drm_mipi_dsi.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index fb23f4e3b94e..f390bd261be7 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -434,8 +434,24 @@ void mipi_dsi_dcs_set_tear_on_multi(struct mipi_dsi_multi_context *ctx,
 		static const u8 d[] = { cmd, seq };                     \
 		mipi_dsi_dcs_write_buffer_multi(ctx, d, ARRAY_SIZE(d)); \
 	} while (0)
 
+#define mipi_dsi_dcs_set_column_address_multi(ctx, start, end)          \
+	do {                                                            \
+		static const u8 d[] = { MIPI_DCS_SET_COLUMN_ADDRESS,    \
+					(start) >> 8, (start) & 0xff,   \
+					(end) >> 8, (end) & 0xff };     \
+		mipi_dsi_dcs_write_buffer_multi(ctx, d, ARRAY_SIZE(d)); \
+	} while (0)
+
+#define mipi_dsi_dcs_set_page_address_multi(ctx, start, end)            \
+	do {                                                            \
+		static const u8 d[] = { MIPI_DCS_SET_PAGE_ADDRESS,      \
+					(start) >> 8, (start) & 0xff,   \
+					(end) >> 8, (end) & 0xff };     \
+		mipi_dsi_dcs_write_buffer_multi(ctx, d, ARRAY_SIZE(d)); \
+	} while (0)
+
 /**
  * mipi_dsi_dcs_write_long_multi - transmit a DCS long command with payload
  * @ctx: Context for multiple DSI transactions
  * @cmd: Commands

-- 
2.45.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux