platform/kernel/linux-amlogic.git
5 years agoamcsc: need force to send fake frame for matrix updating [1/1]
Brian Zhu [Thu, 10 Oct 2019 11:44:46 +0000 (19:44 +0800)]
amcsc: need force to send fake frame for matrix updating [1/1]

PD#SWPL-14947

Problem:
When switch the display mode of VIU1 from panel to hdmi. The
csc matrix did not update  correctly without video on.

Solution:
Force to trigger a fake frame to update csc matrix correctly.

Verify:
Verified on u202

Change-Id: I3e75a2d396ee1c752ed30bf01852afc8b9499f41
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
5 years agosd: fix dts set err [1/1]
Nan Li [Sat, 12 Oct 2019 06:09:33 +0000 (14:09 +0800)]
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>
5 years agocec: Add Feature for freeze mode power on [1/2]
Yong Qin [Sat, 28 Sep 2019 02:54:01 +0000 (10:54 +0800)]
cec: Add Feature for freeze mode power on [1/2]

PD#TV-10483

Problem:
Add feature for freeze mode power on by cec.

Solution:
Add feature for freeze mode power on by cec.

Verify:
tl1
Change-Id: I3e0271cb000d64c4b30cfc75c59e8ca374993d7f
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agosuspend: fix freeze hangup which caused by insmod [1/1]
Qiufang Dai [Thu, 26 Sep 2019 14:06:15 +0000 (22:06 +0800)]
suspend: fix freeze hangup which caused by insmod [1/1]

PD#TV-10472

Problem:
When system on, enter freeze mode lead to flush deferd probe.
Init.rc also run insmod in parallel, if insmod task
atomic_inc(&probe_count), and this task is freezed,
deadlock happends.

Solution:
Move flush deferd probe action before freeze task

Verify:
X32A0-T972

Change-Id: I8949db32aea14e2da37e77658a9c999af39e2c83
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
5 years agosd: add sd power cycle for sd3.0 [1/1]
Nan Li [Thu, 10 Oct 2019 07:31:59 +0000 (15:31 +0800)]
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>
5 years agodtsi: A311D w400 has only hdmi output by default, panel has no output [1/3]
Gongwei Chen [Fri, 11 Oct 2019 07:18:31 +0000 (15:18 +0800)]
dtsi: A311D w400 has only hdmi output by default, panel has no output [1/3]

PD#SWPL-15024

Problem:
A311D w400 has only hdmi output by default, panel has no output

Solution:
modify clk

Verify:
Verify by Android P w400

Change-Id: I90d2defc509de2e559bb1ae1f4fcbcf38012b93c
Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
5 years agovdin: Fix coverity error [1/1]
Yong Qin [Fri, 11 Oct 2019 08:20:58 +0000 (16:20 +0800)]
vdin: Fix coverity error [1/1]

PD#SWPL-13987

Problem:
Fix coverity error.

Solution:
Fix coverity error.

Verify:
TL1

Change-Id: I5fec89f8980a4ea9b93e96e56dd857817695ad71
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agocec: Fix coverity error [1/1]
Yong Qin [Fri, 11 Oct 2019 02:19:31 +0000 (10:19 +0800)]
cec: Fix coverity error [1/1]

PD#SWPL-13936

Problem:
Fix coverity error.

Solution:
Fix coverity error.

Verify:
TL1

Change-Id: I3e1af9370b47c1c9e06634f6cd4d04b2a229d664
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agohdr: fix tl1 hdr no effect [1/1]
MingLiang Dong [Thu, 10 Oct 2019 09:31:07 +0000 (17:31 +0800)]
hdr: fix tl1 hdr no effect [1/1]

PD#SWPL-12751

Problem:
1. tl1 hdr no effect
2. alway print [amvideo..] saturation_pre:0 hue_pre:0 mab:1000000

Solution:
1. seprate vd1/vd2 hdr process
2. fix vd2 metadata random change

Verify:
verify on TL1

Change-Id: I4d88b5b8758095ae90b2d2c06480bd9726e2cad1
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
5 years agoamvecm: fix pc/game mode not close saturation [1/1]
Bencheng Jing [Wed, 11 Sep 2019 03:46:35 +0000 (11:46 +0800)]
amvecm: fix pc/game mode not close saturation [1/1]

PD#SWPL-13896

Problem:
pc/game mode not close saturation

Solution:
add close saturation patch for chip after g12a

Verify:
verified by tl1

Change-Id: I28fe34d0b14700132e92a75ea8d8a7836ed7fd2b
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agodts: add platform W200 [2/3]
Gongwei Chen [Thu, 10 Oct 2019 11:10:14 +0000 (19:10 +0800)]
dts: add platform W200 [2/3]

PD#SWPL-15005

Problem:
need add platform W200

Solution:
add platform W200

Verify:
Verify by Android P w200

Change-Id: Ia1baacb5c62182fd17c4e1730a4ad6aeeaa71dda
Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
5 years agodv: screen highlighting when playing some videos [1/1]
yao liu [Wed, 9 Oct 2019 08:16:44 +0000 (04:16 -0400)]
dv: screen highlighting when playing some videos [1/1]

PD#SWPL-13043

Problem:
Too many prints cause the active line to be
too large when entering the DV process,
resulting in the LUT table of DV core1 not
being written completely

Solution:
Simplify printing in DV

Verify:
sm1

Change-Id: I4fd06f6a8b5e6d0b973077bbe92815224834857b
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agoamvecm: fix contrast adj without uv shift [1/1]
MingLiang Dong [Wed, 25 Sep 2019 14:56:25 +0000 (10:56 -0400)]
amvecm: fix contrast adj without uv shift [1/1]

PD#SWPL-14629

Problem:
fix contrast adj without uv shift

Solution:
workaround with vd1 mtx, add uv shift the same gain with your

Verify:
verify on TL1

Change-Id: I5456b75463ff2c999a8e6d4b42129a909ecfd666
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
5 years agocvbsout: fix cgms bit mistake for NTSC [1/1]
Evoke Zhang [Wed, 9 Oct 2019 02:52:38 +0000 (10:52 +0800)]
cvbsout: fix cgms bit mistake for NTSC [1/1]

PD#OTT-5683

Problem:
NTSC cgms data bit is incorrect

Solution:
fix cgms bit mistake

Verify:
u212

Change-Id: If1d26714eeed9061773c25871715713b122d9980
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agoramdump: support ramdump for tm2 [3/3]
changqing.gao [Wed, 18 Sep 2019 03:03:10 +0000 (11:03 +0800)]
ramdump: support ramdump for tm2 [3/3]

PD#SWPL-13275

Problem:
ramdump is not enabled on tm2.

Solution:
Add ramdump support on tm2 in kernel.

Verify:
verified on tm2_t962x3_ab301_v1.

Change-Id: I1e8fd2e14ba1bc02e47c6e15c534da449352b723
Signed-off-by: changqing.gao <changqing.gao@amlogic.com>
5 years agolcd: optimize ss_set in power_step [2/2]
shaochan.liu [Fri, 27 Sep 2019 10:04:50 +0000 (18:04 +0800)]
lcd: optimize ss_set in power_step [2/2]

