platform/kernel/linux-amlogic.git
5 years agodeinterlace: add sysfs pulldown_enable. [1/1]
Luan Yuan [Tue, 18 Jun 2019 06:34:44 +0000 (14:34 +0800)]
deinterlace: add sysfs pulldown_enable. [1/1]

PD#SWPL-9750

Problem:
the system lost pulldown_enable

Solution:
fixed it

Verify:
verify by franklin

Change-Id: I2b5fe4f74ecf295bb44bdeecfeb6a5cc9188c3f3
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodv: The first frame is abnormal when play video [1/1]
yao liu [Fri, 17 May 2019 09:32:59 +0000 (17:32 +0800)]
dv: The first frame is abnormal when play video [1/1]

PD#SWPL-6480

Problem:
core1 reg is set wrong for g12 and tm2

Solution:
correct core1 reg for g12 and tm2

Verify:
verified by u212

Change-Id: Ie9de107fce6f23ded1397827ebe95a00939df8c1
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agoptsserv: add first pts64 check in. [1/1]
shihong.zheng [Sat, 8 Jun 2019 03:45:51 +0000 (11:45 +0800)]
ptsserv: add first pts64 check in. [1/1]

PD#OTT-4173

Problem:
video stuck after seek. first pts64 is
abnormal when lookup failed.

Solution:
add first pts64 checkin for lookup failed.

Verify:
w400

Change-Id: Ibb2a15815311598cf47c242cb4c369da0f0cbdd2
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agoRevert "AML: v4l2_qbuf"
Nick Xie [Mon, 5 Aug 2019 06:54:53 +0000 (14:54 +0800)]
Revert "AML: v4l2_qbuf"

This reverts commit 53da15132d8017b730a74357ed9d515efc253d99.

5 years agoarm64: defconfig: enable CONFIG_BLK_DEV_RAM
Nick Xie [Mon, 5 Aug 2019 06:47:32 +0000 (14:47 +0800)]
arm64: defconfig: enable CONFIG_BLK_DEV_RAM

Signed-off-by: Nick Xie <nick@khadas.com>
5 years agodefconfig: enable CONFIG_BLK_DEV_RAM [1/1]
Hanjie Lin [Tue, 4 Jun 2019 10:38:30 +0000 (18:38 +0800)]
defconfig: enable CONFIG_BLK_DEV_RAM [1/1]

PD#SWPL-8728

Problem:
{vts}[SEI 510] VtsKernelLtp module 2 fail
fgetxattr02 test failed

Solution:
enable CONFIG_BLK_DEV_RAM

Verify:
u212

Change-Id: I81c42803757f830f4da11fcb18baeaf28074cf26
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agohdmitx: rewrite multi-purpose VSIF [1/1]
Zongdong Jiao [Tue, 21 May 2019 06:51:08 +0000 (14:51 +0800)]
hdmitx: rewrite multi-purpose VSIF [1/1]

PD#SWPL-8788

Problem:
VSIF has multi-purpose: HDMI_4K, 3D, DV and HDR10+.
Need rewrite VSIF programming.

Solution:
rewrite multi-purpose VSIF

Verify:
G12/U212

Change-Id: I1db21d54c8ae873045661d1f00b930afcad5be60
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
5 years agodtv_demod: Play dtv stuttering when the temperature rising [1/1]
zhiwei.yuan [Thu, 11 Apr 2019 07:53:04 +0000 (15:53 +0800)]
dtv_demod: Play dtv stuttering when the temperature rising [1/1]

PD#SWPL-6985

Problem:
cfo track value is small

Solution:
increase cfo track val to avoid crystal jitter

Verify:
verified by t962x2_x301

Change-Id: Ifcf53f1d06eae204a82dc99154d18c38f370ebc1
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agodtv_demod: playing dtmb is not smooth when signal is non-standard [1/1]
zhiwei.yuan [Mon, 25 Mar 2019 09:28:35 +0000 (17:28 +0800)]
dtv_demod: playing dtmb is not smooth when signal is non-standard [1/1]

PD#SWPL-6286

Problem:
tps of non-standard signal is incorrect

Solution:
ignore calculating amplitude tps

Verify:
verified by t962x2_x301

Change-Id: Ibd3ff7bfe56ca604ad99fa7c6f457202c227c9ae
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agoosd: fix release dma buf error when vout1&2 run at same time.
sky zhou [Sat, 6 Apr 2019 11:35:34 +0000 (19:35 +0800)]
osd: fix release dma buf error when vout1&2 run at same time.

PD #SWPL-6027

Problem:
dmabuf panic when vout1,vout2 run at same time.

Solution:
When do pandisplay, only release the dma buf displayed
on current vout pipeline.

Verify:
Verify on macroni.

Change-Id: I8951d55f9f56cbfa509bcbe2906a108c5f50dbfe
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
5 years agoosd: add viu2 support for tl1 [1/1]
pengcheng chen [Tue, 20 Nov 2018 01:42:44 +0000 (09:42 +0800)]
osd: add viu2 support for tl1 [1/1]

PD#172587

Problem:
add viu2 support for tl1.

Solution:
add viu2 support for tl1.

Verify:
verified by x301

Change-Id: Ie728f6ee7e0c4c4062e5e12e3d80515d99d020f8
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
ff60d15 osd: calc osd parameters used num/den replace left/right shift
[1/1]
481d4f2 osd: set hdr size according osd blend0 out size  [1/1]
42b54ce osd: afbc decode error when loop viu1 to vdin [1/1]
91bda20 osd: fix afbc decoder error caused flicker in display [1/1]
799ba4c osd: fix hotplug hdmi causes system crash [1/1]
e9fadfe5 osd: fix osd afbc can't display on android5.1 [1/1]
1f8aa33 osd: frame just display on half screen [1/1]
7bcfa18 osd: set osd1 scaler before osd blend [1/1]
6913eaa osd: osd display color abnormal when run drm [1/1]
6862fb2 osd: add viu2 fence support [1/1]
f59b7a6 drm: a113d support drm issue [1/1]
50557a1 osd: reset afbcd flag when convert format value [1/1]
cfbcb3d osd: fix buidroot compile error issue [1/1]
6163540 osd: rdma write miss caused afbc mosaic [1/1]
032a712 osd: fix display frame offset caused osd display abnormal [1/1]
2c1269e osd: osd: recovey mode always blank [1/1]
3be570b osd: osd: reserve vs_ctrl bit for VPP [1/1]
40bfe97 osd: add viu2 support for tl1 [1/1]

osd: osd: reserve vs_ctrl bit for VPP [1/1]

PD#172587

Problem:
reserve vs_ctrl bit for VPP

Solution:
Avoid operating VPP_OFIFO_SIZE bit19 on OSD code

Verify:
verified on t962x2_x301

Change-Id: Ic450d6f64e2349d97d02f0802058b4031564fea4
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
osd: osd: recovey mode always blank [1/1]

PD#TV-1287

Problem:
recovey mode always blank

Solution:
set right condition to enable free_scale

Verify:
verified on P321 board

Change-Id: I2f70b9c5436b30156f157a3297a11a2ef1cfec67
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
osd: fix display frame offset caused osd display abnormal [1/1]

PD#OTT-1663

Problem:
display frame offset caused osd display abnormal

Solution:
remove unnecessary blend dst_data adjust

Verify:
Locally on raven

Change-Id: I38b97f6da750f5edea97416b4d7fc0172dea7466
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: rdma write miss caused afbc mosaic [1/1]

PD#SWPL-4502

Problem:
afbc mosaic when bandwidth is high, root cause is
rdma write regs missed.

Solution:
1. add vsync line detected, if rdma write nearly
vsync, wait vsync needed
2. add rdma write detected, if rdma write missed
wait vsync needed
3. add tl1/g12b afbc backup

Verify:
Locally on tl1

Change-Id: If4fd303c3808525fa44e1118742a3e26830323f5
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: fix buidroot compile error issue [1/1]

PD#SWPL-4502

Problem:
buidlroot compile error

Solution:
fix buidroot compile error issue

Verify:
buildroot make linux-build

Change-Id: I0277c2b3f439946ab680f4c34f30c16e31ea6034
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: reset afbcd flag when convert format value [1/1]

PD#SWPL-5185

Problem:
"fence color format error 28" when test weston-simple-egl

Solution:
reset afbcd flag when convert format value

Verify:
Locally on g12b_w400

Change-Id: I81a9394288026bc596f6b3438cec72ceaad7749f
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
drm: a113d support drm issue [1/1]

PD#SH-397

Problem:
use  modetest to test A113D DRM function, displaying is incorrect

Solution:
add linear addr config for a113d drm mode

Verify:
verified on s400

Change-Id: Id6a2c6ad94bc0148815076561d9dc2ae8ded6884
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
osd: add viu2 fence support [1/1]

PD#SWPL-6384

Problem:
viu2 not support fence

Solution:
add viu2 fence support.

Verify:
test pass on tl1

Change-Id: I94a5e483c88cace79b7386bb918c203ada6b8274
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: osd display color abnormal when run drm [1/1]

PD#SWPL-6867

Problem:
osd dispaly color abnormal because osd enable not update.

Solution:
update osd enalbe flag in drm process.

Verify:
Verified u212

Change-Id: I1c2e8b62d9d5af203c95d3d0ac940fb512dd8e5e
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: set osd1 scaler before osd blend [1/1]

PD#SWPL-6596

Problem:
bring up osd for TM2

Solution:
set osd1 scaler before osd blend

Verify:
Verified on T962e2_ab319

Change-Id: I9e7d5fa83b2edc8e9359371695ea46fa3b39e09c
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: frame just display on half screen [1/1]

PD#SWPL-7039

Problem:
bring up osd for TM2
frame just display on half screen

Solution:
fix field_out_en value from array

Verify:
Verified on T962e2_ab319

Change-Id: Id07f3d813242f031125fcac11d3fa05205895448
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
osd: fix osd afbc can't display on android5.1 [1/1]

PD#SWPL-6869

Problem:
afbc can't display with android5.1, because blank enable
called before afbc set, which make osd enable not updated
and afbc not enable when hwc post frame

Solution:
if mali afbc enable, call osd enable.

Verify:
verified on x301

Change-Id: I1d727a586a66c6e7848d09dfb5c5b74ff7a2e3e6
Signed-off-by: Shuide Chen <shuide.chen@amlogic.com>
osd: fix hotplug hdmi causes system crash [1/1]

PD#SWPL-7009

Problem:
hotplug hdmi causes system crash
when unplug hdmi display mode is null, hwc hasn't received
event and post frame normal but osd vsync lost, which caused
wait hw vsync timeout(1s), and fd leak.

Solution:
when process every frame, if display mode is null, exit frame process
just process fence.

Verify:
verified on Raven, franklin

Change-Id: Icbe7cd76776e46a6ed79c6cee3ea05772cc5f9d2
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: fix afbc decoder error caused flicker in display [1/1]

PD#OTT-3000

Problem:
afbc decoder error caused flicker in display.

Solution:
close osd prefetch.

Verify:
Verified with raven

Change-Id: I44356c028b41e251f7a98b5e931b2cbd583b0829
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: afbc decode error when loop viu1 to vdin [1/1]

PD#TV-5024

Problem:
afbc decode error when loop viu1 to vdin.

Solution:
set osd hold line to max if vinfo is dummy_panel

Verify:
Tl1 X301

Change-Id: I0ebb312d381accb1890233164f071a095310d2f1
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: set hdr size according osd blend0 out size  [1/1]

PD#IPTV-2395

Problem:
osd last line have abnormal data

Solution:
set hdr size according osd blend0 out size

Verify:
Verfied on u212

Change-Id: Iad738b16fce066270c78213f1b696a802e1b8da6
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
osd: calc osd parameters used num/den replace left/right shift  [1/1]

PD#OTT-3615

Problem:
a line on the right displayed

Solution:
calc osd parameters used num/den replace left/right shift

Verify:
Verfied on u212

Change-Id: If59d9de0bb3c525d2b67d05ec449d458fbbcdfe2
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agohdmitx: replace I2C_REACTIVE with I2C_RESET logic [1/1]
Zongdong Jiao [Thu, 23 May 2019 12:59:32 +0000 (20:59 +0800)]
hdmitx: replace I2C_REACTIVE with I2C_RESET logic [1/1]

PD#OTT-3716

Problem:
In GX, there is the I2C_REACTIVE method to avoid the I2C hangup
issue. But it is fixed in G12, so need replace it.

Solution:
Replace I2C_REACTIVE with I2C_RESET logic

