GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
6 years agoatv_demod: add xtal config for tuner [1/3]
nengwen.chen [Mon, 6 Aug 2018 11:04:10 +0000 (19:04 +0800)]
atv_demod: add xtal config for tuner [1/3]

PD#171245: add xtal config for tuner

Change-Id: Id682294ea1e0de265df56509fa5fc4480212f7a7
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agoext4: fix check to prevent initializing reserved inodes
Theodore Ts'o [Sat, 28 Jul 2018 12:12:04 +0000 (08:12 -0400)]
ext4: fix check to prevent initializing reserved inodes

Commit 8844618d8aa7: "ext4: only look at the bg_flags field if it is
valid" will complain if block group zero does not have the
EXT4_BG_INODE_ZEROED flag set.  Unfortunately, this is not correct,
since a freshly created file system has this flag cleared.  It gets
almost immediately after the file system is mounted read-write --- but
the following somewhat unlikely sequence will end up triggering a
false positive report of a corrupted file system:

   mkfs.ext4 /dev/vdc
   mount -o ro /dev/vdc /vdc
   mount -o remount,rw /dev/vdc

Instead, when initializing the inode table for block group zero, test
to make sure that itable_unused count is not too large, since that is
the case that will result in some or all of the reserved inodes
getting cleared.

This fixes the failures reported by Eric Whiteney when running
generic/230 and generic/231 in the the nojournal test case.

Change-Id: I3967036c1d84cc69798b7c948420735c623c9ae8
Fixes: 8844618d8aa7 ("ext4: only look at the bg_flags field if it is valid")
Reported-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
6 years agoboard: fix ioremap call fail issue
Ao Xu [Thu, 2 Aug 2018 07:42:02 +0000 (15:42 +0800)]
board: fix ioremap call fail issue

PD#169652: board: fix ioremap call fail issue

for arm 32, ioremap will check if page is mapped

Change-Id: Icb5dda1b9de06d32e47c82a6bc45b62873332487
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
6 years agoboard: fix stack overflow issue
Ao Xu [Wed, 1 Aug 2018 11:30:04 +0000 (19:30 +0800)]
board: fix stack overflow issue

PD#169652: board: fix stack overflow issue

it is better to use kmalloc to alloc buffer
instead of in stack buffer.

Change-Id: I6825d8acff19248f2f6c789ed2218af42ca4ffd3
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
6 years agowifi: fix broadcom pcie wifi driver use static buf failed
libo [Wed, 8 Aug 2018 04:51:48 +0000 (12:51 +0800)]
wifi: fix broadcom pcie wifi driver use static buf failed

PD#171351: fix broadcom pcie wifi driver use static buf failed

Change-Id: I1ce8f0d96b1e2ecd5bbd5b3f9ac805c433d548a2
Signed-off-by: libo <bo.li@amlogic.com>
6 years agodvb-core: recover dvb-core support dtmb in dvb v3 [1/1]
nengwen.chen [Wed, 8 Aug 2018 07:10:48 +0000 (15:10 +0800)]
dvb-core: recover dvb-core support dtmb in dvb v3 [1/1]

PD#170409: dvb-core: recover dvb-core support dtmb in dvb v3

Change-Id: I31c1ed779a92f3b7c19a1053eaf739d531a3b31e
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agocec: add port info for mix mode
Yong Qin [Fri, 3 Aug 2018 01:02:00 +0000 (09:02 +0800)]
cec: add port info for mix mode

PD#170794: cec: add port info for mix mode

1.add port info for output and input mix mode
2.port number= input number + output number
3.r321 dts add 1 output number for mix mode

Change-Id: I17692f5fb4526b4f95474f5ea36c11213034724f
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
6 years agohdmitx: hdmitx: add debug info
Kaifu Hu [Fri, 3 Aug 2018 07:55:47 +0000 (15:55 +0800)]
hdmitx: hdmitx: add debug info

PD#170492: hdmitx: add debug info

1. add avi package info.
   ->echo avi_info > /sys/class/amhdmitx/amhdmitx0/debug
2. add vsif package info.
   ->echo dv_info > /sys/class/amhdmitx/amhdmitx0/debug
3. add drm package info.
   ->echo hdr_info > /sys/class/amhdmitx/amhdmitx0/debug
4. add audio info frame info.
   ->echo aud_info > /sys/class/amhdmitx/amhdmitx0/debug
5. add audio acr info.
   ->echo acr_info > /sys/class/amhdmitx/amhdmitx0/debug
6. add audio sample.
   ->echo aud_sample > /sys/class/amhdmitx/amhdmitx0/debug
7. add audio channel status.
   ->echo aud_chls > /sys/class/amhdmitx/amhdmitx0/debug
8. add audio info in sysfs config.
   ->cat /sys/class/amhdmitx/amhdmitx0/config
9. add gcp package.
   -> echo gcp_info > /sys/class/amhdmitx/amhdmitx0/debug

Change-Id: If8e566a18edead21d659ce20e77c475d83287887
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
6 years agoBACKPORT:dma-buf/fence: Fix lock inversion within dma-fence-array
Chris Wilson [Tue, 14 Nov 2017 16:27:19 +0000 (16:27 +0000)]
BACKPORT:dma-buf/fence: Fix lock inversion within dma-fence-array

Ages ago Rob Clark noted,

"Currently with fence-array, we have a potential deadlock situation.  If
we fence_add_callback() on an array-fence, the array-fence's lock is
acquired first, and in it's ->enable_signaling() callback, it will install
cbs on it's array-member fences, so the array-member's lock is acquired
second.

But in the signal path, the array-member's lock is acquired first, and
the array-fence's lock acquired second."

Rob proposed either extensive changes to dma-fence to unnest the
fence-array signaling, or to defer the signaling onto a workqueue. This
is a more refined version of the later, that should keep the latency
of the fence signaling to a minimum by using an irq-work, which is
executed asap.

Reported-by: Rob Clark <robdclark@gmail.com>
Suggested-by: Rob Clark <robdclark@gmail.com>
References: 1476635975-21981-1-git-send-email-robdclark@gmail.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114162719.30958-1-chris@chris-wilson.co.uk
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
Change-Id: Ia08cb17615ff15b18c208cff2000d92344c9f399

