platform/kernel/linux-amlogic.git
5 years agoamvecm: add option for applying gamma [1/1]
Xihai Zhu [Wed, 3 Jul 2019 11:47:12 +0000 (07:47 -0400)]
amvecm: add option for applying gamma [1/1]

PD#SWPL-11288

Problem:
we'd better provide the flexibility
for gamma applying protection

Solution:
add option to let user to choose
if the applying protection is needed
or not

Verify:
tl1

Change-Id: I3f215545c7921134a282571d7f734bb8b42d553e
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agoclk: tl1: add clk81 mux clock [1/1]
Jian Hu [Wed, 8 May 2019 11:52:28 +0000 (19:52 +0800)]
clk: tl1: add clk81 mux clock [1/1]

PD#SWPL-8215

Problem:
1.clk81 can not switch to 24M
2.fixed pll can set rate
  call clk_prepare_enable to open it
  call clk_disable_unprepare to close it

Solution:
1.add clk81 mux clock
2.change fixed pll callback Read only to R/W

Verify:
test passed on tm2 ab301

Change-Id: I426d4307f19647afcb0166a23c1988df1b504807
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
5 years agoclk: tl1: fix hifi clk can not work issue [1/1]
Shunzhou Jiang [Thu, 14 Feb 2019 02:09:50 +0000 (10:09 +0800)]
clk: tl1: fix hifi clk can not work issue [1/1]

PD#SWPL-3825

Problem:
hifi clk can not work

Solution:
add hifi clk table

Verify:
X301

Change-Id: I89699e14077b9046900fec5665b76fb6bb4e080a
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
5 years agoeARCrx: add hdmitx hpd notify [1/1]
Zongdong Jiao [Thu, 1 Aug 2019 06:43:18 +0000 (14:43 +0800)]
eARCrx: add hdmitx hpd notify [1/1]

PD#SWPL-6861

Problem:
Wrong val for init bandgap

Solution:
If PHY_CNTL0 is 0, then enable it, otherwise no need.

Verify:
SM1/AC200

Change-Id: I9e4a7bbe5d4b02cd8e9b2d5da87b4e572bdeb67e
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
5 years agogpio_key: fix request gpio failed issue [1/1]
Yingyuan Zhu [Mon, 29 Jul 2019 06:54:57 +0000 (14:54 +0800)]
gpio_key: fix request gpio failed issue [1/1]

PD#SWPL-11929

Problem:
request gpio failed but the probe function continued
to execute successfully.

Solution:
add return value judgment.

Verify:
test pass on g12a

Change-Id: Iab04b8440a4ecb340d98baee7b1e0df5692739e7
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
5 years agovdin: 1080p 444 10bit mode buffer size not right [1/1]
Yong Qin [Thu, 25 Jul 2019 06:18:52 +0000 (14:18 +0800)]
vdin: 1080p 444 10bit mode buffer size not right [1/1]

PD#TV-7702

Problem:
1.1080p 444 10bit mode, buffer size is not big enough.
alloc as 444 8bit mode.
2.4k afbc not support 10bit mode

Solution:
hdr mode 4k, disable afbc mode.

Verify:
tl1 ref board

Change-Id: I3284a5279c08f360faaeaaf4e6ab47a9008f0da6
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agoamvecm: fix LC noise under SD blue pattern [1/1]
Xihai Zhu [Thu, 25 Jul 2019 06:28:36 +0000 (02:28 -0400)]
amvecm: fix LC noise under SD blue pattern [1/1]

PD#SWPL-11532

Problem:
blue raster pattern show heavy noise
under sd HDMI input

Solution:
it is cuased by incorrect color matrix
set matrix based on the signal type

Verify:
tl1

Change-Id: I36ae74fd0f7762d270c5ea908a817dabb9516d56
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
5 years agoeARCrx: add hdmitx hpd notify [1/1]
Zongdong Jiao [Wed, 31 Jul 2019 07:30:56 +0000 (15:30 +0800)]
eARCrx: add hdmitx hpd notify [1/1]

PD#SWPL-6861

Problem:
Lack hdmitx hpd event notify to eARC

Solution:
Add hdmitx hpd event notify to eARC in HPD interrupt handler
w/o any delay.

Verify:
TBD

Change-Id: Ic7f35365a2af634dee604f7121d62738b4b17a8d
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
5 years agoRevert "eARCrx: add hdmitx hpd notify [1/1]"
Jianxin Pan [Wed, 31 Jul 2019 07:19:06 +0000 (00:19 -0700)]
Revert "eARCrx: add hdmitx hpd notify [1/1]"

This reverts commit 93343170955d94aa45518edca907ba85a917e6ce.
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
Change-Id: I198c244e0d6877776c966983d00fb554767f3fe0

5 years agoeARCrx: add hdmitx hpd notify [1/1]
Zongdong Jiao [Wed, 10 Apr 2019 01:58:59 +0000 (09:58 +0800)]
eARCrx: add hdmitx hpd notify [1/1]

PD#SWPL-6861

Problem:
Lack hdmitx hpd event notify to eARC

Solution:
Add hdmitx hpd event notify to eARC in HPD interrupt handler w/o
any delay.

Verify:
TBD

Change-Id: Iaff59f3144e4a03db32110d438d14012ab2fed81
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
5 years agodi: fix the abnormal white color noise [1/2]
Bencheng Jing [Fri, 26 Jul 2019 09:22:43 +0000 (17:22 +0800)]
di: fix the abnormal white color noise [1/2]

PD#SWPL-7049

Problem:
abnormal white color noise

Solution:
add G12a/G12b/sm1 chip in the deghost patch

Verify:
sm1

Change-Id: Ib3f4f0500712ff2aac8d5eb9cd137f8a3d3fe0f1
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agoamvecm: add 3x65 bin gamma setting function [1/1]
Bencheng Jing [Sat, 6 Apr 2019 10:40:06 +0000 (18:40 +0800)]
amvecm: add 3x65 bin gamma setting function [1/1]

PD#SWPL-6644

Problem:
add 3x65 bin gamma function

Solution:
add 3x65 bin gamma function

Verify:
tm2

Change-Id: I1f70af4b7ad6b5906004c1912e2b8f5e4366da4e
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agodi: fix the sawtooth because of not into pulldown 22 timely [1/1]
Bencheng Jing [Mon, 29 Jul 2019 12:17:08 +0000 (20:17 +0800)]
di: fix the sawtooth because of not into pulldown 22 timely [1/1]

PD#SWPL-10382

Problem:
not into pulldown 22 timely

Solution:
The judgment condition is wider for pulldown 22

Verify:
sm1

Change-Id: Id99c0c997b0954dee0a06b7e6dfd60feded73b30
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agoatv_demod: fix synchronization problem when get frontend [1/1]
nengwen.chen [Tue, 23 Jul 2019 07:21:05 +0000 (15:21 +0800)]
atv_demod: fix synchronization problem when get frontend [1/1]

PD#TV-8131

Problem:
fix synchronization problem when get frontend.

Solution:
1.fix synchronization problem when get frontend.

Verify:
Verified by x301