Verify:
G12/U212

Change-Id: I1ca2f77a213db0d7de067745b3701816b7c85c27
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
5 years agoaudio: fixed cvbs audio pop noise on g12a/b [1/1]
Zhe Wang [Thu, 13 Jun 2019 08:48:09 +0000 (16:48 +0800)]
audio: fixed cvbs audio pop noise on g12a/b [1/1]

PD#OTT-3760, PD#SWPL-8309

Problem:
startup ott, cvbs out with pop noise

Solution:
Set gpio init low

Verify:
verified by franklin

Change-Id: Ieb33e72473055fad69bc8e9a68ed0b0552e9f029
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
5 years agovpp: fix out of one pixel between video and the red frame [1/1]
Peng Yixin [Mon, 27 May 2019 14:00:15 +0000 (22:00 +0800)]
vpp: fix out of one pixel between video and the red frame [1/1]

PD#TV-5764

Problem:
Goto the wrong case when using ext_sar

Solution:
Using the correct case when using ext_sar

Verify:
verified on r311

Change-Id: I181b9e8d21917840729f2e487b3dae3f41cd2c5a
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agoosd: add afbc source crop support [2/2]
Pengcheng Chen [Tue, 26 Feb 2019 10:51:50 +0000 (18:51 +0800)]
osd: add afbc source crop support [2/2]

PD#OTT-2168

Problem:
media control bar can't displayed because afbc source crop not support

Solution:
add afbc source crop support

Verify:
verify on raven

Change-Id: Ib1f925aeea12ba18d8f976aba8c84f0738c41293
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agousb: panel type-c need support adb and u-disk [1/1]
he.he [Thu, 30 May 2019 06:54:52 +0000 (14:54 +0800)]
usb: panel type-c need support adb and u-disk [1/1]

PD#SWPL-9127

Problem:
the id pin of the type-c is aways high, whether it is connected to u disk
or usb cable.

Solution:
It need set vbus high when the usb mode is host only.

Verify:
test passed on sm1

Change-Id: I4ff8a9b5419b54828ecd797a78d149da98535dee
Signed-off-by: he.he <he.he@amlogic.com>
5 years agodts: reduce isp reserved mem [1/1]
Jiacheng Mei [Tue, 4 Jun 2019 09:33:02 +0000 (17:33 +0800)]
dts: reduce isp reserved mem [1/1]

PD#SWPL-70

Problem:
arm isp can't get reserved mem

Solution:
reduce isp reserved mem

Verify:
w400

Test: camera preview and capture OK

Change-Id: Icaf630a25a55d31ec3ed68cae48fb840017c9fc0
Signed-off-by: Jiacheng Mei <jiacheng.mei@amlogic.com>
5 years agoaudio: fixed dtv audio clk setting error in samesource [1/1]
Zhe Wang [Tue, 11 Jun 2019 05:55:04 +0000 (13:55 +0800)]
audio: fixed dtv audio clk setting error in samesource [1/1]

PD#SWPL-9593

Problem:
dtv audio is heard slower in spk

Solution:
when mclk is changed, spdif clk changes correspondingly in samesource case

Verify:
X301

Change-Id: I15fcb598ba893762580f0a5aac856376af8c94ec
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
5 years agoaudio: SM1/TM2: bringup EQ/DRC module [1/1]
Zhe Wang [Thu, 6 Jun 2019 12:22:32 +0000 (20:22 +0800)]
audio: SM1/TM2: bringup EQ/DRC module [1/1]

PD#SWPL-7606

Problem:
EQ/DRC module is out of work

Solution:
bringup EQ/DRC module

Verify:
verified on ac200

Change-Id: Ibd9b1e65aaed2ecd5f3086e4325d6b92fe34b040
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agoaudio: audio ABUS stuck issue [1/1]
Shuai Li [Tue, 4 Jun 2019 05:41:43 +0000 (13:41 +0800)]
audio: audio ABUS stuck issue [1/1]

PD#SWPL-9142

Problem:
Audio Abus may be stuck if it is stopped
when the burst is not finished.
And the stuck can't be recovered
unless reboot the system.

Solution:
Add check to make sure that the transfer
is over then start to disable the toddr fifo.

Verify:
TL1 stress test.

Change-Id: I28dcf84ddec421bc70370b2544f0bf1f3272e7b4
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
5 years agoaudio: enable clk before extern codec init when system resume [1/1]
Zhe Wang [Wed, 22 May 2019 10:40:17 +0000 (18:40 +0800)]
audio: enable clk before extern codec init when system resume [1/1]

PD#TV-6005

Problem:
change time sequence for extern AMP

Solution:
1) enable tdm clk before codec init, when system resume

Verify:
test on X301

Change-Id: I3d6411cd32fbc3496bed942c72b7bec408d66959
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agoaudio: fixed audio hw freq responds test fail [1/2]
Zhe Wang [Fri, 17 May 2019 07:23:56 +0000 (15:23 +0800)]
audio: fixed audio hw freq responds test fail [1/2]

PD#TV-5865

Problem:
audio hdmiin freq responds test fail

Solution:
enable hw audio resample filter

Verify:
X301 marconi

Change-Id: I78699848049abe6a6b1b682e5a7bb2130fb16c09
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
audio: set resample clk to mclk of tdm [1/2]

PD#TV-5865

Problem:
hdmiin frequency responds test fail.

Solution:
set resample clk to mclk of tdm

Verify:
X301

Change-Id: I22c92219bcea534bdec2bc526d535cacd971faa5
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
5 years agoaudio: meson: fix internal codec mixer api call [1/1]
Jian Xu [Mon, 27 May 2019 11:35:58 +0000 (19:35 +0800)]
audio: meson:  fix internal codec mixer api call [1/1]

PD#TV-6267

Problem:
internal codec pointer operation error

Solution:
use 4.9 ALSA standard API to get the codec handle.

Verify:
R311

Change-Id: I52567a914230083054dc0413f818356d71c83a53
Signed-off-by: Jian Xu <jian.xu@amlogic.com>
5 years agoaudio: fix spdif not work on soundbar [1/1]
yujie.wu [Thu, 11 Apr 2019 02:38:54 +0000 (10:38 +0800)]
audio: fix spdif not work on soundbar [1/1]

PD#SWPL-6801

Problem:
  There is too much kernel print which
  blocks the system

Solution:
  Add condition to remove the print log

Verify:
  A113

Change-Id: I5762893b424e8201e2725f33854473097f1246b9
Signed-off-by: yujie.wu <yujie.wu@amlogic.com>
5 years agodi: add di for sm1 bringup [1/1]
Yong Qin [Fri, 22 Mar 2019 12:41:15 +0000 (20:41 +0800)]
di: add di for sm1 bringup [1/1]

PD#SWPL-5865

Problem:
SM1 bring up

Solution:
add the chipid

Verify:
sm

Change-Id: I9b738efea210b4fb3deb2dab9de6a443aabadb53
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodeinterlace: pq: adjust cue setting for tl1 [1/1]
Jihong Sui [Fri, 7 Dec 2018 02:40:26 +0000 (10:40 +0800)]
deinterlace: pq: adjust cue setting for tl1 [1/1]

PD#SWPL-2984

Problem:
VLSI(yanling.liu) fine-tune cue setting for TL1.

Solution:
add new setting.

Verify:
tl1

Change-Id: I99c32d994687650dc851dd2fb8c0464e8ffd21b5
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodi: fix image jitter and flash av ntsc [1/1]
Wenfeng Guo [Wed, 29 May 2019 07:48:52 +0000 (15:48 +0800)]
di: fix image jitter and flash av ntsc [1/1]

PD#SWPL-8937

Problem:
image jitter and flash av ntsc

Solution:
1.force entry pulldown32

Verify:
tl1

Change-Id: I8e86993be8db358c70cd9a4d86c9d578bce74f6e
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
5 years agodeinterlace: tl1: increase protection for unreg. [1/1]
Jihong Sui [Mon, 6 May 2019 10:12:49 +0000 (18:12 +0800)]
deinterlace: tl1: increase protection for unreg. [1/1]

PD#SWPL-7465

Problem:
1.bus crash

Solution:
1. add debug info only for tl1;
2. increase protection for unreg;

Verify:
x301

Change-Id: I84c0058bc22310f87407de1bf56f7a5eb92fd2ed
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agodi: when src size change, post ready size not right [1/1]
Yong Qin [Tue, 23 Apr 2019 09:33:09 +0000 (17:33 +0800)]
di: when src size change, post ready size not right [1/1]

PD#OTT-2650

Problem:
Play local video, when source window size change,
flashing occur. about two frame is not right

Solution:
There have a bug when source window size change, current
frame width was copied to post ready frame. so every
frame backup width saved in to current frame private buffer.

Verify:
TL1

Change-Id: I1b82dcfcfaeffaad6b28a7871014e12f0d157004
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agodi: change clkb frq from 500 to 667 for tl1 [1/1]
Yong Qin [Fri, 12 Apr 2019 02:13:35 +0000 (10:13 +0800)]
di: change clkb frq from 500 to 667 for tl1 [1/1]

PD#SWPL-6762

Problem:
di clkb frq is not right

Solution:
change from 500 to 667

Verify:
tl1

Change-Id: I9242fec37f7527203d1d00cbcdfb79c4f09e9595
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodi: fix TL1 cave video 1080i 60hz have drawing [1/1]
Wenfeng Guo [Tue, 16 Apr 2019 08:06:37 +0000 (16:06 +0800)]
di: fix TL1 cave video 1080i 60hz have drawing [1/1]

PD#SWPL-7006

Problem:
TL1 cave video 1080i 60hz have drawing.

Solution:
dark scenes don't into pulldown32 by vlsi yanling

Verify:
TL1

Signed

Change-Id: Ib77c0f99940c416943baa9b9a8a02a059b274e5b
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
5 years agovpp: support the interlace format from vdin afbc [1/2]
Yong Qin [Thu, 28 Feb 2019 03:24:59 +0000 (11:24 +0800)]
vpp: support the interlace format from vdin afbc [1/2]

PD#SWPL-5205

Problem:
Now vdin support afbc+interlace format

Solution:
In vpp, add case to support vdin afbc with interlace

Verify:
tl1_x301, verify pass

Change-Id: I6540b03a6cb5308fc2bc202069aa87234fd35df6
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
a6973fc di: small window bottom of the screen no video [1/1]
fed45cd di: small window bottom of the screen is blank [1/1]
fb34727 deinterlace: fix tl1 in 1080i has small sawtooth [1/1]
66bdbe7 di: bringup for tm2 [1/1]
13ebe46 di: monkey test di cause crash [1/1]
2c8ed09 di: "DI: di_init_buf vmap fail" is seen when power on [1/1]
7ba6477 di: av to dtv , black screen [1/1]
5970920 di: The last frame of the video flash garbage [1/1]
8c3e98d di: flash green when play 265 SD video [1/1]
975c0ee di: exit play local 4k video flashing [1/1]
edc1970 di: pretect reg unreg flow [1/1]
030872b di: 1080p,the screen display anormal [1/1]
3f4854e di: support the interlace format from vdin afbc [2/2]
89a190a vpp: support the interlace format from vdin afbc [1/2]

di: support the interlace format from vdin afbc [2/2]

PD#SWPL-5205

Problem:
support afbc from vdin and decoder on tl1

Solution:
1.add this function
2.support from vdin and decoder

Verify:
tl1

Change-Id: I258d40ad5706f4a9a5749298dd9a33a9b4bbafa2
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
di: 1080p,the screen display anormal [1/1]

PD#SWPL-5874

Problem:
1080p the screen display anormal

Solution:
compress mode, modify vdin frame type.

Verify:
tl1

Change-Id: Ic1ee1472105861c8debce2a1645f70ed617fd132
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
di: pretect reg unreg flow [1/1]

PD#SWPL-4918

Problem:
when reg unreg event called too fast, di cause system crash

Solution:
pretect reg and unreg flow

Verify:
tl1

Change-Id: I9b3e28c2b0b709d4f53f60b1f044a390933117ce
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
di: exit play local 4k video flashing [1/1]

PD#SWPL-5877

Problem:
1.afbc mode, play h.265 local video, when exit playing,
screen will flashing sometimes.
2.when exit playing, there cost 5s time.

Solution:
4k video di bypass, afbc hw module used by vpp, when
DI unreg, needn't to disable AFBC moudule.

Verify:
tl1

Change-Id: I2ac66a145a009042d286dda50e7259657f4bfc8e
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
di: flash green when play 265 SD video [1/1]