6 years agoBACKPORT: dma-buf/sync_file: Allow multiple sync_files to wrap a single dma-fence
Chris Wilson [Fri, 28 Jul 2017 21:29:51 +0000 (22:29 +0100)]
BACKPORT: dma-buf/sync_file: Allow multiple sync_files to wrap a single dma-fence

Up until recently sync_file were create to export a single dma-fence to
userspace, and so we could canabalise a bit insie dma-fence to mark
whether or not we had enable polling for the sync_file itself. However,
with the advent of syncobj, we do allow userspace to create multiple
sync_files for a single dma-fence. (Similarly, that the sw-sync
validation framework also started returning multiple sync-files wrapping
a single dma-fence for a syncpt also triggering the problem.)

This patch reverts my suggestion in commit e24165537312
("dma-buf/sync_file: only enable fence signalling on poll()") to use a
single bit in the shared dma-fence and restores the sync_file->flags for
tracking the bits individually.

Reported-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Fixes: f1e8c67123cf ("dma-buf/sw-sync: Use an rbtree to sort fences in the timeline")
Fixes: e9083420bbac ("drm: introduce sync objects (v4)")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170728212951.7818-1-chris@chris-wilson.co.uk
[astrachan: rediffed against changed context lines in 4.9]
Bug: 79383895
PD#170298 [1/3]
Change-Id: I70d1f19796c6cb33cd4c19e40276d7298aa4ba5d
Signed-off-by: Alistair Strachan <astrachan@google.com>
6 years agovideo: support hdr new interface [3/4]
Yao.Liu [Fri, 13 Jul 2018 11:07:34 +0000 (19:07 +0800)]
video: support hdr new interface [3/4]

PD#170058: support hdr new interface

Change-Id: I45368f3651781078edbc4d86e5c2bb12afb53a7f
Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
6 years agodts: update the gpio key node for atom and sei210
Yingyuan Zhu [Tue, 7 Aug 2018 06:07:39 +0000 (14:07 +0800)]
dts: update the gpio key node for atom and sei210

PD#170502: dts: update the gpio key node for atom and sei210

Change-Id: Ib92167c36c2a756a784494da5dbe73a13c63dff0
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
6 years agoRevert "BACKPORT: dma-buf/sync_file: Allow multiple sync_files to wrap a single dma...
Victor Wan [Tue, 7 Aug 2018 06:45:33 +0000 (14:45 +0800)]
Revert "BACKPORT: dma-buf/sync_file: Allow multiple sync_files to wrap a single dma-fence"

This reverts commit 74fa0af47306baf118b32b7acdba4ae98eda7a7d.

The commit 74fa0af caused GPU driver loading failed.

Change-Id: I255eb6b7a26e3b00e4f11489ece49896ff004d79

6 years agoMerge branch 'android-4.9' into amlogic-4.9-dev
Victor Wan [Tue, 7 Aug 2018 06:43:24 +0000 (14:43 +0800)]
Merge branch 'android-4.9' into amlogic-4.9-dev

Signed-off-by: Victor Wan <victor.wan@amlogic.com>
 Conflicts:
drivers/md/dm-bufio.c
drivers/media/dvb-core/dvb_frontend.c
drivers/usb/dwc3/core.c
drivers/usb/gadget/function/f_fs.c

6 years agodts: add dtsi for system as root [1/9]
Xindong Xu [Mon, 9 Jul 2018 05:49:38 +0000 (13:49 +0800)]
dts: add dtsi for system as root [1/9]

PD#170278: dts: add dtsi for system as root

Change-Id: Ie2eda798ac17425ddaf73d90bc04a3d9fdb74ade
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
6 years agomtd: spifc: add spifc support for txl
Yi Zeng [Thu, 2 Aug 2018 06:22:04 +0000 (14:22 +0800)]
mtd: spifc: add spifc support for txl

PD#171041: mtd: spifc: add spifc support for txl

Change-Id: I487161c6e85e3b232ed0c3891784b5a37f6d878c
Signed-off-by: Yi Zeng <yi.zeng@amlogic.com>
6 years agoamvecm: dnlp coverity fix
MingLiang Dong [Mon, 6 Aug 2018 03:30:52 +0000 (11:30 +0800)]
amvecm: dnlp coverity fix

PD#171026: amvecm: dnlp coverity fix

1. fix dnlp coverity
2. add kernel auto make dnlp_alg.ko

Change-Id: Idafc02e95655a9970ad778820b33c044e87bb767
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
6 years agodts:txlx_t962x_r311_720p: fix commit error[1/1]
Lei Qian [Mon, 6 Aug 2018 13:35:20 +0000 (21:35 +0800)]
dts:txlx_t962x_r311_720p: fix commit error[1/1]

PD#170749:dts:txlx_t962x_r311_720p: fix commit error

Change-Id: Ie2f8398fab203e752657d54c77ac5ffbe56abebc
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
6 years agodts:txl:sync fb config with txlx
Lei Qian [Sat, 4 Aug 2018 06:53:40 +0000 (14:53 +0800)]
dts:txl:sync fb config with txlx

PD#171168:dts:txl:sync fb config with txlx

Change-Id: I17f2521c5c571258c249ed042dc2978ebb21a5f9
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
6 years agocec: proble cec fail
Yong Qin [Mon, 6 Aug 2018 09:14:41 +0000 (17:14 +0800)]
cec: proble cec fail

PD#171266: cec: proble cec fail on sei 210 board

Change-Id: If45588072a6d700e0b90be4778cb73eed1deeb34
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
6 years agodi: optimize di pre mif config
Dezhi Kong [Wed, 1 Aug 2018 08:31:50 +0000 (16:31 +0800)]
di: optimize di pre mif config

PD#170980: di: optimize di pre mif config

1.add protect for di pre reset
2.add pre de done check when unreg
3.merge afbc hold line from alishan code
4.optimize pre mif enable sequence

Change-Id: I18851ad644aaee7c6c1d76c69f41a91f9599a36d
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
6 years agoclk: fix txl crash issue
Lei Qian [Mon, 6 Aug 2018 05:10:55 +0000 (13:10 +0800)]
clk: fix txl crash issue

