| .. | .. |
|---|
| 11 | 11 | #include <linux/notifier.h> |
|---|
| 12 | 12 | |
|---|
| 13 | 13 | /* |
|---|
| 14 | | -* max support panel size 2560x1920 |
|---|
| 14 | +* max support panel size 2232x1680 |
|---|
| 15 | 15 | * ebc module display buf use 4bit per pixel |
|---|
| 16 | 16 | * eink module display buf use 8bit per pixel |
|---|
| 17 | 17 | * ebc module direct mode display buf use 2bit per pixel |
|---|
| 18 | 18 | */ |
|---|
| 19 | 19 | #define EBC_FB_SIZE 0x200000 /* 2M */ |
|---|
| 20 | | -#define EINK_FB_SIZE 0x500000 /* 5M */ |
|---|
| 21 | | -#define DIRECT_FB_SIZE 0x200000 /* 2M */ |
|---|
| 22 | | -#define LUT_TABLE_SIZE 0x100000 /* 1M */ |
|---|
| 23 | | -#define FRAME_COUNT_SIZE 0x500000 /* 5M */ |
|---|
| 20 | +#define EINK_FB_SIZE 0x400000 /* 4M */ |
|---|
| 21 | +#define DIRECT_FB_SIZE 0x100000 /* 1M */ |
|---|
| 24 | 22 | |
|---|
| 25 | 23 | #define MAX_FB_NUM 4 |
|---|
| 26 | 24 | |
|---|
| 27 | 25 | #define EBC_SUCCESS (0) |
|---|
| 28 | 26 | #define EBC_ERROR (-1) |
|---|
| 29 | | - |
|---|
| 30 | | -#define WF_4BIT 16 |
|---|
| 31 | | -#define WF_5BIT 32 |
|---|
| 32 | | - |
|---|
| 33 | | -/* |
|---|
| 34 | | -* ebc buf format |
|---|
| 35 | | -*/ |
|---|
| 36 | | -#define EBC_Y4 (0) |
|---|
| 37 | | -#define EBC_Y8 (1) |
|---|
| 38 | 27 | |
|---|
| 39 | 28 | /* |
|---|
| 40 | 29 | * ebc status notify |
|---|
| .. | .. |
|---|
| 47 | 36 | /* |
|---|
| 48 | 37 | * ebc system ioctl command |
|---|
| 49 | 38 | */ |
|---|
| 50 | | -#define EBC_GET_BUFFER (0x7000) |
|---|
| 51 | | -#define EBC_SEND_BUFFER (0x7001) |
|---|
| 52 | | -#define EBC_GET_BUFFER_INFO (0x7002) |
|---|
| 39 | +#define EBC_GET_BUFFER (0x7000) |
|---|
| 40 | +#define EBC_SEND_BUFFER (0x7001) |
|---|
| 41 | +#define EBC_GET_BUFFER_INFO (0x7002) |
|---|
| 53 | 42 | #define EBC_SET_FULL_MODE_NUM (0x7003) |
|---|
| 54 | | -#define EBC_ENABLE_OVERLAY (0x7004) |
|---|
| 55 | | -#define EBC_DISABLE_OVERLAY (0x7005) |
|---|
| 56 | | -#define EBC_GET_OSD_BUFFER (0x7006) |
|---|
| 57 | | -#define EBC_SEND_OSD_BUFFER (0x7007) |
|---|
| 58 | | -#define EBC_NEW_BUF_PREPARE (0x7008) |
|---|
| 59 | | -#define EBC_SET_DIFF_PERCENT (0x7009) |
|---|
| 60 | | -#define EBC_WAIT_NEW_BUF_TIME (0x700a) |
|---|
| 61 | | -#define EBC_GET_OVERLAY_STATUS (0x700b) |
|---|
| 62 | | -#define EBC_ENABLE_BG_CONTROL (0x700c) |
|---|
| 63 | | -#define EBC_DISABLE_BG_CONTROL (0x700d) |
|---|
| 64 | | -#define EBC_ENABLE_RESUME_COUNT (0x700e) |
|---|
| 65 | | -#define EBC_DISABLE_RESUME_COUNT (0x700f) |
|---|
| 66 | | -#define EBC_GET_BUF_FORMAT (0x7010) |
|---|
| 67 | | -#define EBC_DROP_PREV_BUFFER (0x7011) |
|---|
| 43 | +#define EBC_ENABLE_OVERLAY (0x7004) |
|---|
| 44 | +#define EBC_DISABLE_OVERLAY (0x7005) |
|---|
| 45 | +#define EBC_GET_OSD_BUFFER (0x7006) |
|---|
| 46 | +#define EBC_SEND_OSD_BUFFER (0x7007) |
|---|
| 68 | 47 | |
|---|
| 69 | 48 | /* |
|---|
| 70 | 49 | * IMPORTANT: Those values is corresponding to android hardware program, |
|---|
| .. | .. |
|---|
| 85 | 64 | EPD_PART_GLD16 = 10, |
|---|
| 86 | 65 | EPD_PART_GCC16 = 11, |
|---|
| 87 | 66 | EPD_A2 = 12, |
|---|
| 88 | | - EPD_A2_DITHER = 13, |
|---|
| 89 | | - EPD_DU = 14, |
|---|
| 90 | | - EPD_DU4 = 15, |
|---|
| 91 | | - EPD_A2_ENTER = 16, |
|---|
| 92 | | - EPD_RESET = 17, |
|---|
| 93 | | - EPD_SUSPEND = 18, |
|---|
| 94 | | - EPD_RESUME = 19, |
|---|
| 95 | | - EPD_POWER_OFF = 20, |
|---|
| 96 | | - EPD_FORCE_FULL = 21, |
|---|
| 97 | | - EPD_AUTO_DU = 22, |
|---|
| 98 | | - EPD_AUTO_DU4 = 23, |
|---|
| 67 | + EPD_DU = 13, |
|---|
| 68 | + EPD_RESET = 14, |
|---|
| 69 | + EPD_SUSPEND = 15, |
|---|
| 70 | + EPD_RESUME = 16, |
|---|
| 71 | + EPD_POWER_OFF = 17, |
|---|
| 72 | + EPD_PART_EINK = 18, |
|---|
| 73 | + EPD_FULL_EINK = 19, |
|---|
| 99 | 74 | }; |
|---|
| 100 | 75 | |
|---|
| 101 | 76 | /* |
|---|
| .. | .. |
|---|
| 113 | 88 | int win_y2; |
|---|
| 114 | 89 | int width_mm; |
|---|
| 115 | 90 | int height_mm; |
|---|
| 116 | | - int needpic; // 1: buf can not be drop by ebc, 0: buf can drop by ebc 2: regal buf, can not be drop by ebc |
|---|
| 117 | | - char tid_name[16]; |
|---|
| 118 | 91 | }; |
|---|
| 119 | 92 | |
|---|
| 120 | 93 | #if IS_ENABLED(CONFIG_ROCKCHIP_EBC_DEV) |
|---|