PD#SWPL-6097

Problem:
flash green garbages when play h.265 SD video

Solution:
afbc input not enable

Verify:
tl1

Change-Id: I310eeb6d922ab8b9035c815afc4e967c0e5390ff
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
di: The last frame of the video flash garbage [1/1]

PD#SWPL-6070

Problem:
flash garbages when unreg process.

Solution:
can't speed down the clkb rate, there is a mirror mode

Verify:
tl1

Change-Id: I5fcc29a1cda196992a457f40fee31992f4bc1528
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
di: av to dtv , black screen [1/1]

PD#SWPL-6096

Problem:
from local av switch to dtv,black screen,then search channel

Solution:
revert the modification "62617"

Verify:
tl1

Change-Id: I49ae627b9f0b1f6a776e5cbffc723a43e85cee72
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
di: "DI: di_init_buf vmap fail" is seen when power on [1/1]

PD#SWPL-5908

Problem:
execute vmap when di reserved memory is disable

Solution:
skip memory calculation in init buf  while using cma

Verify:
verified by t962x2_x301

Change-Id: Ib0c2e422f61f2b4182109cb7bbb3107029363ce0
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
di: monkey test di cause crash [1/1]

PD#SWPL-6133

Problem:
monkey test di cause crash,when is di reg processing, unreg event
attach, and released the di buffer, so cause crash.

Solution:
every unreg event received, need waitting reg process had done.

Verify:
tl1

Change-Id: I2f2bb068ed65ab14ab4f09de96b64d7290da5914
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
di: bringup for tm2 [1/1]

PD#SWPL-6575

Problem:
chip bring up

Solution:
1.add tm2 chip id for tm2
2.add h scaling down function for tm2

Verify:
tm2

Change-Id: I364d7c07be331d81ef546357445225c6071f8e3c
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
deinterlace: fix tl1 in 1080i has small sawtooth [1/1]

PD#SWPL-4072

Problem:
tl1 1080i in some dark scenes and roller coasters
have small sawtooth

Solution:
adjust a set of registers with special motion

Verify:
tl1

Change-Id: Idbe62e823f1c6c683b67d000978de1862c8e3162
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
di: small window bottom of the screen is blank [1/1]

PD#TV-4708

Problem:
small window, bottom of the screen is covered by
blank on the online video

Solution:
vline is odd, mif out is not right

Verify:
verify on TL1

Change-Id: I39eb0cdfd2f4b200a09a9c8b779f509caf6dea37
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
di: small window bottom of the screen no video [1/1]

PD#TV-4708

Problem:
small window,v scaling mode, bottom of the screen is no video.

Solution:
vline is odd, mif out is not more enouth

Verify:
verify on TL1

Change-Id: I2ac35af3632e8b14df5c773b322d4b2d64b050ba
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agotvin: vdin: tl1 improve vdin afbce function [1/1]
Xuhua Zhang [Fri, 16 Nov 2018 06:23:10 +0000 (14:23 +0800)]
tvin: vdin: tl1 improve vdin afbce function [1/1]

PD#172587

Problem:
vdin afbce can not work well

Solution:
change afbce work mode

Verify:
verify on tl1

Change-Id: I3e980c7488bd8a0eb6f043fd1fb2d2b2bc75140f
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
8adc242 tvafe: add control for tvconfig snow config [1/1]
190d82f cvbs: cvbsoutput support for tl1 [1/1]
3e859c8 vdin: add dolby mem release protection [1/1]
ba57ce5 vdin: G12A color space error when  capture screen by post blend
[1/1]
768c100 vdin: add new interface for passing dma-buf to vdin [1/1]
f24b329 vdin: QD980 HDMI 4k 30Hz,change bit depth has green screen [1/1]
a8c6962 vdin: add afbce reg access protection [1/1]
874fe722 vdin: support afbc/non-afbc switch dynamically [1/1]
321d0bc vdin: revert ignore v4l2start/stop ioctl when vdin1 used for
preview [1/1]
05df311 vdin: disable afbce under 4k resolution [1/1]
3038cb8 vdin: recycle garbage frame for afbc mode [1/1]
fbb84a75 vdin: support dynamic dest_cfmt changing [1/1]
81c1e14 vdin: ignore v4l2start/stop ioctl when vdin1 used for preview [1/1]
bab3adb tvafe: add av/atv/cvbs support for tm2 [1/1]
2c05842 vdin: add vdin support for tm2 [1/1]
5a825f1 vdin: config vdin mif/afbc path directly [1/1]
3cb9517 vdin: sync vdin0 & vdin1 buffer for afbc mode to avoid garbage
screen [1/1]
d1f8149 vdin: fixed the issue of mem mapping from vmap. [1/1]
0b049e1 vdin: add sm1 support [1/1]
bfc5e18 vdin: fix vdin1 dest_cfmt for tl1 afbc preview support [1/1]
ded6424 tvin: vdin: add vdin1 scaler preview for vdin0 preview [1/1]
b23ca7b vdin: optimize game mode for tl1 phase lock [1/1]
2a95ff7 vlock: add phase lock function [1/1]
51822f9 vlock: screen flash after PAL NTSC swich [1/1]
315f6d3 vlock: vlock for tl1 [1/1]
7f3b8d9 vdin: fix snowflake bottom screen [1/1]
c2a4eaf tvafe: optimize stable time on manual setting [1/1]
c05cefd tvin: vdin: add interface to get signalinfo [1/1]
5c5d26c tvin: vdin: fix vdin histgram error on tl1 [1/1]
7c0701b tvin: vdin: fix dolby vision memory free print error [1/1]
a510d76 tvin: vdin: fix system crash when dolby vision enable [1/1]
2f1ba00 vdin: add vdin1 histgram [1/1]
f5abdd8 tvin: vdin: fix TXLX ATv channel switching crash [1/1]
8d1a496 vdin: tl1: add viu loop back vpp path [1/1]
63f1b85 tvin: vdin: add vdin afbce memory power ctrl [1/1]
211b677 hdmirx: add allm mode. [1/2]
2afb3d7 tvafe: fix black border for atv [1/1]
ced9632 tvin: vdin: fix afbce 576p color anomaly [1/1]
f00295ae tvin: vdin: fix afbce 4k yuv444 display error [1/1]
1fef799 tvin: vdin: vdin add afbce write back to memory interface [1/1]
482e11b tvin: vdin: fix vdin CMA layout adaptation [1/1]
87d67d8 tvin: vdin: vdin afbce fix header size bug [1/1]
f938eed vdin: optimize game mode process [1/1]
6e847e0 tvin: vdin: hdmirx format change, display exception [1/1]
4c7bb63 tvin: vdin: tl1 improve vdin function [1/1]
8850ab8 tvin: vdin: tl1 improve vdin afbce function  [1/1]

tvin: vdin: tl1 improve vdin function [1/1]

PD#172587

Problem:
1.in the afbce mode,
  screen flicker when serial port print too many debugging information
2.vdin afbce 4K crash
3.viu loop back error
4.need afbce lossy mode

Solution:
1.vdin use rdma mode
2.change vdin afbce buff size
3.change VDIN_ASFIFO_CTRL3 register
4.add lossy mode

Verify:
x301

Change-Id: Id66c0d7df22a9aeaca15d645f9a2ce0ecf47be3f
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
tvin: vdin: hdmirx format change, display exception [1/1]

PD#SWPL-2411

Problem:
hdmirx input 4096X2160 yuv422 in a short period of time,
formate change form yuv422 to yuv444, screen display is exception.

Solution:
force malloc yuv444 size

Verify:
Verify on txlx r311

Change-Id: Ie670b9a2b0c1eceffe423a1cf8606e78b6b347cd
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
vdin: optimize game mode process [1/1]

PD#SWPL-2145

Problem:
HDMI Rx Video path display latency of Game mode and Normal mode

Solution:
optimize game mode

Verify:
T962X-R311

Change-Id: Ib0a41915dfb088495c976d56ab812f90e31602f4
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
tvin: vdin: vdin afbce fix header size bug [1/1]

PD#SWPL-3208

Problem:
vdin afbce scaler, display abnormal.

Solution:
fix afbce header size problem.

Verify:
TL1 X301

Change-Id: I461b4aa809ceddbe18cf7f6f49e8152b43b86076
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvin: vdin: fix vdin CMA layout adaptation [1/1]

PD#SWPL-2526

Problem:
1.CMA layout adaptation cause crash
2.vdin buff dump error
3.read_pic error

Solution:
1.codec mm has be moved to high memory area,
we should map memory use vmap.
2.make vdin high mem and low mem to be compatible
when we dump vdin buff.
3.fix read_pic bug.

Verify:
TXLX R311

Change-Id: I90e4f46ba91d38c6ce0f8bfd65b5c22e6be3b83f
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvin: vdin: vdin add afbce write back to memory interface [1/1]

PD#SWPL-3200

Problem:
vdin add afbce need more debug method.

Solution:
vdin add read_pic_afbce debug interface

Verify:
TL1 X301

Change-Id: I45a741ba20409dc25b41ce316b0df0dce9d2dc28
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvin: vdin: fix afbce 4k yuv444 display error [1/1]

PD#SWPL-3429

Problem:
vdin output format is afbce 4k yuv444,it display ghost shadow of image

Solution:
add afbce comb control

Verify:
x301

Change-Id: I168f13994a4929bd227ba70b006f259ac0726238
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvin: vdin: fix afbce 576p color anomaly [1/1]

PD#SWPL-3424

Problem:
dvd play 576p media, tl1 display color anomaly

Solution:
encoder use same default color setting with decoder

Verify:
x301

Change-Id: I8954874ea048b2d9e9b7aa58c883da1f306c4459
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvafe: fix black border for atv [1/1]

PD#SWPL-3573

Problem:
appear black border after unplug/plug signal

Solution:
reset de when nosignal
restore acd hsync when signal unstable

Verify:
verified by x301

Change-Id: Ia9e2e9dfb326061bd3b9b6f9a02be0d935cdf06f
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
hdmirx: add allm mode. [1/2]

PD#SWPL-1619

Problem:
need support allm mode

Solution:
add allm mode

Verify:
None

Change-Id: I34d05cfbef4b3fccbbb7c6b35fa613cda9b9cf36
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
tvin: vdin: add vdin afbce memory power ctrl [1/1]

PD#SWPL-3635

Problem:
Miss vdin afbce memory power ctrl.

Solution:
Add vdin afbce memory power ctrl.

Verify:
x301_tl1

Change-Id: I94946e3d16027083688735d68b9d023b6bc5c8bf
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
vdin: tl1: add viu loop back vpp path [1/1]

PD#SWPL-2676

Problem:
tl1 viu loop back error

Solution:
add viu loop back vpp path

Verify:
TL1 X301

Change-Id: I4069f6bbd6672d89bd93a0c8b275cfffc273c427
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvin: vdin: fix TXLX ATv channel switching crash [1/1]

PD#SWPL-3964

Problem:
ATv channel switching crash

Solution:
stop vdin, close afbc
need judge platform, there is not afbce on txlx

Verify:
verify by einstein

Change-Id: Ibcff1da47b9fdca7e1758b0d45e7d6800bfc8080
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
vdin: add vdin1 histgram [1/1]

PD#SWPL-3059

Problem:
vdin1 hisgram and screencap cannot be used simultaneously

Solution:
add vdin1 histgram,and make hist and screencap function to be compatible

Verify:
txlx r311

Change-Id: I759d1cdc69d59015ce845898990088eb6943cc41
Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com>
tvin: vdin: fix system crash when dolby vision enable [1/1]

PD#SWPL-3353

Problem:
system crash when dolby vision enable

Solution:
32bit kernel,phy addr to virt interface is changed

Verify:
Verified on txlx R311

Change-Id: Ie012bdaf7f9dc24acf7a7e03f0db056ff31e578c
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvin: vdin: fix dolby vision memory free print error [1/1]

PD#SWPL-3353

Problem:
dolby vision memory free print error

Solution:
dolby vision memory has been free by vdin_cma_release,
don't free again.

Verify:
test pass on R311

Change-Id: Id7108cf17260430c53dff707e843ed7833c8ee7c
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvin: vdin: fix vdin histgram error on tl1 [1/1]

PD#TV-2263

Problem:
vdin histgram error on tl1

Solution:
tl1 use TVIN_PORT_VIU1_WB0_VPP

Verify:
verify on tl1

Change-Id: I225a85a1debee0e8c42f60751524661fc5c986bd
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvin: vdin: add interface to get signalinfo [1/1]