PD#169833: clk: fix txl crash issue

Revert "clk: fix 32bit system compatibility issue"

This reverts commit e39e646127c08cc462cf5ecffbe34f0be630fd43.

Change-Id: I6c7af24e60a46bb386d64b794dd76fb2ec5db354
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
6 years agounifykey: add secure node
jiamin ma [Fri, 22 Jun 2018 11:04:40 +0000 (19:04 +0800)]
unifykey: add secure node

PD#168660: secure hdcp1.4 key

echo key_name > name
cat secure
to query whether a key is secure

Change-Id: If416fc8f2946176ecc956b73f1c9e77a55f7e57b
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
6 years agocec: add the port info and connect status for audio system
hongmin hua [Thu, 2 Aug 2018 12:33:23 +0000 (20:33 +0800)]
cec: add the port info and connect status for audio system

PD#170794: cec: add the port info and connect status for audio system

Change-Id: I433788d4f5fcbb3164f894ebc0f6827dd47b0633
Signed-off-by: hongmin hua <hongmin.hua@amlogic.com>
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
6 years agohdmirx: add lock for top sw reset & edid size protect [1/2]
hongmin hua [Tue, 5 Jun 2018 13:06:00 +0000 (21:06 +0800)]
hdmirx: add lock for top sw reset & edid size protect [1/2]

PD#170713: hdmirx: add lock for top sw reset & edid size protect

Change-Id: I97502324d01d2e99d3a30bb1829affef5d2c123b
Signed-off-by: hongmin hua <hongmin.hua@amlogic.com>
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
6 years agoamvecm: packet dnlp algorithm
MingLiang Dong [Wed, 1 Aug 2018 11:54:44 +0000 (19:54 +0800)]
amvecm: packet dnlp algorithm

PD#171026: amvecm: packet dnlp algorithm

Change-Id: I29dec857c1ca2eed47fd27f6cb3ec986daeaab6a
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
6 years agomm: decrease DEFAULT_TVP_SIZE_FOR_4K and reserved-memory
Wencai You [Fri, 18 May 2018 14:36:23 +0000 (22:36 +0800)]
mm: decrease DEFAULT_TVP_SIZE_FOR_4K and reserved-memory

PD#166821: decrease DEFAULT_TVP_SIZE_FOR_4K and reserved-memory

DEFAULT_TVP_SIZE_FOR_4K to 192M
codec_mm_cma to 208M
ion_reserved to 78M

Change-Id: I2fd38f40c242ef531f8cf2226822bed4b0250a4f
Signed-off-by: Wencai You <wencai.you@amlogic.com>
6 years agoaudio: fix adc3101 8ch PCM format support
Renjun Xu [Fri, 3 Aug 2018 05:54:52 +0000 (13:54 +0800)]
audio: fix adc3101 8ch PCM format support

PD#171085: fix adc3101 8ch PCM format support

For S400 & S420 board, please modify dts to enable adc3101 8ch PCM
please read following file:
Documentation/devicetree/bindings/amlogic/axg-adc3010-pcm.txt

Change-Id: I945441f80d269b167148ccf3d6c33093a20a4f2f
Signed-off-by: Renjun Xu <renjun.xu@amlogic.com>
6 years agoclk: fix 32bit system compatibility issue
Shunzhou Jiang [Fri, 6 Jul 2018 05:02:34 +0000 (13:02 +0800)]
clk: fix 32bit system compatibility issue

PD#169833: clk: fix 32bit system compatibility issue

Change-Id: I4033611ab0863448deb66d7ec1d06e645919fdc6
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
6 years agovdin: add vdin output color depth selection from dts
xuhua zhang [Fri, 27 Jul 2018 09:09:48 +0000 (17:09 +0800)]
vdin: add vdin output color depth selection from dts

PD#170749: vdin: add vdin output color depth selection

when vdin receive 4K && 50/60hz && 10bit data,
we can select vdin output color depth 8bit or 10bit from dts

Change-Id: I9c030b4769927dbf53880fad6c80707d7b282e86
Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com>
6 years agoarm64: dts: txl: add decoder support
Conglin Guo [Thu, 26 Jul 2018 10:53:21 +0000 (18:53 +0800)]
arm64: dts: txl: add decoder support

PD#170321: arm64: dts: txl: add decoder support

add ionvideo devicetree node

Change-Id: I5b628d86a64ff7920546e8122895cc048d8fc039
Signed-off-by: Conglin Guo <conglin.guo@amlogic.com>
6 years agodeinterlace: txl: fix di abnormal when inverted screen
Jihong Sui [Fri, 3 Aug 2018 06:20:28 +0000 (14:20 +0800)]
deinterlace: txl: fix di abnormal when inverted screen

PD#170301: txl: fix di abnormal when inverted screen

Change-Id: I2777e0092413115da5f4fdd4975c721c3f086ee3
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
6 years agobacklight: ldim: algorithms clear up
Evoke Zhang [Fri, 27 Jul 2018 12:08:19 +0000 (20:08 +0800)]
backlight: ldim: algorithms clear up

PD#170815: backlight: ldim: algorithms clear up

Change-Id: Ic6fc691dc67478ae4af6fc842427a839acf9d381
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
6 years agotvin: tvafe: fix black side on atv snow
Nian Jing [Tue, 10 Jul 2018 06:52:02 +0000 (14:52 +0800)]
tvin: tvafe: fix black side on atv snow

PD#168366: tvin: tvafe: fix black side on atv snow

Change-Id: I3e40ff3d6e9dbee5ba4db4f720ae3c2d7aebc690
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
6 years agoatv_demod: modify atv audio for txl [1/1]
nengwen.chen [Wed, 1 Aug 2018 05:32:43 +0000 (13:32 +0800)]
atv_demod: modify atv audio for txl [1/1]

PD#170705: modify atv audio for txl

1.txl non supprot audio decode.

Change-Id: I535354b03b40b8189c050358f96a73e44fc89399
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agodeinterlace: txl: add patch for hdmi progressive input
Jihong Sui [Fri, 27 Jul 2018 03:00:14 +0000 (11:00 +0800)]
deinterlace: txl: add patch for hdmi progressive input

