1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Copyright (c) 2020 Rockchip Electronics Co., Ltd. 4 * 5 * Author: Zorro Liu <zorro.liu@rock-chips.com> 6 */ 7 8 #ifndef EPD_LUT_H 9 #define EPD_LUT_H 10 11 #define MAXFRAME 255 12 13 #define WF_4BIT 16 14 #define WF_5BIT 32 15 16 // same to pvi_wf_mode 17 enum epd_lut_type { 18 WF_TYPE_RESET = 0, 19 WF_TYPE_GRAY2, // like DU 20 WF_TYPE_GRAY4, // like DU4 21 WF_TYPE_GC16, 22 WF_TYPE_GL16, 23 WF_TYPE_GLR16, 24 WF_TYPE_GLD16, 25 WF_TYPE_A2, 26 WF_TYPE_GCC16, 27 PVI_WF_MAX, 28 29 WF_TYPE_AUTO, // like GC16, rk define 30 WF_TYPE_RK_GLR16, // for part regal mode 31 WF_TYPE_RK_GLD16, // for part regal mode 32 WF_TYPE_RK_GL16, // for part gl16 mode 33 WF_TYPE_RK_GC16, // for part gc16 mode 34 WF_TYPE_MAX, 35 WF_TYPE_GRAY16, 36 }; 37 38 struct epd_lut_data { 39 unsigned int frame_num; 40 unsigned int *data; 41 u8 *wf_table[2]; 42 }; 43 44 /* 45 * EPD LUT module export symbols 46 */ 47 int epd_lut_from_mem_init(void *waveform); 48 const char *epd_lut_get_wf_version(void); 49 int epd_lut_get(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperture, int pic, int regal_pix); 50 51 //you can change overlay lut mode here 52 int epd_overlay_lut(void); 53 54 /* 55 * PVI Waveform Interfaces 56 */ 57 int pvi_wf_input(void *waveform_file); 58 int pvi_wf_add_custom_mode_table(u8 *table, int size); 59 const char *pvi_wf_get_version(void); 60 int pvi_wf_get_lut(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperture, int pic, int regal_pix); 61 62 /* 63 * RKF Waveform Interfaces 64 */ 65 int rkf_wf_input(void *waveform_file); 66 const char *rkf_wf_get_version(void); 67 int rkf_wf_get_lut(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperture, int pic, int regal_pix); 68 #endif 69