PD#TV-2083

Problem:
TVIN_IOC_G_SIG_INFO not complete enough

Solution:
add interface to get signalinfo

Verify:
Verify on TL1

Change-Id: I32f198f14dfcc1f8a8ee1f19c4065bd7d4d5dccc
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
tvafe: optimize stable time on manual setting [1/1]

PD#SWPL-5052

Problem:
optimize swith channel time

Solution:
lower wait time on manual colorfmt setting
stable time optimized from 500ms -> 300ms

Verify:
x301

Change-Id: I7e7d711d1c3ab0630d41e933c53ce34d0025e860
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
vdin: fix snowflake bottom screen [1/1]

PD#SWPL-5129

Problem:
cut window need restore when nosignal

Solution:
restore cutwin when nosignal

Verify:
verified by r341

Change-Id: If18dbd18df11cce5d1ddb99ee266901b75b065b3
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
vlock: vlock for tl1 [1/1]

PD#SWPL-3129

Problem:
1.verify manual pll mode
2.modify vlock hiu register access api
3.add a new fsm for tl1 test
4.add chip match data

Solution:
add function for tl1

Verify:
verified on tl1

Change-Id: I75f8d2a40437056135f8dd0fb241016a9ea680df
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
vlock: screen flash after PAL NTSC swich [1/1]

PD#SWPL-4246

Problem:
the screen always flash after switch PAL to NTSC in AVin

Solution:
do not change pll M value, M value will case v by one fail

Verify:
verified on tl1 android p

Change-Id: Ib5ea8dfef1c40af5535e69fdc9241a7f77b4a7dd
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
vlock: add phase lock function [1/1]

PD#SWPL-3644

Problem:
new feature on tl1

Solution:
add function

Verify:
verified on tl1 android p

Change-Id: I964054512f59a98f03d20df11b8c63d6802744d5
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
vdin: optimize game mode for tl1 phase lock [1/1]

PD#SWPL-4788

Problem:
sometimes hdmi source display broken in game mode

Solution:
use phase lock for tl1 game mode ahead 2 frames,
and ahead 1 frame for previous chips.

Verify:
x301

Change-Id: I00df9125c9ea7869ed6e111ba99a8b755c914129
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
tvin: vdin: add vdin1 scaler preview for vdin0 preview [1/1]

PD#SWPL-4115

Problem:
vdin preview error when input 4K

Solution:
use vdin1 as double write function

Verify:
x301

Change-Id: I4ed15dd5c445ed3c38b4a2535be075210dcbdac7
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
vdin: fix vdin1 dest_cfmt for tl1 afbc preview support [1/1]

PD#SWPL-5971

Problem:
preview window color is green with 1080p & 4k hdmirx

Solution:
vdin1 dest_cfmt follow vdin0 for the software double write for preview

Verify:
x301

Change-Id: I2e45b5f838cddcac1ca1c4e6710a7cc1f45ae9b5
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: add sm1 support [1/1]

PD#SWPL-6065

Problem:
need add vdin support for sm1

Solution:
add vdin support for sm1

Verify:
pxp

Change-Id: I55af5273607a88f4e5a2394de0acbb44811da8f9
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: fixed the issue of mem mapping from vmap. [1/1]

PD#SWPL-6196

Problem:
the memory issue cause to kernel crash.

Solution:
1. add flush cache when the mem oper end.
2. unmap addr which from vmap in vdin driver.

Verify:
X301

Change-Id: Id6efe2b009fe64ad753d51eb06784bd4e66f5e87
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
vdin: sync vdin0 & vdin1 buffer for afbc mode to avoid garbage screen [1/1]

PD#SWPL-3431

Problem:
enter hdmi 4k port will flash garbage screen with afbc mode

Solution:
sync vdin0 & vdin1 buffer for afbc mode

Verify:
x301

Change-Id: I443a9be2ed619a5cd2b6229f15814d8b856c5535
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: config vdin mif/afbc path directly [1/1]

PD#SWPL-6277

Problem:
switch hdmi port maybe display green screen

Solution:
1.optimize vdin stop sequence, reduce afbc state polling interval,
  and rest afbc to get a clean state
2.change vdin mif/afbc patch directly, not rdma method,
  for vdin0/1 rdma are independent

Verify:
x301

Change-Id: I0ddf5d27dcfc0fd930eeb681f876c4c5e92e8d70
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: add vdin support for tm2 [1/1]

PD#SWPL-6701

Problem:
Need vdin supprt for sm2

Solution:
add vdin support for tm2

Verify:
test pass on tm2 ab311

Change-Id: I57d7b3014938011d18c5e168f18c78e4fa542fc7
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
tvafe: add av/atv/cvbs support for tm2 [1/1]

PD#:SWPL-6702

Problem:
tm2 bringup

Solution:
add av/atv/cvbs support for tm2

Verify:
tm2 T962E2

Change-Id: I1c7358cd17463843fbdd7a93c7416a22aaa2387c
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
vdin: ignore v4l2start/stop ioctl when vdin1 used for preview [1/1]

PD#SWPL-6840

Problem:
hdmi port can't screencap

Solution:
ignore v4l2start/stop ioctl when vdin1 used for preview

Verify:
x301

Change-Id: I26e7b057177a0b7ed203c04bd3008c2a34793b4a
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: support dynamic dest_cfmt changing [1/1]

PD#TV-4306

Problem:
vdin afbc will show green screen when hdmirx change dest_cfmt after stable

Solution:
dynamic config vdin afbc with cfmt

Verify:
x301

Change-Id: I404c47934f090222a2cdd7cf98b619826cd92cc7
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: recycle garbage frame for afbc mode [1/1]

PD#TV-4335

Problem:
switch tvin signals will flash garbage screen

Solution:
recycle barbage frame for afbc mode

Verify:
x301

Change-Id: I17c13b5db7a506403aa5ac74568b7a9e16c075c0
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: disable afbce under 4k resolution [1/1]

PD#SWPL-7511

Problem:
no need enable vdin afbce under 4k,
it is no help for bandwidth with these resolution

Solution:
only enable vdin afbce for 4k resolution

Verify:
x301

Change-Id: I283efd872004846d158ef6c9addbd1e666d2f61a
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: revert ignore v4l2start/stop ioctl when vdin1 used for preview [1/1]

PD#SWPL-7324

Problem:
tvafe work abnormal when use vdin1 preview

Solution:
revert the previous commit for v4l2start/stop

Verify:
x301

This reverts commit 81c1e1449c5e7362dc263bea76e134ba8fd25265.

Change-Id: I8cdefececb8b01cb86426684a6c700bc9bf8b615
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: support afbc/non-afbc switch dynamically [1/1]

PD#SWPL-7512

Problem:
need switch vdin afbc/non-afbc mode sometime

Solution:
support afbc/non-afbc switch dynamically

Verify:
x301

Change-Id: I08433938f169a51ed1ed7a23fd99f3ba42e076fe
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
vdin: add afbce reg access protection [1/1]

PD#SWPL-7983

Problem:
txlx will crash when access afbce reg without afbce hw

Solution:
add afbce reg access protection

Verify:
r311

Change-Id: Iaabf8da9cb2a58e9c26626b9ac718bdf9c6a2ac3
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
vdin: QD980 HDMI 4k 30Hz,change bit depth has green screen [1/1]

PD#SWPL-8184

Problem:
don't updated afbce output color format

Solution:
update afbce config according afbce support or not,
instead of afbce need or not.

Verify:
verified by t962x2_x301

Change-Id: I7885357c1e5b04b58b059401a5f66d2ee83c76ef
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
vdin: add new interface for passing dma-buf to vdin [1/1]

PD#TV-3863

Problem:
gpu cann't get vdin buf directly

Solution:
vdin write data to the addr passed by upper layer

Verify:
verified by t962x2_x301

Change-Id: I495b78c419e10a6dacb9b9f29c0f8e87339ac195
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
vdin: G12A color space error when  capture screen by post blend [1/1]

PD#SWPL-8335

Problem:
color space setting error

Solution:
set yuv444 when use viu1 post blend port

Verify:
verified by t962x2_x301

Change-Id: Ic92a6db92f6cec64084d140c5f505489579b294f
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
vdin: add dolby mem release protection [1/1]

PD#SWPL-8797

Problem:
sometime oops occurred for vdin_dolby mem release

Solution:
add vdin dolby mem alloc flag & release protection

Verify:
x301

Change-Id: Iee90b58a0624c32032e204adcd043c8e94d03f1f
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
cvbs: cvbsoutput support for tl1 [1/1]

PD#172587

Problem:
no cvbsoutput

Solution:
add cvbsoutput

Verify:
test pass on x301

Change-Id: I92f70d26e32f95de7c63ddbac9fe6664063c1902
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
tvafe: add control for tvconfig snow config [1/1]

PD#SWPL-5985

Problem:
display snow when snow config disabled

Solution:
add control for tvconfig snow config

Verify:
verify it on x301

Change-Id: I3466efc98577f2403f3a6cd638ad7dbf70ce34dc
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodi: TL1 enable lmv_lock_win_en cause crash [1/1]
zhiwei.yuan [Thu, 28 Feb 2019 07:30:09 +0000 (15:30 +0800)]
di: TL1 enable lmv_lock_win_en cause crash [1/1]

PD#SWPL-4999

Problem:
use vmalloc in interrupt context

Solution:
move di_map to cma allocate function(kernel thread)

Verify:
verified by t962x2_x301

Change-Id: I8cf8d9caf9703ba039b32da98d2382a4c875de30
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodeinterlace: fix 480i error into pulldown [1/1]
Wenfeng Guo [Wed, 20 Feb 2019 08:20:10 +0000 (16:20 +0800)]
deinterlace: fix 480i error into pulldown [1/1]

PD#TV-1949

Problem:
480i error into pulldown (by yanling)

Solution:
1. add flm22_comlev3 (by yanling);

Verify:
tl1 txlx

Change-Id: Ib5c168deb1327df0e803831dcf9f13e05faaa915
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodeinterlace: pq: adjust pulldown setting for tl1 [1/1]
Jihong Sui [Tue, 18 Dec 2018 13:56:38 +0000 (21:56 +0800)]
deinterlace: pq: adjust pulldown setting for tl1 [1/1]

PD#SWPL-3182

Problem:
1.VLSI(Feijun) fine-tune pulldown setting for TL1, G12A/B;
2.fine tune combing_glbmot_radprat by VLSI(yanling.liu);

Solution:
finetune setting.

Verify:
tl1

Change-Id: Ie65cec8b216752600dfd54ee6be5302150282774
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agoTM2: add chip id and name for tm2 [1/1]
shanghai engineers [Mon, 25 Mar 2019 02:11:00 +0000 (22:11 -0400)]
TM2: add chip id and name for tm2 [1/1]

PD#SWPL-6157

Problem:
TM2 bring up need to update chip version name and id

Solution:
add the chipid and chip version name at dts and help file

Verify:
on ptm board4

Change-Id: I37e44828db1821c7fd2921c3e4271a27bd715b88
Signed-off-by: pan yang <pan.yang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agovout: add vout2 init mode support [1/1]
Evoke Zhang [Wed, 15 May 2019 02:10:45 +0000 (10:10 +0800)]
vout: add vout2 init mode support [1/1]

PD#TV-5428

Problem:
need viu2 display support

Solution:
add vout2 init mode support

Verify:
u200

Change-Id: Ibd9d2a07645645d739d7421ceafd386caf3066d7
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agohdmi: support 1440x2560p60hz modes [1/1]
Kaifu Hu [Thu, 10 Jan 2019 07:14:49 +0000 (15:14 +0800)]
hdmi: support 1440x2560p60hz modes [1/1]

PD#IPTV-1032

Problem:
Need support 1440x2560p60hz

Solution:
Porting VESA code and 1440x2560p60hz

Verify:
g12b/w400

Change-Id: I3cf38bebc29b76aed50fe2ced7b47e27f2d1af06
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
5 years agodts: change codec mm size to 192M. [1/1]
Luan Yuan [Thu, 30 May 2019 06:22:18 +0000 (14:22 +0800)]
dts: change codec mm size to 192M. [1/1]

PD#SWPL-9156

Problem:
memory overread error

Solution:
fixed play movie error

Verify:
verify by ac202/u202

Change-Id: I15e459a4fe044b02a5e958293c1516f8b7795096
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agostaging: android: ion: Call dma_map_sg for syncing and mapping [2/2]
Laura Abbott [Mon, 3 Apr 2017 18:57:48 +0000 (11:57 -0700)]
staging: android: ion: Call dma_map_sg for syncing and mapping [2/2]