PD#170301: deinterlace: txl: add patch for hdmi progressive input

Change-Id: I12a534d8aa545cfc2c8d5cfb0b9ab763da58d015
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
6 years agothermal: add thermal meson cooldev point check
Huan Biao [Thu, 2 Aug 2018 07:07:46 +0000 (15:07 +0800)]
thermal: add thermal meson cooldev point check

PD#170391: thermal: add thermal meson cooldev point check.

Change-Id: I9aa705a764399670583cb51e0dc8b743ec80fd54
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
6 years agodts: txl: add cpu-idle-states nodes to str fun[1/1]
Yan Wang [Wed, 1 Aug 2018 03:12:22 +0000 (11:12 +0800)]
dts: txl: add cpu-idle-states nodes to str fun[1/1]

PD#170812: gxbb_pm: get system suspend level fail,
need to add cpu-idle-states nodes

Change-Id: I38128bcc6ef84cb1af0dbba556e65d47928182a1
Signed-off-by: yuehu mi <yuehu.mi@amlogic.com>
6 years agoMerge "audio: fail to play DD and DTS files" into amlogic-4.9-dev
Yixun Lan [Thu, 2 Aug 2018 09:39:57 +0000 (02:39 -0700)]
Merge "audio: fail to play DD and DTS files" into amlogic-4.9-dev

6 years agodts: decrease the codec mm size for u200
can.cao [Wed, 18 Jul 2018 05:03:02 +0000 (13:03 +0800)]
dts: decrease the codec mm size for u200

PD#170726: Modify reserved code_mm size value

Change-Id: Id5454f7759ca05dd3e1705cefce9ddd1eb6611ab
Signed-off-by: can.cao <can.cao@amlogic.com>
6 years agoaudio: fail to play DD and DTS files
weijia.zhu [Mon, 30 Jul 2018 10:36:32 +0000 (06:36 -0400)]
audio: fail to play DD and DTS files

PD#170383: add audio_data in p321.dts

Change-Id: I0763daf316821ceed179205e7adbd7b89e5a2185
Signed-off-by: weijia.zhu <weijia.zhu@amlogic.com>
6 years agoarm64: dts: add atom & Beast project [1/1]
Xindong Xu [Tue, 24 Jul 2018 01:45:31 +0000 (09:45 +0800)]
arm64: dts: add atom & Beast project [1/1]

PD#170502: add atom & Beast project

Change-Id: I50da79dbb660372528c5abcdf5da4bb13773bf6c
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
6 years agodts: keypad: fix u200 dtb compile error
Yixun Lan [Thu, 2 Aug 2018 08:17:24 +0000 (16:17 +0800)]
dts: keypad: fix u200 dtb compile error

PD#169209: dts: keypad: fix u200 dtb compile error

Change-Id: Id4956084ae3ee0910860a830d65cfdecb07fbb32
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
6 years agoosd: debug for osd suspend fail issue
zhilei.wu [Fri, 13 Jul 2018 05:33:15 +0000 (13:33 +0800)]
osd: debug for osd suspend fail issue

PD#164508: osd: debug for osd suspend fail issue

Change-Id: Ibd7930c64d102bbe53e1775fa4f52aab0c67d078
Signed-off-by: zhilei.wu <zhilei.wu@amlogic.com>
6 years agokeypad: gpio key drive optimization
Yingyuan Zhu [Thu, 28 Jun 2018 07:54:02 +0000 (15:54 +0800)]
keypad: gpio key drive optimization

PD#169209: keypad: gpio key drive optimization

1.replace the old interface gpio_ with gpiod_.
2.add irq detection mode,can be configured as
 interrupt mode or polling mode through DTS.
3.add keys to eliminate jitter.
4.remove useless code.

Change-Id: I81ef3cd0061e36faa10f58932588ff5031208b25
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
6 years agoCPUFREQ: modify cpufreq driver.
Hong Guo [Tue, 31 Jul 2018 06:45:00 +0000 (14:45 +0800)]
CPUFREQ: modify cpufreq driver.

PD#170037: modify cpufreq driver.

Change-Id: Ic07e887dda26447653c407d06b009755aacc0d41
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
6 years agousb: dwc2: modify SOF interrupt
Jianxin Qin [Wed, 25 Jul 2018 05:43:26 +0000 (13:43 +0800)]
usb: dwc2: modify SOF interrupt

PD#170407: usb: dwc2: modify SOF interrupt

SOF interrupt leads to the system overloading, so we reduce the
workload in the SOF interrupt handler.

Change-Id: I6bf11e672e0f024ac4b2da1ba47effe1da1ab476
Signed-off-by: Jianxin Qin <jianxin.qin@amlogic.com>
6 years agoboard: solve 32bit printk type error
Ao Xu [Wed, 1 Aug 2018 08:48:16 +0000 (16:48 +0800)]
board: solve 32bit printk type error

PD#169652: board: solve 32bit printk type error

for some data type, printk should follow below rule:
size_t: %zu or %zx
phys_addr_t: %pa

Change-Id: I456bd2f010080e6365b521a787367cc51bb4e9f4
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
6 years agoinput: avin_detect: add avin detect driver
Xingyu Chen [Mon, 30 Jul 2018 07:29:03 +0000 (15:29 +0800)]
input: avin_detect: add avin detect driver

PD#170716: input: avin_detect: add avin detect driver

porting from the Linux-3.14

Change-Id: Id0566a62be7d587ca6368b3d29f3887bab1f6d87
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
6 years agoatv_demod: modify afc to prevent demod error locking [1/1]
nengwen.chen [Mon, 30 Jul 2018 08:35:18 +0000 (16:35 +0800)]
atv_demod: modify afc to prevent demod error locking [1/1]

PD#169984: modify afc to prevent demod error locking

Change-Id: I02d184309fdeb5696da6158e0f29311cdc7675a5
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agohdmirx: keep bandgap enabled to fix bibi sound issue
yicheng shen [Mon, 30 Jul 2018 05:50:20 +0000 (13:50 +0800)]
hdmirx: keep bandgap enabled to fix bibi sound issue