PD#TV-10240

Problem:
need optimize ss_set in power_step

Solution:
optimize ss_set in power_step

Verify:
t962x2-x301

Change-Id: I435e5659cbc7225cc957d2fa233c5dee70f894a2
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
5 years agoosd: fix exit hdr play,screen flash for osd hdr matrix not sync [1/1]
Pengcheng Chen [Tue, 8 Oct 2019 09:10:38 +0000 (17:10 +0800)]
osd: fix exit hdr play,screen flash for osd hdr matrix not sync [1/1]

PD#SWPL-14902

Problem:
Play HDR video locally, after exiting, the screen flashes 1, 2 seconds

Solution:
set rdma_hdr_delay default value to 0

Verify:
Verified by T962-P321

Change-Id: I9c0a56332e38d1238129e682535f588104faf8be
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agohdmirx: modify recovery flow for aud_pll error [1/1]
Lei Yang [Sun, 29 Sep 2019 07:18:06 +0000 (15:18 +0800)]
hdmirx: modify recovery flow for aud_pll error [1/1]

PD#SWPL-14776

Problem:
aud pll is zero. need to reset aud bandgap

Solution:
modify related recovery flow

Verify:
TXLX

Change-Id: If8ba596cb7bec81165a0b2f80aa388579cc68411
Signed-off-by: Lei Yang <lei.yang@amlogic.com>
5 years agovdin: [side-effect]hdmi 4k,garbage is seen at the bottom [1/1]
zhiwei.yuan [Tue, 8 Oct 2019 07:26:08 +0000 (15:26 +0800)]
vdin: [side-effect]hdmi 4k,garbage is seen at the bottom [1/1]

PD#SWPL-14760

Problem:
There's no enough mem for screen cap

Solution:
Inc mem only for HDMI 4k afbce

Verify:
verified by t962x2_x301

Change-Id: I688bc67f5b9f754ae3db9fa650778cf36eec18dc
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agoamvecm: fix sat_hue_post ioctrl set error [1/1]
Bencheng Jing [Thu, 16 May 2019 05:50:02 +0000 (13:50 +0800)]
amvecm: fix sat_hue_post ioctrl set error [1/1]

PD#SWPL-14583

Problem:
1.fix sat_hue_post ioctrl set error
2.fix brightness2 set error

Solution:
fix sat_hue_post ioctrl set error

Verify:
u212

Change-Id: I181840fabfec6a3625056ffa95f62d8e50730129
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agotvafe: reinit tvafe when atv demod rescan [1/1]
Evoke Zhang [Wed, 25 Sep 2019 09:58:57 +0000 (17:58 +0800)]
tvafe: reinit tvafe when atv demod rescan [1/1]

PD#SWPL-14610

Problem:
121.25MHz PAL-M Recognized to NTSC-M

Solution:
add reinit tvafe function for atv demod rescan

Verify:
x301

Change-Id: I8d303374f3e1e6e3c84e81d4332735b6687df01b
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agodv: flash when start playing dv [1/1]
robin zhu [Tue, 1 Oct 2019 03:16:32 +0000 (20:16 -0700)]
dv: flash when start playing dv [1/1]

PD#SWPL-14836

Problem:
1) video enable flag is not update correctly
2) source format not update correctly,
which cause wrong dv control path reset
3) when start play video off and repeat frame,
triggers wrong fake sdr frame

Solution:
1) change video enable flag to use both
video_global_output and video_enabled
2) use latest src format insdead of using cur format
3) add repeat frame and video on to off flag to
prevent wrong fake sdr frame

Verify:
Verified on AC213

Change-Id: Ia8ee7bea0b8bcb33e18275611287e0b563caf978
Signed-off-by: robin zhu <robin.zhu@amlogic.com>
5 years agowdt: add option to avoid the wdt is disabled casually [1/1]
Xingyu Chen [Wed, 9 Oct 2019 02:34:55 +0000 (10:34 +0800)]
wdt: add option to avoid the wdt is disabled casually [1/1]

PD#SWPL-14925

Problem:
The system can't be reset by wdt which is fed by the tv-service
when the tv-service is abnormally hanged.

Solution:
Add extra option to avoid the wdt is disabled when the fed dog
thread aborts, but we can disable wdt when certain condition is
met.

Verify:
test pass on customer board

Change-Id: I1fd5ff4e36f06bda99726c0a2ced399299596f95
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
5 years agoatv_demod: fix atv non_std_en == 4 [1/1]
nengwen.chen [Sun, 29 Sep 2019 11:22:36 +0000 (19:22 +0800)]
atv_demod: fix atv non_std_en == 4 [1/1]

PD#TV-10383

Problem:
fix atv non_std_en == 4.

Solution:
1.fix atv non_std_en == 4.

Verify:
Verified by x301

Change-Id: I25286d1f1472411fcc37255eaef80436ed0f2c26
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agodv: fix one picture displayed playing mvc when dv is on [1/1]
Pengcheng Chen [Fri, 6 Sep 2019 08:52:07 +0000 (16:52 +0800)]
dv: fix one picture displayed playing mvc when dv is on [1/1]

PD#SWPL-13590

Problem:
only one picture displayed playing 3D mvc when dv is on

Solution:
when playing 3D mvc bypass dv.

Verify:
Verified by u212

Change-Id: I73c85808b7aad91a009b1e80f2514545e96eedf2
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agoaudio: auge: toddr irq interrupt protection for freeze mode [1/1]
Xing Wang [Wed, 25 Sep 2019 02:24:14 +0000 (10:24 +0800)]
audio: auge: toddr irq interrupt protection for freeze mode [1/1]

PD#TV-10448

Problem:
crash when finished early supend but not entry suspend,
the system is waked up

Solution:
add toddr irq interrupt protection when entry suspend
and exit from suspend

Verify:
x301

Change-Id: I7ade7a745511bab83c70b5649b6af318163568d9
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
5 years agoamvecm: fix coverity issue detected [1/1]
Xihai Zhu [Fri, 27 Sep 2019 02:24:33 +0000 (22:24 -0400)]
amvecm: fix coverity issue detected [1/1]

PD#SWPL-14679

Problem:
coverity issue detected, logical operation
is wrongly used for bit operation

Solution:
update related code

Verify:
tl1

Change-Id: I3b98e702205382dabe4b0cd75f9586cac1bccd48
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agodv: need update the right osd size for core2 [1/1]
Brian Zhu [Mon, 30 Sep 2019 10:41:33 +0000 (18:41 +0800)]
dv: need update the right osd size for core2 [1/1]

PD#SWPL-14748

Problem:
DV core2 did not update the osd size.

Solution:
monitor the osd size change in dv processing

Verify:
Verifed on U212