PD#SWPL-9254

Problem:
uncached display unexpectly.

Solution:
Technically, calling dma_buf_map_attachment should return a buffer
properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to
ensure this happens. As a side effect, this lets Ion buffers take
advantage of the dma_buf sync ioctls.

Verify:
galilei, franklin

Change-Id: Ib6ca06e59e81031d3c65c2df8824b46baaba6c9f
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
5 years agostaging: android: ion: Duplicate sg_table [1/2]
Laura Abbott [Mon, 3 Apr 2017 18:57:47 +0000 (11:57 -0700)]
staging: android: ion: Duplicate sg_table [1/2]

PD#SWPL-9254

Problem:
Ion currently returns a single sg_table on each dma_map call. This is
incorrect for later usage.

Solution:
dup sg table on each dma_map call

Verify:
galilei, franklin

Change-Id: I6df2baa33bba9303b2ac25210ebaf56a337d56a2
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
5 years agopipvideo: fix cur_pipbuf not set to NULL when disable video before unreg [1/1]
jintao xu [Fri, 31 May 2019 06:33:13 +0000 (14:33 +0800)]
pipvideo: fix cur_pipbuf not set to NULL when disable video before unreg [1/1]

PD#OTT-4262

Problem:
When disable video before unreg, cur_pipbuf will not set to NULL.
Next time playback will tog this buffer.

Solution:
Free cur_pipbuf when vd2 is closed in unreg.

Verify:
U212

Change-Id: Ie381ae9feda8a5d23a93b3a5974d9c0af87e6d6e
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
5 years agoclk: sm1: add sm1 dsu clk notify for change dsu freq [1/1]
Shunzhou Jiang [Tue, 14 May 2019 01:47:43 +0000 (09:47 +0800)]
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>
5 years agovideo: clear pcr in video stop [1/1]
shuanglong.wang [Mon, 3 Jun 2019 01:56:30 +0000 (09:56 +0800)]
video: clear pcr in video stop [1/1]

PD#SWPL-6903

Problem:
pcr increase automatic after system reset

Solution:
in non-tunnel mode, only after video stop post will adjust pcr
in omx_secret_mode. Also clear pcr in video stop

Verify:
verify by nts

Change-Id: I528229e8121a99e50c7b8313bd8dc867e3710ad8
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
5 years agodts: add dts config for P281. [3/3]
Luan Yuan [Mon, 3 Jun 2019 02:51:56 +0000 (10:51 +0800)]
dts: add dts config for P281. [3/3]

PD#SWPL-9298

Problem:
add dts config for P281

Solution:
add dts config for P281(from P212)
the difference as follows:
framebuffer from 1080p to 720p
gpu max freq from 750 to 666

Verify:
verify by p281

Change-Id: Ice6bcbd11fd831daeb6620d1780628494c8a10fa
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agoarm64: dts: VIM3: emmc: change emmc busmode from hs400 to hs200
Nick Xie [Mon, 5 Aug 2019 06:41:54 +0000 (14:41 +0800)]
arm64: dts: VIM3: emmc: change emmc busmode from hs400 to hs200

Signed-off-by: Nick Xie <nick@khadas.com>
5 years agoemmc: change emmc busmode from hs400 to hs200 [1/1]
Ruixuan Li [Mon, 3 Jun 2019 11:19:03 +0000 (19:19 +0800)]
emmc: change emmc busmode from hs400 to hs200 [1/1]

PD#SWPL-9326

Problem:
hs400 200M not stable on some platform

Solution:
modify dts to hs200 mode

Verify:
passed on g12b_revb tl1 sm1 tm2

Change-Id: I45670c979b62a2caeed1e7ebc35b035bbbf8968c
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agotm2: emmc run hs200 busmode [1/1]
ruixuan.li [Tue, 2 Apr 2019 03:11:56 +0000 (11:11 +0800)]
tm2: emmc run hs200 busmode [1/1]

PD#SWPL-5658

Problem:
emmc run high speed now

Solution:
modify dts

Verify:
passed on t962e2_ab319

Change-Id: Iedef30bed9547e7f57c883077462f1762c55fda3
Signed-off-by: ruixuan.li <ruixuan.li@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agoemmc: backward compatible with all HS400 clock sources [1/1]
long yu [Mon, 25 Mar 2019 09:46:07 +0000 (17:46 +0800)]
emmc: backward compatible with all HS400 clock sources [1/1]

PD#SWPL-6294

Problem:
TL1 and G12B uses clkin3,TXLX uses clkin2

Solution:
unifying the HS400 source clock name in DTS

Verify:
TL1-T962X2_X301 G12B-Reva G12B-Revb

Change-Id: I7acaf7b4392d757955f43a0b17ac1fad84f53d26
Signed-off-by: Long Yu <long.yu@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agoemmc: modify the emmc device driver strength to type 0 [1/1]
Ruixuan Li [Tue, 21 May 2019 11:32:48 +0000 (19:32 +0800)]
emmc: modify the emmc device driver strength to type 0 [1/1]

PD#SWPL-8806

Problem:
the driver strength is type 1 on sm1

Solution:
modify sm1 dts

Verify:
passed on sm1_ac213

Change-Id: Iea5093541dc0bbd08954e78827309a45a84efc60
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agotm2: emmc run hs400 200M [1/1]
ruixuan.li [Tue, 2 Apr 2019 12:37:38 +0000 (20:37 +0800)]
tm2: emmc run hs400 200M [1/1]

PD#SWPL-5658

Problem:
emmc run hs200 200M now

Solution:
set emmc busmode to hs400 200M

Verify:
passed on t962e2 ab311

Change-Id: If5fef5c3b55cc95152b0d5d19bb5a56b293aafcf
Signed-off-by: ruixuan.li <ruixuan.li@amlogic.com>
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agovideosync: support omx_version 3 [2/2]
jintao xu [Fri, 24 May 2019 09:38:42 +0000 (17:38 +0800)]
videosync: support omx_version 3 [2/2]

PD#OTT-4036

Problem:
1.Pip path seek block.
1.playback blaock

Solution:
1.videosync support omx_version 3.
2.add pts discontinue set

Verify:
Verify on franklin.

Change-Id: I67d23a8878b1493fceb8e4f0b27598413af96e1f
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
5 years agoamvecm: HDR10+ vsif informaton confirmation [1/1]
chengwang [Mon, 27 May 2019 11:46:15 +0000 (19:46 +0800)]
amvecm: HDR10+ vsif informaton confirmation [1/1]

PD#SWPL-8250

Problem:
1 check my patch to Mingliang on trunk
2 980 check vsif and frame timing confirm if vsif is one frame ahead
or not

Solution:
The data is the same as the standard of SPEC.

Verify:
on x301

Change-Id: I39ea8cb5d84c8b5b15109ed65f2428a4ec2c6c68
Signed-off-by: chengwang <cheng.wang@amlogic.com>
5 years agoge2d: add option for rgb_to_yuv to 709 or 601 [1/1]
Jian Cao [Fri, 17 May 2019 14:39:59 +0000 (22:39 +0800)]
ge2d: add option for rgb_to_yuv to 709 or 601 [1/1]

PD#OTT-3711

Problem:
color parameters are wrong
while displaying images on NativeImagePlayer

Solution:
add a macro BT_STANDARD for 709 or 601

Verify:
verified on W400

Change-Id: I0703ef17748c8267b86e85a4366cac88d3e41ee1
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
5 years agohdmitx: edid: add suitable case for DolbyVision [1/1]
Zongdong Jiao [Thu, 30 May 2019 12:08:41 +0000 (20:08 +0800)]
hdmitx: edid: add suitable case for DolbyVision [1/1]

PD#SWPL-7888

Problem:
DV tests add more EDID cases
v2_yuv444_2_yuv422_0_int_3_12Byte.xml
v2_yuv444_0_yuv422_0_int_2_13Byte.xml
v2_yuv444_0_yuv422_0_int_2_16Byte.xml

Solution:
add suitable case for DolbyVision

Verify:
G12/U212

Change-Id: I323d49ad34b12b6a12ba93f0349f0398f2516bcb
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
5 years agoosd: add osd TM2 support [1/1]
Jian Cao [Sat, 30 Mar 2019 11:25:18 +0000 (19:25 +0800)]
osd: add osd TM2 support [1/1]

PD#SWPL-6558

Problem:
bring up osd for TM2

Solution:
osd: add osd TM2 support

Verify:
Verfied on TM2 skt board

Change-Id: I2183bd1f60793baf947c303b6d456e8c69d104ac
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agocvbsout: add NTSC_M mode support [1/1]
Evoke Zhang [Wed, 22 May 2019 05:50:13 +0000 (13:50 +0800)]
cvbsout: add NTSC_M mode support [1/1]

PD#OTT-3953

Problem:
need ntsc_m mode support

Solution:
add NTSC_M mode support

Verify:
u200

Change-Id: I446862a1b9405c7acc4845d1d9116492c3e0ecca
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agodolby: set gmax for LL mode [1/1]
yao liu [Wed, 22 May 2019 09:38:13 +0000 (17:38 +0800)]
dolby: set gmax for LL mode [1/1]

PD#SWPL-8799

Problem:
HDR-001-TC3 GXF is brighter than VID in LL mode

Solution:
dolby_vision_target_graphics_L for LL mode

Verify:
verified on u212

Change-Id: I3b39ec048bfff3d8ae797702c1c783356d59e604
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agodolby: set dovi gmax/pmax [1/1]
yao liu [Wed, 8 May 2019 13:55:45 +0000 (21:55 +0800)]
dolby: set dovi gmax/pmax [1/1]

PD#SWPL-8159

Problem:
Default graphics is always 100nit,
need to set different nits for SDR/HDR/DV TV

Solution:
dolby_vision_target_graphics_max[] for DV/HDR/SDR;
dolby_vision_target_max[][] for video_max;
module param dolby_vision_target_max for force graphics max
when set it to non-zero;

Verify:
verified on sm1

Change-Id: If6f5ae4ffb37629b51d21764302689da776e9f7f
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agodv: fix black screen when connecting dv TV [1/1]
Yi Zhou [Wed, 17 Apr 2019 02:48:00 +0000 (10:48 +0800)]
dv: fix black screen when connecting dv TV [1/1]

PD#SWPL-7778

Problem:
black sreen when connecting dv TV

Solution:
close post matrix
open tm2 dv flag

Verify:
T962E2

Change-Id: I828b32d7bf2ef35c3f236ad9bf15964272d06dd2
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodv: add polling interface for systemcontrol [1/1]
Yi Zhou [Fri, 12 Apr 2019 13:04:03 +0000 (21:04 +0800)]
dv: add polling interface for systemcontrol [1/1]

PD#SWPL-6338

Problem:
add polling interface for systemcontrol

Solution:
add polling interface for systemcontrol

Verify:
tm2

Change-Id: I1a0a9a3028592ee0df77b33c9c617cbdd9b07d70
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
5 years agodv: fix error color when playing dv films with EL under tm2 platform [1/1]
Yi Zhou [Thu, 11 Apr 2019 07:03:06 +0000 (15:03 +0800)]
dv: fix error color when playing dv films with EL under tm2 platform [1/1]

PD#SWPL-6338

Problem:
error color when playing dv films with EL under tm2 platform

Solution:
bypass dv core

Verify:
tm2

Change-Id: I477ea5dbdcf2a0af3783aa62200809f2ed89be5e
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
5 years agodv: add tm2 interface [1/1]
Yi Zhou [Thu, 14 Mar 2019 08:05:59 +0000 (16:05 +0800)]
dv: add tm2 interface [1/1]

PD#SWPL-6338

Problem:
need to add dv interface in tm2

Solution:
choose dv in UI and play films, observe the video and
graphic

Verify:
ab301 verify ok

Change-Id: I5d85b195254a16bcc9046d258728bd41d8a809d5
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodolby: fix Display looks abnormal problem [1/1]
yao liu [Fri, 26 Apr 2019 12:35:34 +0000 (08:35 -0400)]
dolby: fix Display looks abnormal problem [1/1]

PD#OTT-3006

Problem:
The width and height of DOLBY_CORE2A reg are reversed

Solution:
Setting right width and height for DOLBY_CORE2A

Verify:
raven

Change-Id: I89d1a99d00122179bb35b5853a869819e5d62ac9
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agovideo: for beginning playback use small omx_pts_interval_upper [1/1]
shuanglong.wang [Wed, 8 May 2019 02:32:19 +0000 (10:32 +0800)]
video: for beginning playback use small omx_pts_interval_upper [1/1]