PD#170722: hdmirx: keep bandgap enabled to fix bibi sound issue

Change-Id: I55e6cb9084ea93f5bf4accf1cffc04d873cb7c0e
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
6 years agobacklight: optimize pwm level step calculation
Evoke Zhang [Fri, 15 Jun 2018 09:23:24 +0000 (17:23 +0800)]
backlight: optimize pwm level step calculation

PD#168569: backlight: optimize pwm level step calculation

Change-Id: I570c12cc44af399a861ca54ad98180314924c180
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
6 years agopower: battery add dummy battery driver [1/1]
Shuide Chen [Thu, 21 Jun 2018 01:56:02 +0000 (09:56 +0800)]
power: battery add dummy battery driver [1/1]

PD#169027: add dummy battery and charger for CTS/VTS

some CTS and VTS testcases use the battery information, here
implement a dummy battery for it.
for P, it requires a dummy charger to set the online property to 1.

Change-Id: I7cf516f7050b3930cfdd933dc65b811289f89c4f
Signed-off-by: Shuide Chen <shuide.chen@amlogic.com>
6 years agodts: bingup for u212 [2/3]
Shuide Chen [Tue, 31 Jul 2018 00:19:07 +0000 (08:19 +0800)]
dts: bingup for u212 [2/3]

PD#170940: dts for u212, change codec cma to 196M

add dts for u212

Change-Id: I9d3f20d9c8e3a8a60a67d28d85bdfdfa7d4932b7
Signed-off-by: Shuide Chen <shuide.chen@amlogic.com>
6 years agocec: add debug cmd interface
Yong Qin [Tue, 24 Jul 2018 05:55:25 +0000 (13:55 +0800)]
cec: add debug cmd interface

PD#170470: cec: add debug cmd interface

1.enable cec error_initator interrupt
2.add debug cmd interfacec
 1)dump info
 2)register read write
 3)bypass hal cmd
3.boot reson ioctrl add mutex unlock

Change-Id: I340e4d363a46890001ff0494744cd9ec2fb28ea3
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
6 years agodi: fix pre mif reset issue for g12a
Dezhi Kong [Tue, 31 Jul 2018 08:45:46 +0000 (16:45 +0800)]
di: fix pre mif reset issue for g12a

PD#169426: di: fix pre mif reset issue for g12a

Change-Id: I851ef6ff9a1ac844afd32bc40e73c4a189a47b6f
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
6 years agotvafe: fix avin unstable issue
Nian Jing [Mon, 30 Jul 2018 13:08:30 +0000 (21:08 +0800)]
tvafe: fix avin unstable issue

PD#170316: fix avin unstable issue

Change-Id: Id229eff1e996399251cf2d3c93c3d4b2561f8451
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
6 years agounifykey: switch init order of unifykey and securitykey
jiamin ma [Tue, 31 Jul 2018 10:11:54 +0000 (18:11 +0800)]
unifykey: switch init order of unifykey and securitykey

PD#170850: unifykey: wrong unifykey driver init status

  The linux driver init order depends on init func level and
position in Makefile. Securitykey and unifykey are both
necessary for unifykey driver to work normal. Currently
securitykey is always initialized before unifykey, and the
unifykey init status checking API only checkes whether the
probe process of unifykey is done.So there is a chance when
LCD driver get unifykey probing process done status, while
securitykey is still under probing, which means unifykey
still cannot work normal
  We should switch the init order of these two module to
solve this issue

Change-Id: I8c4471d3689cff4356645fdc45df735be625baa2
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>
6 years agothermal: fix big core smp fail to cooldev crash
Huan Biao [Mon, 30 Jul 2018 05:58:04 +0000 (13:58 +0800)]
thermal: fix big core smp fail to cooldev crash

PD#170391:thermal: fix big core smp fail to cooldev crash
big core smp fail, cooldev driver cannot get
cpu2 cpufreq policy, driver init fail, gpu cooldev
data not init, mail ko init fail crash.

Change-Id: I705240b060d80f7afe97fe4dcb20bb2beebc2e13
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
6 years agohdmitx: forward partial EDID data to upstream [2/2]
Zongdong Jiao [Mon, 30 Jul 2018 06:58:50 +0000 (02:58 -0400)]
hdmitx: forward partial EDID data to upstream [2/2]

PD#170713: hdmitx: forward partial EDID data to upstream

TXLX have both HDMITX and HDMIRX. We need forward nessary downstream
information to upstream.

Change-Id: Ie129415b49ceeba2f326d1e500323d39c3a8ba12
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
6 years agodefconfig: disable ext2 support
Hanjie Lin [Thu, 19 Jul 2018 09:20:59 +0000 (17:20 +0800)]
defconfig: disable ext2 support

PD#167122: defconfig: ext2 cause ltp test fail

now amlogic ext2 has disabled xattr feature
it cause ltp test fail
so disable ext2

Change-Id: I26876366bf4efecf2a3002ba36751bec31286ea9
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
6 years agoclk: clock: Fix PCIE100M clock output some corner chip swing small issue
Shunzhou Jiang [Wed, 25 Jul 2018 08:42:42 +0000 (16:42 +0800)]
clk: clock: Fix PCIE100M clock output some corner chip swing small issue

PD#170610: clock: Fix PCIE100M clock output

Change-Id: I8ada918f6910b537374115260ebaea7a4489e9d6
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
6 years agocec: g12b: modify the reg definition
hongmin hua [Mon, 30 Jul 2018 08:55:04 +0000 (16:55 +0800)]
cec: g12b: modify the reg definition

PD#170760: cec: g12b: modify the reg definition

Change-Id: I01cdbb5584c5af3b23b8a1bd18c00bfadf5c8aa2
Signed-off-by: hongmin hua <hongmin.hua@amlogic.com>
6 years agobacklight: ldim: add custome bl region num support for iw7027
Evoke Zhang [Tue, 24 Jul 2018 03:17:55 +0000 (11:17 +0800)]
backlight: ldim: add custome bl region num support for iw7027

PD#170488: ldim: add custome bl region num support for iw7027