Change-Id: Ic0580a83448fe75529615ffa08cb526e205ef9a8
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agodi: fix the flash mosaic caused by cue [1/1]
Bencheng Jing [Thu, 25 Jul 2019 13:02:20 +0000 (21:02 +0800)]
di: fix the flash mosaic caused by cue [1/1]

PD#SWPL-11034

Problem:
flash mosaic when play VTS_13_1.VOB

Solution:
adjust cue function

Verify:
sm1

Change-Id: If188f49f3972e5da2b2fe4e917bb6e1b14163569
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agospi: export the spi_register_board_info for ko [1/1]
Sunny Luo [Tue, 30 Jul 2019 08:02:11 +0000 (16:02 +0800)]
spi: export the spi_register_board_info for ko [1/1]

PD#SWPL-9815

Problem:
spi_register_board_info's export has been removed in kernel 4.9,
but TV need to use it in ko.

Solution:
package it in a new dirspi_register_board_info and export

Verify:
T312

Change-Id: Ic7e5d8cef6840551e2925eda6162156320877833
Signed-off-by: Sunny Luo <sunny.luo@amlogic.com>
5 years agovideo: do not update omx_pts if not continus drop [1/1]
shuanglong.wang [Mon, 22 Jul 2019 11:03:25 +0000 (19:03 +0800)]
video: do not update omx_pts if not continus drop [1/1]

PD#SWPL-9676

Problem:
netflix pause for a relative long time and resume, will occur freeze

Solution:
1.do not update omx_pts if not continus drop
2.omxpts not update for while, no compensate omxpts

Verify:
verify by nts

Change-Id: I4eef7b6aff44077e78fc704e26d8bab441a1b36b
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
5 years agohdmitx: modify fractional part of hpll for gxtvbb [1/1]
Hang Cheng [Fri, 26 Jul 2019 09:29:14 +0000 (17:29 +0800)]
hdmitx: modify fractional part of hpll for gxtvbb [1/1]

PD#TV-8224

Problem:
hdmitx output clk is not right, actually output 145Mhz
when expect to output 148.5Mhz. for gxtvbb, bit[11]
of DIV_FRAC bit[11:0] is used for +/- symbol, but now
is used for fractional weight by mistake.

Solution:
change back to original setting for DIV_FRAC

Verify:
TCL-T966

Change-Id: Idd34a745d4b74a0bd9e6f2b3542af94731d5badd
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
5 years agoidle: power: tl1 need support CPU idle [1/1]
Yan Wang [Mon, 24 Dec 2018 06:51:28 +0000 (14:51 +0800)]
idle: power: tl1 need support CPU idle [1/1]

PD#SWPL-3525

Problem:
tl1 need support cpu idle.

Solution:
tl1 enable cpu idle.

Verify:
T962x2 x301

Change-Id: I14179975bbc1856418abbf32bccbfbf8d8462e4f
Signed-off-by: Yan Wang <yan.wang@amlogic.com>
5 years agoemmc: modified the fixed adj tuning mode for HS200 [1/1]
Long Yu [Tue, 30 Jul 2019 02:26:02 +0000 (10:26 +0800)]
emmc: modified the fixed adj tuning mode for HS200 [1/1]

PD#SWPL-11917

Problem:
Data sampling window has discontinuity

Solution:
Move the data as a whole to find a continuous data window

Verify:
txlx

Change-Id: I76fd41c22ff4c9e2e40b2b47580e25e0284ffbfa
Signed-off-by: Long Yu <long.yu@amlogic.com>
5 years agodrm/vblank: Pass crtc_id to page_flip_ioctl.
Maarten Lankhorst [Thu, 23 Nov 2017 10:37:37 +0000 (11:37 +0100)]
drm/vblank: Pass crtc_id to page_flip_ioctl.

PD#SWPL-4863