PD#SWPL-8545

Problem:
AL1 slope problem

Solution:
for beginning playback, use small omx_pts_interval_upper and
omx_pts_dv_lower to let pcr adjust according to omxpts quickly. Also
omxpts compenstion use sched_clock instead of getimeofday.

Verify:
verify by nts

Change-Id: If9476a9793e3e5da691ea720de78f1c20f01a1e5
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
5 years agoaudio: Speaker has no sound [1/1]
Gongwei Chen [Fri, 31 May 2019 06:59:10 +0000 (14:59 +0800)]
audio: Speaker has no sound [1/1]

PD#IPTV-3107

Problem:
Speaker has no sound

Solution:
modify dts and ad82584f

Verify:
Verify by Android P S905D3 AC202

Change-Id: I92ddb6a86b31dcd2c37311a0fc9b1a2cefc29d4e
Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
5 years agocommon: loudspeaker: adjust for yeke [1/1]
Gongwei Chen [Tue, 7 May 2019 12:57:20 +0000 (20:57 +0800)]
common: loudspeaker: adjust for yeke [1/1]

PD#SWPL-8201

Problem:
loudspeaker ad82584f for yeke.

Solution:
loudspeaker ad82584f for yeke.

Verify:
S905D2 u202.

Change-Id: I01fe62d207c47283e714937282a0ba24aef1d467
Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
5 years agoarm: makefile: change text_offset to 0x108000 [1/1]
Hanjie Lin [Thu, 13 Dec 2018 07:28:45 +0000 (15:28 +0800)]
arm: makefile: change text_offset to 0x108000 [1/1]

PD#SWPL-1505
PD#SWPL-8867

Problem:
Amlogic arm kernel text_offset is 0x208000,
ko start address to kernel text end address arrange is too big(>32M)
it can cause insmod ko failed.

Solution:
modify text_offset to 0x108000
first 0x100000 is invisibe to kernel.

Verify:
u200

Change-Id: I9684b108b57a15b03e4279146c1dc57667aa5d12
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agothermal: check array index when set cur_state [1/1]
Wencai You [Thu, 23 May 2019 12:42:51 +0000 (20:42 +0800)]
thermal: check array index when set cur_state [1/1]

PD#SWPL-8747

Problem:
android.security.sts.Poc17_11#testPocCVE_2017_6264
test echo /sys/devices/virtual/thermal/cooling_device2/cur_state
crash

Solution:
check array index

Verify:
verified by u212

Change-Id: I235d62508d95fffaed7b811ba008384db7c7ec6f
Signed-off-by: Wencai You <wencai.you@amlogic.com>
5 years agomedia_module: fix hevc back mmu dmc warnning [2/2]
Hui Zhang [Thu, 16 May 2019 02:45:49 +0000 (10:45 +0800)]
media_module: fix hevc back mmu dmc warnning [2/2]

PD#TV-5832

Problem:
when mmu scatter tail is freed. sometimes sao mmu is not
stopped or in idle. there is potential memory pollution

Solution:
before free unused scatter, to check hw statu idle and
diable sao mmu to avoid hevc back overwrite system memory

Verify:
X301

Change-Id: Ib784809a0946bd0a6c479a98678cb40edacc4118
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agodts: fixed s905d3 panel compile error. [1/1]
Luan Yuan [Tue, 4 Jun 2019 06:45:11 +0000 (14:45 +0800)]
dts: fixed s905d3 panel compile error. [1/1]

PD#NONE

Problem:
s905d3 panel compile error.

Solution:
remove duplicated prop

Verify:
verify by ac202

Change-Id: Id3f845ffe540392d4f09ef1ed682d3cfb5a54448
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodi: fix image jitter when play DTV 3 channels [1/1]
Wenfeng Guo [Wed, 22 May 2019 09:10:18 +0000 (17:10 +0800)]
di: fix image jitter when play DTV 3 channels [1/1]

PD#SWPL-4508

Problem:
image jitter when play DTV 3 channels

Solution:
1.force entry pulldown22

Verify:
tl1

Change-Id: I3d15ec21458fb3a6e3ae0b59910a8f350a3b1d72
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
5 years agovdin: fix input secam signal colorbar scale line jitter [2/2]
Wenfeng Guo [Fri, 24 May 2019 07:41:26 +0000 (15:41 +0800)]
vdin: fix input secam signal colorbar scale line jitter [2/2]

PD#SWPL-8878

Problem:
input secam signal colorbar scale line jitter

Solution:
setting some register for secam signal

Verify:
tl1

Change-Id: I59c370c2ab3f92c904b506d26022b165d521776c
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
5 years agodeinterlace: fix input secam signal colorbar scale line jitter [1/2]
Wenfeng Guo [Fri, 24 May 2019 06:15:22 +0000 (14:15 +0800)]
deinterlace: fix input secam signal colorbar scale line jitter [1/2]

PD#SWPL-8878

Problem:
input secam signal colorbar scale line jitter

Solution:
setting some register for secam signal

Verify:
tl1

Change-Id: I0b5e1ea03581893a2b460afadcf682f3ce74b450
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
5 years agoaudio: auge: fix the samesource spdif clock recovery issue [1/1]
Jian Xu [Wed, 29 May 2019 12:06:35 +0000 (20:06 +0800)]
audio: auge:  fix the samesource spdif clock recovery issue [1/1]

PD#SWPL-3667

Problem:
after playback none-48K raw audio, the spdif clock
is not recoved to 48K when tdm/spdif same source

Solution:
use the same clock source as tdm if samesource and
config that when tdm hardware prepare.

Verify:
AC213

Change-Id: I0d5dc5f51b5de14d155902e0fe72c293071c93ec
Signed-off-by: Jian Xu <jian.xu@amlogic.com>
5 years agoaudio: Speaker has no sound [1/1]
Gongwei Chen [Wed, 29 May 2019 08:03:16 +0000 (16:03 +0800)]
audio: Speaker has no sound [1/1]

PD#IPTV-3107

Problem:
Speaker has no sound

Solution:
modify dts and ad82584f

Verify:
Verify by Android P S905D3 AC202

Change-Id: I3dc77e5f0ba6e776b5d5ac4f34de4da9a16ec84d
Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agodts: modify for S905D3 ac202 mic and loopback [1/1]
Gongwei Chen [Mon, 27 May 2019 12:04:04 +0000 (20:04 +0800)]
dts: modify for S905D3 ac202 mic and loopback [1/1]

PD#SWPL-8938

Problem:
S905D3 ac202 mic and loopback

Solution:
modify gpio

Verify:
Verify by Android P ac202

Change-Id: Ibfd1711eaae0011af8f69a0fd8b35cf1a335ea8e
Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
5 years agoaudio: auge: fix the samesource spdif clock recovery issue [1/1]
Jian Xu [Sun, 26 May 2019 07:05:05 +0000 (15:05 +0800)]
audio: auge:  fix the samesource spdif clock recovery issue [1/1]

PD#SWPL-3667

Problem:
after playback none-48K raw audio, the spdif clock
is not recoved to 48K when tdm/spdif same source

Solution:
use the same clock source as tdm if samesource and
config that when tdm hardware prepare.

Verify:
u212

Change-Id: I2a847273ab0b920f6cee691ee0db006709ffde2a
Signed-off-by: Jian Xu <jian.xu@amlogic.com>
5 years agoRevert "video: set vpp super_scaler default to 0 [1/1]"
Luan Yuan [Mon, 27 May 2019 06:49:43 +0000 (14:49 +0800)]
Revert "video: set vpp super_scaler default to 0 [1/1]"

This reverts commit af9cad4fbe3ce52b7b6147a8c5f949cd7c532db7.

5 years agovpp: sr: enable sr core0 directly for txlx [1/1]
Brian Zhu [Fri, 26 Apr 2019 20:48:09 +0000 (04:48 +0800)]
vpp: sr: enable sr core0 directly for txlx [1/1]

PD#TV-3260

Problem:
Since the Super scaler on txlx has the latch function
and can not disable it. So need adjust the super scaler
on/off operation flow.

Solution:
write the enable bit of sr core0 directly, not rdma write.

Verify:
r311, verify pass

Change-Id: If1b27205cbb1c49dd6a3ad65a08e2ca1e3f04b62
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
5 years agovpp: use new interface to increase accuracy of ar calculation [1/2]
Brian Zhu [Thu, 11 Apr 2019 08:16:35 +0000 (16:16 +0800)]
vpp: use new interface to increase accuracy of ar calculation [1/2]

PD#OTT-2068

Problem:
When playing 1280x128 video under normal screen mode, the aspect ratio from
decodec is not accurate enough by multipling 0x100. (128x256/1280=25.6).
Dropping 0.6 will cause height losing 9 lines.

Solution:
Using new interface to pass real ar width and height following steps:
1.Set old ar variable to 0x3ff as a trigger flag.
2.set the original ar value into sar_width and sar_height of vframe

Verify:
verified on franklin

Change-Id: I8a794edd968a76f198ee9cb168a7cfb858c858f8
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agoppmgr: 4k video does not do tb detection. [1/1]
renjiang.han [Mon, 20 May 2019 08:30:59 +0000 (16:30 +0800)]
ppmgr: 4k video does not do tb detection. [1/1]

PD#SWPL-8338

Problem:
video of 4k playback caton.

Solution:
4k video does not do tb detection.

Verify:
on x301

Change-Id: Idf10ca33e7ba2d26d759c6e5c21bc465cad0992e
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
5 years agosecmon: clear mmu mapping of cma before a73 run [1/1]
Tao Zeng [Tue, 14 May 2019 10:18:09 +0000 (18:18 +0800)]
secmon: clear mmu mapping of cma before a73 run [1/1]

PD#SWPL-8082

Problem:
Very low ratio(0.3%) of SError can be seen when do auto-reboot
test on g12b platfrom.

Solution:
Clear mmu mapping of secmon cma before a73 run

Verify:
w400

Change-Id: Idacfaea29dea2eff86304c7071a560c76654a5c3
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agoavsync: tsync: reply the stream without audio after loop play [1/1]
Yinming Ding [Tue, 23 Apr 2019 12:15:49 +0000 (20:15 +0800)]
avsync: tsync: reply the stream without audio after loop play [1/1]

PD#SWPL-7379

Problem:
Decoding stream with no audio pid freezes video

Solution:
Reply the stream with no audio after loop play

Verify:
Verified by R314

Change-Id: I8782271fbf40398c639346c960f0e61911ffc1ee
Signed-off-by: Yinming Ding <yinming.ding@amlogic.com>
5 years agoavsync: tsync: change the start condition [2/2]
live.li [Sun, 5 May 2019 07:41:24 +0000 (15:41 +0800)]
avsync: tsync: change the start condition [2/2]

PD#TV-5393

Problem:
 when pcr and vpts distance is far,
 use the vpts as system time for
 cache video to avoid video underrun

solution:
   use vpts as system time for some
   special ts stream

Verify:
   x301

Change-Id: I2f151c526bb0113d4f0cf8bbd1a4772312857606
Signed-off-by: live.li <live.li@amlogic.com>
5 years agomm: arm: fix unmatched pte_offset_map/pte_unmap error [1/1]
Hanjie Lin [Thu, 16 May 2019 05:38:20 +0000 (13:38 +0800)]
mm: arm: fix unmatched pte_offset_map/pte_unmap error [1/1]

PD#TV-5777

Problem:
[CVTE][T972][9.0][System]: PT190004-1300: Appear auto reboot exception
during downloading Facebook app.
get_user_pfn() may caused unmatched pte_offset_map/pte_unmap call, then
may cause bad task preempt_count and subsequently panic.

Solution:
add matched pte_offset_map/pte_unmap

Verify:
tl1

Change-Id: I98240b443b8a0fae89d0ee93701eb1bfdce51b82
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agoaudio: add i2s and spdif fine clk tuning interface [1/1]
Zhe Wang [Mon, 13 May 2019 06:56:25 +0000 (14:56 +0800)]
audio: add i2s and spdif fine clk tuning interface [1/1]

PD#SWPL-8310

Problem:
DTV, a/v is out of sync

Solution:
add i2s and spdif fine clk tuning interface

Verify:
verify on R311.

Change-Id: I8219774bd5fe334fa21227d427ce4dbb06177dc8
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
5 years agopipvideo: add frame drop mechanism [1/1]
jintao xu [Fri, 10 May 2019 11:47:36 +0000 (19:47 +0800)]
pipvideo: add frame drop mechanism [1/1]

