Commit Graph

645544 Commits

Author SHA1 Message Date
Yixun Lan
77768fda23 debug: drop sscanf, use kstrto variant instead
PD#165796: debug: drop sscanf, use kstrto variant instead

kstrto is kernel reconmmend function which is more safe than sscanf
this will also fix the following checkpatch.pl warning

WARNING: Prefer kstrto<type> to single variable sscanf
+       ret = sscanf(buf, "%ld", &val);

Change-Id: I9a4673b9aa43c10f51a20778ba520461ee0a7984
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
2018-05-11 14:21:50 +08:00
Lei Qian
bf91668e9c hdmirx: fix deadlock issue
PD#164867: fix deadlock issue

Revert "hdmirx: add new atmos edid handle method"

This reverts commit 6bf27f9a5a.

Change-Id: Ica0d99c9b4b3f05ccb86c85693c5cc4d2871bd7a
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2018-05-10 21:32:37 +08:00
Nian Jing
9eef6844fe cvbs: cvbs performance for g12a Rev.B
PD#164108: cvbs performance for g12a Rev.B

Change-Id: If140535984762cf6d843878e78ab285e014868e7
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
2018-05-10 03:13:17 -07:00
wenbiao zhang
9b131e8ee7 ethernet: chage u200 buildroot default as internal phy
PD#163830: ethernet: chage u200 buildroot default as internal phy

Change-Id: I1be5bfddae6fc0c43e3da5f604a80cca36cfad6e
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
2018-05-10 02:29:21 -07:00
Jihong Sui
3241fc8804 dtv_demod: modify dtv demod to adapter tuner
PD#165971: dtv_demod: Modify atv demod to adapter tuner

1. add get_strength;
2. call release when switch to not-support format;
3. chang DVBT/DVBC from DVBFE_ALGO_SW to DVBFE_ALGO_HW;

Change-Id: I5d58542dd1dded1579e950ec36c395d6a01e6cd7
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
2018-05-10 01:47:20 -07:00
Jian Hu
0339f49966 i2c: fix i2c clock-frequency inaccurate in fast-mode
PD#165568: i2c: fix i2c clock-frequency in fast-mode

1.When i2c controller used in U-boot,may affect i2c
  controller in Kernel,should clear i2c registers.
2.Add i2c default clock-frequency for axg.
3.Add i2c clock-frequency debug sysfs, for i2c-0:
  /sys/class/i2c-adapter/i2c-0/device/speed
4.change clock high/low = 1:2 to 2:3

Change-Id: I44ca7ecd8e2e7aec978f3240ff837121ae478ba7
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-05-10 01:17:46 -07:00
Nian Jing
615a0322da vdin: fix atv nosignal after snowon
PD#164655: dynamic config clamp for signal stable

Change-Id: I29c42053d2014b2ba17ab62b9a670b82b0d3550e
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
2018-05-10 01:17:18 -07:00
Jian Hu
9e832877f5 pwm: fix min and max duty cycle
PD#165774: pwm: fix min and max duty cycle

When the duty equal 0% and 100%, there is one high or low
count ,the constant bit should be enabled;and constant
bit should be disabled for other duty_cycle.

Change-Id: I36eefee3613f113f6c30db076e41cd8223086c54
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-05-10 01:12:09 -07:00
Shunzhou Jiang
0520011c45 cpuidle: enable cpu idle
PD#163959: G12A: enable cpu idle

Change-Id: If5493f037f51092358b8f1c4151655aafec6e379
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
2018-05-09 23:26:14 -07:00
qi.yuan
325e369e0d audio: add an interface for HDMI out disable [1/2]
PD#165284: add an interface control for audio hdmi out disable

1)add a gpio control switch for ARCIN and SPDIFIN
2)clean global value in audio driver
3)rewrite HDMITX audio control interface
4)remove HDMITX user space control SYSFS
  Forbidden user space control of HDMITX audio, must via AUDIO

Change-Id: Ifc69c8553df903631d80f414771d91966045f85f
Signed-off-by: qi.yuan <qi.yuan@amlogic.com>
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
2018-05-09 22:23:33 -07:00
jiamin ma
41a30dee3d ir: fix ir memory overflow issue
PD#164774: kernel panic after mtk_cfg80211_set_power_mgmt

two possible overflow cases:
1. dev->debug_current + len == dev->debug_buffer_size
2. len > dev->debug_buffer_size

for the first case(currently triggered case)
  the last byte of string pointed to by fmt, aka.'\0', will
overwrite the first byte of memory pointed to by header(in
function __register_sysctl_table), which is just the LSB of
ipv4_table[]'s base address. Leading to "Unable to handle
kernel paging request at virtual address xxxx" panic

for the second case
  a bunch of memory pointed to by header(in function
__register_sysctl_table) will be overwritten

