Commit Graph

649617 Commits

Author SHA1 Message Date
yao liu
da29ea3112 osd: add osd blend bypass function for tm2 [2/3]
PD#SWPL-6631

Problem:
dv certification need osd blend bypass

Solution:
add osd blend bypass function

Verify:
verified on tm2 t96e2

Change-Id: I91ba9c622aacc7bc9ad657105fd5e53a3cee595b
Signed-off-by: yao liu <yao.liu@amlogic.com>
2020-06-29 11:45:50 +09:00
yao liu
f8a69636c3 dolby: TM2 black screen on 4k60hz [1/1]
PD#SWPL-11431

Problem:
black screen on 4k60hz
display abnormal on 1080p24hz/1080i/576p/480p

Solution:
1.Adjust potch according to resolution
2.Add tm2 in is_graphics_output_off
3.Move osd sc to the back of core2

Verify:
Verified on TM2

Change-Id: Ida1b4a67b3a7233d3a03b0536d246a0bd677e90c
Signed-off-by: yao liu <yao.liu@amlogic.com>
2020-06-29 11:45:49 +09:00
Cao Jian
8a5dca900d osd: overflow on 4k src height/width left-shift [1/1]
PD#SWPL-10952

Problem:
osd for 4k native UI

Solution:
modify u32 to u64 for left-shift

Verify:
verified on g12b-w400

Change-Id: I9e98e3b5769d61132570f3f4bb1f47694cffde8f
Signed-off-by: Cao Jian <jian.cao@amlogic.com>
2020-06-29 11:45:49 +09:00
sky zhou
aee823f14c osd: osd ext leaked buf when viu2 displaymode is NULL. [1/1]
PD#TV-7713

Problem:
osd buffer leaked dma buffer when switch
display pipe.

Solution:
when viu is NULL, osd need still release correct
display file.

Verify:
verified on macroni

Change-Id: Ib2df6b022b6fd654430eedae08e351ae53701fc1
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2020-06-29 11:45:49 +09:00
Pengcheng Chen
8db46377b1 rdma: add rdma multi reg trace function [1/1]
PD#SWPL-11388

Problem:
rdma not support multi reg trace

Solution:
add rdma multi reg trace function

Verify:
verify by g12b w400

Change-Id: I74496e11f85af5f2e9aa99108dfc5842eb98d9fc
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2020-06-29 11:45:49 +09:00
Pengcheng Chen
85561b17d8 osd: fixed fb mmap failed on android [3/3]
PD#SWPL-6631

Problem:
dolby vision graphic tests need fb_test

Solution:
Alloc buffer when mmap

Verify:
verified on tm2 t96e2

Change-Id: I12896d7ef9ad4a8122e2784c4692ff2d0bc69d1b
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2020-06-29 11:45:49 +09:00
Pengcheng Chen
d59e7b5b9e osd: add wait_hw_vsync_viu2 [1/1]
PD#TV-7584

Problem:
osd on viu2 present timeout

Solution:
add wait_hw_vsync_viu2

Verify:
Verified on X30A1-T962X2

Change-Id: Iab80f4cef830652923e1de73eba6d87715bad855
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2020-06-29 11:45:49 +09:00
Pengcheng Chen
b6e7b048ec osd: add osd virtual fb support [1/1]
PD#SWPL-8187

Problem:
need implement the new virtual FB device

Solution:
add osd virtual fb support

Verify:
Verified on U200 spi lcd board

Change-Id: I52c4257f6a0a202eb63b2ee3383f6e306e5ec16a
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2020-06-29 11:45:49 +09:00
Pengcheng Chen
f8e4ac85c2 buildroot: fix buildroot compile error and ge2d crash issue [1/1]
PD#SWPL-10483

Problem:
1. buildroot autobuild error
2. buildroot ge2d crash on s400

Solution:
1. fix buildroot compile error
2. move video_keep_init from _init to probe

Verify:
verified on s400,w400