Change-Id: Icade183483bd0f12f3d1d5424b38ac97ac1c83d1
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
5 years agoamvecm: LC input matrix impovement [1/1]
Xihai Zhu [Wed, 25 Sep 2019 02:06:51 +0000 (22:06 -0400)]
amvecm: LC input matrix impovement [1/1]

PD#SWPL-14555

Problem:
there is luma level drop issue while
on/off LC module

Solution:
per VLSI suggestion, use same VPP standard
matrix, and also handle the bitdepth option
correctly

Verify:
tl1

Change-Id: I5450c60dc055ec6493327b77e1295e55e6405fe7
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agodvb: support two si2168(si2151/av2018) [2/3]
Chuangcheng Peng [Mon, 16 Sep 2019 06:30:56 +0000 (14:30 +0800)]
dvb: support two si2168(si2151/av2018) [2/3]

PD#SWPL-13198

Problem:
support U212-D814

Solution:
support U212-D814

Verify:
verify at u212-D814

Change-Id: I2c458b36fc2bee08ddd24e2da016a68515bb82da
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
5 years agovdin: hdmi 4k,garbage is seen at the bottom [1/1]
zhiwei.yuan [Fri, 27 Sep 2019 09:46:52 +0000 (17:46 +0800)]
vdin: hdmi 4k,garbage is seen at the bottom [1/1]

PD#SWPL-14760

Problem:
afbce write need more memory since block can not be separater

Solution:
increase memory size for each frame

Verify:
verified by t962x2_x301

Change-Id: I5a80d0d6f22ef72353bf8b9faa904ec4f4b7c7aa
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agohdmirx: revert commit 86761 [1/1]
Lei Yang [Sun, 29 Sep 2019 10:03:35 +0000 (18:03 +0800)]
hdmirx: revert commit 86761  [1/1]

PD#SWPL-14763

Problem:
rx cannot work after suspend

Solution:
rx22 memory issue. revert related commit.

Verify:
TL1

Change-Id: Ia3a092e2fc602470e4ffc54f0d3b25ae0221f69f
Signed-off-by: Lei Yang <lei.yang@amlogic.com>
5 years agovdin: TvPlayer ANR when screen capture [1/1]
zhiwei.yuan [Wed, 25 Sep 2019 08:22:43 +0000 (16:22 +0800)]
vdin: TvPlayer ANR when screen capture [1/1]

PD#SWPL-14561

Problem:
caused by enc v line check mechanism

Solution:
remove line check since it's unnecessary

Verify:
verified by t962x2_x301

Change-Id: Ic2578b99234ac001baf2e12314119e6a01b0a79c
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agoir: cannot wakeup system when keep pressing power key [1/1]
Qianggui Song [Sun, 29 Sep 2019 10:55:08 +0000 (18:55 +0800)]
ir: cannot wakeup system when keep pressing power key [1/1]

PD#SWPL-14797

Problem:
In freeze mode, keep press power key won't wake up system.

Solution:
replace pm_wakup_event with pm_stay_awake

Verify:
tl1

Change-Id: I5b88714ff45034280ec1d638f86b51fa54e2a011
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
5 years agopage_trace: fix compile error [1/1]
Jiamin Ma [Mon, 30 Sep 2019 00:35:00 +0000 (08:35 +0800)]
page_trace: fix compile error [1/1]

PD#SWPL-14800

Problem:
Compile error

Solution:
Fix compile error

Verify:
Compile pass

Change-Id: Iffb95fef1572e4ce17ec80f0765920b8afad8513
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
5 years agokey: fix wakeup issues of gpiokey and adckey in freeze mode [1/1]
Xingyu Chen [Tue, 24 Sep 2019 05:15:15 +0000 (13:15 +0800)]
key: fix wakeup issues of gpiokey and adckey in freeze mode [1/1]

PD#SWPL-14597

Problem:
- it is risky to replace directly system_freezable_wq with system_wq
for input poll device.
- the system can't be awakened by gpiokey or adckey when system in
freeze mode.

Solution:
- because of the input poll-device can't compatible freeze mode, we
replace it with input device.
- perfect wakeup operation when system works in freeze mode.

Verify:
test pass on ac200

Change-Id: I81c867da7325480712aa5903289e02ebb20d6f07
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
5 years agoatv_demod: adds check exit status when scanning [2/2]
nengwen.chen [Sun, 29 Sep 2019 03:03:43 +0000 (11:03 +0800)]
atv_demod: adds check exit status when scanning [2/2]

PD#TV-10574

Problem:
adds check exit status when scanning.

Solution:
1.adds check exit status when scanning.

Verify:
Verified by x301.

Change-Id: If7ab459a4554d5c0f70b3048956781ea015dbf2e
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agohdmitx: reduce the delay time of plugout [1/1]
Zongdong Jiao [Tue, 24 Sep 2019 13:42:35 +0000 (21:42 +0800)]
hdmitx: reduce the delay time of plugout [1/1]

PD#OTT-6369

Problem:
The HPD low time of some Monitor(such as LG) is about 30ms, less than 100ms

Solution:
Reduce the delay time of plugout

Verify:
G12A/U212

Change-Id: I343223b5ef0696da035f0b3b179bdbfbce68c859
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
5 years agoAudio: Intermittently sluggish video observed on few channels [3/3]
Zhizhong Zhang [Fri, 27 Sep 2019 09:22:01 +0000 (17:22 +0800)]
Audio: Intermittently sluggish video observed on few channels [3/3]

PD#OTT-5171

Problem:
Intermittently sluggish video observed on few channels

Solution:
Don't change pcr when setting apts in pcrmaster mode

Verify:
patch build of U212

Change-Id: I393c3ea8504b95c63edfd1b5acdb89f9ee754f25
Signed-off-by: Zhizhong Zhang <zhizhong.zhang@amlogic.com>
5 years agoMerge "slab: trace for each slab object [1/1]" into amlogic-4.9-dev
gerrit autosubmit [Sun, 29 Sep 2019 08:02:08 +0000 (01:02 -0700)]
Merge "slab: trace for each slab object [1/1]" into amlogic-4.9-dev

5 years agodv: osd icon display colored dots at 720p50hz [1/2]
yao liu [Fri, 27 Sep 2019 09:56:44 +0000 (05:56 -0400)]
dv: osd icon display colored dots at 720p50hz [1/2]

PD#SWPL-14463

Problem:
dv vertical potch is small

Solution:
increase vpotch from 0x30 to 0x38

Verify:
verify on sm1 720p.

Change-Id: Iebf6708f62a8b8c2a32accf9ef721b4d12fa2370
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agoamvecm: add viu2 vsync support for gamma [1/1]
Evoke Zhang [Thu, 26 Sep 2019 08:31:21 +0000 (16:31 +0800)]
amvecm: add viu2 vsync support for gamma [1/1]

PD#SWPL-14450

Problem:
gamma can't support viu2 vsync

Solution:
add viu2 vsync support for gamma

Verify:
u202

Change-Id: I5f490b254f58a130451ff69a456c218e6e4dcc94
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agovpp: use the correct sr0 max width [1/1]
Brian Zhu [Thu, 26 Sep 2019 18:01:46 +0000 (02:01 +0800)]
vpp: use the correct sr0 max width [1/1]

