drm/rockchip: ebc_dev: release version v7.14

1.system update no wait framedone under overlay mode
2.fast mode to normal mode use part glr16 if fast mode not complete
3.support setting enable waveform fix
4.support setting force temperature

Change-Id: I63355e094f56f055022bdb6688270cee3f09b705
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
This commit is contained in:
Zorro Liu
2025-05-06 16:45:40 +08:00
parent bcf6d77dec
commit f3564437b6
6 changed files with 2138 additions and 1906 deletions

View File

@@ -66,6 +66,8 @@
#define EBC_GET_NORMAL_REPAIR (0x7017)
#define EBC_SET_FULL_REFRESH_WIDTH (0x7018)
#define EBC_SET_FULL_REFRESH_TYPE (0x7019)
#define EBC_SET_FORCE_TEMPERATURE (0x701a)
#define EBC_ENABLE_WAVEFORM_FIX (0x701b)
enum full_refresh_type {
NORMAL_FULL_REFRESH,

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@
#include "../ebc_dev.h"
#include "epd_lut.h"
static int (*lut_get)(struct epd_lut_data *, enum epd_lut_type, int, int, int);
static int (*lut_get)(struct epd_lut_data *, enum epd_lut_type, int, int, int, int);
static int (*lut_get_original)(struct epd_lut_data *, enum epd_lut_type, int, int);
int epd_lut_from_mem_init(void *waveform)
@@ -69,9 +69,9 @@ const char *epd_lut_get_wf_version(void)
return NULL;
}
int epd_lut_get(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic, int regal_pix)
int epd_lut_get(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic, int wf_fix, int regal_pix)
{
return lut_get(output, lut_type, temperature, pic, regal_pix);
return lut_get(output, lut_type, temperature, pic, wf_fix, regal_pix);
}
int epd_lut_get_original(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic)

View File

