From d7d611d7a11afe9b97ad8b5c8cec910475fa3347 Mon Sep 17 00:00:00 2001 From: Zorro Liu Date: Mon, 15 Sep 2025 10:53:23 +0800 Subject: [PATCH] drm/rockchip: ebc_dev: release version v8.11 Change-Id: I1d3d26161804d74819ff1049e051cb030044b29e Signed-off-by: Zorro Liu --- .../gpu/drm/rockchip/ebc-dev/ebc_dev_y8_v8.S | 2 +- .../gpu/drm/rockchip/ebc-dev/ebc_dma_buf.c | 4 + .../gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.c | 9 +- .../gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.h | 3 +- .../rockchip/ebc-dev/epdlut/pvi_waveform_v8.S | 113 ++++++++++-------- .../rockchip/ebc-dev/epdlut/rkf_waveform_v8.S | 113 ++++++++++-------- .../rockchip/ebc-dev/pmic/fp9931-regulator.c | 4 +- .../rockchip/ebc-dev/pmic/sy7636a-regulator.c | 4 +- 8 files changed, 141 insertions(+), 111 deletions(-) diff --git a/drivers/gpu/drm/rockchip/ebc-dev/ebc_dev_y8_v8.S b/drivers/gpu/drm/rockchip/ebc-dev/ebc_dev_y8_v8.S index 2c2ca369e7aa..41c32616dd89 100644 --- a/drivers/gpu/drm/rockchip/ebc-dev/ebc_dev_y8_v8.S +++ b/drivers/gpu/drm/rockchip/ebc-dev/ebc_dev_y8_v8.S @@ -14194,7 +14194,7 @@ ebc_pm: .type .L.str.2,@object .L.str.2: - .asciz "8.10_y8" + .asciz "8.11_y8" .size .L.str.2, 8 .type .L.str.3,@object diff --git a/drivers/gpu/drm/rockchip/ebc-dev/ebc_dma_buf.c b/drivers/gpu/drm/rockchip/ebc-dev/ebc_dma_buf.c index c02b90990a11..a7bb9599cedb 100644 --- a/drivers/gpu/drm/rockchip/ebc-dev/ebc_dma_buf.c +++ b/drivers/gpu/drm/rockchip/ebc-dev/ebc_dma_buf.c @@ -74,7 +74,11 @@ static void *ebc_dmabuf_vmap(struct dma_buf *dma_buf) { struct ebc_dmabuf *ebcbuf = to_ebc_dmabuf(dma_buf); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) + return vm_map_ram(ebcbuf->pages, ebcbuf->npages, 0); +#else return vm_map_ram(ebcbuf->pages, ebcbuf->npages, 0, PAGE_KERNEL); +#endif } #endif diff --git a/drivers/gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.c b/drivers/gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.c index 4de3f77b3b16..1cd4d645aa0d 100644 --- a/drivers/gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.c +++ b/drivers/gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.c @@ -106,7 +106,14 @@ int epd_gray2_last_repair(u8 *wf_table) //return value //0 : no modify 1: modify by customer -int epd_overlay_gray2_repair(u8 *wf_table) +int epd_overlay_gray2_repair(u8 *wf_table, int frame_num) +{ + return 0; +} + +//return value +//0 : no modify 1: modify by customer +int epd_regal_repair(u8 *wf_table, int frame_num) { return 0; } diff --git a/drivers/gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.h b/drivers/gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.h index a90cc3e85604..19c505e8f391 100644 --- a/drivers/gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.h +++ b/drivers/gpu/drm/rockchip/ebc-dev/epdlut/epd_lut.h @@ -60,7 +60,8 @@ int epd_lut_get_original(struct epd_lut_data *output, enum epd_lut_type lut_type //you can change overlay lut mode here int epd_overlay_lut(void); int epd_gray2_last_repair(u8 *wf_table); -int epd_overlay_gray2_repair(u8 *wf_table); +int epd_overlay_gray2_repair(u8 *wf_table, int frame_num); +int epd_regal_repair(u8 *wf_table, int frame_num); /* * PVI Waveform Interfaces diff --git a/drivers/gpu/drm/rockchip/ebc-dev/epdlut/pvi_waveform_v8.S b/drivers/gpu/drm/rockchip/ebc-dev/epdlut/pvi_waveform_v8.S index f83bede36629..85ddb507991f 100644 --- a/drivers/gpu/drm/rockchip/ebc-dev/epdlut/pvi_waveform_v8.S +++ b/drivers/gpu/drm/rockchip/ebc-dev/epdlut/pvi_waveform_v8.S @@ -452,6 +452,7 @@ pvi_wf_get_lut: b.ne .LBB1_71 .LBB1_74: mov x0, x22 + mov w1, w21 bl epd_overlay_gray2_repair cbnz w0, .LBB1_76 lsl w8, w21, #10 @@ -1032,62 +1033,70 @@ pvi_wf_normal_fix: .p2align 2 .type pvi_wf_regal_fix,@function pvi_wf_regal_fix: - cmp w1, #1 - b.lt .LBB5_3 - mov w9, w1 + str x30, [x18], #8 + stp x29, x30, [sp, #-32]! + stp x20, x19, [sp, #16] + mov x29, sp + mov w20, w1 + mov x19, x0 + bl epd_regal_repair + cbnz w0, .LBB5_4 + cmp w20, #1 + b.lt .LBB5_4 + mov w9, w20 mov x8, xzr lsl x9, x9, #10 -.LBB5_2: - add x10, x0, w8, sxtw +.LBB5_3: + add x10, x19, w8, sxtw add x8, x8, #1024 cmp x9, x8 - ldrb w11, [x10, #30] - ldrb w12, [x10, #94] - strb w11, [x10, #31] - strb w11, [x10, #29] - ldrb w11, [x10, #158] - strb w12, [x10, #95] - strb w12, [x10, #93] - ldrb w12, [x10, #222] - strb w11, [x10, #159] - strb w11, [x10, #157] - ldrb w11, [x10, #286] - strb w12, [x10, #223] - strb w12, [x10, #221] - ldrb w12, [x10, #350] - strb w11, [x10, #287] - strb w11, [x10, #285] - ldrb w11, [x10, #414] - strb w12, [x10, #351] - strb w12, [x10, #349] - ldrb w12, [x10, #478] - strb w11, [x10, #415] - strb w11, [x10, #413] - ldrb w11, [x10, #542] - strb w12, [x10, #479] - strb w12, [x10, #477] - ldrb w12, [x10, #606] - strb w11, [x10, #543] - strb w11, [x10, #541] - ldrb w11, [x10, #670] - strb w12, [x10, #607] - strb w12, [x10, #605] - ldrb w12, [x10, #734] - strb w11, [x10, #671] - strb w11, [x10, #669] - ldrb w11, [x10, #798] - strb w12, [x10, #735] - strb w12, [x10, #733] - ldrb w12, [x10, #862] - strb w11, [x10, #799] - strb w11, [x10, #797] - ldrb w11, [x10, #926] - strb w12, [x10, #863] - strb w12, [x10, #861] - strb w11, [x10, #927] - strb w11, [x10, #925] - b.ne .LBB5_2 -.LBB5_3: + ldrb w11, [x10, #94] + ldrb w12, [x10, #158] + strb w11, [x10, #95] + strb w11, [x10, #93] + ldrb w11, [x10, #222] + strb w12, [x10, #159] + strb w12, [x10, #157] + ldrb w12, [x10, #286] + strb w11, [x10, #223] + strb w11, [x10, #221] + ldrb w11, [x10, #350] + strb w12, [x10, #287] + strb w12, [x10, #285] + ldrb w12, [x10, #414] + strb w11, [x10, #351] + strb w11, [x10, #349] + ldrb w11, [x10, #478] + strb w12, [x10, #415] + strb w12, [x10, #413] + ldrb w12, [x10, #542] + strb w11, [x10, #479] + strb w11, [x10, #477] + ldrb w11, [x10, #606] + strb w12, [x10, #543] + strb w12, [x10, #541] + ldrb w12, [x10, #670] + strb w11, [x10, #607] + strb w11, [x10, #605] + ldrb w11, [x10, #734] + strb w12, [x10, #671] + strb w12, [x10, #669] + ldrb w12, [x10, #798] + strb w11, [x10, #735] + strb w11, [x10, #733] + ldrb w11, [x10, #862] + strb w12, [x10, #799] + strb w12, [x10, #797] + ldrb w12, [x10, #926] + strb w11, [x10, #863] + strb w11, [x10, #861] + strb w12, [x10, #927] + strb w12, [x10, #925] + b.ne .LBB5_3 +.LBB5_4: + ldp x20, x19, [sp, #16] + ldp x29, x30, [sp], #32 + ldr x30, [x18, #-8]! ret .Lfunc_end5: .size pvi_wf_regal_fix, .Lfunc_end5-pvi_wf_regal_fix diff --git a/drivers/gpu/drm/rockchip/ebc-dev/epdlut/rkf_waveform_v8.S b/drivers/gpu/drm/rockchip/ebc-dev/epdlut/rkf_waveform_v8.S index 70a4f7fa49ce..1b585ecd3093 100644 --- a/drivers/gpu/drm/rockchip/ebc-dev/epdlut/rkf_waveform_v8.S +++ b/drivers/gpu/drm/rockchip/ebc-dev/epdlut/rkf_waveform_v8.S @@ -777,6 +777,7 @@ rkf_wf_get_lut: b.ne .LBB3_75 .LBB3_78: mov x0, x22 + mov w1, w21 bl epd_overlay_gray2_repair cbnz w0, .LBB3_80 lsl w8, w21, #10 @@ -1477,62 +1478,70 @@ rkf_wf_normal_fix: .p2align 2 .type rkf_wf_regal_fix,@function rkf_wf_regal_fix: - cmp w1, #1 - b.lt .LBB7_3 - mov w9, w1 + str x30, [x18], #8 + stp x29, x30, [sp, #-32]! + stp x20, x19, [sp, #16] + mov x29, sp + mov w20, w1 + mov x19, x0 + bl epd_regal_repair + cbnz w0, .LBB7_4 + cmp w20, #1 + b.lt .LBB7_4 + mov w9, w20 mov x8, xzr lsl x9, x9, #10 -.LBB7_2: - add x10, x0, w8, sxtw +.LBB7_3: + add x10, x19, w8, sxtw add x8, x8, #1024 cmp x9, x8 - ldrb w11, [x10, #30] - ldrb w12, [x10, #94] - strb w11, [x10, #31] - strb w11, [x10, #29] - ldrb w11, [x10, #158] - strb w12, [x10, #95] - strb w12, [x10, #93] - ldrb w12, [x10, #222] - strb w11, [x10, #159] - strb w11, [x10, #157] - ldrb w11, [x10, #286] - strb w12, [x10, #223] - strb w12, [x10, #221] - ldrb w12, [x10, #350] - strb w11, [x10, #287] - strb w11, [x10, #285] - ldrb w11, [x10, #414] - strb w12, [x10, #351] - strb w12, [x10, #349] - ldrb w12, [x10, #478] - strb w11, [x10, #415] - strb w11, [x10, #413] - ldrb w11, [x10, #542] - strb w12, [x10, #479] - strb w12, [x10, #477] - ldrb w12, [x10, #606] - strb w11, [x10, #543] - strb w11, [x10, #541] - ldrb w11, [x10, #670] - strb w12, [x10, #607] - strb w12, [x10, #605] - ldrb w12, [x10, #734] - strb w11, [x10, #671] - strb w11, [x10, #669] - ldrb w11, [x10, #798] - strb w12, [x10, #735] - strb w12, [x10, #733] - ldrb w12, [x10, #862] - strb w11, [x10, #799] - strb w11, [x10, #797] - ldrb w11, [x10, #926] - strb w12, [x10, #863] - strb w12, [x10, #861] - strb w11, [x10, #927] - strb w11, [x10, #925] - b.ne .LBB7_2 -.LBB7_3: + ldrb w11, [x10, #94] + ldrb w12, [x10, #158] + strb w11, [x10, #95] + strb w11, [x10, #93] + ldrb w11, [x10, #222] + strb w12, [x10, #159] + strb w12, [x10, #157] + ldrb w12, [x10, #286] + strb w11, [x10, #223] + strb w11, [x10, #221] + ldrb w11, [x10, #350] + strb w12, [x10, #287] + strb w12, [x10, #285] + ldrb w12, [x10, #414] + strb w11, [x10, #351] + strb w11, [x10, #349] + ldrb w11, [x10, #478] + strb w12, [x10, #415] + strb w12, [x10, #413] + ldrb w12, [x10, #542] + strb w11, [x10, #479] + strb w11, [x10, #477] + ldrb w11, [x10, #606] + strb w12, [x10, #543] + strb w12, [x10, #541] + ldrb w12, [x10, #670] + strb w11, [x10, #607] + strb w11, [x10, #605] + ldrb w11, [x10, #734] + strb w12, [x10, #671] + strb w12, [x10, #669] + ldrb w12, [x10, #798] + strb w11, [x10, #735] + strb w11, [x10, #733] + ldrb w11, [x10, #862] + strb w12, [x10, #799] + strb w12, [x10, #797] + ldrb w12, [x10, #926] + strb w11, [x10, #863] + strb w11, [x10, #861] + strb w12, [x10, #927] + strb w12, [x10, #925] + b.ne .LBB7_3 +.LBB7_4: + ldp x20, x19, [sp, #16] + ldp x29, x30, [sp], #32 + ldr x30, [x18, #-8]! ret .Lfunc_end7: .size rkf_wf_regal_fix, .Lfunc_end7-rkf_wf_regal_fix diff --git a/drivers/gpu/drm/rockchip/ebc-dev/pmic/fp9931-regulator.c b/drivers/gpu/drm/rockchip/ebc-dev/pmic/fp9931-regulator.c index 7924f154fe76..bf100bfc4e53 100644 --- a/drivers/gpu/drm/rockchip/ebc-dev/pmic/fp9931-regulator.c +++ b/drivers/gpu/drm/rockchip/ebc-dev/pmic/fp9931-regulator.c @@ -157,7 +157,7 @@ static int fp9931_get_status(struct regulator_dev *rdev) return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) static int fp9931_set_suspend_disable(struct regulator_dev *rdev) { DECLARE_BITMAP(values, FP9931_MAX_ENABLE_GPIO_NUM); @@ -214,7 +214,7 @@ static int fp9931_set_suspend_disable(struct regulator_dev *rdev) } #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) static int fp9931_resume(struct regulator_dev *rdev) { DECLARE_BITMAP(values, FP9931_MAX_ENABLE_GPIO_NUM); diff --git a/drivers/gpu/drm/rockchip/ebc-dev/pmic/sy7636a-regulator.c b/drivers/gpu/drm/rockchip/ebc-dev/pmic/sy7636a-regulator.c index 8062860e9a69..efbd76abb740 100644 --- a/drivers/gpu/drm/rockchip/ebc-dev/pmic/sy7636a-regulator.c +++ b/drivers/gpu/drm/rockchip/ebc-dev/pmic/sy7636a-regulator.c @@ -102,7 +102,7 @@ static int sy7636a_get_status(struct regulator_dev *rdev) return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) static int sy7636a_set_suspend_disable(struct regulator_dev *rdev) { DECLARE_BITMAP(values, SY7636A_MAX_ENABLE_GPIO_NUM); @@ -166,7 +166,7 @@ static int sy7636a_set_suspend_disable(struct regulator_dev *rdev) } #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) static int sy7636a_resume(struct regulator_dev *rdev) { DECLARE_BITMAP(values, SY7636A_MAX_ENABLE_GPIO_NUM);