PD#SWPL-14306

Problem:
When sr0 v scaler is enabled or not, the sr0 max width
is incorrectly.

Solution:
Using the correct sr0 max width.

Verify:
Verified by u212

Change-Id: Id5e0b66f0878676536be0e0970fe8f26419b978c
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
5 years agoirblaster: meson: fix Coverity errors [1/2]
Bichao Zheng [Thu, 12 Sep 2019 07:17:46 +0000 (15:17 +0800)]
irblaster: meson: fix Coverity errors [1/2]

PD#SWPL-13973

Problem:
irblaster Coverity errors.

Solution:
1. Properly release resources.
2. Fix return value type.

Verify:
test pass on g12a_u200_v1

Change-Id: I50054ba3ac9f02aeeaa005b7823416b1c4c9a196
Signed-off-by: Bichao Zheng <bichao.zheng@amlogic.com>
5 years agoion: ion_sync_for_device use swiotlb_dma_ops not dummy_dma_ops [1/1]
baocheng sun [Thu, 26 Sep 2019 07:41:42 +0000 (03:41 -0400)]
ion: ion_sync_for_device use swiotlb_dma_ops not dummy_dma_ops [1/1]

PD#OTT-5276

Problem:
CTS EncodeDecodeTest failed. Ion sync ioctrl was
forwarded to a dummy implementation. So cached dma buffer
syncing between device and driver was inconsistent occasionally.

Solution:
Changed the dummy_dma_ops to swiotbl_dma_ops when ion_sync_for_device

Verify:
franklin, hertz

Change-Id: I16863bba6c3fe16b9c3b2b410ade6e45c9e74826
Signed-off-by: baocheng sun <baocheng.sun@amlogic.com>
5 years agovideo: clear omx_pts_set_index when session switch [1/1]
shuanglong.wang [Mon, 23 Sep 2019 08:37:08 +0000 (16:37 +0800)]
video: clear omx_pts_set_index when session switch [1/1]

PD#SWPL-13597

Problem:
av diff over 200ms after seek when test AL1 ep sync

Solution:
clear omx_pts_set_index when session switch that new playback, drop
old index, new index will update asap when set_omx_pts invoked.

Verify:
verify by skb nts

Change-Id: I5f46338d46524ceb9a4e907cf9db07ff2e373a08
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
5 years agoMerge "vad: enable tm2 vad wakeup [2/2]" into amlogic-4.9-dev
Jianxin Pan [Fri, 27 Sep 2019 11:48:59 +0000 (04:48 -0700)]
Merge "vad: enable tm2 vad wakeup [2/2]" into amlogic-4.9-dev

5 years agodv: dolby tv core need bitmatch [1/1]
yao liu [Thu, 5 Sep 2019 11:12:38 +0000 (07:12 -0400)]
dv: dolby tv core need bitmatch [1/1]

PD#SWPL-6655

Problem:
tm2 tvcore not bitmatch

Solution:
1.Config VIU_VD1_FMT_CTRL for tm2
2.Config DIAG_CTRL, CRC_CTRL and CM_CRC reg for tm2
3.Config DOLBY_PATH_CTRL for tm2

Verify:
Verified on tm2

Change-Id: I56a086c498ed4d3bf2f43a4639c79546072d586b
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agovpp: improve the csc and dv switch flow and policy [1/1]
Brian Zhu [Wed, 11 Sep 2019 19:39:26 +0000 (03:39 +0800)]
vpp: improve the csc and dv switch flow and policy [1/1]

PD#SWPL-13990

Problem:
There are some conflicts between csc and dv module switching.
Can not switch to SDR->DV when HDR core is working on SDR->SDR mode.

Solution:
1. Improve the switching policy. DV and csc will use same on.
2. add mute operation under dv mode.

Verify:
Verified on AC211

Change-Id: I4d59328fc34228a0ef5275d22643932c4dfe00b0
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
5 years agoamvecm: add lc enable/disable in pc mode [1/1]
Bencheng Jing [Wed, 25 Sep 2019 08:52:39 +0000 (16:52 +0800)]
amvecm: add lc enable/disable in pc mode [1/1]

PD#SWPL-12580

Problem:
pcmode can not disable lc

Solution:
add lc enable/disable in pc mode

Verify:
verified by tl1

Change-Id: Ie8f7ff84549cd42efef550ecd7adf6d959ff5a4f
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agohdmirx: add repeater22 [1/1]
Lei Yang [Tue, 24 Sep 2019 12:37:22 +0000 (20:37 +0800)]
hdmirx: add repeater22 [1/1]

PD#SWPL-12503

Problem:
TM2 cannot support repeater22

Solution:
add repreater2.2

Verify:
TM2

Change-Id: Idda626632641939dccab79bf3d958e8f2c462c82
Signed-off-by: Lei Yang <lei.yang@amlogic.com>
5 years agodv: osd icon display colored dots at 720p [1/1]
yao liu [Thu, 26 Sep 2019 10:28:09 +0000 (06:28 -0400)]
dv: osd icon display colored dots at 720p [1/1]

PD#SWPL-14463

Problem:
OSD hold line changed from 4 to 8, dv vertical
potch should be adjusted accordingly.

Solution:
increase vpotch from 0x20 to 0x30.

Verify:
verify on sm1 720p.

Change-Id: I33779829cb80ce34c5596081a7591278e214d347
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agoaudio: change spdif input audio stuttering [1/1]
yunhua.wei [Tue, 10 Sep 2019 03:32:16 +0000 (11:32 +0800)]
audio: change spdif input audio stuttering [1/1]

PD#SH-1182

Problem:
change spdif input audio stuttering

Solution:
Change the log level from pr_info to pr_debug

Verify:
A113D

Change-Id: I44eb6d4453dddff7a1e8e4e2345603aa292ba161
Signed-off-by: yunhua.wei <yunhua.wei@amlogic.com>
5 years agoavsync: tsync: fix avsync issues when dtv play [2/2]
Xiaoming Sui [Sat, 21 Sep 2019 09:36:28 +0000 (17:36 +0800)]
avsync: tsync: fix avsync issues when dtv play [2/2]

PD#TV-10253

Problem:
PD#TV-10253, SWPL-12816
dtv play when pcr is invalid, avsync is lost sometimes.

Solution:
add some specific marginal checks.

Verify:
X301

Change-Id: I2115bc934cd87d8a93c77180f4f37f1d23fa23ba
Signed-off-by: Xiaoming Sui <xiaoming.sui@amlogic.com>
5 years agohdmirx: fix hdcp2.2 request_mem_region fail issue [1/1]
yicheng shen [Wed, 25 Sep 2019 11:18:05 +0000 (07:18 -0400)]
hdmirx: fix hdcp2.2 request_mem_region fail issue [1/1]

PD#SWPL-14563

Problem:
hdcp_rx22 passed a wrong HPI address to hdmirx driver,
and cause HPI address request_mem_region fail

