platform/kernel/linux-amlogic.git
5 years agofreeze: add IRQF_NO_SUSPEND for ir irq flag for avoid wakeup by any IR key
Qiufang Dai [Tue, 24 Sep 2019 13:59:47 +0000 (21:59 +0800)]
freeze: add IRQF_NO_SUSPEND for ir irq flag for avoid wakeup by any IR key

PD#TV-10438

Problem:
system can be wake up by any IR key

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

Verify:
X32A0-T972

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

PD#TV-1924

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

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

Verify:
x301

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

PD#TV-9856

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

Solution:
add lcd_panel_ctrl to control lcd display

Verify:
t962x2-x301

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

PD#SWPL-14477

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

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

Verify:
verify by g12b-w400

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

PD#SWPL-14053

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

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

Verify:
test pass on u200, ODROID-N2

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

PD#SWPL-13967

Problem:
unchecked return value of regmap_write

Solution:
to check the return value

Verify:
test pass on g12a

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

PD#SWPL-14418

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

Solution:
use active_flg to protect tasklet_schedule

Verify:
tl1

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

PD#TV-10251

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

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

Verify:
Verified with X301

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

PD#SWPL-13834

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

Solution:
Dropping frame don't update new_dovi_setting

Verify:
passed on sm1

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

PD#SWPL-14319

Problem:
adjust the contrast in full range

Solution:
change to limit range

Verify:
verified by tl1

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

PD#TV-9972

Problem:
first sound carrier no output in nicam system.

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

Verify:
Verified by TL1.

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

PD#SWPL-14142

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

Solution:
call mc update function in video.c

Verify:
txlx

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

PD#SWPL-14059

Problem:
video stuck after reset or light unreg.

Solution:
optimize reset/light unreg flow

Verify:
G12A

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

PD#SWPL-14260

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

Solution:
delete this variable.

Verify:
tl1

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

PD#SWPL-14323

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

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

Verify:
verify on sm1

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

PD#TV-9668

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

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

Verify:
TL1 x301

Change-Id: I0e02a2048b586854c528cd3eeafb725751b9dc82
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agoevent: restore watch point after cpu pm event [1/1]
Tao Zeng [Thu, 12 Sep 2019 08:46:06 +0000 (16:46 +0800)]
event: restore watch point after cpu pm event [1/1]

PD#TV-9668

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

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

Verify:
TL1

Change-Id: I4fc2002eaabecd4c5e60a5916bc29e0107882bec
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agoaudio: auge: fix kcontrol chip info [1/1]
Xing Wang [Thu, 19 Sep 2019 06:29:58 +0000 (14:29 +0800)]
audio: auge: fix kcontrol chip info [1/1]

PD#SWPL-14331

Problem:
mixer "HDMI ARC Source" crashes when bootup

Solution:
fix kcontrol chip info

Verify:
x301

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

PD#SWPL-14256

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

Solution:
modify VPP_OSD_SC_DUMMY_DATA alpha value

Verify:
verified on txlx-r311

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

PD#TV-10334

Problem:
1.remove 44.25MHz repeat try signal.

Solution:
1.remove 44.25MHz repeat try signal.

Verify:
Verified by x301

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

PD#SWPL-14333

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

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

Verify:
tl1

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

PD#SWPL-13969

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

Solution:
check return value of class_register

Verify:
local coverity check

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

PD#SWPL-12654

Problem:
eARCTX/ARCTX function for tm2

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

Verify:
ab311

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

PD#SWPL-6863

Problem:
eARCRX/ARCRX function for sm1/tm2

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

Verify:
tested on ac200, ab311

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

PD#SWPL-8980

Problem:
bright edge at the top when beans falling

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

Verify:
TL1

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

PD#SWPL-8980

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

Solution:
Correct logic errors according to Feijun's suggestions

Verify:
TL1

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

PD#OTT-5999

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

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

commit 0b0509508beff65c1d50541861bc0d4973487dc5 upstream.

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

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

PD#OTT-5679

[Problem]

[Solution]
USB: check usb_get_extra_descriptor for proper size

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

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

PD#OTT-5676

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

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

[Test]

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

PD#OTT-5671

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

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

[Test]

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

PD#OTT-5666

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

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

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

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

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

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

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

PD#OTT-5669

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

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

[Test]

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

PD#SWPL-13232

Problem:
amvideo drops excessive video frames than it should drop

Solution:
drop only after omx_run is true

Verify:
verified on Franklin

Change-Id: Iacb8f23c9635d00ce6265a0228c1e1e458902c6a
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
5 years agoperf: pmu fine-tune for aarch32/64 of A53/A55/A73 [1/1]
Hanjie Lin [Tue, 27 Aug 2019 08:21:46 +0000 (16:21 +0800)]
perf: pmu fine-tune for aarch32/64 of A53/A55/A73 [1/1]

PD#SWPL-13243

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

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

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

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

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

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

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

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

Verify:
ac200/u200/w400