@@ -48,7 +48,7 @@ struct epd_lut_data {
int epd_lut_from_mem_init(void *waveform);
int epd_lut_from_file_init(struct device *dev, void *waveform, int size);
const char *epd_lut_get_wf_version(void);
int epd_lut_get(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic, int regal_pix);
int epd_lut_get(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic, int wf_fix, int regal_pix);
int epd_lut_get_original(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic);
//you can change overlay lut mode here
@@ -60,7 +60,7 @@ int epd_overlay_lut(void);
int pvi_wf_input(void *waveform_file);
int pvi_wf_add_custom_mode_table(u8 *table, int size);
const char *pvi_wf_get_version(void);
int pvi_wf_get_lut(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic, int regal_pix);
int pvi_wf_get_lut(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic, int wf_fix, int regal_pix);
int pvi_wf_get_original_lut(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic);
/*
@@ -68,5 +68,5 @@ int pvi_wf_get_original_lut(struct epd_lut_data *output, enum epd_lut_type lut_t
*/
int rkf_wf_input(void *waveform_file);
const char *rkf_wf_get_version(void);
int rkf_wf_get_lut(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic, int regal_pix);
int rkf_wf_get_lut(struct epd_lut_data *output, enum epd_lut_type lut_type, int temperature, int pic, int wf_fix, int regal_pix);
#endif

View File

@@ -65,15 +65,16 @@ pvi_wf_get_lut:
str x30, [x18], #8
stp x29, x30, [sp, #-96]!
stp x26, x25, [sp, #32]
adrp x25, global_waveform
adrp x26, global_waveform
stp x28, x27, [sp, #16]
mov x29, sp
stp x24, x23, [sp, #48]
ldr x8, [x25, :lo12:global_waveform]
ldr x8, [x26, :lo12:global_waveform]
stp x22, x21, [sp, #64]
stp x20, x19, [sp, #80]
cbz x8, .LBB1_12
mov w21, w4
mov w21, w5
mov w24, w4
mov w19, w2
mov w22, w1
mov x20, x0
@@ -82,37 +83,37 @@ pvi_wf_get_lut:
ldr x9, [x9]
cbz x9, .LBB1_13
.LBB1_3:
adrp x27, pvi_wf_get_lut.sftemp
adrp x28, pvi_wf_get_lut.sftemp
mov w9, #21846
movk w9, #21845, lsl #16
adrp x28, pvi_wf_get_lut.stype
ldrsw x10, [x27, :lo12:pvi_wf_get_lut.sftemp]
ldrsw x10, [x28, :lo12:pvi_wf_get_lut.sftemp]
smull x11, w19, w9
mul x9, x10, x9
lsr x10, x11, #63
lsr x11, x11, #32
lsr x12, x9, #63
lsr x9, x9, #32
add w26, w11, w10
add w27, w11, w10
add w9, w9, w12
adrp x10, pvi_wf_get_lut.stype
adrp x11, pvi_wf_get_lut.fix
cmp w26, w9
cmp w27, w9
b.ne .LBB1_6
ldr w10, [x28, :lo12:pvi_wf_get_lut.stype]
ldr w10, [x10, :lo12:pvi_wf_get_lut.stype]
cmp w10, w22
b.ne .LBB1_6
ldr w10, [x11, :lo12:pvi_wf_get_lut.fix]
cmp w10, w21
b.eq .LBB1_25
b.eq .LBB1_26
.LBB1_6:
adrp x10, need_pic
cmp w22, #10
str w3, [x10, :lo12:need_pic]
b.eq .LBB1_24
b.eq .LBB1_25
ldr x10, [x20, #16]
adrp x24, waveformdata
adrp x25, waveformdata
ldrb w9, [x8, #38]
str x10, [x24, :lo12:waveformdata]
str x10, [x25, :lo12:waveformdata]
cbz w9, .LBB1_14
mov x10, xzr
add x8, x8, #48
@@ -128,10 +129,10 @@ pvi_wf_get_lut:
b .LBB1_16
.LBB1_12:
mov w0, #-19
b .LBB1_39
b .LBB1_36
.LBB1_13:
mov w0, #-22
b .LBB1_39
b .LBB1_36
.LBB1_14:
mov w10, wzr
mov w8, #-1
@@ -147,25 +148,26 @@ pvi_wf_get_lut:
and w0, w0, #0xff
mov w1, w23
bl get_wf_frm_num
tbnz w0, #31, .LBB1_44
tbnz w0, #31, .LBB1_41
mov w23, w0
cbz w24, .LBB1_24
cmp w22, #7
b.eq .LBB1_19
b.eq .LBB1_20
cmp w22, #1
b.ne .LBB1_32
.LBB1_19:
ldr x28, [x24, :lo12:waveformdata]
b.ne .LBB1_37
.LBB1_20:
ldr x24, [x25, :lo12:waveformdata]
mov w8, #8992
mov w9, #4832
cmp w23, #12
add x27, x28, x8
add x24, x28, x9
b.ls .LBB1_61
.LBB1_20:
add x28, x24, x8
add x25, x24, x9
b.ls .LBB1_62
.LBB1_21:
mov w8, wzr
mov w9, w23
.LBB1_21:
add x10, x28, w8, sxtw
.LBB1_22:
add x10, x24, w8, sxtw
subs x9, x9, #1
add w8, w8, #1024
ldrb w11, [x10, #960]
@@ -180,103 +182,92 @@ pvi_wf_get_lut:
strb wzr, [x10, #958]
strb wzr, [x10, #992]
strb wzr, [x10, #1022]
b.ne .LBB1_21
.LBB1_22:
b.ne .LBB1_22
.LBB1_23:
mov w8, #1
mov w9, #2
strb w8, [x28, #672]
strb w9, [x28, #702]
strb w8, [x24]
strb w9, [x24, #30]
strb w8, [x27]
strb w9, [x27, #30]
strb w8, [x28, #1696]
strb w9, [x28, #1726]
strb w8, [x24, #1024]
strb w9, [x24, #1054]
strb w8, [x27, #1024]
strb w9, [x27, #1054]
strb w8, [x28, #2720]
strb w9, [x28, #2750]
strb w8, [x24, #2048]
strb w9, [x24, #2078]
strb w8, [x27, #2048]
strb w9, [x27, #2078]
strb w8, [x28, #3744]
strb w9, [x28, #3774]
strb w8, [x24, #3072]
strb w9, [x24, #3102]
strb w8, [x27, #3072]
strb w9, [x27, #3102]
strb w8, [x28, #1918]
strb w9, [x28, #2942]
strb w9, [x28, #3966]
adrp x28, pvi_wf_get_lut.stype
strb w8, [x24, #1246]
strb w9, [x24, #2270]
strb w9, [x24, #3294]
strb w8, [x27, #1246]
strb w9, [x27, #2270]
strb w9, [x27, #3294]
adrp x27, pvi_wf_get_lut.sftemp
.LBB1_23:
strb w8, [x24, #672]
strb w9, [x24, #702]
strb w8, [x25]
strb w9, [x25, #30]
strb w8, [x28]
strb w9, [x28, #30]
strb w8, [x24, #1696]
strb w9, [x24, #1726]
strb w8, [x25, #1024]
strb w9, [x25, #1054]
strb w8, [x28, #1024]
strb w9, [x28, #1054]
strb w8, [x24, #2720]
strb w9, [x24, #2750]
strb w8, [x25, #2048]
strb w9, [x25, #2078]
strb w8, [x28, #2048]
strb w9, [x28, #2078]
strb w8, [x24, #3744]
strb w9, [x24, #3774]
strb w8, [x25, #3072]
strb w9, [x25, #3102]
strb w8, [x28, #3072]
strb w9, [x28, #3102]
strb w8, [x24, #1918]
strb w9, [x24, #2942]
strb w9, [x24, #3966]
strb w8, [x25, #1246]
strb w9, [x25, #2270]
strb w9, [x25, #3294]
strb w8, [x28, #1246]
strb w9, [x28, #2270]
strb w9, [x28, #3294]
adrp x28, pvi_wf_get_lut.sftemp
.LBB1_24:
ldrb w8, [x20, #1]
mov w9, #21846
movk w9, #21845, lsl #16
orr w8, w23, w8, lsl #8
str w8, [x20]
ldrsw x8, [x27, :lo12:pvi_wf_get_lut.sftemp]
str w22, [x28, :lo12:pvi_wf_get_lut.stype]
ldrsw x8, [x28, :lo12:pvi_wf_get_lut.sftemp]
mul x8, x8, x9
lsr x9, x8, #63
lsr x8, x8, #32
add w9, w8, w9
adrp x8, pvi_wf_get_lut.stype
str w22, [x8, :lo12:pvi_wf_get_lut.stype]
adrp x8, pvi_wf_get_lut.fix
str w21, [x8, :lo12:pvi_wf_get_lut.fix]
.LBB1_24:
cmp w26, w9
b.ne .LBB1_26
.LBB1_25:
mov w0, wzr
b .LBB1_39
cmp w27, w9
b.ne .LBB1_27
.LBB1_26:
mov w0, wzr
b .LBB1_36
.LBB1_27:
ldr x8, [x20, #24]
adrp x9, waveformdata
str x8, [x9, :lo12:waveformdata]
bl epd_overlay_lut
ldr x10, [x25, :lo12:global_waveform]
ldr x10, [x26, :lo12:global_waveform]
ldrb w8, [x10, #38]
cbz w8, .LBB1_31
cbz w8, .LBB1_32
mov x9, xzr
add x10, x10, #48
.LBB1_28:
.LBB1_29:
ldrb w11, [x10, x9]
cmp w11, w19
b.ge .LBB1_36
b.ge .LBB1_33
add x9, x9, #1
cmp x8, x9
b.ne .LBB1_28
b.ne .LBB1_29
mov w10, #-1
mov w9, w8
b .LBB1_37
.LBB1_31:
b .LBB1_34
.LBB1_32:
mov w9, wzr
mov w10, #-1
b .LBB1_37
.LBB1_32:
sub w8, w22, #5
cmp w8, #1
b.hi .LBB1_40
cbz w23, .LBB1_23
ldr x8, [x24, :lo12:waveformdata]
mov w9, w23
cmp w23, #1
b.ne .LBB1_47
mov x10, xzr
b .LBB1_59
.LBB1_36:
b .LBB1_34
.LBB1_33:
mov w10, w9
.LBB1_37:
.LBB1_34:
sub w11, w9, #1
cmp w9, w8
csel w21, w11, w10, eq
@@ -284,13 +275,13 @@ pvi_wf_get_lut:
and w0, w0, #0xff
mov w1, w21
bl get_wf_frm_num
tbnz w0, #31, .LBB1_44
tbnz w0, #31, .LBB1_41
ldrb w8, [x20]
bfi w8, w0, #8, #24
mov w0, wzr
str w8, [x20]
str w19, [x27, :lo12:pvi_wf_get_lut.sftemp]
.LBB1_39:
str w19, [x28, :lo12:pvi_wf_get_lut.sftemp]
.LBB1_36:
ldp x20, x19, [sp, #80]
ldp x22, x21, [sp, #64]
ldp x24, x23, [sp, #48]
@@ -299,33 +290,44 @@ pvi_wf_get_lut:
ldp x29, x30, [sp], #96
ldr x30, [x18, #-8]!
ret
.LBB1_40:
sub w8, w22, #11
.LBB1_37:
sub w8, w22, #5
cmp w8, #1
b.hi .LBB1_45
cbz w23, .LBB1_23
ldr x8, [x24, :lo12:waveformdata]
b.hi .LBB1_42
cbz w23, .LBB1_24
ldr x8, [x25, :lo12:waveformdata]
mov w9, w23
cmp w23, #1
b.ne .LBB1_64
b.ne .LBB1_48
mov x10, xzr
b .LBB1_84
.LBB1_44:
b .LBB1_60
.LBB1_41:
adrp x0, .L.str
add x0, x0, :lo12:.L.str
bl _printk
mov w0, #-5
b .LBB1_39
.LBB1_45:
b .LBB1_36
.LBB1_42:
sub w8, w22, #11
cmp w8, #1
b.hi .LBB1_46
cbz w23, .LBB1_24
ldr x8, [x25, :lo12:waveformdata]
mov w9, w23
cmp w23, #1
b.ne .LBB1_65
mov x10, xzr
b .LBB1_85
.LBB1_46:
sub w8, w22, #13
cmp w8, #1
b.hi .LBB1_23
ldr x0, [x24, :lo12:waveformdata]
b.hi .LBB1_24
ldr x0, [x25, :lo12:waveformdata]
mov w1, w23
mov w2, w21
bl pvi_wf_normal_fix
b .LBB1_23
.LBB1_47:
b .LBB1_24
.LBB1_48:
sub x12, x9, #1
mov x10, xzr
and x11, x12, #0xffffffff
@@ -334,30 +336,30 @@ pvi_wf_get_lut:
cset w13, ne
cmp xzr, x12, lsr #54
cset w11, ne
tbnz w14, #31, .LBB1_59
tbnz w13, #0, .LBB1_59
tbnz w14, #31, .LBB1_60
tbnz w13, #0, .LBB1_60
lsr x13, x12, #32
cbnz x13, .LBB1_59
cbnz x13, .LBB1_60
add x13, x8, #30
lsl x12, x12, #10
add x14, x13, x12
cmp x14, x13
b.lo .LBB1_59
tbnz w11, #0, .LBB1_59
b.lo .LBB1_60
tbnz w11, #0, .LBB1_60
add x13, x8, #29
add x14, x13, x12
cmp x14, x13
b.lo .LBB1_59
tbnz w11, #0, .LBB1_59
b.lo .LBB1_60
tbnz w11, #0, .LBB1_60
add x13, x8, #31
add x12, x13, x12
cmp x12, x13
b.lo .LBB1_59
tbnz w11, #0, .LBB1_59
b.lo .LBB1_60
tbnz w11, #0, .LBB1_60
and x10, x9, #0xfffffffe
mov w11, #1024
mov x12, x10
.LBB1_57:
.LBB1_58:
sub w13, w11, #1024
add x14, x8, w11, sxtw
subs x12, x12, #2
@@ -369,29 +371,29 @@ pvi_wf_get_lut:
strb w15, [x14, #29]
strb w16, [x13, #31]
strb w16, [x13, #29]
b.ne .LBB1_57
b.ne .LBB1_58
cmp x10, x9
b.eq .LBB1_23
.LBB1_59:
b.eq .LBB1_24
.LBB1_60:
sub x9, x9, x10
lsl w10, w10, #10
.LBB1_60:
.LBB1_61:
add x11, x8, w10, sxtw
subs x9, x9, #1
add w10, w10, #1024
ldrb w12, [x11, #30]
strb w12, [x11, #31]
strb w12, [x11, #29]
b.ne .LBB1_60
b .LBB1_23
.LBB1_61:
b.ne .LBB1_61
b .LBB1_24
.LBB1_62:
adrp x0, .L.str.8
add x0, x0, :lo12:.L.str.8
bl _printk
lsl w8, w23, #10
mov w9, #13
.LBB1_62:
add x10, x28, w8, uxtw
.LBB1_63:
add x10, x24, w8, uxtw
sub w9, w9, #1
add w8, w8, #1024
cmp w23, w9
@@ -405,11 +407,11 @@ pvi_wf_get_lut:
strb wzr, [x10, #958]
strb wzr, [x10, #992]
strb wzr, [x10, #1022]
b.ne .LBB1_62
b.ne .LBB1_63
cmp w23, #1
b.ge .LBB1_20
b .LBB1_22
.LBB1_64:
b.ge .LBB1_21
b .LBB1_23
.LBB1_65:
sub x12, x9, #1
mov x10, xzr
and x11, x12, #0xffffffff
@@ -418,50 +420,50 @@ pvi_wf_get_lut:
cset w13, ne
cmp xzr, x12, lsr #54
cset w11, ne
tbnz w14, #31, .LBB1_84
tbnz w13, #0, .LBB1_84
tbnz w14, #31, .LBB1_85
tbnz w13, #0, .LBB1_85
lsr x13, x12, #32
cbnz x13, .LBB1_84
cbnz x13, .LBB1_85
add x13, x8, #30
lsl x12, x12, #10
add x14, x13, x12
cmp x14, x13
b.lo .LBB1_84
tbnz w11, #0, .LBB1_84
b.lo .LBB1_85
tbnz w11, #0, .LBB1_85
add x13, x8, #1022
add x14, x13, x12
cmp x14, x13
b.lo .LBB1_84
tbnz w11, #0, .LBB1_84
b.lo .LBB1_85
tbnz w11, #0, .LBB1_85
add x13, x8, #1021
add x14, x13, x12
cmp x14, x13
b.lo .LBB1_84
tbnz w11, #0, .LBB1_84
b.lo .LBB1_85
tbnz w11, #0, .LBB1_85
add x13, x8, #29
add x14, x13, x12
cmp x14, x13
b.lo .LBB1_84
tbnz w11, #0, .LBB1_84
b.lo .LBB1_85
tbnz w11, #0, .LBB1_85
add x13, x8, #31
add x14, x13, x12
cmp x14, x13
b.lo .LBB1_84
tbnz w11, #0, .LBB1_84
b.lo .LBB1_85
tbnz w11, #0, .LBB1_85
add x13, x8, #989
add x12, x13, x12
cmp x12, x13
b.lo .LBB1_84
tbnz w11, #0, .LBB1_84
b.lo .LBB1_85
tbnz w11, #0, .LBB1_85
and x10, x9, #0xfffffffe
mov w11, #1024
mov x12, x10
b .LBB1_81
.LBB1_80:
b .LBB1_82
.LBB1_81:
subs x12, x12, #2
add w11, w11, #2048
b.eq .LBB1_83
.LBB1_81:
b.eq .LBB1_84
.LBB1_82:
sub w14, w11, #1024
add x13, x8, w11, sxtw
add x14, x8, w14, sxtw
@@ -473,33 +475,33 @@ pvi_wf_get_lut:
strb w15, [x13, #29]
strb w16, [x14, #31]
strb w16, [x14, #29]
cbz w21, .LBB1_80
cbz w21, .LBB1_81
add x14, x14, #1021
add x13, x13, #1021
strh wzr, [x14]
strh wzr, [x13]
b .LBB1_80
.LBB1_83:
cmp x10, x9
b.eq .LBB1_23
b .LBB1_81
.LBB1_84:
cmp x10, x9
b.eq .LBB1_24
.LBB1_85:
sub x9, x9, x10
lsl w10, w10, #10
b .LBB1_86
.LBB1_85:
b .LBB1_87
.LBB1_86:
subs x9, x9, #1
add w10, w10, #1024
b.eq .LBB1_23
.LBB1_86:
b.eq .LBB1_24
.LBB1_87:
add x11, x8, w10, sxtw
ldrb w12, [x11, #30]
strb wzr, [x11, #989]
strb w12, [x11, #31]
strb w12, [x11, #29]
cbz w21, .LBB1_85
cbz w21, .LBB1_86
add x11, x11, #1021
strh wzr, [x11]
b .LBB1_85
b .LBB1_86
.Lfunc_end1:
.size pvi_wf_get_lut, .Lfunc_end1-pvi_wf_get_lut

View File

@@ -190,26 +190,28 @@ rkf_wf_get_version:
.p2align 2
.type rkf_wf_get_lut,@function
rkf_wf_get_lut:
sub sp, sp, #112
str x30, [x18], #8
stp x29, x30, [sp, #-96]!
adrp x8, global_waveform
stp x28, x27, [sp, #16]
stp x26, x25, [sp, #32]
mov x29, sp
stp x24, x23, [sp, #48]
stp x29, x30, [sp, #16]
stp x28, x27, [sp, #32]
add x29, sp, #16
stp x26, x25, [sp, #48]
ldr x8, [x8, :lo12:global_waveform]
stp x22, x21, [sp, #64]
stp x20, x19, [sp, #80]
cbz x8, .LBB2_30
stp x24, x23, [sp, #64]
stp x22, x21, [sp, #80]
stp x20, x19, [sp, #96]
cbz x8, .LBB2_24
mov x20, x0
cbz x0, .LBB2_31
mov w23, w4
cbz x0, .LBB2_25
mov w23, w5
mov w24, w4
mov w19, w2
mov w21, w1
adrp x27, need_pic
adrp x28, need_pic
sub w8, w1, #8
cmp w8, #6
str w3, [x27, :lo12:need_pic]
str w3, [x28, :lo12:need_pic]
b.hi .LBB2_5
mov w9, #121
lsr w9, w9, w8
@@ -218,11 +220,10 @@ rkf_wf_get_lut:
add x9, x9, :lo12:.Lswitch.table.rkf_wf_get_lut
ldr w21, [x9, w8, sxtw #2]
.LBB2_5:
adrp x24, rkf_wf_get_lut.sftemp
adrp x22, rkf_wf_get_lut.sftemp
mov w8, #26215
movk w8, #26214, lsl #16
adrp x26, rkf_wf_get_lut.stype
ldrsw x10, [x24, :lo12:rkf_wf_get_lut.sftemp]
ldrsw x10, [x22, :lo12:rkf_wf_get_lut.sftemp]
smull x9, w19, w8
lsr x11, x9, #63
asr x9, x9, #33
@@ -231,14 +232,15 @@ rkf_wf_get_lut:
lsr x9, x8, #63
asr x8, x8, #33
add w8, w8, w9
adrp x9, rkf_wf_get_lut.stype
cmp w25, w8
b.ne .LBB2_7
ldr w9, [x26, :lo12:rkf_wf_get_lut.stype]
ldr w9, [x9, :lo12:rkf_wf_get_lut.stype]
cmp w9, w21
b.eq .LBB2_35
b.eq .LBB2_45
.LBB2_7:
cmp w21, #10
b.eq .LBB2_34
b.eq .LBB2_44
ldr x0, [x20, #8]
cbz x0, .LBB2_10
bl kfree
@@ -248,17 +250,17 @@ rkf_wf_get_lut:
mov w1, w21
mov w2, w19
bl parse_wf_data
tbnz w0, #31, .LBB2_45
tbnz w0, #31, .LBB2_55
mov w22, w0
ldr x1, [x20, #16]
cbz w21, .LBB2_32
cbz w21, .LBB2_26
adrp x8, maxpic
mov w10, #32
ldrb w9, [x8, :lo12:maxpic]
mov w8, #16
cmp w9, #0
csel w10, w10, w8, ne
cbz w22, .LBB2_24
cbz w22, .LBB2_27
lsr w13, w10, #4
mov x11, xzr
mov x12, xzr
@@ -295,12 +297,12 @@ rkf_wf_get_lut:
add x11, x11, #1024
cmp x12, x8
b.ne .LBB2_14
ldr w10, [x27, :lo12:need_pic]
ldr w10, [x28, :lo12:need_pic]
cmp w10, #16
cset w10, eq
and w9, w9, w10
cmp w9, #1
b.ne .LBB2_24
b.ne .LBB2_27
mov w9, wzr
mov w10, wzr
mov x11, xzr
@@ -355,23 +357,35 @@ rkf_wf_get_lut:
add w9, w9, #32
cmp x11, x8
b.ne .LBB2_21
b .LBB2_27
.LBB2_24:
cmp w21, #7
b.eq .LBB2_26
cmp w21, #1
b.ne .LBB2_41
mov w0, #-19
b .LBB2_50
.LBB2_25:
mov w0, #-22
b .LBB2_50
.LBB2_26:
mov x0, x20
mov w2, w22
bl rkf_lut_init_wf_table
.LBB2_27:
cbz w24, .LBB2_34
cmp w21, #7
b.eq .LBB2_30
cmp w21, #1
b.ne .LBB2_51
.LBB2_30:
ldr x23, [x20, #16]
mov w8, #8992
mov w9, #4832
cmp w22, #12
add x27, x23, x8
add x28, x23, x9
b.le .LBB2_66
.LBB2_27:
add x24, x23, x8
add x27, x23, x9
b.le .LBB2_78
.LBB2_31:
mov w8, wzr
mov w9, w22
.LBB2_28:
.LBB2_32:
add x10, x23, w8, sxtw
subs x9, x9, #1
add w8, w8, #1024
@@ -387,84 +401,226 @@ rkf_wf_get_lut:
strb wzr, [x10, #958]
strb wzr, [x10, #992]
strb wzr, [x10, #1022]
b.ne .LBB2_28
.LBB2_29:
b.ne .LBB2_32
.LBB2_33:
mov w8, #1
mov w9, #2
strb w8, [x23, #672]
strb w9, [x23, #702]
strb w8, [x28]
strb w9, [x28, #30]
strb w8, [x27]
strb w9, [x27, #30]
strb w8, [x24]
strb w9, [x24, #30]
strb w8, [x23, #1696]
strb w9, [x23, #1726]
strb w8, [x28, #1024]
strb w9, [x28, #1054]
strb w8, [x27, #1024]
strb w9, [x27, #1054]
strb w8, [x24, #1024]
strb w9, [x24, #1054]
strb w8, [x23, #2720]
strb w9, [x23, #2750]
strb w8, [x28, #2048]
strb w9, [x28, #2078]
strb w8, [x27, #2048]
strb w9, [x27, #2078]
strb w8, [x24, #2048]
strb w9, [x24, #2078]
strb w8, [x23, #3744]
strb w9, [x23, #3774]
strb w8, [x28, #3072]
strb w9, [x28, #3102]
strb w8, [x27, #3072]
strb w9, [x27, #3102]
strb w8, [x24, #3072]
strb w9, [x24, #3102]
strb w8, [x23, #1918]
strb w9, [x23, #2942]
strb w9, [x23, #3966]
strb w8, [x28, #1246]
strb w9, [x28, #2270]
strb w9, [x28, #3294]
strb w8, [x27, #1246]
strb w9, [x27, #2270]
strb w9, [x27, #3294]
b .LBB2_33
.LBB2_30:
mov w0, #-19
b .LBB2_40
.LBB2_31:
mov w0, #-22
b .LBB2_40
.LBB2_32:
mov x0, x20
mov w2, w22
bl rkf_lut_init_wf_table
.LBB2_33:
strb w8, [x24, #1246]
strb w9, [x24, #2270]
strb w9, [x24, #3294]
.LBB2_34:
ldr x0, [x20, #8]
cbz x0, .LBB2_36
bl kfree
str xzr, [x20, #8]
.LBB2_36:
add w8, w22, #15
add w9, w22, #30
cmp w8, #0
mov w1, #3520
csel w8, w9, w8, lt
lsl w8, w8, #6
and w8, w8, #0xfffffc00
sxtw x24, w8
mov x0, x24
bl __kmalloc
str x0, [x20, #8]
cbz x0, .LBB2_60
ldr x27, [x20, #16]
stp w25, w19, [sp, #4]
stur w22, [x29, #-4]
cbz x27, .LBB2_61
ldr w8, [x28, :lo12:need_pic]
mov w1, wzr
mov x2, x24
mov x23, x0
cmp w8, #16
cset w28, ne
bl memset
cmp w22, #1
b.lt .LBB2_43
ldur w9, [x29, #-4]
mov w10, #1
mov w11, #2
mov w12, #3
mov w13, #4
mov w14, #5
mov w15, #6
mov w16, #7
mov w17, #8
mov w0, #9
mov w1, #10
mov w2, #11
mov w3, #12
mov w4, #13
mov w5, #14
mov w6, #15
mov x8, xzr
mov w9, w9
lsl x10, x10, x28
lsl x11, x11, x28
lsl x12, x12, x28
lsl x13, x13, x28
lsl x14, x14, x28
lsl x15, x15, x28
lsl x16, x16, x28
lsl x17, x17, x28
lsl x0, x0, x28
lsl x1, x1, x28
lsl x2, x2, x28
lsl x3, x3, x28
lsl x4, x4, x28
lsl x5, x5, x28
lsl x6, x6, x28
.LBB2_40:
lsl w24, w8, #9
mov w25, #31
bfi w25, w8, #9, #23
cmp w24, #0
csel w24, w25, w24, lt
lsl w25, w8, #10
asr w26, w24, #5
mov x7, xzr
add x24, x27, w25, sxtw
add x30, x23, w26, sxtw #2
.LBB2_41:
lsl w26, w7, w28
lsl x25, x7, #2
add x7, x7, #1
add x26, x24, x26, lsl #5
cmp x7, #16
ldr w22, [x30, x25]
ldrb w19, [x26]
and w19, w19, #0x3
orr w19, w22, w19
str w19, [x30, x25]
ldrb w22, [x26, x10]
ubfiz w22, w22, #2, #2
orr w19, w19, w22
str w19, [x30, x25]
ldrb w22, [x26, x11]
ubfiz w22, w22, #4, #2
orr w19, w19, w22
str w19, [x30, x25]
ldrb w22, [x26, x12]
ubfiz w22, w22, #6, #2
orr w19, w19, w22
str w19, [x30, x25]
ldrb w22, [x26, x13]
and w22, w22, #0x3
orr w19, w19, w22, lsl #8
str w19, [x30, x25]
ldrb w22, [x26, x14]
and w22, w22, #0x3
orr w19, w19, w22, lsl #10
str w19, [x30, x25]
ldrb w22, [x26, x15]
and w22, w22, #0x3
orr w19, w19, w22, lsl #12
str w19, [x30, x25]
ldrb w22, [x26, x16]
and w22, w22, #0x3
orr w19, w19, w22, lsl #14
str w19, [x30, x25]
ldrb w22, [x26, x17]
and w22, w22, #0x3
orr w19, w19, w22, lsl #16
str w19, [x30, x25]
ldrb w22, [x26, x0]
and w22, w22, #0x3
orr w19, w19, w22, lsl #18
str w19, [x30, x25]
ldrb w22, [x26, x1]
and w22, w22, #0x3
orr w19, w19, w22, lsl #20
str w19, [x30, x25]
ldrb w22, [x26, x2]
and w22, w22, #0x3
orr w19, w19, w22, lsl #22
str w19, [x30, x25]
ldrb w22, [x26, x3]
and w22, w22, #0x3
orr w19, w19, w22, lsl #24
str w19, [x30, x25]
ldrb w22, [x26, x4]
and w22, w22, #0x3
orr w19, w19, w22, lsl #26
str w19, [x30, x25]
ldrb w22, [x26, x5]
and w22, w22, #0x3
orr w19, w19, w22, lsl #28
str w19, [x30, x25]
ldrb w22, [x26, x6]
orr w19, w19, w22, lsl #30
str w19, [x30, x25]
b.ne .LBB2_41
add x8, x8, #1
cmp x8, x9
b.ne .LBB2_40
.LBB2_43:
ldrb w8, [x20, #1]
adrp x22, rkf_wf_get_lut.sftemp
ldur w9, [x29, #-4]
ldp w25, w19, [sp, #4]
orr w8, w9, w8, lsl #8
mov w9, #26215
movk w9, #26214, lsl #16
orr w8, w22, w8, lsl #8
str w8, [x20]
ldrsw x8, [x24, :lo12:rkf_wf_get_lut.sftemp]
str w21, [x26, :lo12:rkf_wf_get_lut.stype]
ldrsw x8, [x22, :lo12:rkf_wf_get_lut.sftemp]
mul x8, x8, x9
lsr x9, x8, #63
asr x8, x8, #33
add w8, w8, w9
.LBB2_34:
adrp x9, rkf_wf_get_lut.stype
str w21, [x9, :lo12:rkf_wf_get_lut.stype]
.LBB2_44:
cmp w25, w8
b.ne .LBB2_36
.LBB2_35:
b.ne .LBB2_46
.LBB2_45:
mov w0, wzr
b .LBB2_40
.LBB2_36:
b .LBB2_50
.LBB2_46:
ldr x0, [x20, #8]
cbz x0, .LBB2_38
cbz x0, .LBB2_48
bl kfree
str xzr, [x20, #8]
.LBB2_38:
.LBB2_48:
bl epd_overlay_lut
mov w1, w0
mov x0, x20
mov w2, w19
bl parse_wf_data
tbnz w0, #31, .LBB2_45
tbnz w0, #31, .LBB2_55
mov w21, w0
ldr x1, [x20, #24]
mov x0, x20
@@ -474,56 +630,68 @@ rkf_wf_get_lut:
mov w0, wzr
bfi w8, w21, #8, #24
str w8, [x20]
str w19, [x24, :lo12:rkf_wf_get_lut.sftemp]
.LBB2_40:
ldp x20, x19, [sp, #80]
ldp x22, x21, [sp, #64]
ldp x24, x23, [sp, #48]
ldp x26, x25, [sp, #32]
ldp x28, x27, [sp, #16]
ldp x29, x30, [sp], #96
str w19, [x22, :lo12:rkf_wf_get_lut.sftemp]
.LBB2_50:
ldp x20, x19, [sp, #96]
ldp x22, x21, [sp, #80]
ldp x24, x23, [sp, #64]
ldp x26, x25, [sp, #48]
ldp x28, x27, [sp, #32]
ldp x29, x30, [sp, #16]
ldr x30, [x18, #-8]!
add sp, sp, #112
ret
.LBB2_41:
.LBB2_51:
sub w8, w21, #5
cmp w8, #1
b.hi .LBB2_46
b.hi .LBB2_56
cmp w22, #1
b.lt .LBB2_33
b.lt .LBB2_34
ldr x8, [x20, #16]
mov w9, w22
cmp w22, #1
b.ne .LBB2_52
b.ne .LBB2_64
mov x10, xzr
b .LBB2_64
.LBB2_45:
b .LBB2_76
.LBB2_55:
adrp x0, .L.str.3
add x0, x0, :lo12:.L.str.3
bl _printk
mov w0, #-5
b .LBB2_40
.LBB2_46:
b .LBB2_50
.LBB2_56:
sub w8, w21, #11
cmp w8, #1
b.hi .LBB2_50
b.hi .LBB2_62
cmp w22, #1
b.lt .LBB2_33
b.lt .LBB2_34
ldr x8, [x20, #16]
mov w9, w22
cmp w22, #1
b.ne .LBB2_69
b.ne .LBB2_81
mov x10, xzr
b .LBB2_89
.LBB2_50:
b .LBB2_101
.LBB2_60:
adrp x0, .L.str.4
add x0, x0, :lo12:.L.str.4
bl _printk
mov w0, #-12
b .LBB2_50
.LBB2_61:
adrp x0, .L.str.12
add x0, x0, :lo12:.L.str.12
bl _printk
b .LBB2_43
.LBB2_62:
sub w8, w21, #13
cmp w8, #1
b.hi .LBB2_33
b.hi .LBB2_34
ldr x0, [x20, #16]
mov w1, w22
mov w2, w23
bl rkf_wf_normal_fix
b .LBB2_33
.LBB2_52:
b .LBB2_34
.LBB2_64:
sub x12, x9, #1
mov x10, xzr
and x11, x12, #0xffffffff
@@ -532,30 +700,30 @@ rkf_wf_get_lut:
cset w13, ne
cmp xzr, x12, lsr #54
cset w11, ne
tbnz w14, #31, .LBB2_64
tbnz w13, #0, .LBB2_64
tbnz w14, #31, .LBB2_76
tbnz w13, #0, .LBB2_76
lsr x13, x12, #32
cbnz x13, .LBB2_64
cbnz x13, .LBB2_76
add x13, x8, #30
lsl x12, x12, #10
add x14, x13, x12
cmp x14, x13
b.lo .LBB2_64
tbnz w11, #0, .LBB2_64
b.lo .LBB2_76
tbnz w11, #0, .LBB2_76
add x13, x8, #29
add x14, x13, x12
cmp x14, x13
b.lo .LBB2_64
tbnz w11, #0, .LBB2_64
b.lo .LBB2_76
tbnz w11, #0, .LBB2_76
add x13, x8, #31
add x12, x13, x12
cmp x12, x13
b.lo .LBB2_64
tbnz w11, #0, .LBB2_64
b.lo .LBB2_76
tbnz w11, #0, .LBB2_76
and x10, x9, #0xfffffffe
mov w11, #1024
mov x12, x10
.LBB2_62:
.LBB2_74:
sub w13, w11, #1024
add x14, x8, w11, sxtw
subs x12, x12, #2
@@ -567,28 +735,28 @@ rkf_wf_get_lut:
strb w15, [x14, #29]
strb w16, [x13, #31]
strb w16, [x13, #29]
b.ne .LBB2_62
b.ne .LBB2_74
cmp x10, x9
b.eq .LBB2_33
.LBB2_64:
b.eq .LBB2_34
.LBB2_76:
sub x9, x9, x10
lsl w10, w10, #10
.LBB2_65:
.LBB2_77:
add x11, x8, w10, sxtw
subs x9, x9, #1
add w10, w10, #1024
ldrb w12, [x11, #30]
strb w12, [x11, #31]
strb w12, [x11, #29]
b.ne .LBB2_65
b .LBB2_33
.LBB2_66:
b.ne .LBB2_77
b .LBB2_34
.LBB2_78:
adrp x0, .L.str.11
add x0, x0, :lo12:.L.str.11
bl _printk
lsl w8, w22, #10
mov w9, #13
.LBB2_67:
.LBB2_79:
add x10, x23, w8, uxtw
sub w9, w9, #1
add w8, w8, #1024
@@ -603,11 +771,11 @@ rkf_wf_get_lut:
strb wzr, [x10, #958]
strb wzr, [x10, #992]
strb wzr, [x10, #1022]
b.ne .LBB2_67
b.ne .LBB2_79
cmp w22, #1
b.ge .LBB2_27
b .LBB2_29
.LBB2_69:
b.ge .LBB2_31
b .LBB2_33
.LBB2_81:
sub x12, x9, #1
mov x10, xzr
and x11, x12, #0xffffffff
@@ -616,50 +784,50 @@ rkf_wf_get_lut:
cset w13, ne
cmp xzr, x12, lsr #54
cset w11, ne
tbnz w14, #31, .LBB2_89
tbnz w13, #0, .LBB2_89
tbnz w14, #31, .LBB2_101
tbnz w13, #0, .LBB2_101
lsr x13, x12, #32
cbnz x13, .LBB2_89
cbnz x13, .LBB2_101
add x13, x8, #30
lsl x12, x12, #10
add x14, x13, x12
cmp x14, x13
b.lo .LBB2_89
tbnz w11, #0, .LBB2_89
b.lo .LBB2_101
tbnz w11, #0, .LBB2_101
add x13, x8, #1022
add x14, x13, x12
cmp x14, x13
b.lo .LBB2_89
tbnz w11, #0, .LBB2_89
b.lo .LBB2_101
tbnz w11, #0, .LBB2_101
add x13, x8, #1021
add x14, x13, x12
cmp x14, x13
b.lo .LBB2_89
tbnz w11, #0, .LBB2_89
b.lo .LBB2_101
tbnz w11, #0, .LBB2_101
add x13, x8, #29
add x14, x13, x12
cmp x14, x13
b.lo .LBB2_89
tbnz w11, #0, .LBB2_89
b.lo .LBB2_101
tbnz w11, #0, .LBB2_101
add x13, x8, #31
add x14, x13, x12
cmp x14, x13
b.lo .LBB2_89
tbnz w11, #0, .LBB2_89
b.lo .LBB2_101
tbnz w11, #0, .LBB2_101
add x13, x8, #989
add x12, x13, x12
cmp x12, x13
b.lo .LBB2_89
tbnz w11, #0, .LBB2_89
b.lo .LBB2_101
tbnz w11, #0, .LBB2_101
and x10, x9, #0xfffffffe
mov w11, #1024
mov x12, x10
b .LBB2_86
.LBB2_85:
b .LBB2_98
.LBB2_97:
subs x12, x12, #2
add w11, w11, #2048
b.eq .LBB2_88
.LBB2_86:
b.eq .LBB2_100
.LBB2_98:
sub w14, w11, #1024
add x13, x8, w11, sxtw
add x14, x8, w14, sxtw
@@ -671,33 +839,33 @@ rkf_wf_get_lut:
strb w15, [x13, #29]
strb w16, [x14, #31]
strb w16, [x14, #29]
cbz w23, .LBB2_85
cbz w23, .LBB2_97
add x14, x14, #1021
add x13, x13, #1021
strh wzr, [x14]
strh wzr, [x13]
b .LBB2_85
.LBB2_88:
b .LBB2_97
.LBB2_100:
cmp x10, x9
b.eq .LBB2_33
.LBB2_89:
b.eq .LBB2_34
.LBB2_101:
sub x9, x9, x10
lsl w10, w10, #10
b .LBB2_91
.LBB2_90:
b .LBB2_103
.LBB2_102:
subs x9, x9, #1
add w10, w10, #1024
b.eq .LBB2_33
.LBB2_91:
b.eq .LBB2_34
.LBB2_103:
add x11, x8, w10, sxtw
ldrb w12, [x11, #30]
strb wzr, [x11, #989]
strb w12, [x11, #31]
strb w12, [x11, #29]
cbz w23, .LBB2_90
cbz w23, .LBB2_102
add x11, x11, #1021
strh wzr, [x11]
b .LBB2_90
b .LBB2_102
.Lfunc_end2:
.size rkf_wf_get_lut, .Lfunc_end2-rkf_wf_get_lut
@@ -1331,6 +1499,11 @@ need_pic:
.asciz "rkf waveform get frame number failed\n"
.size .L.str.3, 38
.type .L.str.4,@object
.L.str.4:
.asciz "kzalloc output->data failed\n"
.size .L.str.4, 29
.type .L.str.5,@object
.L.str.5:
.asciz "rkf:v1.0"
@@ -1372,6 +1545,11 @@ need_pic:
.asciz "gray2 waveform framenum < 13 frames\n"
.size .L.str.11, 37
.type .L.str.12,@object
.L.str.12:
.asciz "wf_table or lut_data is NULL\n"
.size .L.str.12, 30
.type .Lswitch.table.rkf_wf_get_lut,@object
.section .rodata,"a",@progbits
.p2align 2