Change-Id: I6bc42308323b7ffb52fe4d1fa9d22742a31e8b1f
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>
2018-05-09 21:32:04 -07:00
jianxin.pan
160f1e245e workqueue: add more debug when null pwq
PD#158184: print work and worker function when null pwq

Change-Id: I552c6585935e47abfb9593f4a2d2f1588906aaf8
Signed-off-by: jianxin.pan <jianxin.pan@amlogic.com>
2018-05-09 21:30:48 -07:00
Nian Jing
98aa399781 tvafe: reset vdin asynchronous fifo in tvafe reset
PD#165571: fix greenscreen on repeatly power on/off

Change-Id: Iefa412c2c4f86ba525bfdebbf395d38d34b77a30
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
2018-05-09 21:24:25 -07:00
jianxin.pan
5aa2357ea0 debug: add watchdog trigger in sysrq
PD#165796: watchdog trigger to debug wdt related behavior
"echo x > /proc/sysrq-trigger" to trigger watchdog

Change-Id: Iddd92cd64c9a7ccdf452f23706b396eaf50ae448
Signed-off-by: jianxin.pan <jianxin.pan@amlogic.com>
2018-05-09 21:14:17 -07:00
jianxin.pan
91d7a0007a debug: hard lockup detect
PD#165796: detect dead lock in isr and dead lock with irq disabled

Change-Id: I0aace28fd29e5aeb8c514f6ab1700ac1248f836c
Signed-off-by: jianxin.pan <jianxin.pan@amlogic.com>
2018-05-09 19:39:28 -07:00
Yi Zhou
fdaf7bd612 hdmitx: remove setting BT2020 in 4k color deptch mode
PD#162864: hdmitx: remove setting BT2020 in 4k color deptch mode

some TVs flash when changing colormetry
such as bt2020 to bt709, or bt709 to bt601

Change-Id: I360dfc1ea3299d4ec75903d435530425afb4f546
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
2018-05-09 18:54:42 -07:00
yicheng shen
6bf27f9a5a hdmirx: add new atmos edid handle method
PD#164867: hdmirx: add new atmos edid handle method

Change-Id: I4f6fa58ebfe106cedb9f814c92657f08dc6d2aaf
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
2018-05-09 07:56:03 -07:00
tao zeng
0c2c8fb684 ddr: fix wrong bandwidth result on g12 platform
PD#161475: ddr: fix wrong bandwidth result on g12 platform

Correct function name get_ddr_freq to get_dmc_freq in order
to avoid misunderstanding.

Change-Id: I9000970f100394cf63468149d431d05ece2aaa1d
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
2018-05-08 23:38:14 -07:00
Hong Guo
922fb52799 arm64: dts: g12a: dvfs voltage duty modify.
PD#165143: cpufreq: dvfs voltage duty modify for 0.731mv.

Change-Id: I85370ea18b68eb3b37636629a9e0da8b26491f83
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2018-05-08 22:21:26 -07:00
Jian Hu
16a0d05225 pwm: optimizing pwm duty calculation
PD#165143: pwm: optimizing pwm duty calculation

1.Fix duty equal 0% and 100% duty count incorrect
2.Change period unit to ps to increase accuracy

Change-Id: Ied478f21ac4b4f9f3d1508d69dfbcdbb9ca4e732
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-05-08 18:45:58 -07:00
Nan Li
7ed184dc94 sd: add sd_uart to g12a.
PD#165584: add sd_uart on g12a.
test on u211.

Change-Id: Ia8e5cde6c60b3019329324445593d82cf2543afe
Signed-off-by: Nan Li <nan.li@amlogic.com>
2018-05-08 04:53:18 -07:00
Zongdong Jiao
6a927947f8 hdmitx: set frac_rate_policy as 1.[1/2]
PD#165862: hdmitx: set frac_rate_policy as 1
For most video/films or NTSC, they are 23.976/29.97/59.94fps, so
hdmitx should adjust set frac_rate_policy as 1.

Change-Id: I9671935c5121634d1af6879d8ccd91eb4f92c9cb
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2018-05-08 04:46:44 -07:00
manhao liang
b3aeeb5e81 dtv_mode: R311 add tuner mxl661
PD#165368: dtv_mode: R311 add tuner mxl661

Change-Id: Ifbc3ffece7d30d29e295f3e70c37d9d25ee0ac69
Signed-off-by: manhao liang <manhao.liang@amlogic.com>
2018-05-08 04:34:46 -07:00
Nan Li
dd85726020 sd: sd & wifi TDMA crash.
PD#164804: when system run with SD card in,
system will be crashed. rm post_dma() crash error.

Change-Id: I99c10fcbf151a4c349bf6b0584056cd9080349e8
Signed-off-by: Nan Li <nan.li@amlogic.com>
2018-05-08 00:50:49 -07:00
Zhuo Wang
1e1290ae25 ethernet: add delay after reset phy
PD#165891: can't readout phyid when bootup