Change-Id: I7f11e1480c3c27d016b011d2a84c33e824f69b08
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
5 years agoatv_demod: optimize pal-i ring [1/1]
nengwen.chen [Thu, 29 Aug 2019 09:20:55 +0000 (17:20 +0800)]
atv_demod: optimize pal-i ring [1/1]

PD#TV-8006

Problem:
1.optimize pal-i ring.

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

Verify:
Verified by x301.

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

PD#TV-10211

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

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

Verify:
tl1

Change-Id: Ib36662045e28a911bf1585bf57bc849b1952d6f9
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agoCPUFREQ: use gp1 pll for cpufreq. [1/1]
Hong Guo [Thu, 20 Dec 2018 07:24:23 +0000 (15:24 +0800)]
CPUFREQ: use gp1 pll for cpufreq. [1/1]

PD#SWPL-3826

Problem:
use gp1 pll for cpufreq.

Solution:
use gp1 pll for cpufreq.

Verify:
x301_tl1

Change-Id: Iefb6d31ec40ba304f41024e4b7adceec881d043e
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
5 years agousb: TOSHIBA Disk Can't Be Recognized on the Port of USB 2.0 [1/1]
he.he [Tue, 10 Sep 2019 02:48:17 +0000 (22:48 -0400)]
usb: TOSHIBA Disk Can't Be Recognized on the Port of USB 2.0 [1/1]

PD#SWPL-14156

Problem:
TOSHIBA Disk can't be recognized on the Port of USB 2.0 and since then
any disk can't be recognized.This is because
that the CCS flag of the PORTSC is still set and if write 0
to 0x38 of usb phy register the CCS will change to
0 and so that other disks can be recognized.

Solution:
when the enumeration fails, call set_usb_phy_host_tuning.

Verify:
test pass on u212

Change-Id: I507f269afc825de75c7dcce5f79c9c1dd7793d84
Signed-off-by: he.he <he.he@amlogic.com>
5 years agopower: optimize the power consumption of vad wakeup [1/1]
zhiqiang liang [Fri, 10 May 2019 05:34:49 +0000 (13:34 +0800)]
power: optimize the power consumption of vad wakeup [1/1]

PD#SWPL-3826

Problem:
optimize the power consumption of tl1 with vad wakeup

Solution:
optimize the power consumption when enter freeze mode
switch the clk81 to 24M
cpu and dsu clk switch to gp1 pll,frequency is 600M
closed the fixed pll
closed the vddio_3.3V

Verify:
TL1 revB

Change-Id: I39170bb8efb91b126b6a15faad3cefee19b13089
Signed-off-by: zhiqiang liang <zhiqiang.liang@amlogic.com>
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
5 years agoclk: add protection mechanism for all plls [1/1]
Jian Hu [Wed, 11 Sep 2019 06:05:35 +0000 (14:05 +0800)]
clk: add protection mechanism for all plls [1/1]

PD#SWPL-14024

Problem:
add protection mechanism for all plls

Solution:
add protection mechanism for all plls

Verify:
test passed on
1)axg
2)g12a
3)txl
4)txlx

Change-Id: I6f29026422f73c690854d5ffa292857d14922d22
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
5 years agodv: display green when playing sdr video on sdr tv [1/1]
yao liu [Mon, 16 Sep 2019 08:00:45 +0000 (04:00 -0400)]
dv: display green when playing sdr video on sdr tv [1/1]

PD#SWPL-14115

Problem:
DV is bypass for SDR->SDR case on sm1, but
bypass failed due to dolby_vision_status is
not sync with uboot.

Solution:
Update dolby_vision_status after startup.

Verify:
passed on sm1

Change-Id: I8025b0982ce5bfb2afc5ece1b5f14be54f3a80d6
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agodefendkey: AXG: support secure upgrade check [3/3]
Zhongfu Luo [Mon, 9 Sep 2019 03:29:32 +0000 (11:29 +0800)]
defendkey: AXG: support secure upgrade check [3/3]

PD#SH-1185

Problem:
AXG need to support secure upgrade check

Solution:
1.add defendkey support in AXG dts
2.add defendkey config in smarthome defconfig

Verify:
AXG skt board verify pass

Change-Id: I1d173d4e7ce8d47c486bf8df4f6b7e417809c424
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>
5 years agoMTD: Coverity defect cleanup: MTD [1/1]
xianjun.liu [Mon, 16 Sep 2019 07:56:11 +0000 (15:56 +0800)]
MTD: Coverity defect cleanup: MTD [1/1]

PD#SWPL-13991

Problem:
Out-of-bounds read in get_free_node

Solution:
fix the issue

Verify:
AXG400

Change-Id: I6e41caf3b3118d524218d6023fb51df692865cba
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
5 years agoeth: clk invert bit compatible for 100M when exphy [1/1]
qi duan [Mon, 16 Sep 2019 06:45:48 +0000 (02:45 -0400)]
eth: clk invert bit compatible for 100M when exphy [1/1]

PD#SWPL-14033