PD#OTT-3616

Problem:
when HDMI output is 30HZ, video is 60fps, pipvideo only can display 30fps,
need drop 30fps.

Solution:
drop frames when there is no time to display

Verify:
U212

Change-Id: I3c946aa49ccc40b8e69e6e7c5031df0b5af34454
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
5 years agodi: fix wire drawing issue caused by pendulum clock stuck [1/1]
Wenfeng Guo [Thu, 9 May 2019 03:04:08 +0000 (11:04 +0800)]
di: fix wire drawing issue caused by pendulum clock stuck [1/1]

PD#SWPL-7650

Problem:
TL1 have drawing.

Solution:
fine-tuning GMV

Verify:
TL1

Change-Id: Ie50207969a2d7511882552b0adc8baef083300ff
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agoge2d: correct YUV limit/full range config when RGB->YUV [1/1]
Jian Cao [Wed, 8 May 2019 13:41:58 +0000 (21:41 +0800)]
ge2d: correct YUV limit/full range config when RGB->YUV [1/1]

PD#OTT-3500

Problem:
Grey-scale graph image on video layer performance worse.

Solution:
correct YUV limit/full range config to set ge2d,
when converting RGB to YUV.

Verify:
G12B_W400 board.

Change-Id: I304298a0a6942482196fe5d56a0f356fb30cbe61
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
5 years agodv: fix black screen when play mel video [1/1]
yao liu [Sun, 5 May 2019 13:57:37 +0000 (21:57 +0800)]
dv: fix black screen when play mel video [1/1]

PD#SWPL-8155

Problem:
support el is disabled for default on 2.4.2 ko

Solution:
For mel video, set el flag to ko, to make support el
enable

Verify:
T962E2, Ves_L2DM_23976_3840x2160_10000kbps_hevc
_dvhe_dtr___dt.mp4 display normal

Change-Id: I6e92c012fedb460c373e6e4c0312542564b6ced3
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agokasan: change address layout [3/3]
Tao Zeng [Thu, 16 May 2019 09:28:29 +0000 (17:28 +0800)]
kasan: change address layout [3/3]

PD#SWPL-8572

Problem:
In change http://scgit.amlogic.com:8080/#/c/73995/ we have changed
memory layout of vmalloc. Which caused kasan can't be used

Solution:
change kasan address layout

Verify:
x301

Change-Id: I28aee4b1d9b622dd884e6c2d6b621aa870cd8586
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agobinder: back port changes from kernel 4.19 [1/3]
Tao Zeng [Tue, 14 May 2019 08:35:57 +0000 (16:35 +0800)]
binder: back port changes from kernel 4.19 [1/3]

PD#SWPL-8572

Problems:
based on android platfrom, each process may allocate 1MB vmalloc
memory space for IPC. But most process don't use full memory
range of vmalloc space. It's a waste of memory space and may
cause driver can't work normal based on 32bit kernel

Soluton:
On kernel 4.19, google have fixed it, so we need back porting
following changes:

Squashed commit of the following:

commit b12a56e5342e15e99b0fb07c67dfce0891ba2f6b
Author: Todd Kjos <tkjos@google.com>
Date:   Tue Mar 19 09:53:01 2019 -0700

    FROMGIT: binder: fix BUG_ON found by selinux-testsuite

    The selinux-testsuite found an issue resulting in a BUG_ON()
    where a conditional relied on a size_t going negative when
    checking the validity of a buffer offset.

    (cherry picked from commit 5997da82145bb7c9a56d834894cb81f81f219344
     git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
     char-misc-linus)
    Bug: 67668716
    Change-Id: Ib3b408717141deadddcb6b95ad98c0b97d9d98ea
    Fixes: 7a67a39320df ("binder: add function to copy binder object from buffer")
Reported-by: Paul Moore <paul@paul-moore.com>
Tested-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
commit 5b28e504d93a5f1efc074dd7cdcadc07293bb783
Author: Todd Kjos <tkjos@android.com>
Date:   Thu Feb 14 15:22:57 2019 -0800

    UPSTREAM: binder: fix handling of misaligned binder object

    Fixes crash found by syzbot:
    kernel BUG at drivers/android/binder_alloc.c:LINE! (2)

    (cherry pick from commit 26528be6720bb40bc8844e97ee73a37e530e9c5e)
    Bug: 67668716
Reported-and-tested-by: syzbot+55de1eb4975dec156d8f@syzkaller.appspotmail.com
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Change-Id: Ib8597dd05a158f78503d4affe6c5f46ded16a811