Change-Id: I624fed9669387c94a50974f77b32a4730db08314
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2020-06-29 11:45:49 +09:00
Luke Go
c4899c384e Revert "ODROID-N2: cpu-opp-table: Add 1000 microvolts."
This reverts commit 1fbc1ea16a.
2020-06-29 11:45:49 +09:00
Hong Guo
584c3cd9e1 cpufreq: update dvfs voltage and pwm for g12b revb [1/1]
PD#SWPL-7636

Problem:
update dvfs voltage and pwm for g12b revb

Solution:
update dvfs voltage and pwm for g12b revb

Verify:
update dvfs voltage and pwm for g12b revb

Change-Id: I29deea791126fcb1819be380ed81bc2aa29eeec6
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2020-06-29 11:45:49 +09:00
Tao Zeng
3cbc6e6115 event: restore watch point after cpu pm event [1/1]
PD#TV-9668

Problem:
After cpu idle enabled, watch point event register will be cleared
if cpu exit pm(idle). This will cause watch point can't work.

Solution:
re-enable watch point after cpu exit pm(idle)

Verify:
TL1

Change-Id: I4fc2002eaabecd4c5e60a5916bc29e0107882bec
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2020-06-29 11:45:49 +09:00
Hanjie Lin
802b47d3f8 mm: vmap: decrease wrps num [1/1]
PD#SWPL-6813

Problem:
sys_ptrace watchpoint can't stop

Solution:
decrease wrps num

Verify:
u212

Change-Id: I18947bd91f8dd07cedeebbfca6d7ce01107c6a3e
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2020-06-29 11:45:48 +09:00
Tao Zeng
c93f59a541 vmap: print pfn for register in vmalloc range [1/1]
PD#SWPL-5564

Problem:
When open VMAP for kernel stack, if we meet kernel panic log, we
can't know physical address of stack and hard to debug.

Solution:
Print pfn for register in vmalloc range

Verify:
p212

Change-Id: Iee120df1feab88e412ef63e87c2e2bb4ad0645fb
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2020-06-29 11:45:48 +09:00
Jiamin Ma
4333209505 backtrace: add validation checking for fp [1/1]
PD#SWPL-15010

Problem:
Crash if keep executing echo w > /proc/sysrq-trigger
on android platform

Solution:
Add necessary checking for the fp to be dereferenced in
dump_backtrace_entry with VMAP stack enabled

Verify:
U212

Change-Id: I69d8d7353cf99a71dc3e7640efa1d460ef2f5f9a
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2020-06-29 11:45:48 +09:00
Hanjie Lin
e74c229341 perf: pmu fine-tune for aarch32/64 of A53/A55/A73 [1/1]
PD#SWPL-13243

Problem:
pmu event is not accurate or not complete in A53/A55/A73.

Solution:
1, modify event config for A53/A55/A73.
2, perf executable file must compiled from latest kernel(5.1+)
3, A55 events are most complete, A73 are least complete(eg: less ld_retired/st_retired/stall/prefetch events)
4, A55/A53 same event meanings simlar, but A73 is more different(eg: L1/L2 dcache/icache loads meanings)

sample commands:
a55 arm64:
perf stat -e task-clock,context-switches,cpu-migrations,page-faults,instructions,armv8_pmuv3/ld_retired/,armv8_pmuv3/st_retired/,cycles,branch-loads,branch-load-misses,armv8_pmuv3/a55_l1d_cache_rd/,armv8_pmuv3/a55_l1d_cache_refill_rd/,armv8_pmuv3/a55_l1d_cache_wr/,armv8_pmuv3/a55_l1d_cache_refill_wr/,L1-icache-loads,L1-icache-load-misses,armv8_pmuv3/a55_l2d_cache_rd/,armv8_pmuv3/a55_l2d_cache_refill_rd/,armv8_pmuv3/a55_l1d_cache_refill_inner/,armv8_pmuv3/a55_l1d_cache_refill_outer/,armv8_pmuv3/a55_l1d_cache_refill_prefetch/,armv8_pmuv3/a55_l2d_cache_refill_prefetch/,armv8_pmuv3/a5x_stall_frontend_cache/,armv8_pmuv3/a5x_stall_frontend_tlb/,armv8_pmuv3/a5x_stall_backend_ld/,armv8_pmuv3/a55_stall_backend_ld_cache/,armv8_pmuv3/a55_stall_backend_ld_tlb/,armv8_pmuv3/a5x_stall_backend_st/,armv8_pmuv3/a5x_stall_backend_ilock_agu/,armv8_pmuv3/a5x_stall_backend_ilock_fpu/ ls