Change-Id: I775f4fe9b8c4b2e76475f239e75539ecbe2bf843
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
2018-05-08 00:39:02 -07:00
Brian Zhu
3b2697b90f vpp: use correct width to select the min skip ratio
PD#165601: vpp: use correct width to select the min skip ratio

Change-Id: Idcf9ff250c4d6af089dd2b8a25285b81c849a78a
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
2018-05-07 07:06:52 -07:00
nengwen.chen
cdd5f6af3b atv_demod: Modify atv demod to adapter tuner
PD#165368: atv_demod: Modify atv demod to adapter tuner

Change-Id: Ifa69db980dfe9519c80932d22dffbb1fb6600fc9
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2018-05-07 02:53:03 -07:00
Yi Zeng
66a28439a4 mtd: add new slc nand type
PD#165148: mtd: add new slc nand type

add the MFR id, flash id and factory bad block
management of Dosilicon & ATO into our code.

Change-Id: If00e026460c6c3f5d354832bef9ba95a0733fdf3
Signed-off-by: Yi Zeng <yi.zeng@amlogic.com>
2018-05-07 01:32:16 -07:00
Hui Zhang
0d07e6ac1b video_keeper: fixed greenscreen bug
PD#155455: fixed green screen bug

Change-Id: Idbb2ae30b1bd88d1782ff47b485e0cbf476641d0
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2018-05-06 22:36:21 -07:00
Xing Wang
6de6b29305 dts: audio: disable dac for u211
PD#165585: dts: audio: disable dac for u211

Change-Id: I290cc1445e30c5b7de2003f579751d0cf6ce291f
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
2018-05-06 22:32:47 -07:00
Weiming Liu
1d665546a7 lcd_extern: add mipi default driver [2/2]
PD#164036: lcd_extern: add mipi default driver

Change-Id: Id120299c2434a3cce9b154064cd0c7e5dd0bbe8e
Signed-off-by: Weiming Liu <weiming.liu@amlogic.com>
2018-05-06 22:31:42 -07:00
Chuangcheng Peng
67d51ac6ae demux: add demux irq for txlx
PD#165368: add demux irq for txlx

Change-Id: I165a524cd5e161b22ee21318d9379bb139622e2f
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
2018-05-07 11:29:25 +08:00
Jihong Sui
f645e84376 dtv_demod: add dtv demod for txlx
PD#165005: dtv_demod: add dtv demod for txlx

Change-Id: I311fea46351644902a5e886be4623601e21ec6ac
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
2018-05-04 03:37:40 -07:00
Bang Peng
e5f9ab37c8 mm: fixed tvp alloc failed
PD#159668: fixed tvp alloc failed

[<ffffff80091c38a0>] shrink_inactive_list+0x578/0x584
[<ffffff80091c42c4>] shrink_node_memcg.isra.71+0x6a4/0x734
[<ffffff80091c43c8>] shrink_node+0x74/0x1e0
[<ffffff80091c46f0>] try_to_free_pages+0x1bc/0x4c0
[<ffffff80091b3f10>] __alloc_pages_nodemask+0x5a8/0xd0c
[<ffffff8009983898>] get_migrate_page+0x2c/0x34
[<ffffff8009203c84>] migrate_pages+0xe0/0x890
[<ffffff8009983548>] aml_alloc_contig_migrate_range+0x98/0x150
[<ffffff8009983788>] cma_boost_work_func+0x188/0x26c
[<ffffff80090c53e8>] kthread+0x10c/0x120
[<ffffff80090836e0>] ret_from_fork+0x10/0x30

Change-Id: Iada340b48dcb2ba2ebf7570a15cec21553fd0d0a
Signed-off-by: Bang Peng <bang.peng@amlogic.com>
2018-05-04 03:30:00 -07:00
Yi Zhou
065822467b hdmitx: fix frac_rate flag changed when setting mode
PD#165548: hdmitx: fix frac_rate flag changed when setting mode

Change-Id: Ie6d96ec6c7f58d17f02e241aa0aa122c7db1c0a2
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
2018-05-04 01:10:49 -07:00
Nan Li
c36c75aacb sd: open the macro of sd_uart func.
PD#165593: open the macro of sd_uart func.

Change-Id: Icf7c4c2faf7297a1da0bda47b4c648bb49faac2a
Signed-off-by: Nan Li <nan.li@amlogic.com>
2018-05-03 20:09:03 -07:00
bichao.zheng
8dd460189d dts: g12a: add system led control for u200 [2/2]
PD#165027: gpio-led: g12a_s905d2_u200 add system led

1.Turns on green light when booting and resume.
2.Turns off green light,turns on red light when suspend and shutdown