Problem:
if clk invert bit set, 100M will not connect

Solution:
don't invert clk when connect 100M network

Verify:
w400

Change-Id: I4c3acbcc0d05fc2c99b5a982461ab3d5ff83fe26
Signed-off-by: qi duan <qi.duan@amlogic.com>
5 years agoETH: add eth reset bit when resume. [1/1]
qi duan [Wed, 4 Sep 2019 09:34:59 +0000 (05:34 -0400)]
ETH: add eth reset bit when resume. [1/1]

PD#SWPL-12602

Problem:
omni phy can not connect network probably
after long stress suspend test
for gxl/txl/txlx

Solution:
In suspend/resume sequeue, add eth reset

Verify:
verify on p212/r311

Change-Id: I4b6ab34eb2eae40533f4a33db8fb40a00f5b3d51
Signed-off-by: qi duan <qi.duan@amlogic.com>
5 years agoaudio: VAD use HIFI PLL [1/1]
jian.zhou [Wed, 11 Sep 2019 07:59:12 +0000 (03:59 -0400)]
audio: VAD use HIFI PLL [1/1]

PD#SWPL-12746

Problem:
VAD does not use HIFI PLL, it will effect vad wakup

Solution:
VAD use HIFI PLL

Verify:
T962X2_X301

Change-Id: Iad13661c4ec3495130f485447f3c8b034bee9ce2
Signed-off-by: jian.zhou <jian.zhou@amlogic.com>
5 years agousb: coverity fix [1/1]
Yue Wang [Thu, 12 Sep 2019 05:39:48 +0000 (13:39 +0800)]
usb: coverity fix [1/1]

PD#SWPL-14009

Problem:
Coverity defect cleanup - usb.

Solution:
Coverity defect cleanup - usb.

Verify:
sm1

Change-Id: Ib194a82e54f819e4ab59eab944b446683c894f15
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
5 years agosdio: optimize mmc tuning operation [1/1]
Nan Li [Mon, 9 Sep 2019 10:09:08 +0000 (18:09 +0800)]
sdio: optimize mmc tuning operation [1/1]

PD#SWPL-13914

Problem:
G12A TDMA affects the tuning, make tuning process
+/- dly is useless.

Solution:
add pdata save val operation.

Verify:
G12A_u212

Change-Id: I204dd989fae0d400b14725df068378be0262b1cc
Signed-off-by: Nan Li <nan.li@amlogic.com>
5 years agoamvecm: detect out of range signal [1/1]
Xihai Zhu [Thu, 12 Sep 2019 10:05:13 +0000 (06:05 -0400)]
amvecm: detect out of range signal [1/1]

PD#SWPL-14102

Problem:
need to detect out of range signal
correctly

Solution:
refine the checking

Verify:
tl1

Change-Id: Ia2e47ca3a427e4f66a5464997aeb8dd766b4f7ff
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agohdmirx: add control for hdcp hpd [1/1]
Hang Cheng [Wed, 11 Sep 2019 08:15:05 +0000 (16:15 +0800)]
hdmirx: add control for hdcp hpd [1/1]

PD#SWPL-14041

Problem:
sometimes after hpcp_hpd 0->1, ESM doesn't
respond to AKE_INIT, it will lead to flash
red screen on TCL DCLS-HG50

Solution:
add control for hpcp_hpd, keep it high by default

Verify:
X301

Change-Id: I8f8e5c880400084d6ed252667460c4e397b9909d
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
5 years agoemmc: run hs400 200M on tm2 [1/1]
Ruixuan Li [Fri, 23 Aug 2019 01:06:45 +0000 (09:06 +0800)]
emmc: run hs400 200M on tm2 [1/1]

PD#SWPL-12796

Problem:
tm2 is run hs200 200M now

Solution:
modify dts

Verify:
passed on tm2_t962e2_ab311

Change-Id: If834e822aefe3c9b469ff69ce58672a94caaabb4
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
5 years agoamvecm: fix failure for pattern detect [1/1]
Xihai Zhu [Thu, 12 Sep 2019 02:34:11 +0000 (22:34 -0400)]
amvecm: fix failure for pattern detect [1/1]

PD#SWPL-14069

Problem:
special pattern is detected as colorbar

Solution:
tune the detection parameter

Verify:
tl1

Change-Id: I9079efe222888e6d9e2955c0cfd4f2d7ca0f6efa
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agobl40: g12a/sm1: add m4 bringup path [1/3]
Shunzhou Jiang [Tue, 20 Aug 2019 12:09:13 +0000 (20:09 +0800)]
bl40: g12a/sm1: add m4 bringup path [1/3]

PD#SWPL-12964

Problem:
bring up m4

Solution:
add kernel driver

Verify:
U209+S905D3

Change-Id: Iaa57f24c919af013581b8e3faffb0b57f5af10ed
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
5 years agotvafe: add 0x87, 0x11b support in pq trust list [1/1]
Evoke Zhang [Wed, 4 Sep 2019 06:50:58 +0000 (14:50 +0800)]
tvafe: add 0x87, 0x11b support in pq trust list [1/1]