commit e110c3b44e437bad09f76c2b42f23dcad898f57d
Author: Todd Kjos <tkjos@android.com>
Date:   Wed Feb 13 11:48:53 2019 -0800

    UPSTREAM: binder: fix sparse issue in binder_alloc_selftest.c

    Fixes sparse issues reported by the kbuild test robot running
    on https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
    char-misc-testing: bde4a19fc04f5 ("binder: use userspace pointer as base
    of buffer space")

    Error output (drivers/android/binder_alloc_selftest.c):
    sparse: warning: incorrect type in assignment (different address spaces)
    sparse:    expected void *page_addr
    sparse:    got void [noderef] <asn:1> *user_data
    sparse: error: subtraction of different types can't work

    Fixed by adding necessary "__user" tags.

    (cherry pick from commit 36f30937922ce75390c73f99e650e4f2eb56b0e6)
    Bug: 67668716
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Change-Id: Ia0a16d163251381d4bc04f46a44dddbc18b10a85

commit 9f6fd7733286f1af04d153c9d3a050ca2615b3cc
Author: Todd Kjos <tkjos@android.com>
Date:   Fri Feb 8 10:35:20 2019 -0800

    BACKPORT: binder: use userspace pointer as base of buffer space

    Now that alloc->buffer points to the userspace vm_area
    rename buffer->data to buffer->user_data and rename
    local pointers that hold user addresses. Also use the
    "__user" tag to annotate all user pointers so sparse
    can flag cases where user pointer vaues  are copied to
    kernel pointers. Refactor code to use offsets instead
    of user pointers.

    (cherry pick from commit bde4a19fc04f5f46298c86b1acb7a4af1d5f138d)
    Bug: 67668716
    Change-Id: I9d04b844c5994d1f6214da795799e6b373bc9816
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 194d8606b011657ce30bf0c240a5adcad0691201
Author: Todd Kjos <tkjos@android.com>
Date:   Wed Dec 5 15:19:25 2018 -0800

    UPSTREAM: binder: fix kerneldoc header for struct binder_buffer

    Fix the incomplete kerneldoc header for struct binder_buffer.

    (cherry pick from commit 7a2670a5bc917e4e7c9be5274efc004f9bd1216a)
    Bug: 67668716
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Change-Id: I6bb942e6a9466b02653349943524462f205af839

commit 55cb58623a60d48678d8eb74e1cabe7744ed62c2
Author: Todd Kjos <tkjos@android.com>
Date:   Fri Feb 8 10:35:19 2019 -0800

    BACKPORT: binder: remove user_buffer_offset

    Remove user_buffer_offset since there is no kernel
    buffer pointer anymore.

    (cherry pick from commit c41358a5f5217abd7c051e8d42397e5b80f3b3ed)
    Bug: 67668716
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Change-Id: I399219867704dc5013453a7738193c742fc970ad

commit 3301f77efa9d99e742e5642243b891e014becf17
Author: Todd Kjos <tkjos@android.com>
Date:   Fri Feb 8 10:35:18 2019 -0800

    UPSTREAM: binder: remove kernel vm_area for buffer space

    Remove the kernel's vm_area and the code that maps
    buffer pages into it.

    (cherry pick from commit 880211667b203dd32724f3be224c44c0400aa0a6)
    Bug: 67668716
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Change-Id: I2595bb8416c2bbfcf97ad3d7380ae94e29c209fb

commit 628c27a60665f15984364f6c0a1bda03473b3a78
Author: Todd Kjos <tkjos@android.com>
Date:   Fri Feb 8 10:35:17 2019 -0800

    UPSTREAM: binder: avoid kernel vm_area for buffer fixups

    Refactor the functions to validate and fixup struct
    binder_buffer pointer objects to avoid using vm_area
    pointers. Instead copy to/from kernel space using
    binder_alloc_copy_to_buffer() and
    binder_alloc_copy_from_buffer(). The following
    functions were refactored:

     refactor binder_validate_ptr()
     binder_validate_fixup()
     binder_fixup_parent()

    (cherry pick from commit db6b0b810bf945d1991917ffce0e93383101f2fa)
    Bug: 67668716
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Change-Id: Ic222af9b6c56bf48fd0b65debe981d19a7809e77

commit ed39057090cc4a95c318bafcd97f418da56e3867
Author: Todd Kjos <tkjos@android.com>
Date:   Fri Feb 8 10:35:16 2019 -0800

    BACKPORT: binder: add function to copy binder object from buffer

    When creating or tearing down a transaction, the binder driver
    examines objects in the buffer and takes appropriate action.
    To do this without needing to dereference pointers into the
    buffer, the local copies of the objects are needed. This patch
    introduces a function to validate and copy binder objects
    from the buffer to a local structure.

    (cherry pick from commit 7a67a39320dfba4b36d3be5dae4581194e650316)
    Bug: 67668716
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Change-Id: I42dfe238a2d20bdeff479068ca87a80e4577e64a

commit 01f8f48c56b53faf1c795112f451a032a0d00b75
Author: Todd Kjos <tkjos@android.com>
Date:   Fri Feb 8 10:35:15 2019 -0800

    BACKPORT: binder: add functions to copy to/from binder buffers

    Avoid vm_area when copying to or from binder buffers.
    Instead, new copy functions are added that copy from
    kernel space to binder buffer space. These use
    kmap_atomic() and kunmap_atomic() to create temporary
    mappings and then memcpy() is used to copy within
    that page.

    Also, kmap_atomic() / kunmap_atomic() use the appropriate
    cache flushing to support VIVT cache architectures.
    Allow binder to build if CPU_CACHE_VIVT is defined.

    Several uses of the new functions are added here. More
    to follow in subsequent patches.

    (cherry picked from commit 8ced0c6231ead26eca8cb416dcb7cc1c2cdd41d8)
    Bug: 67668716
    Change-Id: I6a93d2396d0a80c352a1d563fc7fb523a753e38c
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit bfc28d4c046d2a1aea5db66508e7fbb65a31a4a9
Author: Todd Kjos <tkjos@android.com>
Date:   Fri Feb 8 10:35:14 2019 -0800

    UPSTREAM: binder: create userspace-to-binder-buffer copy function

    The binder driver uses a vm_area to map the per-process
    binder buffer space. For 32-bit android devices, this is
    now taking too much vmalloc space. This patch removes
    the use of vm_area when copying the transaction data
    from the sender to the buffer space. Instead of using
    copy_from_user() for multi-page copies, it now uses
    binder_alloc_copy_user_to_buffer() which uses kmap()
    and kunmap() to map each page, and uses copy_from_user()
    for copying to that page.

    (cherry picked from 1a7c3d9bb7a926e88d5f57643e75ad1abfc55013)
    Bug: 67668716
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Change-Id: I59ff83455984fce4626476e30601ed8b99858a92

commit 89a1a65d35200d8ca94c865f061f11af41a8ced7
Author: Todd Kjos <tkjos@android.com>
Date:   Mon Jan 14 09:10:21 2019 -0800

    FROMGIT: binder: create node flag to request sender's security context

    To allow servers to verify client identity, allow a node
    flag to be set that causes the sender's security context
    to be delivered with the transaction. The BR_TRANSACTION
    command is extended in BR_TRANSACTION_SEC_CTX to
    contain a pointer to the security context string.

Signed-off-by: Todd Kjos <tkjos@google.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    (cherry picked from commit ec74136ded792deed80780a2f8baf3521eeb72f9
     https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
     master)
    Change-Id: I44496546e2d0dc0022f818a45cd52feb1c1a92cb
Signed-off-by: Todd Kjos <tkjos@google.com>
commit 4afd6d2498ecd54e4211c6e47d8956a686a52ee3
Author: Todd Kjos <tkjos@android.com>
Date:   Wed Dec 5 15:19:26 2018 -0800

    UPSTREAM: binder: filter out nodes when showing binder procs

    When dumping out binder transactions via a debug node,
    the output is too verbose if a process has many nodes.
    Change the output for transaction dumps to only display
    nodes with pending async transactions.

Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    (cherry picked from commit ecd589d8f5661dd3a9545079a29b678cd9e3ecf3)
    Bug: 112037142
    Change-Id: Iaa76ebdc844037ce1ee3bf2e590676790a959cef

commit 72e3c1d60a499bfa547d962a150082f47bfb16af
Author: Todd Kjos <tkjos@android.com>
Date:   Tue Nov 6 15:55:32 2018 -0800

    binder: fix race that allows malicious free of live buffer

    commit 7bada55ab50697861eee6bb7d60b41e68a961a9c upstream.

    Malicious code can attempt to free buffers using the BC_FREE_BUFFER
    ioctl to binder. There are protections against a user freeing a buffer
    while in use by the kernel, however there was a window where
    BC_FREE_BUFFER could be used to free a recently allocated buffer that
    was not completely initialized. This resulted in a use-after-free
    detected by KASAN with a malicious test program.

    This window is closed by setting the buffer's allow_user_free attribute
    to 0 when the buffer is allocated or when the user has previously freed
    it instead of waiting for the caller to set it. The problem was that
    when the struct buffer was recycled, allow_user_free was stale and set
    to 1 allowing a free to go through.

Signed-off-by: Todd Kjos <tkjos@google.com>
Acked-by: Arve Hjønnevåg <arve@android.com>
Cc: stable <stable@vger.kernel.org> # 4.14
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit c7940ee7e55f4caec80ab646b7f9d495ee2677c6
Author: Martijn Coenen <maco@android.com>
Date:   Sat Aug 25 13:50:56 2018 -0700

    UPSTREAM: binder: Add BINDER_GET_NODE_INFO_FOR_REF ioctl.

    This allows the context manager to retrieve information about nodes
    that it holds a reference to, such as the current number of
    references to those nodes.

    Such information can for example be used to determine whether the
    servicemanager is the only process holding a reference to a node.
    This information can then be passed on to the process holding the
    node, which can in turn decide whether it wants to shut down to
    reduce resource usage.

    Bug: 79983843
    Change-Id: I21e52ed1ca2137f7bfdc0300365fb1285b7e3d70
Signed-off-by: Martijn Coenen <maco@android.com>
commit afd02b5ead68a94eb6bf1bf5234271687d7eb461
Author: Minchan Kim <minchan@kernel.org>
Date:   Thu Aug 23 14:29:56 2018 +0900

    android: binder: fix the race mmap and alloc_new_buf_locked

    There is RaceFuzzer report like below because we have no lock to close
    below the race between binder_mmap and binder_alloc_new_buf_locked.
    To close the race, let's use memory barrier so that if someone see
    alloc->vma is not NULL, alloc->vma_vm_mm should be never NULL.

    (I didn't add stable mark intentionallybecause standard android
    userspace libraries that interact with binder (libbinder & libhwbinder)
    prevent the mmap/ioctl race. - from Todd)

    "
    Thread interleaving:
    CPU0 (binder_alloc_mmap_handler)              CPU1 (binder_alloc_new_buf_locked)
    =====                                         =====
    // drivers/android/binder_alloc.c
    // #L718 (v4.18-rc3)
    alloc->vma = vma;
                                                  // drivers/android/binder_alloc.c
                                                  // #L346 (v4.18-rc3)
                                                  if (alloc->vma == NULL) {
                                                      ...
                                                      // alloc->vma is not NULL at this point
                                                      return ERR_PTR(-ESRCH);
                                                  }
                                                  ...
                                                  // #L438
                                                  binder_update_page_range(alloc, 0,
                                                          (void *)PAGE_ALIGN((uintptr_t)buffer->data),
                                                          end_page_addr);

                                                  // In binder_update_page_range() #L218
                                                  // But still alloc->vma_vm_mm is NULL here
                                                  if (need_mm && mmget_not_zero(alloc->vma_vm_mm))
    alloc->vma_vm_mm = vma->vm_mm;

    Crash Log:
    ==================================================================
    BUG: KASAN: null-ptr-deref in __atomic_add_unless include/asm-generic/atomic-instrumented.h:89 [inline]
    BUG: KASAN: null-ptr-deref in atomic_add_unless include/linux/atomic.h:533 [inline]
    BUG: KASAN: null-ptr-deref in mmget_not_zero include/linux/sched/mm.h:75 [inline]
    BUG: KASAN: null-ptr-deref in binder_update_page_range+0xece/0x18e0 drivers/android/binder_alloc.c:218
    Write of size 4 at addr 0000000000000058 by task syz-executor0/11184

    CPU: 1 PID: 11184 Comm: syz-executor0 Not tainted 4.18.0-rc3 #1
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014
    Call Trace:
     __dump_stack lib/dump_stack.c:77 [inline]
     dump_stack+0x16e/0x22c lib/dump_stack.c:113
     kasan_report_error mm/kasan/report.c:352 [inline]
     kasan_report+0x163/0x380 mm/kasan/report.c:412
     check_memory_region_inline mm/kasan/kasan.c:260 [inline]
     check_memory_region+0x140/0x1a0 mm/kasan/kasan.c:267
     kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278
     __atomic_add_unless include/asm-generic/atomic-instrumented.h:89 [inline]
     atomic_add_unless include/linux/atomic.h:533 [inline]
     mmget_not_zero include/linux/sched/mm.h:75 [inline]
     binder_update_page_range+0xece/0x18e0 drivers/android/binder_alloc.c:218
     binder_alloc_new_buf_locked drivers/android/binder_alloc.c:443 [inline]
     binder_alloc_new_buf+0x467/0xc30 drivers/android/binder_alloc.c:513
     binder_transaction+0x125b/0x4fb0 drivers/android/binder.c:2957
     binder_thread_write+0xc08/0x2770 drivers/android/binder.c:3528
     binder_ioctl_write_read.isra.39+0x24f/0x8e0 drivers/android/binder.c:4456
     binder_ioctl+0xa86/0xf34 drivers/android/binder.c:4596
     vfs_ioctl fs/ioctl.c:46 [inline]
     do_vfs_ioctl+0x154/0xd40 fs/ioctl.c:686
     ksys_ioctl+0x94/0xb0 fs/ioctl.c:701
     __do_sys_ioctl fs/ioctl.c:708 [inline]
     __se_sys_ioctl fs/ioctl.c:706 [inline]
     __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:706
     do_syscall_64+0x167/0x4b0 arch/x86/entry/common.c:290
     entry_SYSCALL_64_after_hwframe+0x49/0xbe
    "

Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: Martijn Coenen <maco@android.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 3ed5fd0f095e9d6fe5f33f909165a8cd596e8b46
Author: Sherry Yang <sherryy@android.com>
Date:   Tue Aug 7 12:57:13 2018 -0700

    android: binder: Rate-limit debug and userspace triggered err msgs

    Use rate-limited debug messages where userspace can trigger
    excessive log spams.

Acked-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Sherry Yang <sherryy@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 8129fb3ee7af23a888383aa23647c9d576ecdfef
Author: Sherry Yang <sherryy@android.com>
Date:   Thu Jul 26 17:17:17 2018 -0700

    android: binder: Show extra_buffers_size in trace

    Add extra_buffers_size to the binder_transaction_alloc_buf tracepoint.

Acked-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Sherry Yang <sherryy@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 3b0bbcb65457ddec6fbee72bb26002e2bba16089
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Mon Jul 23 14:41:38 2018 -0700

    android: binder: Include asm/cacheflush.h after linux/ include files

    If asm/cacheflush.h is included first, the following build warnings are
    seen with sparc32 builds.

    In file included from arch/sparc/include/asm/cacheflush.h:11:0,
            from drivers/android/binder.c:54:
    arch/sparc/include/asm/cacheflush_32.h:40:37: warning:
     'struct page' declared inside parameter list will not be visible
     outside of this definition or declaration

    Moving the asm/ include after linux/ includes solves the problem.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit e8a4948f49629c6ab122339f46908884d55ca7e9
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Mon Jul 23 14:47:23 2018 -0700

    android: binder_alloc: Include asm/cacheflush.h after linux/ include files

    If asm/cacheflush.h is included first, the following build warnings are
    seen with sparc32 builds.

    In file included from ./arch/sparc/include/asm/cacheflush.h:11:0,
     from drivers/android/binder_alloc.c:20:
    ./arch/sparc/include/asm/cacheflush_32.h:40:37: warning:
     'struct page' declared inside parameter list

    Moving the asm/ include after linux/ includes fixes the problem.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 8cae6730ef318700ab3a0db3ef43ee6a5e5856c8
Author: Geert Uytterhoeven <geert@linux-m68k.org>
Date:   Wed Jun 6 14:40:56 2018 +0200

    android: binder: Drop dependency on !M68K

    As of commit 7124330dabe5b3cb ("m68k/uaccess: Revive 64-bit
    get_user()"), the 64-bit Android binder interface builds fine on m68k.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
verify:
p212

Change-Id: I1bac2c5345bcac64a3890f1688c1ecc4a3654a79
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agokasan: rebuild address layout after vmalloc increased [1/1]
Tao Zeng [Tue, 7 May 2019 02:51:42 +0000 (10:51 +0800)]
kasan: rebuild address layout after vmalloc increased [1/1]

PD#SWPL-8132

Problem:
In Jira TV-5143, final fix change have increased 128MB address space
for vmalloc. Because binder wasted too many vmalloc space but it's
hard to fix it in kernel side.
Due to incease of vmalloc address space, old design of address space
layout for KASAN32 is not suitable after this change. So we need to
change memory layout to fix this problem and let KASAN can running OK
again.

Solution:
1, rebuild address space layout for kasan
2, make kasan compatible with vmap stack config

Verify:
p212

Change-Id: I2ce8a840df0ce1fcda61ebeb14a64b1d609719ca
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agokasan: fix wrong kasan report when resume [1/1]
Tao Zeng [Wed, 24 Apr 2019 08:10:03 +0000 (16:10 +0800)]
kasan: fix wrong kasan report when resume [1/1]

PD#SWPL-7676

Problem:
If we open kasan on 32bit kernel, after resume we usually will
get a stack-out-of-bounds KASAN error report. But infact that's
a fake report. Because On arm architecture, cpu suspend/resume
routine is done in function call path:
    cpu_suspend -> psci_cpu_suspend -> __invoke_psci_fn_smc
during this call path, some parts of stack will be marked as
shadow memory. But when cpu resume from smc call, it directly
return to point which saved in cpu_suspend and call resume
procedure. Which do not comeback as a reverse return path:
    __invoke_psci_fn_smc -> psci_cpu_suspend -> cpu_suspend
So some residual shadow memory may affect KASAN report when
cpu is calling resume hooks.

Solution:
We just need to clear all shadow in stack for this case.

Verify:
p212

Change-Id: Ic6c877212240d03902b11184e54ac363455e0094
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agounifikey: fix kasan bug reported in name_store [1/1]
Jiamin Ma [Fri, 19 Apr 2019 00:15:47 +0000 (08:15 +0800)]
unifikey: fix kasan bug reported in name_store [1/1]

PD#SWPL-7326

Problem:
slab-out-of-bounds in strlen called by name_store

Solution:
Make sure the string passed to strlen is always '\0'
ended

Verify:
Locally

Change-Id: Ifd78a100c0e34ff9afb527ebe7b044ceb5c3505e
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
5 years agosupsend: update gx_pm driver [1/1]
Hong Guo [Thu, 18 Apr 2019 08:42:01 +0000 (16:42 +0800)]
supsend: update gx_pm driver [1/1]

PD#SWPL-7226

Problem:
update gx_pm driver

Solution:
update gx_pm driver

Verify:
test pass on tl1_x309

Change-Id: If078b0744cb8ce46029d77512d5755f4d40c2014
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agokasan: bring up KASAN for 32bit os [2/2]
Tao Zeng [Tue, 16 Apr 2019 01:42:24 +0000 (09:42 +0800)]
kasan: bring up KASAN for 32bit os [2/2]

PD#SWPL-7085

Problem:
Currently kasan can't be used on 32bit kernel, it's difficult to debug
memory problems;

Solution:
Bring up KASAN on 32bit kernel

Verify:
p212

Change-Id: I4d80568f023315994e969c79b786eba856177c9c
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agocec: cec version is not 1.4 when do cts [1/1]
Yong Qin [Fri, 1 Mar 2019 06:30:34 +0000 (14:30 +0800)]
cec: cec version is not 1.4 when do cts [1/1]

PD#SWPL-5045

Problem:
cts cec version is not right

Solution:
cec version 1.4

Verify:
android p

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