Solution:
Use the correct HPI address when request_mem_region called.

Verify:
TL1

Change-Id: I80bd6323ae4959edf3c792758568c581024536bb
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
5 years agodeinterlace: pq: mtn use different setting for 480i [1/1]
Jihong Sui [Wed, 25 Sep 2019 08:00:45 +0000 (16:00 +0800)]
deinterlace: pq: mtn use different setting for 480i [1/1]

PD#SWPL-14550

Problem:
deinterlance1-Chapter#1 in sony test pattern,
the "ok" display abnormal.

Solution:
from yanling(VLSI), bencheng.jing
change mxcmbY from 1 to 3;
add combing_bias_motion_setting and
combing_very_motion_setting for 480i;

Verify:
x301

Change-Id: Ida2b432af80a2bd5937f13b3f7a4a030b9b0cfaa
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agoslab: trace for each slab object [1/1]
Tao Zeng [Fri, 2 Aug 2019 08:32:22 +0000 (16:32 +0800)]
slab: trace for each slab object [1/1]

PD#TV-8287

Problem:
Slab memleak is hard to track;

Solution:
Add slab trace to fix it

Verify:
P212

Change-Id: Ie1c44f28d5539c7bf71f9825c617c36af65d8058
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agoeth: compatible internal phy enet efuse map for some chip [1/1]
qi duan [Wed, 25 Sep 2019 07:31:39 +0000 (03:31 -0400)]
eth: compatible internal phy enet efuse map for some chip [1/1]

PD#SWPL-14596

Problem:
some g12a chip,efuse map for enet is diff
So need compatible for these chip

Solution:
read valid bit from valid block,not data block

Verify:
verified by tl1 and g12a

Change-Id: I564209d865cbc2ff1151df07d06593b12ea225d8
Signed-off-by: qi duan <qi.duan@amlogic.com>
5 years agoiomap: fix coverity errors [1/1]
changqing.gao [Wed, 18 Sep 2019 05:41:05 +0000 (13:41 +0800)]
iomap: fix coverity errors [1/1]

PD#SWPL-13972

Problem:
iomap Coverity errors.

Solution:
1. remove verbose code.
2. check return value.

Verify:
test pass on tm2_ab301_v1

Change-Id: Ib8c2baaae63d3c6454ffa45a0c353a6dd9de0787
Signed-off-by: changqing.gao <changqing.gao@amlogic.com>
5 years agodeinterlace: pq: fix combing_fix_en can not change [1/1]
Jihong Sui [Tue, 24 Sep 2019 02:39:41 +0000 (10:39 +0800)]
deinterlace: pq: fix combing_fix_en can not change [1/1]

PD#SWPL-11557

Problem:
Some scenes flicker badly, such as the roof

Solution:
The modification requirements come from,
yanling(VLSI), bencheng.jing
a. patch 62052:
need change mtn parameter back to old for local 1080i;
b. patch 71464:
need fix combing_fix_en can not change;

Verify:
x301

Change-Id: I3e067930f0e4dea9f300e888a6ee3f96caf987fb
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agovideo: dv: DV SDK, DRM infoframe in GBR order [1/1]
robin zhu [Fri, 20 Sep 2019 04:03:07 +0000 (21:03 -0700)]
video: dv: DV SDK, DRM infoframe in GBR order [1/1]

PD#SWPL-13874

Problem:
DV sdk test, for sdr/hdr/dv to hdr cases
DRM infoframe primaries in GBR order

Solution:
DV enable, send primaries in RGB order

Verify:
None

Change-Id: I0229179592203aba5e2a388a572b0061fa21a48f
Signed-off-by: robin zhu <robin.zhu@amlogic.com>
5 years agohdmitx: force to update glitch time after hdcp22 unmux [1/1]
Hang Cheng [Tue, 24 Sep 2019 06:12:27 +0000 (14:12 +0800)]
hdmitx: force to update glitch time after hdcp22 unmux [1/1]

PD#SWPL-11894

Problem:
glitch time in bl31 may not be updated after hdcp22 unmux,
because get hdcp auth result function in bl31 will not be
called after hdcp mode set to 0. In a result, the glitch
hdcp22 result may take place of the actual hdcp22 auth
status after mode change, and feedback to systemcontrol
to clear/set video mute by wrong

Solution:
force to update glitch time after hdcp22 unmux

Verify:
U200/g12a

Change-Id: I497ead5f8f5c46959560ffc0c8702acca1a3f46c
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
5 years agodts: add county and langurage prop for gva [1/1]
jinrong.liao [Mon, 23 Sep 2019 03:32:12 +0000 (11:32 +0800)]
dts: add county and langurage prop for gva [1/1]

PD#SH-875

Problem:
add county and langurage prop via unifykey for gva

Solution:
add county and langurage prop via unifykey for gva

Verify:
S420

Change-Id: Icf5f7c3f44d93fbcaf2be3410e0c04289549c555
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
5 years agotvafe: update 0x125 setting for tl1 av ntsc-m/pali [1/1]
Evoke Zhang [Wed, 18 Sep 2019 02:02:25 +0000 (10:02 +0800)]
tvafe: update 0x125 setting for tl1 av ntsc-m/pali [1/1]

PD#SWPL-14271

Problem:
av pali green block dark in colorbar left bottom corner

Solution:
update 0x125 setting for tl1 av ntsc-m/pali

Verify:
x301

Change-Id: Icb759a39c1265ac043b888b55f3ccaf12661cafe
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agofreeze: add IRQF_NO_SUSPEND for ir irq flag for avoid wakeup by any IR key
Qiufang Dai [Tue, 24 Sep 2019 13:59:47 +0000 (21:59 +0800)]
freeze: add IRQF_NO_SUSPEND for ir irq flag for avoid wakeup by any IR key

PD#TV-10438

Problem:
system can be wake up by any IR key

Solution:
Add IRQF_NO_SUSPEND to avoid IR interrupt being seen as wakeup source IRQ
When IR irq check current key is power key, then send pm_wakeup_event()

Verify:
X32A0-T972

Change-Id: I753fe15f859480954bb569f2da3d3e0dd93c29e3
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
5 years agoramdump: not set sticky register if ramdump disabled [1/1]
Tao Zeng [Wed, 18 Sep 2019 06:19:27 +0000 (14:19 +0800)]
ramdump: not set sticky register if ramdump disabled [1/1]

PD#TV-1924

Problem:
Sticky register which control compress in bl2z will always be set
if ramdump driver probed.

Solution:
If ramdump is disabled by envrioment under uboot. sticky register
should not set for not enter compress under bl2z

Verify:
x301

Change-Id: I1f41c98cebf7957f0dc214046e6d011e08c326de
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agolcd: add lcd_init_level to control lcd display [2/2]
shaochan.liu [Wed, 11 Sep 2019 06:03:03 +0000 (14:03 +0800)]
lcd: add lcd_init_level to control lcd display [2/2]

PD#TV-9856