PD#SWPL-13775

Problem:
pq need update 0x87, 0x11b reg

Solution:
1.add 0x87, 0x11b support in pq trust list
2.update 0x87,0xfa,0x12e reg init setting for tl1
3.add dump regs for debug

Verify:
x301

Change-Id: I532d164f0fb7b01e817d19ece1498b970d40193e
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agodts: S905Y2 can not switch adb/usb. [1/1]
Luan Yuan [Thu, 20 Jun 2019 02:07:11 +0000 (10:07 +0800)]
dts: S905Y2 can not switch adb/usb. [1/1]

PD#SWPL-13103

Problem:
S905Y2 can not use adb.

Solution:
config dts, and switch the state in uboot.
setenv otg_device 0 or 1.

Verify:
verify by faraday.

Change-Id: If4cda761e346fb63d6918db74bc03f23cdcb3a1b
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
5 years agoosd: adjust threshold by using active_begin_line [2/2]
Cao Jian [Tue, 10 Sep 2019 04:39:41 +0000 (12:39 +0800)]
osd: adjust threshold by using active_begin_line [2/2]

PD#SWPL-11936

Problem:
set screen position frequently
frame flashes white stripes

Solution:
modify threshold for updating all registers
on vsync coming

Verify:
Verfied on u212

Change-Id: Iac1ec8b5ec36809d5f5ffe2fe8e79c182e9c126b
Signed-off-by: Cao Jian <jian.cao@amlogic.com>
5 years agoamvecm: minor fix failure for color bar detect [1/1]
Xihai Zhu [Wed, 11 Sep 2019 03:23:37 +0000 (23:23 -0400)]
amvecm: minor fix failure for color bar detect [1/1]

PD#SWPL-14019

Problem:
colorbar is not detected

Solution:
tune the detection parameter

Verify:
tl1

Change-Id: I0bdbe8a7fa5d55a7a5879959439dc87a51d86034
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agohdr: add hdr tone mapping ioctrol [1/1]
MingLiang Dong [Tue, 10 Sep 2019 05:51:46 +0000 (01:51 -0400)]
hdr: add hdr tone mapping ioctrol [1/1]

PD#SWPL-13948

Problem:
customer want to set hdr tone mapping curve themself,
we provide hdr interface for them

Solution:
add hdr iocontrol interface

Verify:
verify on TL1

Change-Id: I9b7d5b33e0a72c6d1ca1fca2ebffe2a3c7e460aa
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
5 years agosuspend: gxm can not enter suspend state issue [1/2]
Hong Guo [Tue, 10 Sep 2019 05:40:39 +0000 (13:40 +0800)]
suspend: gxm can not enter suspend state issue [1/2]

PD#SWPL-13523

Problem:
gxm can't enter suspend

Solution:
modify the system sleep parameter

Verify:
gxm_q201

Change-Id: I697f03170a56925aa0fdb2160340cc0d480623a8
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
5 years agovdin: System panic when calling stop_tvin_service twice continuously [1/1]
zhiwei.yuan [Mon, 9 Sep 2019 02:39:59 +0000 (10:39 +0800)]
vdin: System panic when calling stop_tvin_service twice continuously [1/1]

PD#SWPL-13880

Problem:
free_irq was called twice continuously while ponter is NULL at 2nd time.

Solution:
use mutex to prevent reentry

Verify:
verified by t962x2_x301

Change-Id: I8032d15de0a2fe5a1ab30b70af0e342d0aa3ac40
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agodeinterlace: clear KASAN warning [1/1]
Jihong Sui [Wed, 4 Sep 2019 06:41:40 +0000 (14:41 +0800)]
deinterlace: clear KASAN warning [1/1]

PD#SWPL-13378

Problem:
BUG: KASAN: use-after-free in di_task_handle+0x1dc/0x790

Solution:
add judgement before use

Verify:
u212

Change-Id: I6281257997239fa9adbe215ca31ef7d760c9302c
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agoclk: tm2: fix pcie pll lock failed [1/1]
Jian Hu [Fri, 6 Sep 2019 11:47:02 +0000 (19:47 +0800)]
clk: tm2: fix pcie pll lock failed [1/1]

PD#SWPL-11934

Problem:
pcie pll lock failed some times

Solution:
1.add retry mechanism when pcie lock failed
2.add protection mechanism for all plls

Verify:
test passed on tm2 ab311

Change-Id: Id34e87d84e2bc2368c074556f500f8af1f2a4088
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
5 years agodeinterlace: add retry for pre timeout [1/1]
Jihong Sui [Tue, 3 Sep 2019 07:21:04 +0000 (15:21 +0800)]
deinterlace: add retry for pre timeout [1/1]

PD#SWPL-13664

Problem:
when open some special UI app, DI will have a lot of timeout,
this cause display  abnormal.

Solution:
add retry after timeout;