Change-Id: If57cc7dd77f6143ce6c904716750c3edbfcbd546
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
6 years agoatv_demod: improve the nicam and a2 [1/6]
nengwen.chen [Thu, 26 Jul 2018 08:10:38 +0000 (16:10 +0800)]
atv_demod: improve the nicam and a2 [1/6]

PD#169518: improve the nicam and a2

Change-Id: I91b48aea877ada0b733f4fe735fb8a2ab0f53163
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agohdmirx: mute audio when unsupport format received
yicheng shen [Mon, 23 Jul 2018 11:05:22 +0000 (19:05 +0800)]
hdmirx: mute audio when unsupport format received

PD#170497: hdmirx: mute audio when unsupport format received

Change-Id: Id849c725b88d1d80328f3ef6b76ba09248d5b9b8
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
6 years agohdmirx: edid mix add hdr block
hongmin hua [Wed, 11 Jul 2018 02:42:14 +0000 (10:42 +0800)]
hdmirx: edid mix add hdr block

PD#169888: hdmirx: edid mix add hdr block

Change-Id: I0a280abbd37295abc8ba8dc61ee91ee888b6e2e5
Signed-off-by: hongmin hua <hongmin.hua@amlogic.com>
6 years agohdmitx: forward hdr block data to rprx [1/1]
Zongdong Jiao [Tue, 3 Jul 2018 06:09:10 +0000 (14:09 +0800)]
hdmitx: forward hdr block data to rprx [1/1]

PD#168875: hdmitx: forward hdr block data to rprx
Under repeater mode, need forward hdr block data to rprx.

Change-Id: Ib57dc4071f621e620a88cdf24340194cca1f8b24
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
6 years agoarm64: dts: txl: audio: re-map spk and dac mask
Xing Wang [Thu, 26 Jul 2018 07:51:37 +0000 (15:51 +0800)]
arm64: dts: txl: audio: re-map spk and dac mask

PD#170319: arm64: dts: txl: audio: re-map spk and dac mask

Change-Id: I47da64823dfa90460abf2327cd2e628320ef8ab1
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
6 years agoatv_demod: modify tuner config in dts [1/3]
nengwen.chen [Tue, 24 Jul 2018 13:02:12 +0000 (21:02 +0800)]
atv_demod: modify tuner config in dts [1/3]

PD#170567: modify tuner config in dts

Change-Id: Ibd14a6d334f097b1df243bfdfb9e22cad5b80e93
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agolcd: mute: wait vsync for display shadow [2/2]
Evoke Zhang [Wed, 18 Jul 2018 11:58:35 +0000 (19:58 +0800)]
lcd: mute: wait vsync for display shadow [2/2]

PD#170101: lcd: mute: wait vsync for display shadow

Change-Id: If17838c40d46fd6f4b943d313456738fec50185a
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
6 years agolcd: lcd_extern: increase init_on table size support to 3000 [2/2]
Evoke Zhang [Mon, 23 Jul 2018 09:59:55 +0000 (17:59 +0800)]
lcd: lcd_extern: increase init_on table size support to 3000 [2/2]

PD#170356: lcd_extern: increase init_on table size support to 3000

Change-Id: Ic37f918553436fe40c0afc5b307c54d9b07febba
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
6 years agodts:txl:optimize ion memory usage [2/2]
Lei Qian [Thu, 26 Jul 2018 03:41:15 +0000 (11:41 +0800)]
dts:txl:optimize ion memory usage [2/2]

PD#170336:dts:txl: optimize ion memory usage

Change-Id: I8eb3cbf60ceeba959dbb74b51912947c9880ceb4
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
6 years agoemmc: g12a: optimize sd_uart for revA.
Nan Li [Tue, 24 Jul 2018 05:30:13 +0000 (13:30 +0800)]
emmc: g12a: optimize sd_uart for revA.

PD#170542: optimize sd_uart dts /sd1 for g12a revA.

Change-Id: I35bbb52790a1a11cc1d95d02c6cda717f43c9f75
Signed-off-by: Nan Li <nan.li@amlogic.com>
6 years agoaudio: auge: fix S/PDIF reset
Xing Wang [Fri, 20 Jul 2018 02:37:50 +0000 (10:37 +0800)]
audio: auge: fix S/PDIF reset

PD#170264: audio: auge: fix S/PDIF reset

Change-Id: I515319feb04b6c97850d218a5786990980054c51
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
6 years agodemod: prevent the agc pin conflict when used in atv or dtv demod [1/3]
nengwen.chen [Tue, 24 Jul 2018 06:20:03 +0000 (14:20 +0800)]
demod: prevent the agc pin conflict when used in atv or dtv demod [1/3]

PD#170409: prevent the agc pin conflict when used in atv or dtv demod

Change-Id: I78359502a97d79a703e990669bd1acddae6679ce
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agomedia: ptsserv: set pts_us64 in pts_lookup_offset
rongrong zhou [Fri, 20 Jul 2018 06:11:16 +0000 (14:11 +0800)]
media: ptsserv: set pts_us64 in pts_lookup_offset

PD#170127: media: ptsserv: set pts_us64 in pts_lookup_offset

Setiting pts_us64 prevents the decoder from using uninitialized values,
Sometimes the function return pts valid only if pts is set.

Change-Id: If4b0a329bbc013902fd2045207420f0f85bfff4e
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
6 years agocec: modify the line check for g12a
hongmin hua [Mon, 16 Jul 2018 06:15:50 +0000 (14:15 +0800)]
cec: modify the line check for g12a

PD#168682: cec: modify the line check for g12a

Change-Id: Id7f318caae3230df9bd6689f566524e05fd512bd
Signed-off-by: hongmin hua <hongmin.hua@amlogic.com>
6 years agonet: xfrm: enable compat xfrm syscall
Yixun Lan [Fri, 13 Jul 2018 08:20:13 +0000 (16:20 +0800)]
net: xfrm: enable compat xfrm syscall

PD#170491: net: xfrm: enable compat xfrm syscall

When using 32bit user space and 64bit kernel in ARM64 platform,
we do not need to disable compat syscall, since there is struct size
difference between user space and kernel space.

This will fix error in xfrm test cases of VtsKernelNetTest.