Problem:
need change display driver for cool boot to enter
kernel stage freeze mode

Solution:
add lcd_panel_ctrl to control lcd display

Verify:
t962x2-x301

Change-Id: I8b58ab0a0f87c49791af7dddf7b05db37f7ad716
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
5 years agopicdec: fix no scale mode, frame stretch [1/1]
Cao Jian [Thu, 19 Sep 2019 03:38:57 +0000 (11:38 +0800)]
picdec: fix no scale mode, frame stretch [1/1]

PD#SWPL-14477

Problem:
the picture is rotated 90 degrees,
stretching left and right

Solution:
modify conditions for frame width or height
equal to screen width or height

Verify:
verify by g12b-w400

Change-Id: I0ca9cc255b202306562bee69726400c697f3b053
Signed-off-by: Cao Jian <jian.cao@amlogic.com>
5 years agousb: xHCI host not responding to stop endpoint command [1/1]
he.he [Thu, 29 Aug 2019 11:09:28 +0000 (07:09 -0400)]
usb: xHCI host not responding to stop endpoint command [1/1]

PD#SWPL-14053

Problem:
Read and write simultaneously on two disks on a hub,
and then the XHCI controller would halted.

Solution:
Set the GUCTL1 BIT 17 to 1 for disable park mode.

Verify:
test pass on u200, ODROID-N2

Change-Id: I007804fa6b97a103da4a05be12c1193b9dd422cb
Signed-off-by: he.he <he.he@amlogic.com>
5 years agoiio: adc: coverity defect cleanup [1/1]
Xingyu Chen [Thu, 12 Sep 2019 03:04:08 +0000 (11:04 +0800)]
iio: adc: coverity defect cleanup [1/1]

PD#SWPL-13967

Problem:
unchecked return value of regmap_write

Solution:
to check the return value

Verify:
test pass on g12a

Change-Id: Ibb45e36d7c24f0e0ea8b14da75e887321ee5b791
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
5 years agodeinterlace: fix suspend di cause undefined instruction [1/1]
Jihong Sui [Fri, 20 Sep 2019 08:03:44 +0000 (16:03 +0800)]
deinterlace: fix suspend di cause undefined instruction [1/1]

PD#SWPL-14418

Problem:
DI issue causes platform crash to restart
when do DTV 2s channel switch+15s suspend

Solution:
use active_flg to protect tasklet_schedule

Verify:
tl1

Change-Id: I91028a039d8b1799b131a953bef4877f70a2f697
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agovideo: fix video axis no changes when enable hold video [1/1]
Rui Wang [Thu, 19 Sep 2019 02:33:53 +0000 (10:33 +0800)]
video: fix video axis no changes when enable hold video [1/1]

PD#TV-10251

Problem:
PE190005-1038 press the OK button switching to
the ATV channel, the screen is not full screen.

Solution:
After the video property changes, if the hold video
is enabled, the current frame needs to be refreshed.

Verify:
Verified with X301

Change-Id: I05cb7255147b1950cb6b9d5813148a9ce0aa6e66
Signed-off-by: Rui Wang <rui.wang@amlogic.com>
5 years agodv: display abnormal when seeking [1/1]
yao liu [Tue, 17 Sep 2019 10:39:24 +0000 (06:39 -0400)]
dv: display abnormal when seeking [1/1]

PD#SWPL-13834

Problem:
Dropping dv frame triggers parser_matedata which updates
the new_dovi_setting. Before rendering the first frame,
keep frame is displayed. However, keep frame requires
toggle, which updates the dovi_setting from new_dovi_setting,
causing color error in keep frame

Solution:
Dropping frame don't update new_dovi_setting

Verify:
passed on sm1

Change-Id: I1c73ba6f7d192066e3d5f9439ccbedc6d610d6eb
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agoamvecm: fix pure black scene adjust contrast affected brightness [1/1]
Bencheng Jing [Thu, 19 Sep 2019 05:58:28 +0000 (13:58 +0800)]
amvecm: fix pure black scene adjust contrast affected brightness [1/1]

PD#SWPL-14319

Problem:
adjust the contrast in full range

Solution:
change to limit range

Verify:
verified by tl1

Change-Id: Icfa3c128c2943e30f2710dad5181c1d85dd32095
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agoatv_demod: fix first sound carrier output in nicam system [1/1]
nengwen.chen [Fri, 20 Sep 2019 05:49:44 +0000 (13:49 +0800)]
atv_demod: fix first sound carrier output in nicam system [1/1]

PD#TV-9972

Problem:
first sound carrier no output in nicam system.

Solution:
1.fix first sound carrier output in nicam system.

Verify:
Verified by TL1.

Change-Id: Ib89b6a5300a1ebeb9e61bbb3acb6356e2abab08f
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agodeinterlace: vpp: change mc update flow [1/1]
Jihong Sui [Mon, 16 Sep 2019 11:35:32 +0000 (19:35 +0800)]
deinterlace: vpp: change mc update flow [1/1]

PD#SWPL-14142

Problem:
display abnormal after play 1 hour.
this is because rdma can't been called in two thread.
mc update bit in hw timer, this causes pps's register
to be set incorrectly.

Solution:
call mc update function in video.c

Verify:
txlx

Change-Id: I750aa5c242a1077691f82c3b2361ee46b3202313
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agodeinterlace: optimize reset/light unreg flow [1/1]
Jihong Sui [Mon, 16 Sep 2019 03:20:43 +0000 (11:20 +0800)]
deinterlace: optimize reset/light unreg flow [1/1]

PD#SWPL-14059

Problem:
video stuck after reset or light unreg.

Solution:
optimize reset/light unreg flow

Verify:
G12A

Change-Id: I982ef4ee618a25d0b562f70b5e7df0fad2d87278
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agodeinterlace: delete reg_req_flag_irq to avoid failed reg. [1/1]
Jihong Sui [Tue, 17 Sep 2019 11:50:40 +0000 (19:50 +0800)]
deinterlace: delete reg_req_flag_irq to avoid failed reg. [1/1]

PD#SWPL-14260

Problem:
variable reg_req_flag_irq is redundant and
it has a probability of causing error reg.

Solution:
delete this variable.

Verify:
tl1

Change-Id: I807f32789acdf4b8e0fea88f9786a301638460ff
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agodv: display green when hotplug hdmi after boot [1/1]
yao liu [Fri, 20 Sep 2019 01:56:22 +0000 (21:56 -0400)]
dv: display green when hotplug hdmi after boot [1/1]

PD#SWPL-14323

Problem:
Kernel and uboot is not sync: When kernel startup
without hdmi,dolby_vision_on is not set to true
even if dv is on in uboot. This lead to dv core
can't turn off when bypass dv in sdr->sdr case.

Solution:
Regardless of connecting to hdmi, as long as uboot
turn on dv, set dolby_vision_on up

Verify:
verify on sm1