Verify:
tl1

Change-Id: I3316252577bad218256651ebbc6d4fd8b25acb12
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agoamvecm: minor fix for pattern detection function [1/1]
Xihai Zhu [Tue, 10 Sep 2019 01:55:27 +0000 (21:55 -0400)]
amvecm: minor fix for pattern detection function [1/1]

PD#SWPL-13075

Problem:
use the correct config option

Solution:
fix the wrong config option

Verify:
tl1

Change-Id: I87d3ba28c32fa77e12143522a4a342fdfe144af5
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agodv: HDR Luminance exceeded recommendation range [1/1]
Wencai You [Thu, 5 Sep 2019 14:44:36 +0000 (22:44 +0800)]
dv: HDR Luminance exceeded recommendation range [1/1]

PD#SWPL-13766

Problem:
HDR Luminance 285.5 exceeded recommendation range 300~400

Solution:
increase graphic target max luminuance for HDR output

Verify:
Verified on u212

Change-Id: Ib873f18843a1a93149d0454d67345071e512893b
Signed-off-by: Wencai You <wencai.you@amlogic.com>
5 years agoamvecm: add pattern detection function [1/1]
Xihai Zhu [Fri, 23 Aug 2019 12:22:48 +0000 (08:22 -0400)]
amvecm: add pattern detection function [1/1]

PD#SWPL-13075

Problem:
some pattern need special handling

Solution:
per VLSI'e suggestion, add pattern
detection to try to detect special pattern

Verify:
tl1

Change-Id: I545b6e8c1b4a11fca927be46f16caeeb2cbe5327
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agoaudio: mclk pad0 doesn't output clk [1/1]
Shuai Li [Fri, 6 Sep 2019 08:26:02 +0000 (16:26 +0800)]
audio: mclk pad0 doesn't output clk [1/1]

PD#OTT-5603

Problem:
Configurate GPIO_AO 9 as mclk_0,it doesn't work.

Solution:
From SM1, the mclk pad register is changed.
Using standard clk tree to make it compitable.

Verify:
TM2, SM1.

Change-Id: I8d53296297536c90768495232570f33fc89db131
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
5 years agotvafe: update 0x18b setting for av pali for tl1 [1/1]
Evoke Zhang [Tue, 3 Sep 2019 03:00:32 +0000 (11:00 +0800)]
tvafe: update 0x18b setting for av pali for tl1 [1/1]

PD#TV-8586

Problem:
av pali need update 0x18b setting

Solution:
update 0x18b setting for av pali for tl1

Verify:
x301

Change-Id: I64bddac5c4196110b46ebfbd7a89ee97095a7f82
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agodeinterlace: add condition for switch to EI in de_post_process [1/1]
Jihong Sui [Wed, 4 Sep 2019 04:16:31 +0000 (12:16 +0800)]
deinterlace: add condition for switch to EI in de_post_process [1/1]

PD#SWPL-12002

Problem:
pause and plug out/in hdmi tx, display abnormal

Solution:
add condition for switch to EI in de_post_process
ref to IPTV's project

Verify:
G12A

Change-Id: I6230464c308660c62199aa24ad5843e7c7bd070d
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agovdin: HDMI source occurred tortured picture and had sound [1/1]
zhiwei.yuan [Fri, 30 Aug 2019 08:24:59 +0000 (16:24 +0800)]
vdin: HDMI source occurred tortured picture and had sound [1/1]

PD#SWPL-13676

Problem:
vdin status is confused when enter hdmi

Solution:
reset afifo every time enter the channel

Verify:
verified by t962x2_x301

Change-Id: I9ec78bebec4d2d5e312de82942c29a940fc322ea
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agodv: display abnormal after hotplug hdmi [1/1]
yao liu [Tue, 3 Sep 2019 09:44:18 +0000 (05:44 -0400)]
dv: display abnormal after hotplug hdmi [1/1]

PD#SWPL-13367

Problem:
HDMI hotplugged during video pause,
system control first set disable_video 1,
then DV core turn on due to sink changed,
then OMX sets disable video 2. DV core 1
is disabled after video_onoff_state is set to OFF.

Solution:
Monitor video status, parser and toggle once
to enable core1 when video off->on.

Verify:
SM1

Change-Id: Ied6f1f05ed1592f9917c093b5d567904a3bdc61c
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agoatv_demod: audio: fix audio source contorl for atv demod [1/1]
nengwen.chen [Fri, 30 Aug 2019 11:41:40 +0000 (19:41 +0800)]
atv_demod: audio: fix audio source contorl for atv demod [1/1]

PD#TV-9484

Problem:
1.fix audio source contorl for atv demod.

Solution:
1.fix audio source contorl for atv demod.
2.increase the output power of ATV audio.

Verify:
Verified by r311.

Change-Id: I1332dcd3b968790e3227170799ddb019578fe431
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agohdmirx: add option for scdc enable [1/1]
Hang Cheng [Thu, 5 Sep 2019 07:57:11 +0000 (15:57 +0800)]
hdmirx: add option for scdc enable [1/1]