a53 arm64:
perf stat -e task-clock,context-switches,cpu-migrations,page-faults,instructions,armv8_pmuv3/ld_retired/,armv8_pmuv3/st_retired/,cycles,branch-loads,branch-load-misses,armv8_pmuv3/l1d_cache/,armv8_pmuv3/l1d_cache_refill/,L1-icache-loads,L1-icache-load-misses,armv8_pmuv3/a5x_l2d_cache/,armv8_pmuv3/a5x_l2d_cache_refill/,armv8_pmuv3/a53_cache_refill_prefetch/,armv8_pmuv3/a53_scu_snooped/,armv8_pmuv3/a5x_stall_frontend_cache/,armv8_pmuv3/a5x_stall_frontend_tlb/,armv8_pmuv3/a5x_stall_backend_ld/,,armv8_pmuv3/a5x_stall_backend_st/,armv8_pmuv3/a5x_stall_backend_ilock_agu/,armv8_pmuv3/a5x_stall_backend_ilock_fpu/ ls

a73 arm64: (w400 bind to a73 cpu2)
perf stat -e task-clock,context-switches,cpu-migrations,page-faults,instructions,cycles,branch-loads,branch-load-misses,armv8_pmuv3/l1d_cache/,armv8_pmuv3/l1d_cache_refill/,armv8_pmuv3/a55_l1d_cache_rd/,armv8_pmuv3/a55_l1d_cache_wr/,armv8_pmuv3/a5x_l2d_cache/,armv8_pmuv3/a5x_l2d_cache_refill/,armv8_pmuv3/a55_l2d_cache_rd/,armv8_pmuv3/a55_l2d_cache_wr/ busybox taskset 4 ls

a55 arm:
perf stat -e task-clock,context-switches,cpu-migrations,page-faults,instructions,armv7_cortex_a15/ld_retired/,armv7_cortex_a15/st_retired/,cycles,branch-loads,branch-load-misses,armv7_cortex_a15/a55_l1d_cache_rd/,armv7_cortex_a15/a55_l1d_cache_refill_rd/,armv7_cortex_a15/a55_l1d_cache_wr/,armv7_cortex_a15/a55_l1d_cache_refill_wr/,L1-icache-loads,L1-icache-load-misses,armv7_cortex_a15/a55_l2d_cache_rd/,armv7_cortex_a15/a55_l2d_cache_refill_rd/,armv7_cortex_a15/a55_l1d_cache_refill_inner/,armv7_cortex_a15/a55_l1d_cache_refill_outer/,armv7_cortex_a15/a55_l1d_cache_refill_prefetch/,armv7_cortex_a15/a55_l2d_cache_refill_prefetch/,armv7_cortex_a15/a5x_stall_frontend_cache/,armv7_cortex_a15/a5x_stall_frontend_tlb/,armv7_cortex_a15/a5x_stall_backend_ld/,armv7_cortex_a15/a55_stall_backend_ld_cache/,armv7_cortex_a15/a55_stall_backend_ld_tlb/,armv7_cortex_a15/a5x_stall_backend_st/,armv7_cortex_a15/a5x_stall_backend_ilock_agu/,armv7_cortex_a15/a5x_stall_backend_ilock_fpu/ ls

a53 arm:
perf stat -e task-clock,context-switches,cpu-migrations,page-faults,instructions,armv7_cortex_a15/ld_retired/,armv7_cortex_a15/st_retired/,cycles,branch-loads,branch-load-misses,armv7_cortex_a15/l1d_cache/,armv7_cortex_a15/l1d_cache_refill/,L1-icache-loads,L1-icache-load-misses,armv7_cortex_a15/a5x_l2d_cache/,armv7_cortex_a15/a5x_l2d_cache_refill/,armv7_cortex_a15/a53_cache_refill_prefetch/,armv7_cortex_a15/a53_scu_snooped/,armv7_cortex_a15/a5x_stall_frontend_cache/,armv7_cortex_a15/a5x_stall_frontend_tlb/,armv7_cortex_a15/a5x_stall_backend_ld/,armv7_cortex_a15/a5x_stall_backend_st/,armv7_cortex_a15/a5x_stall_backend_ilock_agu/,armv7_cortex_a15/a5x_stall_backend_ilock_fpu/ ls