Change-Id: Ifd6c1f5e678138286678d5c119c0efa42d5b3a59
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
6 years agodts: Add low memory config for u200 [1/2]
can.cao [Tue, 17 Jul 2018 07:48:12 +0000 (15:48 +0800)]
dts: Add low memory config for u200 [1/2]

PD#170190: Add new dts file for u200

Change-Id: Ia5332c20906666fa7828d671f16f872e05954cac
Signed-off-by: can.cao <can.cao@amlogic.com>
6 years agocec: add cec support for txl p346 p341
Yong Qin [Mon, 23 Jul 2018 07:42:31 +0000 (15:42 +0800)]
cec: add cec support for txl p346 p341

PD#170469: cec: add cec support for txl p346 p341
1.support p346
2.support p341

Change-Id: I4b680d407ce0c79eb952a3b74c2cf06df15d32ae
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
6 years agodts: gpu: g12b: enable ACE-lite
Jiyu Yang [Tue, 19 Jun 2018 08:37:34 +0000 (16:37 +0800)]
dts: gpu: g12b: enable ACE-lite

PD#168676: dts: gpu: g12b: enable ACE-lite

Change-Id: I19eaa04dd0ce35499b162fb1caafa7fa8a438404
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
6 years agoarm64: dts: txl: add 4g emmc support
jiaming.huang [Sat, 21 Jul 2018 12:20:24 +0000 (20:20 +0800)]
arm64: dts: txl: add 4g emmc support

PD#170439: arm64: dts: txl: add 4g emmc support

arm64: dts: txl: add 4g emmc config for txl board

Change-Id: I452efa07da038d8d8316c8afadf121522122afeb
Signed-off-by: jiaming.huang <jiaming.huang@amlogic.com>
6 years agoRTC: enable rtc dev for systemclock save[1/1]
Ting Li [Fri, 20 Jul 2018 03:15:45 +0000 (11:15 +0800)]
RTC: enable rtc dev for systemclock save[1/1]

PD#170346: RTC: enable rtc dev for systemclock save[1/1]

enable rtc dev for systemclock save

Change-Id: I1a055b0c2448160fa1554ac3b82da0760b26a4fd
Signed-off-by: Li Ting <ting.li@amlogic.com>
6 years agocodec_mm: set enable_slot_from_sys to try one page
rongrong zhou [Fri, 20 Jul 2018 09:24:20 +0000 (17:24 +0800)]
codec_mm: set enable_slot_from_sys to try one page

PD#170091: codec_mm: set enable_slot_from_sys to try one page

set enable_slot_from_sys to try one page

Change-Id: I53a50b666e7986abe1627a70b5112c234a6ce1ec
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
6 years agodts: spicc: change txl dts to use upstream driver
Sunny Luo [Mon, 23 Jul 2018 08:12:22 +0000 (16:12 +0800)]
dts: spicc: change txl dts to use upstream driver

PD#164751: dts: spicc: change txl dts to use upstream driver

Change-Id: Ibf51059122d31316bb644d6431466e36afe44cb6
Signed-off-by: Sunny Luo <sunny.luo@amlogic.com>
6 years agodi: add more debug info into dumpstate_board
wenfeng.guo [Fri, 20 Jul 2018 10:52:00 +0000 (18:52 +0800)]
di: add more debug info into dumpstate_board

PD#170100: di: add more debug info into dumpstate_board

1. add new debugfs:
cat /sys/kernel/debug/di/state
cat /sys/kernel/debug/vdin0/state
2. Retain the original usage
echo state > /sys/class/vdin/vdin0/attr;
echo state > /sys/class/deinterlace/di0/debug;

Change-Id: I98054baa260ae5e9bf945d23b5becd2064c81a69
Signed-off-by: wenfeng.guo <wenfeng.guo@amlogic.com>
6 years agoemmc: Modify txlx latest data for data6
Long Yu [Tue, 26 Jun 2018 11:19:54 +0000 (19:19 +0800)]
emmc: Modify txlx latest data for data6

PD#169386: emmc: modify txlx latest data for data6

Change-Id: I5bbfa5fa7fa7641a3a532ef74f5e5450b518135c
Signed-off-by: Long Yu <long.yu@amlogic.com>
6 years agoaudio: support the number of datain+loopback beyond 8 channel feature
Renjun Xu [Tue, 12 Jun 2018 08:34:14 +0000 (16:34 +0800)]
audio: support the number of datain+loopback beyond 8 channel feature

PD#168268: add support datain+loopback beyond 8 channel feature

   You need add  datain_datalb_total = <10>; at the end
   of aml_loopback node on dts or amixer command to enable.

   e.g. pdm 8ch + loopback 2ch case
        pdm 8ch + loopback 8ch case
        pdm 6ch + loopback 4ch case

   if total number of channel beyond 8 , must utilize 16ch to capture.
   so that  we change relevant parameter like this:
   if (lb_cfg->datain_datalb_total > 8) {
     lb_cfg->datain_chnum = 8;
     lb_cfg->datain_chmask = 0xff;
     lb_cfg->datalb_chnum = 8;
     lb_cfg->datalb_chmask = 0xff;
     lb_cfg->datalb_chswap = 0x76543210;
   }
   capture command:
   arecord -Dhw:0,3 -c 16 -r 48000 -f S32_LE /test.wav

   You can use asound.conf to choose your channel.

Change-Id: I0a59c4c12da603efd8709bf36d6dac640fdf788a
Signed-off-by: Renjun Xu <renjun.xu@amlogic.com>
6 years agovdin: g12a/g12b: fix screencap error from ENCL
xuhua zhang [Thu, 19 Jul 2018 08:15:52 +0000 (16:15 +0800)]
vdin: g12a/g12b: fix screencap error from ENCL

PD#170320: vdin: g12a/g12b: fix screencap error from ENCL

Change-Id: I16bd33f31d126b714aa15e09bd782525b25da54b
Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com>
6 years agodefect: fix code defects in public parts
Jianxiong Pan [Thu, 5 Jul 2018 09:17:02 +0000 (17:17 +0800)]
defect: fix code defects in public parts

PD#166793: code defects in public parts