PD#SWPL-13667

Problem:
some devices may forcely send signal above 3.4G
even if TV announce hdmi1.4 edid, such as apple
TV box, Samsung UBD-K8500 dvd; and for QD6508 box
of TCL, it will not send signal out if scdc NAK

Solution:
add a scdc force enable option to cover this
issue. by default, scdc is enabled or not
accroding to current edid version

Verify:
X301

Change-Id: Ibdacbd3bb1edbdcb99637252530d19510fbcfb1d
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
5 years agohdmirx: optimize esm clock init sequence [1/1]
yicheng shen [Thu, 5 Sep 2019 10:24:31 +0000 (06:24 -0400)]
hdmirx: optimize esm clock init sequence [1/1]

PD#SWPL-13779

Problem:
esm can not work after burning a new key and regenerating new
fw.le as the esm clock was not configured when probe.

Solution:
so we need to configure ESM clock no matter hdcp2.2
is burned or not.

Verify:
None

Change-Id: I793b63ad2f20434b9f8f27ccca7c80dee2990718
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
5 years agousb: disable AB311 usb3.0 [1/1]
Yue Wang [Fri, 6 Sep 2019 04:25:09 +0000 (12:25 +0800)]
usb: disable AB311 usb3.0 [1/1]

PD#SWPL-13820

Problem:
disable AB311 usb3.0.

Solution:
disable AB311 usb3.0

Verify:
tm2

Change-Id: Ic69c8ea8e9f31d66f738a019d6b59e2d9a1a51a4
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
5 years agocsc: add vinfo check for csc process [1/1]
Dezhi Kong [Mon, 2 Sep 2019 11:53:09 +0000 (19:53 +0800)]
csc: add vinfo check for csc process [1/1]

PD#SWPL-13491

Problem:
After plugging and unplugging HDMITX,
the panel screen color display is abnormal
for dual display platform.

Solution:
add vinfo->mode check for csc process,
avoid process null and invalid vinfo case.

Verify:
verify by AC202(sm1)

Change-Id: I54c54adcf2a0fc9a02e35b0ef24a720a55a8781a
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
5 years agoosd: add osd blend reg config check. [1/4]
Dezhi Kong [Wed, 28 Aug 2019 08:11:53 +0000 (16:11 +0800)]
osd: add osd blend reg config check. [1/4]

PD#SWPL-2049

Problem:
osd3 din blend config may be incorrect when viu2 is enable

Solution:
add osd blend reg config check

Verify:
verify by AC202(sm1)

Change-Id: I3d8ff0d247226d4df1386808caba2a21a34f0b10
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
5 years agousb: CtsVerifier.apk usb device test failed [1/1]
he.he [Thu, 5 Sep 2019 09:21:34 +0000 (05:21 -0400)]
usb: CtsVerifier.apk usb device test failed [1/1]

PD#SWPL-13498

Problem:
The printing may delay the usb_disconnect processing, result to
USB transfer error during reconnecting.

Solution:
Moving the print in proc_setconfig of devio.c .

Verify:
test pass on sm1

Change-Id: I5c45abb2d5d640e2e02dc3e0c08b10ca7a294eeb
Signed-off-by: he.he <he.he@amlogic.com>
5 years agoaudio: make loopback compitable with chips [1/1]
Shuai Li [Fri, 30 Aug 2019 10:38:21 +0000 (18:38 +0800)]
audio: make loopback compitable with chips [1/1]

PD#TV-8363

Problem:
Loopback doesn't work on TM2.
TL1 doesn't support loopback in OE pins.

Solution:
Make it compitable with chips.
Add tdm_lb format and chmasks.

Verify:
TM2 AB311 and TL1 X301.

Change-Id: If878fe75fc87857eae7a44439a451c5b2f494c67
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
5 years agodts: ge2d: correct the ge2d irq number [1/1]
Brian Zhu [Thu, 5 Sep 2019 12:02:49 +0000 (20:02 +0800)]
dts: ge2d: correct the ge2d irq number [1/1]

PD#SWPL-13669

Problem:
Ge2d irq number is wrong on g12a/g12b/sm1.

Solution:
Replace the correct number

Verify:
Verified on u212

Change-Id: Ia3d202dc10cb978033892efb1de251bf5cf1df31
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
5 years agodts: add osd logo_reserved [1/1]
Pengcheng Chen [Tue, 3 Sep 2019 09:31:15 +0000 (17:31 +0800)]
dts: add osd logo_reserved [1/1]

PD#SWPL-13646

Problem:
uboot logo flashed

Solution:
add osd logo_reserved

Verify:
test pass on p212

Change-Id: I73d95faffea80c68e8d0a04750d33fd0c821ca44
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agoaudio: auge: add loopback + vad [1/1]
Xing Wang [Fri, 30 Aug 2019 06:33:50 +0000 (14:33 +0800)]
audio: auge: add loopback + vad [1/1]