a73 arm: (w400 bind to a73 cpu2)
perf stat -e task-clock,context-switches,cpu-migrations,page-faults,instructions,cycles,branch-loads,branch-load-misses,armv7_cortex_a15/l1d_cache/,armv7_cortex_a15/l1d_cache_refill/,armv7_cortex_a15/a55_l1d_cache_rd/,armv7_cortex_a15/a55_l1d_cache_wr/,armv7_cortex_a15/a5x_l2d_cache/,armv7_cortex_a15/a5x_l2d_cache_refill/,armv7_cortex_a15/a55_l2d_cache_rd/,armv7_cortex_a15/a55_l2d_cache_wr/ busybox taskset 4 ls

Verify:
ac200/u200/w400

Change-Id: I7f11e1480c3c27d016b011d2a84c33e824f69b08
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2020-06-29 11:45:48 +09:00
daozai.ye
61a21b7619 OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2019-8912) Risk:[] [1/1]
PD#OTT-6791

Problem:
net: crypto set sk to NULL when af_alg_release.
KASAN has found use-after-free in sockfs_setattr.
The existed commit 6d8c50dcb0 ("socket: close race condition between sock_close()
and sockfs_setattr()") is to fix this simillar issue, but it seems to ignore
that crypto module forgets to set the sk to NULL after af_alg_release.

KASAN report details as below:
BUG: KASAN: use-after-free in sockfs_setattr+0x120/0x150
Write of size 4 at addr ffff88837b956128 by task syz-executor0/4186

CPU: 2 PID: 4186 Comm: syz-executor0 Not tainted xxx + #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.10.2-1ubuntu1 04/01/2014
Call Trace:
dump_stack+0xca/0x13e
print_address_description+0x79/0x330
? vprintk_func+0x5e/0xf0
kasan_report+0x18a/0x2e0
? sockfs_setattr+0x120/0x150
sockfs_setattr+0x120/0x150
? sock_register+0x2d0/0x2d0
notify_change+0x90c/0xd40
? chown_common+0x2ef/0x510
chown_common+0x2ef/0x510
? chmod_common+0x3b0/0x3b0
? __lock_is_held+0xbc/0x160
? __sb_start_write+0x13d/0x2b0
? __mnt_want_write+0x19a/0x250
do_fchownat+0x15c/0x190
? __ia32_sys_chmod+0x80/0x80
? trace_hardirqs_on_thunk+0x1a/0x1c
__x64_sys_fchownat+0xbf/0x160
? lockdep_hardirqs_on+0x39a/0x5e0
do_syscall_64+0xc8/0x580
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x462589
Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89
f7 48 89 d6 48 89
ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3
48 c7 c1 bc ff ff
ff f7 d8 64 89 01 48
RSP: 002b:00007fb4b2c83c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000104
RAX: ffffffffffffffda RBX: 000000000072bfa0 RCX: 0000000000462589
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000007
RBP: 0000000000000005 R08: 0000000000001000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb4b2c846bc
R13: 00000000004bc733 R14: 00000000006f5138 R15: 00000000ffffffff

Allocated by task 4185:
kasan_kmalloc+0xa0/0xd0
__kmalloc+0x14a/0x350
sk_prot_alloc+0xf6/0x290
sk_alloc+0x3d/0xc00
af_alg_accept+0x9e/0x670
hash_accept+0x4a3/0x650
__sys_accept4+0x306/0x5c0
__x64_sys_accept4+0x98/0x100
do_syscall_64+0xc8/0x580
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 4184:
__kasan_slab_free+0x12e/0x180
kfree+0xeb/0x2f0
__sk_destruct+0x4e6/0x6a0
sk_destruct+0x48/0x70
__sk_free+0xa9/0x270
sk_free+0x2a/0x30
af_alg_release+0x5c/0x70
__sock_release+0xd3/0x280
sock_close+0x1a/0x20
__fput+0x27f/0x7f0
task_work_run+0x136/0x1b0
exit_to_usermode_loop+0x1a7/0x1d0
do_syscall_64+0x461/0x580
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Syzkaller reproducer:
r0 = perf_event_open(&(0x7f0000000000)={0x0, 0x70, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, @perf_config_ext}, 0x0, 0x0,
0xffffffffffffffff, 0x0)
r1 = socket$alg(0x26, 0x5, 0x0)
getrusage(0x0, 0x0)
bind(r1, &(0x7f00000001c0)=@alg={0x26, 'hash\x00', 0x0, 0x0,
'sha256-ssse3\x00'}, 0x80)
r2 = accept(r1, 0x0, 0x0)
r3 = accept4$unix(r2, 0x0, 0x0, 0x0)
r4 = dup3(r3, r0, 0x0)
fchownat(r4, &(0x7f00000000c0)='\x00', 0x0, 0x0, 0x1000)

Fixes: 6d8c50dcb0 ("socket: close race condition between sock_close() and sockfs_setattr()")

Solution:
set the sk to NULL after af_alg_release

This fixes CVE-2019-8912

Verify:
Raven

Change-Id: I0a655942b6cd522ecd2255af8f1fc1f78978d286
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2020-06-29 11:45:48 +09:00
Kuibao Zhang
967bafe4e5 BT: support rtl8761atv [1/1]
PD#OTT-2730

Problem:
    1.BT open fail;
    2.the problem is caused by Flow Control;

Solution:
    1.set host cts pull-down as default on the dts.

Verify:
    Galilei.

Change-Id: I42aa3bfa263d4330219268622bce94bfc24ced8a
Signed-off-by: Kuibao Zhang <kuibao.zhang@amlogic.com>
2020-06-29 11:45:48 +09:00
Bichao Zheng
f07216eb47 irblaster: meson: refactored irblaster driver [1/1]
PD#SWPL-1856

Problem:
refactored irblaster code

Solution:
1. Refactor the code according to the core, provider, and consumer
   frameworks.
2. Provide software encode to let irblaster work according to different
   protocols
3. Provide a unified consumer interface to allow other consumer drivers
   to use irblaster.

Verify:
test pass on g12a_u200_v1

Change-Id: Ifd841ef0ed741b7fd721defc25691744ea2103f0
Signed-off-by: Bichao Zheng <bichao.zheng@amlogic.com>
2020-06-29 11:45:48 +09:00
Hong Guo
f60997d442 Change-Id: I6936c1479ba1c159e52ab56b2a7337759c9a1e7f 2020-06-29 11:45:48 +09:00
Luke Go
adb48c8cdf Revert "ODROID-N2: arm/dts: add missing reserved memory to prevent unknown crash"
This reverts commit 128f6fb841.
2020-06-29 11:45:48 +09:00
Luke Go
aa55bdf34f sm1 apply old g12 state.
Change-Id: I72fb585884d6448fd9ffe738b4499800c7b104e4
2020-06-29 11:45:48 +09:00
Guosong Zhou
8fe1ad84ea camera: add mipi csi driver for sm1 [1/1]
PD#SWPL-5388

Problem:
sm1 board camera need add mipi csi module

Solution:
add mipi csi module

Verify:
verified on SM1 AC200

Change-Id: I819f2f74aa8da7d725cb59e5636e790185964f79
Signed-off-by: Guosong Zhou <guosong.zhou@amlogic.com>
2020-06-29 11:45:48 +09:00
Nan Li
b8c9ab7fc2 sd: optimize sd_uart jtag pin cfg [1/1]
PD#SWPL-17140

Problem:
sd_uart jtag pin cfg error.

Solution:
modify sd_uart jtag pin dts cfgs.

Verify:
sm1

Change-Id: I66a2f147110e48d53bd2fa08ac3860426ffd1e7d
Signed-off-by: Nan Li <nan.li@amlogic.com>
2020-06-29 11:45:47 +09:00
Nan Li
1d985cec2d sd: fix dts set err [1/1]
PD#SWPL-14953

Problem:
commit: 64ef52a0160d33a2aa88eff05a373bafc6d8637d
arm64 dts set err.

Solution:
modify it.

Verify:
sm1_ac200

Change-Id: Ida45806ec2232435d9d7b40f5286a46528f8ab73
Signed-off-by: Nan Li <nan.li@amlogic.com>
2020-06-29 11:45:47 +09:00
Nan Li
1a249d948b sd: add sd power cycle for sd3.0 [1/1]
PD#SWPL-14953

Problem:
SD card 3.0 mode requires power cycle.
if not, the initialization of SD card will be affected.

Solution:
add SD power cycle supported.

Verify:
sm1_ac200

Change-Id: Ic8aecadf3b63660adb74ff4ecf0a5d38037b579f
Signed-off-by: Nan Li <nan.li@amlogic.com>
2020-06-29 11:45:47 +09:00
Nanxin.Qin
21288ca37d media: add the register sets for parser B [1/1]
PD#SWPL-5417

Problem:
bringup sm1 and tm2.

Solution:
add the register sets for parser B.

Verify:
AB311

Change-Id: I3c1620d69260f92c8d1590976950030604b7dd80
Signed-off-by: Nanxin.Qin <nanxin.qin@amlogic.com>
2020-06-29 11:45:47 +09:00
Yong Qin
3ed583a244 cec: for sm1 support ARC [1/1]
PD#SWPL-12148

Problem:
no output config

Solution:
sm1 dts add output config

Verify:
sm1

Change-Id: Ie431b5e485c5ad199d2840070dbf940ff88912c0
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2020-06-29 11:45:47 +09:00
cancan.chang
3a7bd74c43 galcore: resolve the conflict between usb module and nn module [1/1]
PD#SH-986

Problem:
nn module and usb module confilct

Solution:
add a label in galcore

Verify:
s905d3 w400

Change-Id: I3f5b8738aa8924c7a292fc1da6dda1d2002a77ae
Signed-off-by: "cancan.chang" <cancan.chang@amlogic.com>
2020-06-29 11:45:47 +09:00
Jiamin Ma
ab2a0dd78f DTS: fix compile warnings [1/1]
PD#SWPL-12245

Problem:
Warning (resets_property): Missing property '#reset-cells'

Solution:
Add #reset-cells to node clock-controller

Verify:
P212

Change-Id: I5bc01ab88774be2088764ee6fb0eb9a863894ca2
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2020-06-29 11:45:47 +09:00
Qianggui Song
44cb00d7cf irqchip: sm1 support double-edge gpio irq trigger [1/1]
PD#SWPL-5395

Problem:
sm1 support double-edge trigger, current code do not support.

Solution:
add relatvie bitmask to support this function.

Verify:
ptm & sm1_skt

Change-Id: I48ebc9b38db868f946c49b6fd5f98d427b2669df
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2020-06-29 11:45:47 +09:00
Tao Zeng
6c72eb1412 ramdump: write compressed data [2/2]
PD#SWPL-6193

Problem:
ramdump need write compressed data to persist storage device.
But if we write it under uboot, it may cause journal and block
bitmap mismatch due to different version of file system. This
caused kernel panic after ramdump finished.

Solution:
Write compressed data under kernel.
This change also removed some extern function of ramdump since
we use sticky register to store ramdump information.

Verify:
p212

Change-Id: Idd83ec6ead4783918b90a39cf716fd3117402278
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2020-06-29 11:45:47 +09:00
Shunzhou Jiang
e56c051873 clk: sm1: add sm1 dsu clk notify for change dsu freq [1/1]
PD#SWPL-8145

Problem:
dsu clk can't change freq

Solution:
add sm1 dsu clk notify

Verify:
sm1_skt

Change-Id: If3ecf1066b49c07e6af69ce342956cb0469a5f87
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2020-06-29 11:45:47 +09:00
Lei Qian
1ba443cfdc clock: merge from mainline
PD#SWPL-15312

Change-Id: Icf34b5ebe85efb0565536144df854bc56ebd4791
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2020-06-29 11:45:47 +09:00
Jian Hu
44f39642cc clk: x301: cpu hangup when play 3D game [1/1]
PD#SWPL-9471

Problem:
it will hangup when play 3D game for a long time

Solution:
using the origin clk-mux ops to register cpu clock

Verify:
test passed on x301

Change-Id: I1b977e3a9559ef5f376d4cb8a4735e943c07f525
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2020-06-29 11:45:46 +09:00
Ao Xu
a982972fc4 drm: solve debug node write string issue [1/1]
PD#SWPL-15143

Problem:
userspace program use the write() syscall to write the node.
when write the strlen() length content, it will fail.

Solution:
use the buf[size] to instead of buf[size-1]

Verify:
U200

Change-Id: I886d9a1cbf3da459476bca76c9a5708ecbc20afe
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2020-06-29 11:45:46 +09:00
Dezhi Kong
cab45b3348 drm: merge commit related to gamma [1/1]
PD#SWPL-11059

Problem:
gamma setting in DRM

Solution:
merge commit related to gamma

Author: Ao Xu <ao.xu@amlogic.com>
Date:   Tue Oct 30 19:18:21 2018 +0800

    drm: add meson private property gamma_lut

    When setting CTM, gamma is also set again.
    Setting gamma frequently will lead to visual glitches.
    Add a private value to record whether
    gamma_lut blob is changed.

    Bug: b/113682067
    Test: Ran on device and changed gamma to verify there are no glitches

Author: Fergus Simpson <afergs@google.com>
Date:   Fri Aug 10 13:18:36 2018 -0700

    [Estelle] Enable top/bottom color clamping

    Modifies amvecm's color clipping to allow either the lower or upper
    limit to be set. This sets clipping registers that hold the top and
    bottom 10-bit clipping values for each color channel.

    This does not cause the artifacts that we've been seeing while trying
    enable the gamma tables.

    Usage (set a clip of 32/255):
    echo 20080020 > /sys/class/amvecm/color_bottom

    Bug: 109942195
    Test: Flashed to device and tested with a internal changes that use the
          registers.

Author: Frank Chen <frank.chen@amlogic.com>
Date:   Wed Aug 8 15:21:17 2018 +0800

    remove gamma_enable in am_meson_crtc_create

Verify:
verify by u200

Change-Id: I4221b3b4671516e7afd4dea14ce3cd71b4b66433
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
2020-06-29 11:45:46 +09:00
Ao Xu
d45e20a596 drm: add gem import interface to support drm-hwc [1/1]
PD#SWPL-11320

Problem:
current gem driver have not implementted the import interface.
For drm-hwc in android, gralloc allocate the dumb buffer, it
should use the import interface to import the allocated buffer
to the drm driver.

Solution:
implement the gem import interface

Verify:
g12a-u200

Change-Id: I32f7705fd67853a1000875b2af69fcaf700330e1
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2020-06-29 11:45:46 +09:00
Dezhi Kong
455c74d2d8 drm: add TL1 drm support [1/1]
PD#SWPL-7987

Problem:
TL1 DRM support

Solution:
add TL1 DRM support

Verify:
t962x2_x301

Change-Id: Ibc8ff641f42c0a416e80c3a420c1d808e0ad8b26
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
2020-06-29 11:45:46 +09:00
lingjie li
c945cbd1a3 drm: start hdcp work when the "Content Protection" was set thought atomic [1/1]
PD#SWPL-4866

Problem:
1. The old implement not support atomic. (the atomic check on am_meson
hdmi.c will disable CP,The set property function will not reached when
use atomic set CP)
2. The hdcp work kthread start and terminal not match cause coredump.

Problem:
need add hdcp function.

Solution:
Start hdcp work when the encoder enabled.stop when encoder disabled.
modified hdcp work state machine.

Verify:
On u212 drm backend, use drm-helper-client to set CP property.
need enable atomic on wayland.based on below CL
http://scgit.amlogic.com:8080/#/c/78810/1
http://scgit.amlogic.com:8080/#/c/78804/2
http://scgit.amlogic.com:8080/#/c/78811/1

Change-Id: If213b7def89ff1f1ec63b866a21a3323e098786f
Signed-off-by: lingjie li <lingjie.li@amlogic.com>
2020-06-29 11:45:46 +09:00
lingjie li
ecb536d3db osd: update osd_count according to the chip [2/4]
PD#SWPL-3996

Problem:
g12b/g12a wayland-drm device print below error
"fb: error osd index=0" while start wayland-client.
while start wayland-client.

Solution:
set to the proper osd_count

Verify:
W400

Change-Id: I3c4c6d821ff0778cd4912a67046f7dbab60be2ad
Signed-off-by: lingjie li <lingjie.li@amlogic.com>
2020-06-29 11:45:46 +09:00
Ao Xu
4d4e4149c0 drm: add meson drm debugfs node [1/1]
PD#SWPL-12289

Problem:
drm driver has no debug sysfs file

Solution:
add follow sysfs node
1. dump the osd register
/sys/kernel/debug/dri/%minor%/vpu/reg_dump
2. dump the gem buffer image
/sys/kernel/debug/dri/%minor%/vpu/dump
3. set the gem buffer image store path
/sys/kernel/debug/dri/%minor%/vpu/imgpath
4. set 1 to disable the osd plane
/sys/kernel/debug/dri/%minor%/vpu/blank

Verify:
g12a-u200

Change-Id: I10746d65b09d3b530dc22720b8cee669fa120dde
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2020-06-29 11:45:46 +09:00
Ao Xu
0d1925d781 drm: add afbc support in drm driver [1/1]
PD#SWPL-13092

Problem:
drm driver has no drm support

Solution:
add afbc block support

Verify:
g12a-u200

Change-Id: If2e57b63032e9f93be800bda652b80e560163231
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2020-06-29 11:45:46 +09:00
Dezhi Kong
91e5facadb drm: add sm1 support [1/1]
PD#SWPL-8061

Problem:
SM1 support

Solution:
add sm1 support

Verify:
verify by ac200 with modetest command

Change-Id: Id79f227afa7f7dbcaad09887f8bdbd1f64b93c4a
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
2020-06-29 11:45:46 +09:00
Dezhi Kong
ab623e744d drm: add multi-layer support [1/1]
PD#SWPL-9646

Problem:
unsupport multi-layer

Solution:
add multi-layer support

Verify:
verify by w400 with modetest command

Change-Id: I5cd50761d2ab9cfff0f80d38e20455044c7a33fd
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
2020-06-29 11:45:46 +09:00
yao liu
098824072d DV: playback bl+el black screen [1/1]
PD#SWPL-7872

Problem:
TM2 special case , vd2 afbc can't work on TM2

Solution:
Process bl+el as SDR on TM2

Verify:
T962e2

Change-Id: I2433b72c4b5548e75665aba9623a29cd5f12d202
Signed-off-by: yao liu <yao.liu@amlogic.com>
2020-06-29 11:45:45 +09:00
Luke Go
900d412085 tmp
Change-Id: Iba93a2353a0792553a39f70578e9a024aa6fa88b
2020-06-29 11:45:45 +09:00
Pengcheng Chen
9f2c11d704 osd: add osd sw_sync [1/1]
PD#SWPL-9736

Problem:
osd fence crash when play AIV H264 video

Solution:
add osd sw_sync

Verify:
Verified with raven,w400

Change-Id: I309af0e3718221e2309460a990ef0badb9e8bd39
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2020-06-29 11:45:45 +09:00
Luke Go
dee0572dd6 IEEEOUI to ieeeoui
Change-Id: I266d8e8ea51f49c6c58c0fbeea5d77fab89a5e5a
2020-06-29 11:45:45 +09:00
Nian Jing
0664273f62 tvafe: add atv format get func [1/1]
PD#TV-1586

Problem:
no atv format get func

Solution:
Add atv format get func

Verify:
verified by x301

Change-Id: Ia43d5a67370d2b025e1b32833a5408a5e7d251d4
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
2020-06-29 11:45:45 +09:00