Change-Id: I170b4745b320a5525fe128c025f2670103950922
Signed-off-by: bichao.zheng <bichao.zheng@amlogic.com>
2018-05-03 19:20:02 -07:00
Hui Zhang
dd68fe9b52 video_keeper: fixed unexpected green screen when seek
PD#162351:
	when start to toggle frame, the disable video cmd is set,
and seek immediately, play will be quit before enable video,
so keep failed and cur_dispbuf is uncertain, it may cause
unexpected green screen after seek

Change-Id: I62526b3dda0256d7a9476d378a13baffb4785bd6
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2018-05-03 04:34:23 -07:00
Hui Zhang
15549c90b6 codec_mm: fixed scatter cached bug
PD#159652: it may occur in tvp mode, no tvp may a lost less.
	some free slot not insert free list after first alloc.
	this leads to a lot of wasted memory

Change-Id: Ia62d7f661ee5bc1563cac0980da604e5d8356113
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2018-05-03 17:44:14 +08:00
zhilei.wu
ab93cf4997 dv: maintain previous md when md parser error to fix red screen
PD#157814: dv: maintain previous md when md parser error to fix red screen

Change-Id: Ie1b0c556ae65d275fdbd074356f633485bc5217a
Signed-off-by: zhilei.wu <zhilei.wu@amlogic.com>
2018-05-03 02:16:17 -07:00
Nan Li
565504efbc emmc: modify emmc shutdown time too long
PD#164859: modify emmc shutdown time too long.
Kingston EMMC08G-T227 POWER_OFF_LONG_TIME is 0xff,
shutdown time is too long.
modify mmc_delay 0 when POWER_OFF_LONG_TIME is 0xff.

Change-Id: Ie85be335a77d9ec82a12158996c2c773d113c41f
Signed-off-by: Nan Li <nan.li@amlogic.com>
2018-05-03 01:59:55 -07:00
zhilei.wu
07d8ca719e dv: below 720p was chaged to HDR10 mode in Dolby
PD#163239: dv: below 720p was changed to HDR10 in Dolby

Change-Id: Ie6cedbc03582e4b36b6d3a8c628bbf41001862c2
Signed-off-by: zhilei.wu <zhilei.wu@amlogic.com>
2018-05-02 23:57:14 -07:00
Brian Zhu
f2653f4294 vpp: adjust dmc for every YUV444 frame
PD#165450: vpp: adjust dmc for every YUV444 frame

Change-Id: I07da12c337b2ba5b8af3b9d5c17e6a9ba080f83e
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
2018-05-02 21:38:28 -07:00
nengwen.chen
3aab13f88d atv_demod: Modify atv io ctrl and memory alloc for atv crash.
PD#165008: Modify atv io ctrl and memory alloc for atv crash.

Change-Id: Ib6aa737ffad5d155022ad276ecf16ce2a7537138
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2018-05-02 19:46:06 -07:00
Xingyu Chen
a7169fd161 dts: disable saradc feature for u221
PD#165535: dts: disable saradc feature for u221

Change-Id: I442690cfdae5c1964bcef3cfb7810421cfc77d01
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2018-05-02 17:36:27 +08:00
Yue Wang
03a15dd78b pcie: disable pcie feature in u221.
PD#165524: pcie: disable pcie feature in u211.

Change-Id: I7fd8108a167a745622b0b4d0582ca25caf3f0286
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2018-05-02 17:01:20 +08:00
Yonghui Yu
a1015e7b4c emmc: using rx delay to avoid invalid tuning
PD#165303: emmc: using rx delay to avoid invalid tuning

When emmc work at hs200@200Mhz, tuning result using fixed
adj mode may got a full window. The tuning result contains
invalid point. we have to adjust rx-delay to avoid it.

Change-Id: I33c5e234fe0f480180b0c9312641ba7a0a4e9cfb
Signed-off-by: Yonghui Yu <yonghui.yu@amlogic.com>
2018-04-28 02:24:09 -07:00
yicheng shen
fc307b359a vdin: add force_color_range control[1/2]
PD#165178: vdin: add force_color_range control[1/2]

Change-Id: I5f8a94ed0416867841bc8d1c744e176cced64fc6
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
2018-04-28 02:23:07 -07:00
wenbiao zhang
11eadad3a7 dts: update q200/p241 buildroot dts
PD#160248: dts: update q200/p241 buildroot dts

Change-Id: Ice6038373877ad2911e45a21888beed5a2f2f604
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
2018-04-28 00:00:23 -07:00
pengcheng chen
287c5c111a osd: fix buildroot compile error issue
PD#163270: osd: fix buildroot compile error issue

Change-Id: I4745a302bc78a714a3f1cba464f4cfac86309378
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
2018-04-27 23:30:27 -07:00