PD#TV-8989

Problem:
loopback with datain pdm, no vad to wakeup

Solution:
loopback with pdmin still works when entry freeze mode
vad works in two channel mode, mapping pdm ch0 & ch1 to vad
add channel num to loopback for vad

Verify:
x301

Change-Id: Ied244292bf2a2f668bb5a2216ec6a12964a46663
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
5 years agohdmirx: add repeater14 for TM2 [1/2]
Lei Yang [Mon, 2 Sep 2019 07:40:18 +0000 (15:40 +0800)]
hdmirx: add repeater14 for TM2 [1/2]

PD#SWPL-12502

Problem:
new function

Solution:
add new function of TM2

Verify:
T962E2

Change-Id: Idd5843d39bb9235fe0abdf9aaaca3be6dd2795e7
Signed-off-by: Lei Yang <lei.yang@amlogic.com>
5 years agovpp: sr software flow improvement [1/1]
Pengcheng Chen [Wed, 4 Sep 2019 03:15:32 +0000 (11:15 +0800)]
vpp: sr software flow improvement [1/1]

PD#SWPL-13633

Problem:
sr input size need improvement

Solution:
improvement sr software flow

Verify:
verified by sm1

Change-Id: I10b9dd6d057fc8906ce312576623480aa14ae8a3
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agoethernet: q201 change to internal phy [1/1]
Zhuo Wang [Tue, 3 Sep 2019 03:33:16 +0000 (11:33 +0800)]
ethernet: q201 change to internal phy [1/1]

PD#SWPL-13557

Problem:
change q201 to internal phy

Solution:
change q201 to internal phy

Verify:
q201

Change-Id: Iae23461edf6169207a5f0468cba8edda8b8a5e75
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
5 years agobuildroot: Disable lcd-drm in ac200_drm_buildroot dts [1/1]
Blance Tang [Tue, 3 Sep 2019 08:50:50 +0000 (16:50 +0800)]
buildroot: Disable lcd-drm in ac200_drm_buildroot dts [1/1]

PD#SWPL-13623

Problem:
  Wayland-DRM broken due to lcd-drm is enabled

Solution:
  Disable lcd-drm

Verify:
  Local

Change-Id: I2e4c7cded9e6979b97fb652e2d0d824c8af54ef6
Signed-off-by: Blance Tang <guofeng.tang@amlogic.com>
5 years agovdin: TL1 screen is black when switch out hdmi to others [1/1]
zhiwei.yuan [Mon, 2 Sep 2019 06:08:00 +0000 (14:08 +0800)]
vdin: TL1 screen is black when switch out hdmi to others [1/1]

PD#SWPL-13556

Problem:
hdmi signal has changed(color space, hdr etc.) before switch source

Solution:
clear the change flag when stop dec

Verify:
verified by t962x2_x301

Change-Id: I79c6dba9bf69f70850714c5810ae724b5d35e1e3
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agowifi: chang the static buf to support ap6356 [2/2]
Rongjun Chen [Wed, 14 Aug 2019 08:57:17 +0000 (16:57 +0800)]
wifi: chang the static buf to support ap6356 [2/2]

PD#SWPL-12561

Problem:
ap6356 open fail

Solution:
update static buf to fix it

Verify:
ampere

Change-Id: Iec415b0dcf46b3e5574bcb3673d5129b4f35c802
Signed-off-by: Rongjun Chen <rongjun.chen@amlogic.com>
5 years agolcd: tcon: add load flash data to update gamma voltage for lcd driver [2/2]
shaochan.liu [Mon, 2 Sep 2019 05:37:06 +0000 (13:37 +0800)]
lcd: tcon: add load flash data to update gamma voltage for lcd driver [2/2]

PD#TV-6676

Problem:
the auto gamma function need load flash data to update gamma voltage
gor lcd driver

Solution:
add load flash data to update gamma voltage

Verify:
t962x2_x301

Change-Id: I80176e4a146fe453c3d3b5919c96b659be1286ea
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
5 years agoionvideo: check and releaes ion_id when fd closed [1/1]
Rico Yang [Tue, 27 Aug 2019 02:17:49 +0000 (22:17 -0400)]
ionvideo: check and releaes ion_id when fd closed [1/1]

PD#SH-726

Problem:
ion_id leak

Solution:
release ion_id when closed

Verify:
verified on w400

Change-Id: Ie72a0fb5f4243d83aa5d7ca6be2c5cfa8844a6b2
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
5 years agolcd: add lcd status for detect VBO LOCKN and VBO HPDN work properly [1/1]
shaochan.liu [Wed, 28 Aug 2019 05:33:16 +0000 (13:33 +0800)]
lcd: add lcd status for detect VBO LOCKN and VBO HPDN work properly [1/1]

PD#TV-9186

Problem:
need provide interfaces for detect VBO LOCKN and VBO HPDN work properly.

Solution:
add lcd status for detect VBO LOCKN and VBO HPDN work properly