We added crtc_id to the atomic ioctl, but forgot to add it for vblank
and page flip events. Commit bd386e518056 ("drm: Reorganize
drm_pending_event to support future event types [v2]") added it to
the vblank event, but page flip event was still missing.

Correct this and add a test for making sure we always set crtc_id correctly.

Change-Id: Idd1070005d88529500a8be868f714c8bb345ddee
Fixes: bd386e518056 ("drm: Reorganize drm_pending_event to support future event types [v2]")
Fixes: 5db06a8a98f5 ("drm: Pass CRTC ID in userspace vblank events")
Cc: Daniel Stone <daniels@collabora.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.12+
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #irc
Testcase: igt/kms_vblank/crtc_id
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171123103737.47138-1-maarten.lankhorst@linux.intel.com
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
5 years agodts: sm1: camera preview would cause garbage [1/1]
changqing.gao [Mon, 29 Jul 2019 05:53:02 +0000 (13:53 +0800)]
dts: sm1: camera preview would cause garbage [1/1]

PD#SWPL-11884

Problem:
camera preview would cause garbage.

Solution:
modify the previous change:38e45fb998269d36f41a7b004be51ba9f1e7bef9
not to remove vdin0_cma_reserved.

Verify:
test passed on sm1

Change-Id: Ie20de9b3562f7c83fa73bd88acab7770ca8c3b0a
Signed-off-by: changqing.gao <changqing.gao@amlogic.com>
5 years agoscripts: fixed an issue that could cause an infinite loop. [1/1]
Jianxiong Pan [Tue, 30 Jul 2019 01:57:56 +0000 (09:57 +0800)]
scripts: fixed an issue that could cause an infinite loop. [1/1]

PD#SWPL-12025

Problem:
the merge_pre_check.pl script has an bug that may enter an infinite loop,
causing problems.

Solution:
add the length of the detection conditions.

Verify:
local test.

Change-Id: I48fe839678ea0884a9082197eab083a2b8f489cd
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
5 years agoosd: osd_mmap no more locks to release [1/1]
Cao Jian [Fri, 26 Jul 2019 09:46:04 +0000 (17:46 +0800)]
osd: osd_mmap no more locks to release [1/1]

PD#SWPL-11768

Problem:
release one more mutex in osd_mmap

Solution:
remove mutex release in osd_mmap

Verify:
Verfied on p212

Change-Id: I139b80590740717ced321171ee665d0f6c0cd83f
Signed-off-by: Cao Jian <jian.cao@amlogic.com>
5 years agodrm: Reorganize drm_pending_event to support future event types [v2]
Keith Packard [Wed, 5 Jul 2017 21:34:23 +0000 (14:34 -0700)]
drm: Reorganize drm_pending_event to support future event types [v2]

PD#SWPL-4863

Place drm_event_vblank in a new union that includes that and a bare
drm_event structure. This will allow new members of that union to be
added in the future without changing code related to the existing vbl
event type.

Assignments to the crtc_id field are now done when the event is
allocated, rather than when delievered. This way, delivery doesn't
need to have the crtc ID available.

v2:
 * Remove 'dev' argument from create_vblank_event

It wasn't being used anyways, and if we need it in the future,
we can always get it from crtc->dev.

 * Check for MODESETTING before looking for crtc in queue_vblank_event

UMS drivers will oops if we try to get a crtc, so make sure
we're modesetting before we try to find a crtc_id to fill into
the event.

(cherry picked from commit dc695b85fde88eca3ef3b03fcd82f15b6bc6e462)

Change-Id: I6f0feabcba9373fcc434b148752d9cd28bea67e6
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
5 years agoamcsc: remove the vout_device is NULL log [1/1]
Brian Zhu [Mon, 29 Jul 2019 05:52:45 +0000 (13:52 +0800)]
amcsc: remove the vout_device is NULL log [1/1]

PD#SWPL-11922

Problem:
When the vout_device point is NULL, amcsc will print too
many logs.

Solution:
Remove this warning log since the vout_device = NULL is
normal under TV or CVBS case.

Verify:
Verified by X301

Change-Id: I007e3970b8361e0cd79bfc81ee5205cbb262c0c1
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
5 years agodrm: start hdcp work when the "Content Protection" was set thought atomic [1/1]
lingjie li [Fri, 5 Jul 2019 09:27:04 +0000 (17:27 +0800)]
drm: start hdcp work when the "Content Protection" was set thought atomic [1/1]

PD#SWPL-4866

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

Problem:
need add hdcp function.

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

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

Change-Id: If213b7def89ff1f1ec63b866a21a3323e098786f
Signed-off-by: lingjie li <lingjie.li@amlogic.com>
5 years agowifi: add tcp delay ack support [1/1]
libo [Fri, 18 May 2018 12:47:38 +0000 (20:47 +0800)]
wifi: add tcp delay ack support [1/1]

PD#OTT-5388

Problem:
wifi rx throughput issue

Solution:
add tcp delay ack support
enable tcp dealy ack by following command:
echo 1 > /proc/sys/net/ipv4/tcp_use_userconfig
echo 60 > /proc/sys/net/ipv4/tcp_delack_seg

Verify:
u211

Change-Id: I060810b2800bae377388ba6ed9f9256597c9e6ea
Signed-off-by: libo <bo.li@amlogic.com>
5 years agodrm: Pass CRTC ID in userspace vblank events
Ao Xu [Mon, 29 Jul 2019 08:35:36 +0000 (16:35 +0800)]
drm: Pass CRTC ID in userspace vblank events

PD#SWPL-4863

With the atomic API, it is possible that a single commit affects
multiple crtcs. If the user requests an event with that commit, one
event will be sent for each CRTC, but it is not possible to distinguish
which crtc an event is for in user space. To solve this, the reserved
field in struct drm_vblank_event is repurposed to include the crtc_id
which the event is for.

The DRM_CAP_CRTC_IN_VBLANK_EVENT is added to allow userspace to query if
the crtc field will be set properly.

[daniels: Rebased, using Maarten's forward-port.]

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170404165221.28240-2-daniels@collabora.com
Change-Id: Ide7657bdc38563d2de91edc2d649b53262002c39
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
5 years agoaudio: Disable Resample module for SPDIFIn [1/2]
yujie.wu [Mon, 15 Jul 2019 11:38:01 +0000 (19:38 +0800)]
audio: Disable Resample module for SPDIFIn  [1/2]

PD#SWPL-9922

Problem:
  The spdif input doesn't work

Solution:
  Disable resample module for Spdif in

Verify:
  A113

Change-Id: I459555d485641884cc026459ebb4a92d99157d8a
Signed-off-by: yujie.wu <yujie.wu@amlogic.com>
5 years agoethernet: debug function for reset [1/1]
Zhuo Wang [Fri, 19 Jul 2019 03:13:02 +0000 (11:13 +0800)]
ethernet: debug function for reset [1/1]

PD#SWPL-11505

Problem:
STR may crash

Solution:
improve the suspend/rusume flow

Verify:
verify on g12a u200 board

Change-Id: Ie7b4759fd0d801c83eb3c1c314c402ae470b5e3f
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
5 years agovdin: dec stop port close vdin flag is not right [1/1]
Yong Qin [Tue, 23 Jul 2019 09:02:34 +0000 (17:02 +0800)]
vdin: dec stop port close vdin flag is not right [1/1]

PD#TV-7934

Problem:
when port not open complitly, needn't send event to tv server

Solution:
add a condition to pretect

Verify:
tl1

Change-Id: I4fb6d7d1d247381c9cb13acabeece56dd6b6d1bc
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agolcd: tcon: set od function [2/2]
shaochan.liu [Fri, 12 Jul 2019 05:20:52 +0000 (13:20 +0800)]
lcd: tcon: set od function [2/2]

PD#TV-7435

Problem:
when enable od function, the left half of the screen
display is abnormal after boot

Solution:
set od function

Verify:
x301

Change-Id: Ibe4f2e7e5d9bc46c6ce880715103e2cc69d4625b
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
5 years agodvb: ci mcu: control CAM throw mcu and used api to control mcu. [2/9]
hualing chen [Wed, 3 Jul 2019 06:21:20 +0000 (14:21 +0800)]
dvb: ci mcu: control CAM throw mcu and used api to control mcu. [2/9]

PD#SWPL-10659

Problem:
tsin and tsout pin not config.
ci mcu dts not add config.

Solution:
1 add tsin and tsout pinmux config.
2 add ci mcu dts config.

Verify:
verified on t962x3-t312 box.

Change-Id: Id8c271e41736e337c12141f879e97bc9673bb99e
Signed-off-by: hualing chen <hualing.chen@amlogic.com>
5 years agocpufreq: update dvfs voltage and pwm for g12b revb [1/1]
Hong Guo [Tue, 23 Apr 2019 07:38:33 +0000 (15:38 +0800)]
cpufreq: update dvfs voltage and pwm for g12b revb [1/1]

PD#SWPL-7636

Problem:
update dvfs voltage and pwm for g12b revb

Solution:
update dvfs voltage and pwm for g12b revb

Verify:
update dvfs voltage and pwm for g12b revb

Change-Id: I29deea791126fcb1819be380ed81bc2aa29eeec6
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
5 years agoavin_detect: fix avin_detect_flag mistak in probe [1/1]
Evoke Zhang [Fri, 26 Jul 2019 10:39:26 +0000 (18:39 +0800)]
avin_detect: fix avin_detect_flag mistak in probe [1/1]

PD#TV-7797

Problem:
cat detect avin signal

Solution:
fix avin_detect_flag in probe

Verify:
x301

Change-Id: I2ee1f7fa243d31262f4e156e84e63440fe812c09
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agodv: support PIP [1/1]
robin zhu [Tue, 25 Jun 2019 20:02:14 +0000 (13:02 -0700)]
dv: support PIP [1/1]

PD#SWPL-9950

Problem:
  not support VD1+VD2 PIP for DV+None_DV or 2xNone_DV
  need bypass HDR+ to HDR module when Sink support
  need always bypass to HDR module for HLG
  not fully support convert between format SDR/HDR(+)/HLG
  not support convert all format to IPT(DV)
  not support follow sink/follow src policy for PIP

Solution:
  add full matrix support to convert between SDR/HDR formats
  add support to convert all format to IPT(DV)
  rewrite policy, video process and tx handing for PIP

Verify:
  tested and merged in raven project
  need test on for src
  need test for sink(has regression, need to fix)

Change-Id: I001d9dcdcb94c95fb2b7651e726d1ebadc8f4551
Signed-off-by: robin zhu <robin.zhu@amlogic.com>
5 years agoMTD: slc-nand: fix signed integer overflow in erase_bootloader [1/1]
xianjun.liu [Tue, 23 Jul 2019 03:14:19 +0000 (11:14 +0800)]
MTD: slc-nand: fix signed integer overflow in erase_bootloader [1/1]

PD#SWPL-11771

Problem:
Hackers can use signed integer erase_boot_num to cause systems crash

Solution:
replace signed variable with unsigned variables

Verify:
AXG-S400

Change-Id: I9cc8d8f43c199f48e7d7bff2664bca740681d274
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
5 years agoMTD: reset some important buf before free the buf [1/1]
xianjun.liu [Mon, 22 Jul 2019 10:02:10 +0000 (18:02 +0800)]
MTD: reset some important buf before free the buf [1/1]

PD#SWPL-11772

Problem:
Inadequate clearing of keys/dtbs/env buf in memory

Solution:
clear the corresponding buf before free the buf

Verify:
AXG-S400

Change-Id: I61971c11a41c7062270a3863ae711c856d66f332
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
5 years agoMtd: fix check return value for copy_from_user in uboot_write method [1/1]
xianjun.liu [Tue, 25 Jun 2019 07:31:30 +0000 (15:31 +0800)]
Mtd: fix check return value for copy_from_user in uboot_write method [1/1]

PD#SWPL-11776

Problem:
missing return value check for copy_from_user in uboot_write method

Solution:
checking return value after call copy_from_user/copy_to_user

Verify:
AXG-S420

Change-Id: I087a341cbf0b603b2898e81773dc266d8e3debe1
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
5 years agolicense: add license for audio source file [1/2]
jiejing.wang [Wed, 24 Jul 2019 08:21:55 +0000 (16:21 +0800)]
license: add license for audio source file [1/2]

PD#SWPL-11716

Problem:
some audio source has no license

Solution:
add license for audio source file

Verify:
verify by locally

Change-Id: I85e7a27a724f1d255e38f4a878475b38abc1dfd4
Signed-off-by: jiejing.wang <jiejing.wang@amlogic.com>
5 years agoavin_detect: optimize avin detect driver [1/1]
Evoke Zhang [Tue, 23 Jul 2019 08:11:10 +0000 (16:11 +0800)]
avin_detect: optimize avin detect driver [1/1]

PD#TV-7797

Problem:
avin ch2 affect to ch1 display

Solution:
optimize avin detect driver, add debug print

Verify:
x301

Change-Id: Icc89c5b44f187a30971e8c53c3019297ce72b816
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agodvfs: update cpu clk after adjust cpufeq for g12b big core [1/1]
Hong Guo [Thu, 25 Jul 2019 08:20:45 +0000 (16:20 +0800)]
dvfs: update cpu clk after adjust cpufeq for g12b big core [1/1]

PD#SWPL-11796

Problem:
update cpu clk after adjust cpufeq

Solution:
update cpu clk after adjust cpufeq

Verify:
test pass on g12b_w400

Change-Id: I5e4593e4b65de5f7536ddde793d682cc67df0e64
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
5 years agoclk: g12a/b: add aclk_lock init [1/1]
Jian Hu [Thu, 25 Jul 2019 03:54:02 +0000 (11:54 +0800)]
clk: g12a/b: add aclk_lock init [1/1]

PD#SWPL-11765

Problem:
open CONFIG_LOCK_STAT

BUG: spinlock bad magic on CPU#2, swapper/0/1
lock: aclk_lock+0x0/0x28, .magic: 00000000, .owner: swapper/0/1, .owner_cpu: 2
CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.9.113 #1
Hardware name: Generic DT based system
[bc001a5c+ 16][<c020e5f4>] show_stack+0x20/0x24
[bc001a84+ 40][<c06161e8>] dump_stack+0xb8/0xf4
[bc001aac+ 40][<c02a1428>] spin_dump+0xa0/0xf0
[bc001acc+ 32][<c02a1744>] do_raw_spin_unlock+0xb8/0x138
[bc001ae4+ 24][<c0fa35f4>] _raw_spin_unlock_irqrestore+0x34/0x9c
[bc001b2c+ 72][<c0690ce4>] clk_mux_set_parent+0xc0/0x148
[bc001b3c+ 16][<c06911d8>] clk_composite_set_parent+0x3c/0x40
[bc001b6c+ 48][<c068cccc>] clk_core_set_parent+0x18c/0x42c
[bc001b7c+ 16][<c068cf98>] clk_set_parent+0x2c/0x30
[bc001bb4+ 56][<c0ca7ad8>] aml_tdm_platform_probe+0x27c/0x748
[bc001bd4+ 32][<c06d69e0>] platform_drv_probe+0x60/0xc0
[bc001bfc+ 40][<c06d4734>] driver_probe_device+0x214/0x2c0

Solution:
add aclk_lock init

Verify:
test passed on g12b

Change-Id: I1214d044c279865065de237bfb1ecc7f9ea71699
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
5 years agoppmgr: Unbound kstrdup and Potential Null Dereference. [1/1]
renjiang.han [Thu, 4 Jul 2019 07:34:36 +0000 (15:34 +0800)]
ppmgr: Unbound kstrdup and Potential Null Dereference. [1/1]

PD#OTT-4872

Problem:
Unbound kstrdup and Potential Null Dereference.

Solution:
Add a judgment on the return value and the null pointer.

Verify:
on u212

Change-Id: I1e493c8125e08d4a6fb9fb46f28309eba6f0e47b
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
5 years agodv: fix Buffer overflow in amdolby_vision due to string processing [1/1]
Pengcheng Chen [Tue, 23 Jul 2019 02:24:04 +0000 (10:24 +0800)]
dv: fix Buffer overflow in amdolby_vision due to string processing [1/1]

PD#OTT-5058

Problem:
Buffer overflow in amdolby_vision due to string processing

Solution:
add buffer limited when string buffer accepting commands (namely *parm);

Verify:
verified on Raven

Change-Id: Icd550f331efb2ee46e2f270e516df9942837f93d
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agodeinterlace: add condition for force_prog [1/1]
Jihong Sui [Wed, 24 Jul 2019 09:12:27 +0000 (17:12 +0800)]
deinterlace: add condition for force_prog [1/1]

PD#SWPL-11550

Problem:
force_prog only for progressive.

Solution:
add condition for force_prog

Verify:
TL1

Change-Id: I44e165c779eefcefcc18a286e66a598ffef1294f
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agobuild: fix uninitialized-use when build with prebuilt toolchain [1/1]
Chia-hung Duan [Wed, 3 Jul 2019 06:40:41 +0000 (14:40 +0800)]
build: fix uninitialized-use when build with prebuilt toolchain [1/1]

PD#SWPL-8241

Problem:
** SYNC FROM GOOGLE **
Build failed due to uninitialzed variable

Solution:
Init to reasonable value

Verify:
Build with Android prebuilt toolchain

Change-Id: I09615276b48b6253f8084743a7d50081cfc24ec4
Signed-off-by: Shuide Chen <shuide.chen@amlogic.com>
5 years agoaudio: Fix panic on add_timer [1/1]
Shuai Li [Mon, 22 Jul 2019 06:13:48 +0000 (14:13 +0800)]
audio: Fix panic on add_timer [1/1]

PD#TV-7920

Problem:
Audio drive caused kernel panic.
BUG_ON timer_pending.

Solution:
Add timer will panic calling add_timer.
If timer is pending we need use mod_timer
to deal with this case.

Verify:
T962

Change-Id: Ib4143de384af40803609c3513ad07eeb3fe59bbf
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
5 years agoamlvideo2: screenshot buffer leak. [1/1]
renjiang.han [Wed, 24 Jul 2019 11:56:12 +0000 (19:56 +0800)]
amlvideo2: screenshot buffer leak. [1/1]

PD#TV-7948

Problem:
Amlvideo2 will not put the last buffer of vdin back.

Solution:
Return temp vf to vdin in amlvideo2.

Verify:
on X301

Change-Id: I6f7f604a8a0fa8f577d50e242968e0aa52450cda
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
5 years agotvafe: vbi: optimize vbi data parse [1/1]
Evoke Zhang [Fri, 28 Jun 2019 10:16:12 +0000 (18:16 +0800)]
tvafe: vbi: optimize vbi data parse [1/1]

PD#SWPL-10532

Problem:
teletext sometimes display abnormal

Solution:
optimize vbi data parse

Verify:
x301

Change-Id: I879208fd05dd188dc84fde7dd32a1c64504c57f8
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agoirblaster: add irblaster support for tm2 t312 [1/1]
Bichao Zheng [Thu, 18 Jul 2019 06:42:25 +0000 (14:42 +0800)]
irblaster: add irblaster support for tm2 t312 [1/1]

PD#SWPL-9909

Problem:
Need add irblaster support for tm2 T312.

Solution:
1. Enable irblaster controller.
2. Mux GPIOAO_4 to IR_REMOTE_OUT.

Verify:
verified on tm2 t96e2

Change-Id: If40c84c0dff0c1d771cd6bccc1c3ac5af8e728fd
Signed-off-by: Bichao Zheng <bichao.zheng@amlogic.com>
5 years agoethernet: g12a/b exphy use autocali [1/1]
qi duan [Tue, 9 Jul 2019 12:27:45 +0000 (08:27 -0400)]
ethernet: g12a/b exphy use autocali [1/1]

PD#SWPL-10391

Problem:
g12b revA and revB need one code for two parameter

Solution:
if autocali in uboot, use autocali result
if no autocali,use the dts para

Verify:
verify on g12b w400 board,revA and revB

Change-Id: I4b48c67fba25eba4cb286470557ff0777009ec9f
Signed-off-by: qi duan <qi.duan@amlogic.com>
5 years agovpu: fix mem_pd reg4 mistake for local dimming [1/1]
Evoke Zhang [Sun, 5 May 2019 09:39:01 +0000 (05:39 -0400)]
vpu: fix mem_pd reg4 mistake for local dimming [1/1]

PD#SWPL-6798

Problem:
vpu mem_pd reg4 config is incorrect

Solution:
fix mem_pd reg4 config

Verify:
ab301

Change-Id: Ibeb732051c2ad4b46e55f66fe05fce440b450263
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agoavsync: video: fix avsync issue when hdmiin [2/3]
Xiaoming Sui [Fri, 14 Jun 2019 09:59:54 +0000 (17:59 +0800)]
avsync: video: fix avsync issue when hdmiin [2/3]

PD#TV-6148

Problem:
the avsync test is failed when hdmiin.

Solution:
add the delay check and setting when avsync is lost.

Verify:
X301

Change-Id: I53c1a7f0ddb907afa83fbf65b280d1d1cb35a804
Signed-off-by: Xiaoming Sui <xiaoming.sui@amlogic.com>
5 years agoamvecm: fix dnlp_cuvbld_min and dnlp_cuvbld_max not load [1/1]
Bencheng Jing [Fri, 12 Jul 2019 13:17:09 +0000 (21:17 +0800)]
amvecm: fix dnlp_cuvbld_min and dnlp_cuvbld_max not load [1/1]

PD#SWPL-11528

Problem:
dnlp_cuvbld_min and dnlp_cuvbld_max not follow db

Solution:
add refresh in driver

Verify:
TL1

Change-Id: Id3a79c5b834c8e6fd3574c70efdf0982694b306c
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agowifi: pull-down uart_cts_a pin for realtek bt [4/4]
libo [Wed, 8 May 2019 09:51:51 +0000 (17:51 +0800)]
wifi: pull-down uart_cts_a pin for realtek bt [4/4]

PD#SWPL-7373

Problem:
realtek bt not work

Solution:
pull-down uart_cts_a pin

Verify:
ampere

Change-Id: I14f57d28d081077d89c681e2ecc95a25f706c64c
Signed-off-by: libo <bo.li@amlogic.com>
5 years agoemmc: run hs400 166M busmode on sm1 [1/1]
Ruixuan Li [Tue, 23 Jul 2019 03:06:30 +0000 (11:06 +0800)]
emmc: run hs400 166M busmode on sm1 [1/1]

PD#SWPL-10719

Problem:
right now the sm1 is run hs200 200M

Solution:
modify dts

Verify:
passed on sm1_ac200

Change-Id: I01c36c04293698b36cec116302cb104b22500d99
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
5 years agordma: add rdma multi reg trace function [1/1]
Pengcheng Chen [Fri, 12 Jul 2019 10:45:24 +0000 (18:45 +0800)]
rdma: add rdma multi reg trace function [1/1]

PD#SWPL-11388

Problem:
rdma not support multi reg trace

Solution:
add rdma multi reg trace function

Verify:
verify by g12b w400

Change-Id: I74496e11f85af5f2e9aa99108dfc5842eb98d9fc
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agoatv_demod: fix the CVBS output level [1/1]
nengwen.chen [Tue, 7 May 2019 06:41:16 +0000 (14:41 +0800)]
atv_demod: fix the CVBS output level [1/1]

PD#SWPL-11581, PD#TV-5622, PD#TV-8087, PD#TV-8088, PD#TV-8089

Problem:
fix the CVBS output level.

Solution:
1.fix peak level(1Vp-p).
2.fix sync head level(300+/-10%mv).
3.fix white level(700+/-10%mv).

Verify:
Verified by x301.

Change-Id: Ie4bd6ed0bb4d6db4443acae49ef98f1f4398d973
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agotsync: tunnel mode do not set first vpts for stream mode [1/2]
shuanglong.wang [Fri, 19 Jul 2019 02:48:07 +0000 (10:48 +0800)]
tsync: tunnel mode do not set first vpts for stream mode [1/2]

PD#SWPL-11210

Problem:
stream mode set vpts in check in pts

Solution:
tunnel mode do not set first vpts for stream mode

Verify:
verify by u212

Change-Id: Ic369b83411051a819eb65ad5d1585e26e0342f3f
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
5 years agoemmc: run hs400 166M busmod on sm1 [1/1]
Ruixuan Li [Tue, 9 Jul 2019 08:51:49 +0000 (16:51 +0800)]
emmc: run hs400 166M busmod on sm1 [1/1]

PD#SWPL-10719

Problem:
hs400 200M not stable on sm1

Solution:
run hs400 166M busmod

Verify:
passed on sm1_ac200

Change-Id: I5e5f4db821e8360fdd3ccd6ce24df83446073cf2
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
5 years agohdmitx: update the phy setting for TM2 [2/2]
yicheng shen [Mon, 15 Jul 2019 06:53:07 +0000 (02:53 -0400)]
hdmitx: update the phy setting for TM2 [2/2]

PD#SWPL-10703

Problem:
HDMITX Eye Diagram of TM2 test fail

Solution:
Optimize the phy setting;

Verify:
TM2

Change-Id: Ib9f948aa85fe189754d7da002727309e7e32ca18
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
5 years agoMerge "clk: g12b: fix cpu hangup when reboot [1/1]" into amlogic-4.9-dev
Jianxin Pan [Mon, 22 Jul 2019 02:45:31 +0000 (19:45 -0700)]
Merge "clk: g12b: fix cpu hangup when reboot [1/1]" into amlogic-4.9-dev

5 years agoemmc: rescan cmd delay windows to set cmd delay [1/1]
Ruixuan Li [Wed, 12 Jun 2019 08:49:22 +0000 (16:49 +0800)]
emmc: rescan cmd delay windows to set cmd delay [1/1]

PD#SWPL-10095

Problem:
command delay may too close to the command edge

Solution:
rescan cmd delay windows and find cmd delay value
after data alignment

Verify:
passed on g12b

Change-Id: I258e93aa87e35c843c45f62c58af3609bebe0901
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
5 years agohdr: add hdmi hdr10+ support [1/1]
MingLiang Dong [Wed, 10 Jul 2019 13:29:37 +0000 (09:29 -0400)]
hdr: add hdmi hdr10+ support [1/1]

PD#SWPL-9850

Problem:
new feature, add hdmi hdr10+ support

Solution:
add hdmi hdr10+ support

Verify:
verify on TL1

Change-Id: I189d92d48dcce81ac8c9476d0c6f7b64a461a9e6
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
5 years agoclk: g12b: fix cpu hangup when reboot [1/1]
Jian Hu [Sun, 21 Jul 2019 04:57:38 +0000 (12:57 +0800)]
clk: g12b: fix cpu hangup when reboot [1/1]

PD#SWPL-11559

Problem:
it will hangup when reboot

Solution:
fix cpub clock parent name error

Verify:
test passed on g12b

Change-Id: I7c2732420d6040d8cb778c104f71f4397a1bb03a
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
5 years agosm1: add slt panel config support [1/1]
shaochan.liu [Wed, 22 May 2019 07:41:15 +0000 (15:41 +0800)]
sm1: add slt panel config support [1/1]

PD#SWPL-8442

Problem:
need slt panel config(mipi2hdmi 720p) on basic board

Solution:
add slt panel config(mipi2hdmi 720p) on basic board

Verify:
sm1

Change-Id: Ia634216a5f0bc96f9a4838a2f0ec983bef8d0a3b
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
5 years agovdin: add hdr10 pluse data in vframe [1/1]
Yong Qin [Mon, 1 Jul 2019 09:19:26 +0000 (17:19 +0800)]
vdin: add hdr10 pluse data in vframe [1/1]

PD#SWPL-9849

Problem:
add hdr10 pkt data into vframe structure

Solution:
according to hdmi rx hdr10p_on flag, copy hdr10p data
from hdmirx to vframe

Verify:
tl1

Change-Id: I4d3bcbcce4d1303a5e5d4cf57a7777e4fd1fd54c
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agodts: sm1: reduce the CMA reserved memory [1/1]
changqing.gao [Thu, 18 Jul 2019 06:17:21 +0000 (14:17 +0800)]
dts: sm1: reduce the CMA reserved memory [1/1]

PD#SWPL-11208

Problem:
system would auto reboot because of low free memory(Unmovable type)

Solution:
reduce the CMA reserved memory.
1.reduce ion_cma_reserved from 128MB to 48MB.(DDR size == 1G)
2.remove vdin0_cma_reserved which is not used for sm1.

Verify:
test passed on sm1

Change-Id: Ifdb31bd3451ad984305c5f08ba3b1be478c02cf4
Signed-off-by: changqing.gao <changqing.gao@amlogic.com>
5 years agohdmirx: add packet analysis of hdr10plus [1/1]
Lei Yang [Fri, 14 Jun 2019 09:32:27 +0000 (17:32 +0800)]
hdmirx: add packet analysis of hdr10plus [1/1]

PD#SWPL-9686

Problem:
hdmirx cannot support HDR10plus

Solution:
add packet analysis of hdr10plus.

Verify:
tm2_ab311.

Change-Id: Ic98c3fa57ce6da3262285febc587fb2cac2be0fa
Signed-off-by: Lei Yang <lei.yang@amlogic.com>
5 years agomcdi: keep g12a/g12b/sm1 reg_mcdi_qmeen same as gxlx2 [1/2]
Bencheng Jing [Wed, 17 Jul 2019 08:29:26 +0000 (16:29 +0800)]
mcdi: keep g12a/g12b/sm1 reg_mcdi_qmeen same as gxlx2 [1/2]

PD#SWPL-10411

Problem:
reg_mcdi_qmeen is enable by driver

Solution:
disable reg_mcdi_qmeen

Verify:
u212

Change-Id: I02887fab37a0bbeb43bfa83a4a5a2e446bebb9c1
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agovpp: fix afbc scope set when video reverse [1/1]
Pengcheng Chen [Thu, 18 Jul 2019 12:09:31 +0000 (20:09 +0800)]
vpp: fix afbc scope set when video reverse [1/1]

PD#SWPL-9397

Problem:
afbc scope set error when video reverse and afbc width not aligned

Solution:
fix afbc scope set when video reverse

Verify:
Verify on TL1-x301

Change-Id: I1631c18192f438bfb6e60c3970789a903d0a3d19
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agocec: during resume received OTP msg again [1/1]
Yong Qin [Thu, 11 Jul 2019 10:51:44 +0000 (18:51 +0800)]
cec: during resume received OTP msg again [1/1]

PD#TV-7837

Problem:
when tv power on by OTP, when during power on, tv received
OTP again, then needn't send power key. and need send a event
to android.

Solution:
when cec driver is power on, needn't send power event to android.

Verify:
tl1

Change-Id: I8807c5cbbcab831577fdc23062a78454c2106167
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agodrm: add sm1 support [1/1]
Dezhi Kong [Mon, 17 Jun 2019 11:39:59 +0000 (19:39 +0800)]
drm: add sm1 support [1/1]

PD#SWPL-8061

Problem:
SM1 support

Solution:
add sm1 support

Verify:
verify by ac200 with modetest command

Change-Id: Id79f227afa7f7dbcaad09887f8bdbd1f64b93c4a
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
5 years agoosd: fixed fb mmap failed on android [3/3]
Pengcheng Chen [Wed, 10 Jul 2019 09:25:10 +0000 (17:25 +0800)]
osd: fixed fb mmap failed on android [3/3]

PD#SWPL-6631

Problem:
dolby vision graphic tests need fb_test

Solution:
Alloc buffer when mmap

Verify:
verified on tm2 t96e2

Change-Id: I12896d7ef9ad4a8122e2784c4692ff2d0bc69d1b
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
5 years agovdin: for support dv ll mode [1/1]
Yong Qin [Mon, 8 Jul 2019 07:42:57 +0000 (15:42 +0800)]
vdin: for support dv ll mode [1/1]

PD#SWPL-2894

Problem:
vdin for support DV LL mode

Solution:
1.add dv 1.5 LL mode support
2.fix vdin mem dump method,only dump active zone
3.add support RGB and 12bit for dv LL mode
4.add vsi info param of dv LL mode
5.dolby vision LL 422 12bit mode,RX need to enable tunnel

Verify:
tl1

Change-Id: I4ddad1310bcc6d2f777bf7099ac26fe2db812b22
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agocec: none tv chip set arc cause crash [1/1]
Yong Qin [Fri, 12 Jul 2019 06:12:06 +0000 (14:12 +0800)]
cec: none tv chip set arc cause crash [1/1]

PD#OTT-5149

Problem:
ceca isr cost long time, and delayed vdin vs.

Solution:
move function to tasklet

Verify:
test on txlx customer platform.

Change-Id: Iaae5b682f858787b25527518d2f787c3ee73e1be
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agoTL1: dts: change dvfs table [1/1]
Sandy Luo [Mon, 15 Jul 2019 05:44:39 +0000 (13:44 +0800)]
TL1: dts: change dvfs table [1/1]

PD#SWPL-10848

Problem:
ARM vfp d8 error.

Solution:
Add DFVS voltage

Verify:
TL1 X301

Change-Id: I780daaa5326c99c80e246ce1a1797fb5ed13a518
Signed-off-by: Sandy Luo <sandy.luo@amlogic.com>
5 years agosupsend: clear wakeup reason after reusme. [1/1]
Hong Guo [Fri, 12 Jul 2019 09:21:07 +0000 (17:21 +0800)]
supsend: clear wakeup reason after reusme. [1/1]

PD#SWPL-11035

Problem:
clear wakeup reason after reusme.

Solution:
clear wakeup reason after reusme.

Verify:
test pass on t962x2-x301 ,g12b_400

Change-Id: I19360dbf1c7a1cf9460417b00c8af6ebc818beba
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
5 years agoosd: add osd blend bypass function for tm2 [2/3]
yao liu [Fri, 12 Jul 2019 09:33:50 +0000 (05:33 -0400)]
osd: add osd blend bypass function for tm2 [2/3]

PD#SWPL-6631

Problem:
dv certification need osd blend bypass

Solution:
add osd blend bypass function

Verify:
verified on tm2 t96e2

Change-Id: I91ba9c622aacc7bc9ad657105fd5e53a3cee595b
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agodolby: fix tm2 end-to-end test [1/3]
yao liu [Fri, 12 Jul 2019 09:27:54 +0000 (05:27 -0400)]
dolby: fix tm2 end-to-end test [1/3]

PD#SWPL-6631

Problem:
5213/5214/5217 480p graphic tests fail
due to g_vpotch is too small

Solution:
incread g_vpotch from 0x20 to 0x60 for resolution below 720p

Verify:
verified on tm2 t96e2

Change-Id: Iedeaaf485c9ffea703d344edd7ed4b5187e78f1f
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agodeinterlace: increasing protection for unreg [1/2]
Jihong Sui [Mon, 15 Jul 2019 05:50:45 +0000 (13:50 +0800)]
deinterlace: increasing protection for unreg [1/2]

PD#SWPL-10149

Problem:
random crash when stress test

Solution:
1. delete recycle keep buff when bypass;
2. adjusting judgment timing about pre_de_buf_config;

Verify:
TL1

Change-Id: I7b0716ce35234d2342cdc13fcf0d51211f579d13
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agoclk: sm1: fix cpu clock hangup [1/1]
Jian Hu [Fri, 12 Jul 2019 09:10:45 +0000 (17:10 +0800)]
clk: sm1: fix cpu clock hangup [1/1]

PD#SWPL-10033

Problem:
it will hangup when play video

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

Verify:
test passed on sm1

Change-Id: I1a21eb28d8af3d68a70c89c37fff857fb416c9a8
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
5 years agovdin: remove hardcode manual buffer cnt. [1/3]
sky zhou [Fri, 5 Jul 2019 08:37:36 +0000 (16:37 +0800)]
vdin: remove hardcode manual buffer cnt. [1/3]

PD#TV-7344

Problem:
current vdin1 use hardcode buffer cnt 4, it
is not good for user space program.

Solution:
Check passed buffer fd arry, so we can read variable
fd num.

Verify:
verified on macroni

Change-Id: I9bc07e45a3716423dc037a5d966c9b6b5eafcdfe
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
5 years agoosd: osd ext leaked buf when viu2 displaymode is NULL. [1/1]
sky zhou [Tue, 16 Jul 2019 10:05:16 +0000 (18:05 +0800)]
osd: osd ext leaked buf when viu2 displaymode is NULL. [1/1]

PD#TV-7713

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

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

Verify:
verified on macroni

Change-Id: Ib2df6b022b6fd654430eedae08e351ae53701fc1
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
5 years agodts: gpio keypad in u202 [1/2]
Gongwei Chen [Mon, 15 Jul 2019 07:35:54 +0000 (15:35 +0800)]
dts: gpio keypad in u202 [1/2]

PD#SWPL-11212

Problem:
The physical keys are not working

Solution:
add gpio keypad in u202

Verify:
Verify by Android P u202

Change-Id: I0c97d2ffd7f8712b4584c81b1b9007f45755ec7c
Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
5 years agodts: thermal: fix gpu pp get fail issue [1/1]
Huan Biao [Thu, 11 Jul 2019 03:33:53 +0000 (11:33 +0800)]
dts: thermal: fix gpu pp get fail issue [1/1]

PD#SWPL-11138

Problem:
gpufreq cooling device init get gpu pp fail

Solution:
get gpu pp from gpu dts

Verify:
verified on s905x p212

Change-Id: I0dfa8f6ff2a767432177301b32acdceb0f5e3462
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
5 years agokasan: close vmap if enabled kasan [1/1]
Tao Zeng [Mon, 15 Jul 2019 05:53:42 +0000 (13:53 +0800)]
kasan: close vmap if enabled kasan [1/1]

PD#SWPL-10141

Problem:
if opened kasan with vmap, there will be some wrong kasan reports

Solution:
close vmap if open kasan

Verify:
p212

Change-Id: I37cdcb26cfb6fe87529db1ece3b7740ac072ba1a
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
5 years agothermal: add s912 thermal support [1/2]
Huan Biao [Fri, 12 Jul 2019 09:27:01 +0000 (17:27 +0800)]
thermal: add s912 thermal support [1/2]

PD#SWPL-11152

Problem:
s912 thermal init fail

Solution:
fix thermal dts
fix thermal cpuid get issue

Verify:
verified on s912 q201

Change-Id: Id2802621c5c8d711bfcbc5684252ac0dd519900a
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
5 years agovdin: switch to ATV source,snowflake screen showing pink [1/1]
zhiwei.yuan [Wed, 10 Jul 2019 08:31:15 +0000 (16:31 +0800)]
vdin: switch to ATV source,snowflake screen showing pink [1/1]

PD#SWPL-11340

Problem:
matrix setting is wrong

Solution:
for snowflake brightness, only need coef0, disable coef1 & 2

Verify:
verified by t962x2_x301

Change-Id: Id248803541fbb68004ea61bd2aa7dfc57408e787
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agoir: fix allocation of memory without size check issue [1/1]
Qianggui Song [Thu, 27 Jun 2019 10:46:29 +0000 (18:46 +0800)]
ir: fix allocation of memory without size check issue [1/1]

PD#SWPL-11248

Problem:
When handling the set attribute IOCTL REMOTE_IOC_SET_KEY_NUMBER, the driver
does not limit the size of allocation with kzalloc.

Solution:
Limit the size of alllcation range, if given a value out of range, set
update flag to false and do nothing in kzalloc stage.

Verify:
W400

Change-Id: I6a4150f5615557c372738c918aad86120d149340
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
5 years agousb: dma-mapping: prevent writeback deadlock in CMA allocator [1/1]
Yue Wang [Tue, 16 Jul 2019 07:41:04 +0000 (15:41 +0800)]
usb: dma-mapping: prevent writeback deadlock in CMA allocator [1/1]

PD#SWPL-11362

Problem:
A deadlock happens when a task initiates a CMA allocation that triggers
a page migration *AND* the tasks holding the subsequent pages have to
writeback their pages using CMA allocations.

In such a situation, the task that has triggered the page migration
holds a mutex that prevents other tasks from migrating their pages using
that same CMA allocator. This leads to a deadlock.

Solution:
The CMA is incapable of honoring the NOIO flags in some scenario, thus
cannot be used for writeback. The fix allows the code that chooses which
allocator to use in the ARM platform to avoid the CMA case for that
scenario.

The ARM DMA layer checks for allow blocking flag (_GFP_BDEV) to decide
whether to go for CMA or not. That test is not sufficient to cover the
case of writeback (GFP_NOIO).

The fix consists in adding a gfp_allow_writeback helper that tests for
the __GFP_IO flag. Then, the DMA layer uses it to decide not to go for
CMA in case of writeback.

Verify:
TL1

Change-Id: I175eb94de588234d3de2dc7f65dafe980e2636af
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
5 years agoatv_demod: after afc adjusts freq and stable, sync to settings to get freq [1/1]
nengwen.chen [Wed, 3 Jul 2019 11:48:52 +0000 (19:48 +0800)]
atv_demod: after afc adjusts freq and stable, sync to settings to get freq [1/1]

PD#TV-7462

Problem:
after afc adjusts freq and stable, sync to settings to get freq.

Solution:
1.after afc adjusts freq and stable, sync to settings to get freq.

Verify:
Verified by x301

Change-Id: Id78a7f974345fd428f9bb185c36fcbe7b93f4ac2
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agodolby: fix 5008 crc error [1/1]
yao liu [Fri, 28 Jun 2019 02:07:23 +0000 (10:07 +0800)]
dolby: fix 5008 crc error [1/1]

PD#SWPL-10487

Problem:
1.tb39 new case 5008, dm version is 3,
core3 raw_metadata overflow
2.core3 raw_metadata 207 overwrite core3 clkgate_ctrl
and core3 swap_ctrl0 andsawp_ctrl1 reg.

Solution:
1.Increase raw_metadata size to 512
2.Force dv_mode to DOLBY_VISION_OUTPUT_MODE_IPT, output
ipt444 12bit for 5008.
3.Dont set core3 metadata reg when scramble disabled or
metedata size > 204

Verify:
verified on sm1

Change-Id: I459736eb42eb14fe3fe0dc054eb6693c88967741
Signed-off-by: yao liu <yao.liu@amlogic.com>
5 years agovdin: subtitle is disappear after hot_plug signal cable [1/1]
zhiwei.yuan [Mon, 15 Jul 2019 05:54:19 +0000 (13:54 +0800)]
vdin: subtitle is disappear after hot_plug signal cable [1/1]

PD#SWPL-11151

Problem:
signal format is null when start dec

Solution:
do not change signal format when signal is unstable

Verify:
verified by t962x2_x301

Change-Id: I14a9247e83c15aecac1939f3270f46642a6d3a22
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
5 years agoavsync: tsync: fix the avsync issue [1/3]
Xiaoming Sui [Sat, 29 Jun 2019 11:17:27 +0000 (19:17 +0800)]
avsync: tsync: fix the avsync issue [1/3]

PD#SWPL-8590

Problem:
inprove avsync accuracy when play

Solution:
1: calc the pts and pcr diff from the stream;
2: do the hold or drop audio data;
3: reclac the timestamp when paly;

Verify:
X301

Change-Id: I176bb2e19c1c538cfb9a8203d1303ee700a4927c
Signed-off-by: Xiaoming Sui <xiaoming.sui@amlogic.com>
5 years agotvafe: fix identify as PAL-DK when the input signal is SCAM DK [1/1]
Evoke Zhang [Mon, 17 Jun 2019 06:49:44 +0000 (14:49 +0800)]
tvafe: fix identify as PAL-DK when the input signal is SCAM DK [1/1]

PD#TV-7779

Problem:
identify as PAL-DK when the input signal is SECAM DK

Solution:
increase atv try_fmt max cnt to recognize SECAM

Verify:
x301

Change-Id: I306f2337b6b2c3d0b4ec2fc85e45f9f5993b754b
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agovlock: when quite vlock, restore pre pll value [1/1]
Yong Qin [Mon, 8 Jul 2019 06:19:04 +0000 (14:19 +0800)]
vlock: when quite vlock, restore pre pll value [1/1]

PD#TV-6743

Problem:
exit hdmi source, display many horizontal fine lines.
restore m/f value is wrong.

Solution:
when exit vlock, need restore m/f value from backup.

Verify:
T950X

Change-Id: If0d1b3758a19547675aa4bef920168c20ca83939
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agosched: change sleep api for __migration_entry_wait [1/1]
Tao Zeng [Mon, 8 Jul 2019 02:36:26 +0000 (10:36 +0800)]
sched: change sleep api for __migration_entry_wait [1/1]

PD#TV-7519

Problem:
schedule_timeout did not really make task sleep. It will cause
rt thread bug when this thread is waiting for a cma page migrated:
sched: RT throttling activated for rt_rq eaf671b8 (cpu 1)
potential CPU hogs:
        btu message loo (4253)
[<c037d5b8>] task_tick_rt+0x0/0x120
[<c037d914>] pick_next_task_rt+0x1cc/0x1e4
[<c0fa8534>] __schedule+0x598/0x91c
[<c0fa891c>] schedule+0x64/0xc4
[<c0fac134>] schedule_timeout+0x1dc/0x47c
[<c0493ba4>] __migration_entry_wait+0x168/0x194
               ~~~~~blocked here
[<c0493c20>] migration_entry_wait+0x50/0x54
[<c0473008>] do_swap_page+0x404/0x4e8
[<c047357c>] handle_mm_fault+0x1ec/0xa60
[<c031a2f0>] do_page_fault+0x2d4/0x3a8
[<c0301408>] do_PrefetchAbort+0x48/0xb0
[<c030f78c>] ret_from_exception+0x0/0x34

Solution:
using usleep_range instead of schedule_timeout

Verify:
t905x

Change-Id: I908022b747ad921b5863af377291abdf06672f15
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>