Change-Id: I704c833c0b099637ea08b255b6cd380199ea0148
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agovmap: fix wrong mmu setting in check sp funciton [1/1]
Tao Zeng [Tue, 17 Sep 2019 07:00:12 +0000 (15:00 +0800)]
vmap: fix wrong mmu setting in check sp funciton [1/1]

PD#TV-9668

Problem:
If sp address is in linear mapping range, check_sp_fault_again
function in vmap fault handler will still map a new page for it.
This will cause some data in R/W section polluted.

Solution:
Avoid map page if sp is in linear range.

Verify:
TL1 x301

Change-Id: I0e02a2048b586854c528cd3eeafb725751b9dc82
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agoevent: restore watch point after cpu pm event [1/1]
Tao Zeng [Thu, 12 Sep 2019 08:46:06 +0000 (16:46 +0800)]
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>
5 years agoaudio: auge: fix kcontrol chip info [1/1]
Xing Wang [Thu, 19 Sep 2019 06:29:58 +0000 (14:29 +0800)]
audio: auge: fix kcontrol chip info [1/1]

PD#SWPL-14331

Problem:
mixer "HDMI ARC Source" crashes when bootup

Solution:
fix kcontrol chip info

Verify:
x301

Change-Id: I2f2d66acbbd4092a5cbbe4c108d5ae928f0f0ccc
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
5 years agoosd: modify VPP_OSD_SC_DUMMY_DATA alpha conditions [1/1]
Cao Jian [Tue, 17 Sep 2019 08:52:36 +0000 (16:52 +0800)]
osd: modify VPP_OSD_SC_DUMMY_DATA alpha conditions [1/1]

PD#SWPL-14256

Problem:
When ATV Mode has no signal
the bright line interference at the bottom
if freescale height is set to vinfo height

Solution:
modify VPP_OSD_SC_DUMMY_DATA alpha value

Verify:
verified on txlx-r311

Change-Id: I48bbb1be533a88e8b3c622550a0a2e8c07f2a863
Signed-off-by: Cao Jian <jian.cao@amlogic.com>
5 years agoatv_demod: remove 44.25 repeat try signal [1/1]
nengwen.chen [Wed, 18 Sep 2019 05:11:57 +0000 (13:11 +0800)]
atv_demod: remove 44.25 repeat try signal [1/1]

PD#TV-10334

Problem:
1.remove 44.25MHz repeat try signal.

Solution:
1.remove 44.25MHz repeat try signal.

Verify:
Verified by x301

Change-Id: I76608f76885f555dfa5849e8e9016757736c2de8
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agoamvecm: add addr protect for register program [1/1]
Xihai Zhu [Thu, 19 Sep 2019 02:04:02 +0000 (22:04 -0400)]
amvecm: add addr protect for register program [1/1]

PD#SWPL-14333

Problem:
invalid address is allowed for register program
which cause kernel panic

Solution:
add protection, programming on invalid addr will
be terminated

Verify:
tl1

Change-Id: I44bedec256ee5c386b53188fb2d8e40ae8c3f553
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agoir: fix coverity unchecked return value issue [1/1]
Qianggui Song [Wed, 11 Sep 2019 09:22:50 +0000 (17:22 +0800)]
ir: fix coverity unchecked return value issue [1/1]

PD#SWPL-13969

Problem:
In sysfs.c, return value of class_register is not checked.

Solution:
check return value of class_register

Verify:
local coverity check

Change-Id: If8deb3e388e784650e4812257143c3ac919c2d9a
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
5 years agoaudio: auge: add eARC_TX/ARC_TX driver for tm2 [1/1]
Xing Wang [Fri, 9 Aug 2019 07:30:08 +0000 (15:30 +0800)]
audio: auge: add eARC_TX/ARC_TX driver for tm2 [1/1]

PD#SWPL-12654

Problem:
eARCTX/ARCTX function for tm2

Solution:
add eARCTX/ARCTX driver for tm2
add extcon for earc tx connection
optimize eARC RX with regmap

Verify:
ab311

Change-Id: I61f44950af9e200f698372ad4f17457785a6255a
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
5 years agoaudio: update eARC_RX/ARC_RX driver [1/1]
Xing Wang [Thu, 16 May 2019 13:43:26 +0000 (21:43 +0800)]
audio: update eARC_RX/ARC_RX driver [1/1]

PD#SWPL-6863

Problem:
eARCRX/ARCRX function for sm1/tm2

Solution:
add eARCRX/ARCRX driver for sm1/tm2
plug in/out HDMI cable, notify user space current attended type

Verify:
tested on ac200, ab311

Change-Id: I0332723ef9c9d45f7797df38a7077561fddb13bf
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
5 years agodeinterlace: fix bright edge at the top when beans falling [1/1]
Wenfeng Guo [Tue, 17 Sep 2019 09:12:27 +0000 (17:12 +0800)]
deinterlace: fix bright edge at the top when beans falling [1/1]

PD#SWPL-8980

Problem:
bright edge at the top when beans falling

Solution:
revert the setting of top two lines do weave to Feijun's suggestions

Verify:
TL1

Change-Id: I314e0d23e4e7c00939bd0203cd821144274fbf9e
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
5 years agodeinterlace: fix blend setting err [1/1]
Jihong Sui [Tue, 17 Sep 2019 05:48:14 +0000 (13:48 +0800)]
deinterlace: fix blend setting err [1/1]

PD#SWPL-8980

Problem:
0x170d[16] can't set;

Solution:
Correct logic errors according to Feijun's suggestions

Verify:
TL1

Change-Id: If1ba9494d49b5614aac7571c3ee0e6ddb3fb6245
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agoRAVENPLAT 2652: RAVEN - Android Security Bulletin - September 2019-09 - Kernel compon...
Todd Kjos [Wed, 24 Apr 2019 19:31:18 +0000 (12:31 -0700)]
RAVENPLAT 2652: RAVEN - Android Security Bulletin - September 2019-09 - Kernel components binder driver - CVE-2019-2181 [1/]

PD#OTT-5999

[Problem]
In binder_transaction of binder.c, there is a possible out of bounds
write due to an integer overflow. This could lead to local escalation of
privilege with noadditional execution privileges needed. User interaction
is needed for exploitation.
The fix is designed to check for the integer overflow.

[Solution]
UPSTREAM: binder: check for overflow when alloc for security context

commit 0b0509508beff65c1d50541861bc0d4973487dc5 upstream.

When allocating space in the target buffer for the security context,
make sure the extra_buffers_size doesn't overflow. This can only
happen if the given size is invalid, but an overflow can turn it
into a valid size. Fail the transaction if an overflow is detected.

Bug: 130571081
Change-Id: Ibaec652d2073491cc426a4a24004a848348316bf
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agoRAVENPLAT 2390:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-20169...
Mathias Payer [Wed, 5 Dec 2018 20:19:59 +0000 (21:19 +0100)]
RAVENPLAT 2390:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-20169) Risk:[] [1/1]

PD#OTT-5679

[Problem]

[Solution]
USB: check usb_get_extra_descriptor for proper size

When reading an extra descriptor, we need to properly check the minimum
and maximum size allowed, to prevent from invalid data being sent by a
device.