Verify:
t962x2_x301

Change-Id: I1f441a42f656205ef2ec15429c883ffc67e60a95
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
5 years agoaudio: Spk_mute has no effect [1/1]
Shuai Li [Mon, 2 Sep 2019 11:10:53 +0000 (19:10 +0800)]
audio: Spk_mute has no effect [1/1]

PD#OTT-6073

Problem:
Spk_mute has no effect.

Solution:
The gpio get function get the wrong name.
After correction, it works good.

Verify:
TM2.

Change-Id: Icf0356ec3238fda6e78e778ebaa812af445ccfd5
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
5 years agovlock: for support double frq out [1/1]
Yong Qin [Mon, 19 Aug 2019 08:29:49 +0000 (16:29 +0800)]
vlock: for support double frq out [1/1]

PD#SWPL-12698

Problem:
Add feature for support input 25Hz, 30Hz

Solution:
Add feature for support input 25Hz, 30Hz

Verify:
tl1

Change-Id: I753547078e26b77edd6e69f452afcd9d49a17063
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agodts: mbox add video11 and video12 for screencontrol [1/2]
huijie.huang [Thu, 29 Aug 2019 11:08:31 +0000 (19:08 +0800)]
dts: mbox add video11 and video12 for screencontrol [1/2]

PD#SWPL-13022

Problem:
mbox needs to support screencontrol

Solution:
add video11 and video12 node

Verify:
SM1-AC202

Change-Id: I1197fceb6cdc2d220318bbd87281b55dff98a665
Signed-off-by: huijie.huang <huijie.huang@amlogic.com>
5 years agovdin: improve robustness of vdin drvier for reentry case [1/1]
zhiwei.yuan [Fri, 30 Aug 2019 07:04:13 +0000 (15:04 +0800)]
vdin: improve robustness of vdin drvier for reentry case [1/1]

PD#SWPL-13492

Problem:
disable irq cnt don't equal to enable

Solution:
corrent mutex mechanism for vdin driver

Verify:
verified by t962x2_x301

Change-Id: I9d33c8297c9ed4d155233948d1d6bb7dfc6ca4a4
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agodts: increase i2c3 clock frequency to 300k [2/2]
Cheng Tong [Wed, 28 Aug 2019 08:35:39 +0000 (16:35 +0800)]
dts: increase i2c3 clock frequency to 300k [2/2]

PD#SWPL-13393

Problem:
demod init cost about 8s

Solution:
increase i2c3 clock frequency

Verify:
on s905x3

Change-Id: I6e69629f088599f2e3b36f36d4da35df4d65034a
Signed-off-by: Cheng Tong <cheng.tong@amlogic.com>
5 years agotvafe: add pq table management [1/1]
Evoke Zhang [Fri, 16 Aug 2019 11:56:21 +0000 (19:56 +0800)]
tvafe: add pq table management [1/1]

PD#SWPL-12842

Problem:
tvafe pq setting logic is not very clear

Solution:
add pq table management for different port and format

Verify:
x301

Change-Id: I9d7ae16166c73a997d9697e61bf77a87ba743d5c
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agolcd: add driver for pmu data check [2/2]
shaochan.liu [Fri, 26 Jul 2019 08:07:02 +0000 (16:07 +0800)]
lcd: add driver for pmu data check [2/2]

PD#TV-6928

Problem:
CS602 need pmu data check

Solution:
add i2c_CS602 driver with pmu data check

Verify:
t962x3_ab301

Change-Id: I1d1f33cbb63cb4f3b3fc308d610411091cb2a65d
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
5 years agomm: fix wrong kasan report [1/1]
Tao Zeng [Wed, 28 Aug 2019 07:25:40 +0000 (15:25 +0800)]
mm: fix wrong kasan report [1/1]

PD#SWPL-13281

Problem:
There are 2 types of wrong kasan report after merge change of
save wasted slab.
1, slab-out-of-bounds, which is caused by krealloc set shadow
   memory out-of-range, since tail of page was freed.
2, use-after-free, which is caused by kasan_free_pages called
   after a page freed. Because this function already called in
   free_page, so it marked shadow memory twice.

Solution:
1, make shadow do not out of range if a tail page was freed and
   been realloc again.
2, remove call of kasan_free_pages.

Verify:
X301

Change-Id: Ib5bdcbb618a783920009bb97d112c361888b0d7c
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agodv: enable drop frame for dv [1/1]
yao liu [Mon, 26 Aug 2019 13:58:21 +0000 (09:58 -0400)]
dv: enable drop frame for dv [1/1]

PD#SWPL-13115

Problem:
Apk drop lots of frames before render
the first frame, in this case, omx_run
is false and no frames will render.
Decoder doesn't have free output buffer.

Solution:
Drop dv frames in video sync before render
the first frame if app want to drop.

Verify:
Verified on U212

Change-Id: I463619f658d7f78ad8d513e17ca78482e17b3a4e
Signed-off-by: yao liu <yao.liu@amlogic.com>