[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e22c86a-3998-c2fd-cb14-203df547eb5c@jaseg.net>
Date: Tue, 30 Jul 2019 22:48:31 +0900
From: Jan Sebastian Götte <linux@...eg.net>
To: dri-devel@...ts.freedesktop.org
Cc: Noralf Trønnes <noralf@...nnes.org>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, linux-kernel@...r.kernel.org
Subject: [PATCH 5/6] drm: uapi: add gdepaper uapi header
Signed-off-by: Jan Sebastian Götte <linux@...eg.net>
---
include/uapi/drm/gdepaper_drm.h | 62 +++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
create mode 100644 include/uapi/drm/gdepaper_drm.h
diff --git a/include/uapi/drm/gdepaper_drm.h b/include/uapi/drm/gdepaper_drm.h
new file mode 100644
index 000000000000..84ff6429bef5
--- /dev/null
+++ b/include/uapi/drm/gdepaper_drm.h
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
+/* gdepaper_drm.h
+ *
+ * Copyright (c) 2019 Jan Sebastian Götte
+ */
+
+#ifndef _UAPI_GDEPAPER_DRM_H_
+#define _UAPI_GDEPAPER_DRM_H_
+
+#include "drm.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+enum drm_gdepaper_vghl_lv {
+ DRM_GDEP_PWR_VGHL_16V = 0,
+ DRM_GDEP_PWR_VGHL_15V = 1,
+ DRM_GDEP_PWR_VGHL_14V = 2,
+ DRM_GDEP_PWR_VGHL_13V = 3,
+};
+
+struct gdepaper_refresh_params {
+ enum drm_gdepaper_vghl_lv vg_lv; /* gate voltage level */
+ __u32 vcom_sel; /* VCOM select bit according to datasheet */
+ __s32 vdh_bw_mv; /* drive high level, b/w pixel (mV) */
+ __s32 vdh_col_mv; /* drive high level, red/yellow pixel (mV) */
+ __s32 vdl_mv; /* drive low level (mV) */
+ __s32 vcom_dc_mv;
+ __u32 vcom_data_ivl_hsync; /* data ivl len in hsync periods */
+ __u32 border_data_sel; /* "vbd" in datasheet */
+ __u32 data_polarity; /* "ddx" in datasheet */
+ __u32 use_otp_luts_flag; /* Use OTP LUTs */
+ __u8 lut_vcom_dc[44];
+ __u8 lut_ww[42];
+ __u8 lut_bw[42];
+ __u8 lut_bb[42];
+ __u8 lut_wb[42];
+};
+
+/* Force a full display refresh */
+#define DRM_GDEPAPER_FORCE_FULL_REFRESH 0x00
+#define DRM_GDEPAPER_GET_REFRESH_PARAMS 0x01
+#define DRM_GDEPAPER_SET_REFRESH_PARAMS 0x02
+#define DRM_GDEPAPER_SET_PARTIAL_UPDATE_EN 0x03
+
+#define DRM_IOCTL_GDEPAPER_FORCE_FULL_REFRESH \
+ DRM_IO(DRM_COMMAND_BASE + DRM_GDEPAPER_FORCE_FULL_REFRESH)
+#define DRM_IOCTL_GDEPAPER_GET_REFRESH_PARAMS \
+ DRM_IOR(DRM_COMMAND_BASE + DRM_GDEPAPER_GET_REFRESH_PARAMS, \
+ struct gdepaper_refresh_params)
+#define DRM_IOCTL_GDEPAPER_SET_REFRESH_PARAMS \
+ DRM_IOR(DRM_COMMAND_BASE + DRM_GDEPAPER_SET_REFRESH_PARAMS, \
+ struct gdepaper_refresh_params)
+#define DRM_IOCTL_GDEPAPER_SET_PARTIAL_UPDATE_EN \
+ DRM_IOR(DRM_COMMAND_BASE + DRM_GDEPAPER_SET_PARTIAL_UPDATE_EN, __u32)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* _UAPI_GDEPAPER_DRM_H_ */
--
2.21.0
Powered by blists - more mailing lists