Change-Id: Ie3dbdb24bebc0f2813b0bedd2261f8246ddd71d3
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Co-developed-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Hui Peng <benquike@gmail.com>
Signed-off-by: Mathias Payer <mathias.payer@nebelwelt.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agoRAVENPLAT 2387:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-17182...
Hanjie Lin [Wed, 21 Aug 2019 01:19:19 +0000 (09:19 +0800)]
RAVENPLAT 2387:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-17182) Risk:[] [1/1]

PD#OTT-5676

[Problem]
digital security team requires OSS to be patched up to the latest or non-vulnerable version

[Solution]
mm: get rid of vmacache_flush_all() entirely
Jann Horn points out that the vmacache_flush_all() function is not only
potentially expensive, it's buggy too.  It also happens to be entirely
unnecessary, because the sequence number overflow case can be avoided by
simply making the sequence number be 64-bit.  That doesn't even grow the
data structures in question, because the other adjacent fields are
already 64-bit.
So simplify the whole thing by just making the sequence number overflow
case go away entirely, which gets rid of all the complications and makes
the code faster too.  Win-win.

[Test]

Change-Id: I536c7b183ced970e18c9d67211f32da0ee404111
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agoRAVENPLAT 2381:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-6555...
Hanjie Lin [Wed, 14 Aug 2019 10:42:54 +0000 (18:42 +0800)]
RAVENPLAT 2381:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-6555) Risk:[] [1/1]

PD#OTT-5671

[Problem]
The irda_setsockopt function in net/irda/af_irda.c and later in
drivers/staging/irda/net/af_irda.c in the Linux kernel before 4.17
allows local users to cause a denial of service (ias_object
use-after-free and system crash) or possibly have unspecified other
impact via an AF_IRDA socket.

[Solution]
The irda_setsockopt() function conditionally allocates memory for a new
self->ias_object or, in some cases, reuses the existing
self->ias_object. Existing objects were incorrectly reinserted into the
LM_IAS database which corrupted the doubly linked list used for the
hashbin implementation of the LM_IAS database. When combined with a
memory leak in irda_bind(), this issue could be leveraged to create a
use-after-free vulnerability in the hashbin list. This patch fixes the
issue by only inserting newly allocated objects into the database.

[Test]

Change-Id: Idbdc870be0064e331969b39a7b6e447c16a9073a
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agoRAVENPLAT 2378:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-9517...
Hanjie Lin [Wed, 14 Aug 2019 08:36:56 +0000 (16:36 +0800)]
RAVENPLAT 2378:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-9517) Risk:[] [1/1]

PD#OTT-5666

[Problem]
In pppol2tp_connect, there is possible memory corruption due to a
use after free. This could lead to local escalation of privilege with
System execution privileges needed. User interaction is not needed for
exploitation.

[Solution]
l2tp: pass tunnel pointer to ->session_create()

Using l2tp_tunnel_find() in pppol2tp_session_create() and
l2tp_eth_create() is racy, because no reference is held on the
returned session. These functions are only used to implement the
->session_create callback which is run by l2tp_nl_cmd_session_create().
Therefore searching for the parent tunnel isn't necessary because
l2tp_nl_cmd_session_create() already has a pointer to it and holds a
reference.

This patch modifies ->session_create()'s prototype to directly pass the
the parent tunnel as parameter, thus avoiding searching for it in
pppol2tp_session_create() and l2tp_eth_create().

Since we have to touch the ->session_create() call in
l2tp_nl_cmd_session_create(), let's also remove the useless conditional:
we know that ->session_create isn't NULL at this point because it's
already been checked earlier in this same function.

Finally, one might be tempted to think that the removed
l2tp_tunnel_find() calls were harmless because they would return the
same tunnel as the one held by l2tp_nl_cmd_session_create() anyway.
But that tunnel might be removed and a new one created with same tunnel
Id before the l2tp_tunnel_find() call. In this case l2tp_tunnel_find()
would return the new tunnel which wouldn't be protected by the
reference held by l2tp_nl_cmd_session_create().

Change-Id: I50e19ae5abb4009205e59105222bf92e3587f9c4
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agoRAVENPLAT-2379:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-5390...
Hanjie Lin [Mon, 12 Aug 2019 11:35:42 +0000 (19:35 +0800)]
RAVENPLAT-2379:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-5390) Risk:[] [1/1]

PD#OTT-5669

[Problem]
Linux kernel versions 4.9+ can be forced to make very expensive calls
to tcp_collapse_ofo_queue() and tcp_prune_ofo_queue() for every incoming
packet which can lead to a denial of service.

[Solution]
Juha-Matti Tilli reported that malicious peers could inject tiny
packets in out_of_order_queue, forcing very expensive calls
to tcp_collapse_ofo_queue() and tcp_prune_ofo_queue() for
every incoming packet.
With tcp_rmem[2] default of 6MB, the ooo queue could
contain ~7000 nodes.
This patch series makes sure we cut cpu cycles enough to
render the attack not critical.
We might in the future go further, like disconnecting
or black-holing proven malicious flows.

[Test]

Change-Id: I09c72cd11a38516f3b6e293deb21c5dd0faa3d9e
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agoamvideo: omx consecutive drop should happen only after omx_run is true [1/1]
Rico Yang [Wed, 11 Sep 2019 07:40:17 +0000 (03:40 -0400)]
amvideo: omx consecutive drop should happen only after omx_run is true [1/1]

PD#SWPL-13232

Problem:
amvideo drops excessive video frames than it should drop

Solution:
drop only after omx_run is true

Verify:
verified on Franklin

Change-Id: Iacb8f23c9635d00ce6265a0228c1e1e458902c6a
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
5 years agoperf: pmu fine-tune for aarch32/64 of A53/A55/A73 [1/1]
Hanjie Lin [Tue, 27 Aug 2019 08:21:46 +0000 (16:21 +0800)]
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>
5 years agoatv_demod: optimize pal-i ring [1/1]
nengwen.chen [Thu, 29 Aug 2019 09:20:55 +0000 (17:20 +0800)]
atv_demod: optimize pal-i ring [1/1]

PD#TV-8006

Problem:
1.optimize pal-i ring.

Solution:
1.optimize pal-i ring.
2.add pal-i peak filter.

Verify:
Verified by x301.

Change-Id: Id935a24712216aafc20ac150c2560dd998a76f56
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agovlock: log level less than 3, enc mode not work properly [1/1]
Yong Qin [Mon, 16 Sep 2019 08:30:42 +0000 (16:30 +0800)]
vlock: log level less than 3, enc mode not work properly [1/1]

PD#TV-10211

Problem:
log level less than 3, the function call flow changed, and
enc mode vlock max line, max pixel varible havn't be initialed.

Solution:
move initial max line/pixel varible in vlock initial function.

Verify:
tl1

Change-Id: Ib36662045e28a911bf1585bf57bc849b1952d6f9
Signed-off-by: Yong Qin <yong.qin@amlogic.com>