crypto: exclude the of_match_device function return value is NULL
ddr_tool: solve problems of bad_shift and use_after_free
debug: prevent the number of cpus from exceeding the total
efuse: solve the problem of buffer_size_warning
memory_ext: solve the problems of divide_by_zero and overrun
unifykey: solve the problem of buffer_size_warning,and add a variable
          for useless_call
wifi: exclude the of_match_node function return value is NULL,and avoid
   the problem of string_overflow

Change-Id: I099ce7c60ddd0266d067215108f0e2baeb31c234
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
6 years agovlock: add dynamic switch from pll to enc mdoe
Dezhi Kong [Tue, 3 Jul 2018 07:57:01 +0000 (15:57 +0800)]
vlock: add dynamic switch from pll to enc mdoe

PD#169634: vlock: add dynamic switch from pll to enc mode

1.seperate vlock process from amvecm_on_vs,
avoid the influence of repeate call.
2.add dynamic switch from pll to enc mode,
pll adj firstly,then switch to enc mode do fine tuning.
3.seperate vlock reg init from amcm interface,
avoid the influence of rdma mode.
4.decrease enc line adjust limit.
5.add enc adjust range check.

Change-Id: I6352b45e9ec8869be43660c03352d1a406ca8a0a
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
6 years agoatv_demod: improve atv demod timer handler [1/1]
nengwen.chen [Wed, 18 Jul 2018 03:23:51 +0000 (11:23 +0800)]
atv_demod: improve atv demod timer handler [1/1]

PD#169330: improve atv demod timer handler

1.Add work queue to do the time consuming operations.
2.Optimize code.
3.V2.02

Change-Id: I809179ab84fc236cc4dba234e21448d6528f9c5e
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agocec: add otp in str mode
Yong Qin [Tue, 17 Jul 2018 10:00:34 +0000 (18:00 +0800)]
cec: add otp in str mode

PD#170099: cec: add otp in str mode

1.add otp function in str mode

Change-Id: I49cee530f63246bc080ec4a6eb9538a0bb6c6bae
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
6 years agoarm64: dts: vdin: use discontinus way to alloc cma
xuhua zhang [Wed, 18 Jul 2018 09:37:39 +0000 (17:37 +0800)]
arm64: dts: vdin: use discontinus way to alloc cma

PD#170275: arm64: dts: vdin: use discontinus way to alloc cma

Change-Id: I9a0ed8e612a98f5558f90df2b91b3384e954b9e4
Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com>
6 years agodts: g12b: add efusekey support [1/1]
Gongwei [Thu, 19 Jul 2018 11:07:58 +0000 (19:07 +0800)]
dts: g12b: add efusekey support [1/1]

PD#169961: dts: g12b: add efusekey support

Change-Id: Ideed83ddc3ad59370165079e2c8e236510507573
Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
6 years agodts: audio: g12b audio config spdif_a;
shihong.zheng [Thu, 19 Jul 2018 02:31:05 +0000 (10:31 +0800)]
dts: audio: g12b audio config spdif_a;

PD#169619: dts: g12b audiobus tdmb samesource_sel config to 3.

Change-Id: I853d60297fa3b24989c160ec95c68e4ccd76623b
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
6 years agotouchscreen: optimize module init flow
Qianggui Song [Wed, 4 Jul 2018 05:42:37 +0000 (13:42 +0800)]
touchscreen: optimize module init flow

PD#169285: touchscreen: optimize module init flow

1.Initializing/Uninitializing resource in probe/remove function is more
appropriate in this case.
2.Use module_i2c_driver to replace module_init/exit to make code more
compact.
verify on a311d_w400

Change-Id: If02f12a6c290a6346d439785060e60a6cd815c12
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
6 years agoANDROID: Fix massive cpufreq_times memory leaks
Sultan Alsawaf [Sun, 3 Jun 2018 17:47:51 +0000 (10:47 -0700)]
ANDROID: Fix massive cpufreq_times memory leaks

Every time _cpu_up() is called for a CPU, idle_thread_get() is called
which then re-initializes a CPU's idle thread that was already
previously created and cached in a global variable in
smpboot.c. idle_thread_get() calls init_idle() which then calls
__sched_fork(). __sched_fork() is where cpufreq_task_times_init() is,
and cpufreq_task_times_init() allocates memory for the task struct's
time_in_state array.

Since idle_thread_get() reuses a task struct instance that was already
previously created, this means that every time it calls init_idle(),
cpufreq_task_times_init() allocates this array again and overwrites
the existing allocation that the idle thread already had.

This causes memory to be leaked every time a CPU is onlined. In order
to fix this, move allocation of time_in_state into _do_fork to avoid
allocating it at all for idle threads. The cpufreq times interface is
intended to be used for tracking userspace tasks, so we can safely
remove it from the kernel's idle threads without killing any
functionality.

But that's not all!

Task structs can be freed outside of release_task(), which creates
another memory leak because a task struct can be freed without having
its cpufreq times allocation freed. To fix this, free the cpufreq
times allocation at the same time that task struct allocations are
freed, in free_task().

Since free_task() can also be called in error paths of copy_process()
after dup_task_struct(), set time_in_state to NULL immediately after
calling dup_task_struct() to avoid possible double free.

Bug description and fix adapted from patch submitted by
Sultan Alsawaf <sultanxda@gmail.com> at
https://android-review.googlesource.com/c/kernel/msm/+/700134

Bug: 110044919
Test: Hikey960 builds, boots & reports /proc/<pid>/time_in_state
correctly
Change-Id: I12fe7611fc88eb7f6c39f8f7629ad27b6ec4722c
Signed-off-by: Connor O'Brien <connoro@google.com>
6 years agoANDROID: Reduce use of #ifdef CONFIG_CPU_FREQ_TIMES
Connor O'Brien [Fri, 13 Jul 2018 21:31:40 +0000 (14:31 -0700)]
ANDROID: Reduce use of #ifdef CONFIG_CPU_FREQ_TIMES

Add empty versions of functions to cpufreq_times.h to cut down on use
of #ifdef in .c files.

Test: kernel builds with and without CONFIG_CPU_FREQ_TIMES=y
Change-Id: I49ac364fac3d42bba0ca1801e23b15081094fb12
Signed-off-by: Connor O'Brien <connoro@google.com>