platform/kernel/linux-amlogic.git
5 years agousb: fix variable not initial issue
Lei Qian [Sat, 1 Sep 2018 02:32:18 +0000 (10:32 +0800)]
usb: fix variable not initial issue

PD#165090:usb: fix variable not initial issue

Change-Id: Ideee120dcde79a2cd0b688413784e6e9e474c6da
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
5 years agoDTS: modify thermal high temperature shutdown and reboot data
Huan Biao [Fri, 31 Aug 2018 07:32:51 +0000 (15:32 +0800)]
DTS: modify thermal high temperature shutdown and reboot data

PD#172934: modify sw shutdown temp and hw reboot temp for g12a/b

sw governor shutdown temp 110
hw sensor reboot temp 115

Change-Id: Ie43037ee86c9de4c0b2f43dd9a1662f3d6042a2d
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
5 years agoosd: add osd reset logic for chip txl when hdr
Brian Zhu [Fri, 31 Aug 2018 09:28:07 +0000 (17:28 +0800)]
osd: add osd reset logic for chip txl when hdr

PD#172201: osd: add osd reset logic for chip txl when hdr

Change-Id: Iaf3f723cb3c515570c500614e8f720a72d5d8758
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
5 years agohdmi: cec: cmd interface cause system crash
Yong Qin [Thu, 30 Aug 2018 10:05:31 +0000 (18:05 +0800)]
hdmi: cec: cmd interface cause system crash

PD#172867: cec: cmd interface cause system crash

1.cmd file interface will cause system crash
when send data more than 4 bytes

Change-Id: I57035a17138df6c8929d0879068ea095463c128e
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agoosd: add the position check to avoid refresh logo when mode changed
Brian Zhu [Wed, 29 Aug 2018 15:36:55 +0000 (23:36 +0800)]
osd: add the position check to avoid refresh logo when mode changed

PD#171930: add the position check to avoid refresh logo when mode changed

Change-Id: I6760a70736209d89d6edeba40c6772d5f794208d
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
5 years agoMerge "hdmitx: fix KASAN Bug in store_valid_mode [1/1]" into amlogic-4.9-dev
Tao Zeng [Fri, 31 Aug 2018 11:41:58 +0000 (04:41 -0700)]
Merge "hdmitx: fix KASAN Bug in store_valid_mode [1/1]" into amlogic-4.9-dev

5 years agohdmitx: fix KASAN Bug in store_valid_mode [1/1]
Zongdong Jiao [Fri, 31 Aug 2018 08:34:48 +0000 (16:34 +0800)]
hdmitx: fix KASAN Bug in store_valid_mode [1/1]

PD#172926: hdmitx: fix KASAN Bug in store_valid_mode

==================================================================
BUG: KASAN: slab-out-of-bounds in store_valid_mode+0x48/0x70
Read of size 32 at addr ffffffc04a64ef80 by task systemcontrol/2924

CPU: 1 PID: 2924 Comm: systemcontrol Tainted: G           O    4.9.113 #7
Hardware name: Amlogic (DT)
Call trace:
[<ffffff900908ecc0>] dump_backtrace+0x0/0x368
[<ffffff900908f0cc>] show_stack+0x24/0x30
[<ffffff900963bdb0>] dump_stack+0xa0/0xc8
[<ffffff90092ba140>] print_address_description+0x68/0x258
[<ffffff90092ba694>] kasan_report+0x264/0x338
[<ffffff90092b8fdc>] check_memory_region+0x12c/0x1c0
[<ffffff90092b90c4>] __asan_loadN+0x14/0x20
[<ffffff9009c0c250>] store_valid_mode+0x48/0x70
[<ffffff9009757104>] dev_attr_store+0x4c/0x68
[<ffffff90093973b0>] sysfs_kf_write+0x98/0xb8
[<ffffff9009396134>] kernfs_fop_write+0x12c/0x270
[<ffffff90092c9870>] __vfs_write+0xd8/0x268
[<ffffff90092cae30>] vfs_write+0xd8/0x240
[<ffffff90092ccd74>] SyS_write+0xc4/0x148
[<ffffff9009083f00>] el0_svc_naked+0x34/0x38

Allocated by task 2924:
 save_stack_trace_tsk+0x0/0x268
 save_stack_trace+0x24/0x30
 kasan_kmalloc+0xd8/0x188
 __kmalloc+0x14c/0x2e8
 kernfs_fop_write+0x1d0/0x270
 __vfs_write+0xd8/0x268
 vfs_write+0xd8/0x240
 SyS_write+0xc4/0x148
 el0_svc_naked+0x34/0x38

Freed by task 2746:
 save_stack_trace_tsk+0x0/0x268
 save_stack_trace+0x24/0x30
 kasan_slab_free+0x88/0x188
 kfree+0x80/0x280
 selinux_cred_free+0x34/0x50
 security_cred_free+0x48/0x70
 put_cred_rcu+0x38/0x110
 rcu_process_callbacks+0x3b4/0x950
 __do_softirq+0x210/0x5ec

The buggy address belongs to the object at ffffffc04a64ef80
 which belongs to the cache kmalloc-64 of size 64
The buggy address is located 0 bytes inside of
 64-byte region [ffffffc04a64ef80ffffffc04a64efc0)
The buggy address belongs to the page:
page:ffffffbf01299380 count:1 mapcount:0 mapping:          (null) index:0x0
flags: 0x7ab1600000080(slab)
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffffffc04a64ee80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
 ffffffc04a64ef00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffffffc04a64ef80: 00 00 02 fc fc fc fc fc fc fc fc fc fc fc fc fc
                         ^
 ffffffc04a64f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffc04a64f080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Change-Id: I553bd648453385788899fadf0da9f17817891db2
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
5 years agohdmirx: add power ctrl in early suspend
Hang Cheng [Wed, 8 Aug 2018 13:25:27 +0000 (21:25 +0800)]
hdmirx: add power ctrl in early suspend

PD#171879: hdmirx: add power ctrl in early suspend

add rxsense pulse(20ms) to fix mtk box sda low
issue. 50ms delay is needed between rxsense pulse
and rxsense high, accroding to experiment and LG TV

Change-Id: Ifceeec415f9c69abce7aced1f3011020848043d0
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
5 years agomtd: fix coverity for mtd driver
xianjun.liu [Thu, 23 Aug 2018 03:38:52 +0000 (11:38 +0800)]
mtd: fix coverity for mtd driver

PD#172180: code style and logic issue

Change-Id: Ife539ada43eafa04538150697e5e4c63f4f90db0
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
5 years agohdr: add some hdr flags in t962e dts
Yi Zhou [Fri, 17 Aug 2018 05:14:16 +0000 (13:14 +0800)]
hdr: add some hdr flags in t962e dts

PD#171577:hdr: add some flags in t962e dts

1.PD#164627: hdr: add osd lut table for nts test
2.PD#165557: hdr set bt2020 output when connect hdr tv

Change-Id: I826f7ce51d484cea0508f87b0eda5b278b9391aa
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
5 years agotee: cpuid: change function of getting cpuid for arm32
Yan Wang [Fri, 31 Aug 2018 07:17:44 +0000 (15:17 +0800)]
tee: cpuid: change function of getting cpuid for arm32

PD#170391

Change getting cpuid function for 32bit kernel compile.

Change-Id: Ibccfc8ab1df599b23555fd14efc63c1d4df07895
Signed-off-by: Yan Wang <yan.wang@amlogic.com>
5 years agokasan: bring up kasan
tao zeng [Thu, 30 Aug 2018 06:17:02 +0000 (14:17 +0800)]
kasan: bring up kasan

PD#172700:

1. Fix boot fail due to vmap exit problem after enable kasan;
2. Fix make fail problem when open stack/static size check
   after enable kasan;
3. fix dt-match problems reported by kasan:

==================================================================
BUG: KASAN: global-out-of-bounds in __of_match_node+0x78/0xc0
Read of size 1 at addr ffffff900a5696d0 by task swapper/0/1

CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.113 #5
Hardware name: Amlogic (DT)
Call trace:
[<ffffff900908ecc0>] dump_backtrace+0x0/0x368
[<ffffff900908f0cc>] show_stack+0x24/0x30
[<ffffff900963bdb0>] dump_stack+0xa0/0xc8
[<ffffff90092ba21c>] print_address_description+0x144/0x258
[<ffffff90092ba694>] kasan_report+0x264/0x338
[<ffffff90092b897c>] __asan_load1+0x4c/0x58
[<ffffff9009ab99c0>] __of_match_node+0x78/0xc0
[<ffffff9009ab9a48>] of_match_node+0x40/0x68
[<ffffff9009abcac8>] of_match_device+0x38/0x50
[<ffffff90097631c4>] platform_match+0x7c/0x128
[<ffffff900975fcdc>] __device_attach_driver+0x64/0x140
[<ffffff900975c8b4>] bus_for_each_drv+0xec/0x158
[<ffffff900975f694>] __device_attach+0x164/0x1c8
[<ffffff900975fe4c>] device_initial_probe+0x24/0x30
[<ffffff900975e3a8>] bus_probe_device+0xe8/0xf8
[<ffffff900975aae8>] device_add+0x548/0x880
[<ffffff9009abd21c>] of_device_add+0x64/0x90
[<ffffff9009abdbd8>] of_platform_device_create_pdata+0xc0/0x128
[<ffffff9009abde4c>] of_platform_bus_create+0x1c4/0x488
[<ffffff9009abe274>] of_platform_populate+0x74/0xd0
[<ffffff900abfeaa0>] of_platform_default_populate_init+0x78/0x88
[<ffffff900908421c>] do_one_initcall+0xac/0x1f8
[<ffffff900abb10bc>] kernel_init_freeable+0x254/0x2f4
[<ffffff900a290b40>] kernel_init+0x18/0x118
[<ffffff9009083e80>] ret_from_fork+0x10/0x50

The buggy address belongs to the variable:
meson_gxl_pinctrl_dt_match+0x190/0x840

Memory state around the buggy address:
ffffff900a569580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffff900a569600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffff900a569680: 00 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa
^
ffffff900a569700: 00 04 fa fa fa fa fa fa 00 06 fa fa fa fa fa fa
ffffff900a569780: 03 fa fa fa fa fa fa fa 05 fa fa fa fa fa fa fa
==================================================================

Change-Id: I8b0a6369fbdc10ba5106bf4f40d4b82971b7ad23
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
5 years agoemmc: clean the coverity errors for emmc module.
Qiang Li [Wed, 18 Jul 2018 05:35:48 +0000 (13:35 +0800)]
emmc: clean the coverity errors for emmc module.

PD#170176: code defects in emmc part.

Change-Id: I2fbdb03d20bb1ea8087453398a3bc3731b30b466
Signed-off-by: Qiang Li <qiang.li@amlogic.com>
5 years agoDTS: fix the dts configuration error of leds
jinrong.liao [Wed, 29 Aug 2018 05:02:12 +0000 (13:02 +0800)]
DTS: fix the dts configuration error of leds

PD#172284: this commit changes mainly for GVA

1) fix the dts configuration error of leds
2) enable "is31fl3236a" driver

Change-Id: Ic2135991b39dcca78b0b09158af0cf9b3f5fb87d
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
5 years agoaudio: enable spdif defconfig and enable dd+ decoder
jinrong.liao [Wed, 29 Aug 2018 04:47:39 +0000 (12:47 +0800)]
audio: enable spdif defconfig and enable dd+ decoder

PD#170752: this commit changes mainly for GVA

1) enable spdif defconfig.
2) enable dd+ decoder.

Change-Id: I0e38208e4d1bd935c2f85b1ccb4723ac85e7149b
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
5 years agoinput: add pca9557 keypad driver for new mic board D607
jinrong.liao [Wed, 29 Aug 2018 04:35:24 +0000 (12:35 +0800)]
input: add pca9557 keypad driver for new mic board D607

PD#172286: this commit changes mainly for GVA

1) keypad: add pca9557 keypad driver for new mic board D607.

Change-Id: I0d9ec9626362b3d87d6c55e5c967bfa4486b1472
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
5 years agoinput: add touch sensor driver.
jinrong.liao [Wed, 29 Aug 2018 04:21:49 +0000 (12:21 +0800)]
input: add touch sensor driver.

PD#172287: this commit changes mainly for GVA

1) add sensor cy8c4014 driver.

Change-Id: Ic1ed6cf2a42e2286e4860946d89091a3dd524ef8
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
5 years agoplatform: modify partition for s420/s400 platform
jinrong.liao [Wed, 29 Aug 2018 03:27:06 +0000 (11:27 +0800)]
platform: modify partition for s420/s400 platform

PD#172285: this commit changes mainly for GVA

1) modify partition for s420/s400 platform.
2) new dts for GVA platform.

Change-Id: If7861004b2c5aa79136282b0db2fa28aedce599e
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
5 years agoemmc: optimize emmc TDMA config on g12a.
Nan Li [Mon, 27 Aug 2018 06:36:42 +0000 (14:36 +0800)]
emmc: optimize emmc TDMA config on g12a.

PD#172626: add emmc TDMA config set on match-data.

Change-Id: I1efc93dc1ab437f9f0e383cb545b78947e1997a4
Signed-off-by: Nan Li <nan.li@amlogic.com>
5 years agohdr: fix hdr gamut convert support 32/64bit
MingLiang Dong [Thu, 30 Aug 2018 05:45:28 +0000 (13:45 +0800)]
hdr: fix hdr gamut convert support 32/64bit

PD#172813: hdr: fix hdr gamut convert support 32/64bit

Change-Id: Iab330be778920c2d5322d4f29b5673266f065e6f
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
5 years agosaradc/adc_keypad: add shutdown interface
Xingyu Chen [Wed, 29 Aug 2018 03:26:55 +0000 (11:26 +0800)]
saradc/adc_keypad: add shutdown interface

PD#172019: saradc/adc_keypad: add shutdown interface

Change-Id: I5345e9f85e88ebd44156de3f00790f798327ddf3
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
5 years agohdr: fix hdr color abnormal
MingLiang Dong [Tue, 28 Aug 2018 07:34:20 +0000 (15:34 +0800)]
hdr: fix hdr color abnormal

PD#171738: hdr: fix hdr color abnormal

1. lcd send hdr flag according to panel config
2. 32bit revert

Change-Id: I6865d76e69acd504911dfa2ff30ab13e2cd8431d
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
5 years agoddr: fix coverity check for dmc monitor
tao zeng [Wed, 29 Aug 2018 07:28:49 +0000 (15:28 +0800)]
ddr: fix coverity check for dmc monitor

PD#172256

Change-Id: Iaa80d73df756c58d59b2055a75a5ded5f0345c09
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
5 years agoamvecm: add ioctrl for sat/hue/contrast/pcmode/dnlp_en
Bencheng Jing [Wed, 25 Jul 2018 12:41:04 +0000 (20:41 +0800)]
amvecm: add ioctrl for sat/hue/contrast/pcmode/dnlp_en

PD#169671: amvecm: add ioctrl for sat/hue/contrast/pcmode/dnlp_en

Change-Id: Ib5257a577274561d367f29c48d464e810f1b0f91
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
5 years agomodpost: eliminate the section mismatches warning
Jianxiong Pan [Mon, 27 Aug 2018 10:51:16 +0000 (18:51 +0800)]
modpost: eliminate the section mismatches warning

PD#172419: found 3 section mismatches

Change-Id: I886c06b7ebd17cb463ade5bc66f82c1c09400431
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
5 years agoddr: add dmc monitor driver tool [1/2]
tao zeng [Wed, 22 Aug 2018 06:34:44 +0000 (14:34 +0800)]
ddr: add dmc monitor driver tool [1/2]

PD#172256

1. Add dts config for dmc monitor of each chip;
2. rename ddr_band_port_desc.c to ddr_port_desc.c, to reuse
   name description of each DMC port and chip;
3. Implement driver code for dmc monitor.

Change-Id: I645ded2af519b858118365d359b1d47fa455039c
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
5 years agoatv_demod: optimize atv channel scan [1/1]
nengwen.chen [Tue, 28 Aug 2018 01:56:41 +0000 (09:56 +0800)]
atv_demod: optimize atv channel scan [1/1]

PD#171265: optimize atv channel scan

Change-Id: Iea0a9adcb7fad8757368f411274d05998516535f
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agomm: decrease DEFAULT_TVP_SIZE_FOR_4K and reserved-memory
Sandy Luo [Tue, 28 Aug 2018 08:38:46 +0000 (16:38 +0800)]
mm: decrease DEFAULT_TVP_SIZE_FOR_4K and reserved-memory

PD#166821: decrease DEFAULT_TVP_SIZE_FOR_4K and reserved-memory

Change-Id: I314d4c2e2fc6cbb2bb339c79bbcf27600adc9c69
Signed-off-by: Sandy Luo <sandy.luo@amlogic.com>
5 years agoUSB: clean the coverity errors of usb module
qi duan [Thu, 23 Aug 2018 08:56:35 +0000 (16:56 +0800)]
USB: clean the coverity errors of usb module

PD#166793: code defects in usb part

Change-Id: I196d293c9e0147c60dd493fa36f896996bafb312
Signed-off-by: qi duan <qi.duan@amlogic.com>
5 years agotsync: delete some frequent debug info
Cheng Tong [Mon, 27 Aug 2018 06:46:05 +0000 (14:46 +0800)]
tsync: delete some frequent debug info

PD#172598: tsync delete some frequent debug info

Change-Id: Ibcb708375842f4ef1dff5ab6333387d1f3ff3b2d
Signed-off-by: Cheng Tong <cheng.tong@amlogic.com>
5 years agoMerge "irblaster: clean the coverity errors of blaster module" into amlogic-4.9-dev
Jianxin Pan [Mon, 27 Aug 2018 08:47:30 +0000 (01:47 -0700)]
Merge "irblaster: clean the coverity errors of blaster module" into amlogic-4.9-dev

5 years agoRevert "arm64: select HAVE_ARCH_VMAP_STACK by default [2/3]"
Jianxin Pan [Mon, 27 Aug 2018 08:01:08 +0000 (01:01 -0700)]
Revert "arm64: select HAVE_ARCH_VMAP_STACK by default [2/3]"

This reverts commit d560a7683c108df8d1b420f9c02a60e3d7e63c9d.

Change-Id: I4b9dc63a986afbffd81be991dc782916feb95270
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
5 years agoirblaster: clean the coverity errors of blaster module
Yu Tu [Mon, 27 Aug 2018 05:44:00 +0000 (13:44 +0800)]
irblaster: clean the coverity errors of blaster module

PD#166793: code defects in irblaster part

Change-Id: I3aed8bd61dfa0dfdcf68a1a43b0c82caf8dff091
Signed-off-by: Yu Tu <yu.tu@amlogic.com>
5 years agodv: change the pps bypass logic when dv on for 962e
zhilei.wu [Wed, 22 Aug 2018 09:11:28 +0000 (17:11 +0800)]
dv: change the pps bypass logic when dv on for 962e

PD#168736: dv: change the pps bypass logic when dv on for 962e

Change-Id: Ib9ee85f975d63e2124f87bd3e0507095ab659760
Signed-off-by: zhilei.wu <zhilei.wu@amlogic.com>
5 years agodv: SDR2HDR solution was moved to dovi.ko
zhilei.wu [Wed, 22 Aug 2018 08:04:05 +0000 (16:04 +0800)]
dv: SDR2HDR solution was moved to dovi.ko

PD#170257: dv: SDR2HDR solution was moved to dovi.ko

Change-Id: I958d7ee272389c0ed266f0d5dab3ae9ef54485b9
Signed-off-by: zhilei.wu <zhilei.wu@amlogic.com>
5 years agovpp: pixel at top/left corner has wrong color
zhilei.wu [Wed, 22 Aug 2018 07:59:33 +0000 (15:59 +0800)]
vpp: pixel at top/left corner has wrong color

PD#168736: vpp: pixel at top/left corner has wrong color

Change-Id: Icddce7c51d840b92cf57a6fd6a35e3e442cf1258
Signed-off-by: zhilei.wu <zhilei.wu@amlogic.com>
5 years agodv: send bypass_el event to dvbldec
zhilei.wu [Wed, 22 Aug 2018 06:55:37 +0000 (14:55 +0800)]
dv: send bypass_el event to dvbldec

PD#163750: dv: send bypass_el event to dvbldec

Change-Id: Ide0b29bae17a47cd1477d31b0679efba25340b5a
Signed-off-by: zhilei.wu <zhilei.wu@amlogic.com>
5 years agogpio_keypad: Fix key reporting [1/1]
Dmitry Shmidt [Thu, 16 Aug 2018 00:44:14 +0000 (17:44 -0700)]
gpio_keypad: Fix key reporting [1/1]

PD#172258: pio_keypad: Fix key reporting [1/1]

the following issues have been fixed :
1. didn't report any keys to userspace.
2. the push down of key is reported as push up.
3. no event is reported when press key for the first time.

adjust the key event value by changing the gpio flag for
atom board, as follows:
1. the event value "0" is replaced  to "1" when push down.
2. the event value "1" is replaced  to "0" when push up.

Change-Id: Ia207506df25ea604bce4b6ae9573a981fe664061
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Tellen Yu <tellen.yu@amlogic.com>
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
5 years agotee: G12B: workaroud for system stability.
Yan Wang [Fri, 17 Aug 2018 11:03:13 +0000 (19:03 +0800)]
tee: G12B: workaroud for system stability.

PD#170391

G12B GTVs version generate SErr exception when BL32/TA run on A73.
Set BL32/TA affinity to core0(A53) temporarily.

Change-Id: Ib1326914ef164f379c6920b5643b07e4e152b30e
Signed-off-by: Yan Wang <yan.wang@amlogic.com>
5 years agodts: audio: fix spdif_a share buffer with i2s
Jian Xu [Fri, 24 Aug 2018 02:50:44 +0000 (10:50 +0800)]
dts: audio: fix spdif_a share buffer with i2s

PD#160888: dts: audio: fix spdif_a share buffer with i2s

Change-Id: I61f8f69d613d7bd1d52de173a13c43ceae21b80a
Signed-off-by: Sandy Luo <sandy.luo@amlogic.com>
5 years agodi: remove unused txl register of dump di reg/mif
wenfeng.guo [Wed, 15 Aug 2018 08:29:35 +0000 (16:29 +0800)]
di: remove unused txl register of dump di reg/mif

PD#171757: di: remove unused txl register of dump di reg/mif

1.add new debugfs:
cat /sys/kernel/debug/di/dumpreg
cat /sys/kernel/debug/di/dumpmif
2.move di_state to deinterlace_dbg

Change-Id: Ic183abd793b170519ccc20e9a546efdfd531c469
Signed-off-by: wenfeng.guo <wenfeng.guo@amlogic.com>
5 years agoethernet: clean the coverity errors of eth module
qi duan [Thu, 23 Aug 2018 10:00:35 +0000 (18:00 +0800)]
ethernet: clean the coverity errors of eth module

PD#166793: code defects in eth part

Change-Id: I5e9a4bc9ff3c89a2fff8fa000d2c33dc87f2492c
Signed-off-by: qi duan <qi.duan@amlogic.com>
5 years agoUART: clean the coverity errors of UART module
qi duan [Thu, 23 Aug 2018 09:14:11 +0000 (17:14 +0800)]
UART: clean the coverity errors of UART module

PD#166793: code defects in UART part

Change-Id: Id2a379cc4d0ae7d463d835cad01be83793dba4ca
Signed-off-by: qi duan <qi.duan@amlogic.com>
5 years agoaudio: solve av out voltage lower issue
Lianlian Zhu [Tue, 21 Aug 2018 14:05:09 +0000 (22:05 +0800)]
audio: solve av out voltage lower issue

PD#171873

Change-Id: I2fb1e3a70b3fa71b0ec4d5f8c528fead1e5cd009
Signed-off-by: Lianlian Zhu <lianlian.zhu@amlogic.com>
5 years agoemmc: fixed the timeout of flushing the cache
Long Yu [Mon, 11 Jun 2018 03:08:16 +0000 (11:08 +0800)]
emmc: fixed the timeout of flushing the cache

PD#168102: emmc: fixed the timeout of flushing the cache

Change-Id: I122ace6bd5fa7b1b74de642652a76df9dfb62873
Signed-off-by: Long Yu <long.yu@amlogic.com>
5 years agoaudio: fixed frequency responds curve test fail[1/2]
Zhe Wang [Tue, 21 Aug 2018 08:28:02 +0000 (16:28 +0800)]
audio: fixed frequency responds curve test fail[1/2]

PD#168797: -change hw resample filter parameters with input sr
    in hdmiin and spdifin source

   -optimize filter parameters

Change-Id: Ie48d55446b22b8f3dceff8be404ad52d7820f6e8
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
5 years agohdmirx: add ddc idle detection before edid filling
Lei Yang [Wed, 8 Aug 2018 03:11:18 +0000 (11:11 +0800)]
hdmirx: add ddc idle detection before edid filling

PD#171215: hdmirx: add ddc idle detection before edid filling

1. add ddc idle detection
2. increase hpd low wait time to 350ms

Change-Id: I59e3bc52af09b41b8567a93d595c2b52233f170a
Signed-off-by: Lei Yang <lei.yang@amlogic.com>
5 years agolcd: clear mute after driver reset
Evoke Zhang [Tue, 21 Aug 2018 05:12:33 +0000 (13:12 +0800)]
lcd: clear mute after driver reset

PD#172121: lcd: clear mute after driver reset
also update CONFIG AML_VOUT_FRAMERATE_AUTOMATION to AMLOGIC_VOUT_SERVE

Change-Id: I65309c6c3b43fabc4e95269114ad22d18d360a41
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agolcd: update optical info struct name
Evoke Zhang [Tue, 26 Jun 2018 02:16:55 +0000 (10:16 +0800)]
lcd: update optical info struct name

PD#171986: lcd: update optical info struct name

Change-Id: I17b4381b7011a48491d3e127ceba8b08b7dcd197
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agotvafe: add Variable initialization
Nian Jing [Tue, 21 Aug 2018 02:10:31 +0000 (10:10 +0800)]
tvafe: add Variable initialization

PD#172153: fix complie error for some GCC version

Change-Id: I0f09bf4097dfea278c63d69e789ee99b016e84b2
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
5 years agothermal: clean the coverity errors of thermal module
zhiqiang.liang [Tue, 21 Aug 2018 08:53:08 +0000 (16:53 +0800)]
thermal: clean the coverity errors of thermal module

PD#166793: code defects in thermal part

Change-Id: Icd970eced2ed3bcd76a8baf15bf7b885d63d8d6a
Signed-off-by: zhiqiang.liang <zhiqiang.liang@amlogic.com>
5 years agoClk: clean the coverity errors of clk module
zhiqiang.liang [Tue, 21 Aug 2018 08:44:23 +0000 (16:44 +0800)]
Clk: clean the coverity errors of clk module

PD#166793: code defects in clk part

Change-Id: Iee2753552c6f345ea78329833415e607b141d188
Signed-off-by: zhiqiang.liang <zhiqiang.liang@amlogic.com>
5 years agolcd: lcd_extern: add two i2c address support
Evoke Zhang [Fri, 10 Aug 2018 05:58:03 +0000 (13:58 +0800)]
lcd: lcd_extern: add two i2c address support

PD#169249: lcd: lcd_extern: add two i2c address support

Change-Id: Ic67304cd32768f5800b3702c57527e152bb71916
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agolcd: add auto test for panel color bar
Evoke Zhang [Thu, 19 Apr 2018 08:10:34 +0000 (16:10 +0800)]
lcd: add auto test for panel color bar

PD#169249: lcd: add auto test for panel color bar
also add gp0_pll clktree for clk_path 1 used

Change-Id: I78d1e42e68bfb8f294247053fdae4bb09fc3077a
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agomm: reduce codec cma pool size for 1GB platform [3/3]
tao zeng [Thu, 16 Aug 2018 06:44:39 +0000 (02:44 -0400)]
mm: reduce codec cma pool size for 1GB platform [3/3]

PD#171358

Memory will allocation fail for driver and kernel on 1GB platform
sometimes. But meminfo show that there are many free CMA pages,
which can't be used by kernel and driver. High percentage of CMA
pages reducec memory space for unmovable pages. We need to reduce
cma pool size for small memory platform.

Change-Id: I671d68f54209e7d557b6e33e2100af0ff4da2073
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
5 years agoarm64: select HAVE_ARCH_VMAP_STACK by default [2/3]
tao zeng [Thu, 16 Aug 2018 06:42:12 +0000 (02:42 -0400)]
arm64: select HAVE_ARCH_VMAP_STACK by default [2/3]

PD#171358

On arm64, task stack is 16KB and need order 2 when create a task.
It's easy get a failed allocation result if memory is fragmentation
after long time of using. Using vmap to allocate task stack can help
to avoid this problem.

Change-Id: I3a8a3fbf626eb30e0e547ed0605be02bb3391e5a
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
5 years agohdmirx: add feature of disable specific port
Hang Cheng [Fri, 22 Jun 2018 11:47:20 +0000 (19:47 +0800)]
hdmirx: add feature of disable specific port

PD#162498: hdmirx: add feature of disable specific port

1.disable termination and hpd of specific port to avoid
interference to adjacent non-hdmi source
2.use dts to control this feature, disable feature by default
3.side effect: cec function of disabled port will not work

Change-Id: Ie52b187185277ee4e900b4de6db1da0da65bb1b9
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
5 years agohdmi: pkt: pktfifo not work after switch src
Yong Qin [Mon, 20 Aug 2018 08:58:04 +0000 (16:58 +0800)]
hdmi: pkt: pktfifo not work after switch src

PD#172097: hdmi: pktfifo not work after switch src

1.pktinfo not work when exit hdmi source and re-enter
hdmi source.

Change-Id: I51f08529f38e93158e5c52a686472c5c3577e66b
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agoinput: gpio_key: add some missing code [1/1]
xiaoliang.wang [Tue, 14 Aug 2018 22:23:11 +0000 (18:23 -0400)]
input: gpio_key: add some missing code [1/1]

PD#171750: google b/112555582

add some missing code for send keyevent

Change-Id: I2586a0cd163c02b483657ade4e1a998d54f379d8
Signed-off-by: Shuide Chen <shuide.chen@amlogic.com>
Signed-off-by: xiaoliang.wang <xiaoliang.wang@amlogic.com>
5 years agoclk: mpll: fix audio not sound issue
Shunzhou Jiang [Mon, 20 Aug 2018 02:14:10 +0000 (10:14 +0800)]
clk: mpll: fix audio not sound issue

PD#170386: clk: fix audio not sound

Change-Id: I0396c6e2447162995964914fa7adb9f35ff651f0
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
5 years agoVIDEO_PTS: don't used the hardware register
Zhi Zhou [Mon, 16 Jul 2018 03:29:16 +0000 (11:29 +0800)]
VIDEO_PTS: don't used the hardware register

PD#169889: don't used harware vpts/apts for avsync.

becuase this apts/vpts is hardware irrelevant.
so if we need this register, we need power on
the parser,but it is irrelevant in ATV/hdmi-in
mode.

Change-Id: I4bd218c228516c974027b61c3a094b536913312e
Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com>
5 years agoinit: wait emmc ready before root
Yonghui Yu [Thu, 16 Aug 2018 16:11:35 +0000 (00:11 +0800)]
init: wait emmc ready before root

PD#171658: init: wait emmc ready before root

A temporary ugly patch

Change-Id: I9a75fabf7460f92b0b9ae51992ac0d3c964798d2
Signed-off-by: Yonghui Yu <yonghui.yu@amlogic.com>
5 years agoramdump: fix type error for status of watch dog node [1/1]
tao zeng [Fri, 17 Aug 2018 06:36:54 +0000 (14:36 +0800)]
ramdump: fix type error for status of watch dog node [1/1]

PD#165764

Change-Id: Ib3a92525eedeedaa7a451214279d526bb3daa71a
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
5 years agohdmi: cec: switch hdmi port cec not work
Yong Qin [Mon, 13 Aug 2018 11:48:58 +0000 (19:48 +0800)]
hdmi: cec: switch hdmi port cec not work

PD#171014: cec: hdmi source cec not work

Change-Id: I2198eb4f9bc17f9909b9d693b4f12945240a7239
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
5 years agodi: fix compile error when disable di
frank zhao [Wed, 1 Aug 2018 03:31:55 +0000 (23:31 -0400)]
di: fix compile error when disable di

PD#171633: di: fix compile error when disable di

Change-Id: Ib7ff39d05b8575fc5094494611d698e81f470644
Signed-off-by: frank zhao <frank.zhao@amlogic.com>
5 years agovideo: add hdr metadata and color aspects support
jintao xu [Tue, 14 Aug 2018 11:10:23 +0000 (19:10 +0800)]
video: add hdr metadata and color aspects support

PD#167533

add hdr metadata and color aspects support
fix cts below test cases:
android.media.cts.DecoderTest#testH265HDR10StaticMetadata
android.media.cts.DecoderTest#testH264ColorAspects
android.media.cts.DecoderTest#testH265ColorAspects
android.media.cts.DecoderTest#testMPEG2ColorAspectsTV

Change-Id: I7a7f3b3d7ec1079c4b4094e3c6b9a14c5fe9d791
Signed-off-by: peter wang <peter.wang@amlogic.com>
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
5 years agothermal: support A32 driver
Huan Biao [Thu, 2 Aug 2018 07:47:58 +0000 (15:47 +0800)]
thermal: support A32 driver

PD#169652: thermal: support A32 driver

Change-Id: Ic0d86782f1b10743435588080c1a1548ccd80e04
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
5 years agodeinterlace: txl: fix di abnormal when dtv on inverted screen
Jihong Sui [Wed, 15 Aug 2018 07:44:28 +0000 (15:44 +0800)]
deinterlace: txl: fix di abnormal when dtv on inverted screen

PD#171587: txl: fix di abnormal when dtv on inverted screen

Change-Id: I38a1d2c73b0dd961739a010b36e06bb1f51e7be8
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agohdmirx: add new hdcp14 key configuration method
yicheng shen [Tue, 26 Jun 2018 03:02:22 +0000 (11:02 +0800)]
hdmirx: add new hdcp14 key configuration method

PD#168660: hdmirx: add new hdcp14 key configuration method

set hdcp1.4 key via secure OS to protect the key

Change-Id: If455aebe1c7fb65b4b16e8cf3ba7a70cf20702ac
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
5 years agoclocksource: remove LOCAL_TIMER config in meson64_a32
Ao Xu [Wed, 15 Aug 2018 08:22:16 +0000 (04:22 -0400)]
clocksource: remove LOCAL_TIMER config in meson64_a32

PD#169652: clocksource: remove LOCAL_TIMER config in meson64_a32

use soc timer instead of local timer

Change-Id: Ie2fd614cc6978496474fefcd39f0f21136197f34
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
5 years agoboard: add A32 support for gxl&txlx
Ao Xu [Thu, 2 Aug 2018 08:50:14 +0000 (16:50 +0800)]
board: add A32 support for gxl&txlx

PD#169652: board: add A32 support for gxl&txlx

add dts for gxl&txlx

Change-Id: Id2e79c9d2611bc2fb84ee344568ed9276566e872
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
5 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: I3ded0352c88267275cb1f128f1bfb79618f2226c
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
5 years agodrm: Create a format/modifier blob
Ben Widawsky [Mon, 24 Jul 2017 03:46:39 +0000 (20:46 -0700)]
drm: Create a format/modifier blob

Updated blob layout (Rob, Daniel, Kristian, xerpi)

v2:
* Removed __packed, and alignment (.+)
* Fix indent in drm_format_modifier fields (Liviu)
* Remove duplicated modifier > 64 check (Liviu)
* Change comment about modifier (Liviu)
* Remove arguments to blob creation, use plane instead (Liviu)
* Fix data types (Ben)
* Make the blob part of uapi (Daniel)

v3:
Remove unused ret field.
Change i, and j to unsigned int (Emil)

v4:
Use plane->modifier_count instead of recounting (Daniel)

v5:
Rename modifiers to modifiers_property (Ville)
Use sizeof(__u32) instead to reflect UAPI nature (Ville)
Make BUILD_BUG_ON for blob header size

Change-Id: Ibb2490b0510cbae9b5f4252483f8b1531fddf73f
Cc: Rob Clark <robdclark@gmail.com>
Cc: Kristian H. Kristensen <hoegsberg@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
Reviewed-by: Liviu Dudau <liviu@dudau.co.uk> (v2)
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v3)
Signed-off-by: Daniel Stone <daniels@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170724034641.13369-2-ben@bwidawsk.net
5 years agodrm: Plumb modifiers through plane init
Ben Widawsky [Mon, 24 Jul 2017 03:46:38 +0000 (20:46 -0700)]
drm: Plumb modifiers through plane init

This is the plumbing for supporting fb modifiers on planes. Modifiers
have already been introduced to some extent, but this series will extend
this to allow querying modifiers per plane. Based on this, the client to
enable optimal modifications for framebuffers.

This patch simply allows the DRM drivers to initialize their list of
supported modifiers upon initializing the plane.

v2: A minor addition from Daniel

v3:
* Updated commit message
* s/INVALID/DRM_FORMAT_MOD_INVALID (Liviu)
* Remove some excess newlines (Liviu)
* Update comment for > 64 modifiers (Liviu)

v4: Minor comment adjustments (Liviu)

v5: Some new platforms added due to rebase

v6: Add some missed plane inits (or maybe they're new - who knows at
this point) (Daniel)

Change-Id: I717e6240f729902af34c1419140bbf0b8c0a421d
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agodrm: Nuke modifier[1-3]
Ville Syrjälä [Wed, 16 Nov 2016 11:33:16 +0000 (13:33 +0200)]
drm: Nuke modifier[1-3]

It has been suggested that having per-plane modifiers is making life
more difficult for userspace, so let's just retire modifier[1-3] and
use modifier[0] to apply to the entire framebuffer.

Obviosuly this means that if individual planes need different tiling
layouts and whatnot we will need a new modifier for each combination
of planes with different tiling layouts.

For a bit of extra backwards compatilbilty the kernel will allow
non-zero modifier[1+] but it require that they will match modifier[0].
This in case there's existing userspace out there that sets
modifier[1+] to something non-zero with planar formats.

Mostly a cocci job, with a bit of manual stuff mixed in.

@@
struct drm_framebuffer *fb;
expression E;
@@
- fb->modifier[E]
+ fb->modifier

@@
struct drm_framebuffer fb;
expression E;
@@
- fb.modifier[E]
+ fb.modifier

Change-Id: Iebf536e81ea538e157d57eebed1ae3f9b3d912ce
Cc: Kristian Høgsberg <hoegsberg@gmail.com>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Cc: dczaplejewicz@collabora.co.uk
Suggested-by: Kristian Høgsberg <hoegsberg@gmail.com>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479295996-26246-1-git-send-email-ville.syrjala@linux.intel.com
5 years agodrm: Extract drm_mode_config.[hc]
Daniel Vetter [Mon, 14 Nov 2016 11:58:23 +0000 (12:58 +0100)]
drm: Extract drm_mode_config.[hc]

And shuffle the kernel-doc structure a bit since drm_crtc.[hc] now
only contains CRTC-related functions and structures.

v2:
- rebase onto drm-misc
- don't forget to move drm_mode_config_cleanup.
- move 2 internal decls under the right heading (Chris)

Change-Id: Ia84e8ea0df4be681c2e6a7856e11ec4bf7edfcdb
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
5 years agodrm: add helper for printing to log or seq_file
Rob Clark [Sat, 5 Nov 2016 15:08:07 +0000 (11:08 -0400)]
drm: add helper for printing to log or seq_file

Sometimes it is nice not to duplicate equivalent printk() and
seq_printf() code.

v2: simplify things w/ va_format, and use dev_printk, docs

Change-Id: Idad43e786b5007cc4c794afaf04dd3ad03d58941
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1478358492-30738-3-git-send-email-robdclark@gmail.com
5 years agodrm_fourcc: Document linear modifier
Daniel Vetter [Wed, 9 Nov 2016 12:36:36 +0000 (13:36 +0100)]
drm_fourcc: Document linear modifier

Not setting the fb modifiers flag is something different from setting
the fb modifiers to 0 (which means explicitly linear). We kinda failed
to document that properly. Spotted by Kristian.

Change-Id: I165c4b32bcd2c329786aa05fac268b066a9af159
Cc: hoegsberg@google.com
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1478694996-4200-1-git-send-email-daniel.vetter@ffwll.ch
5 years agodrm: WARN when calling drm_format_info() for an unsupported format
Laurent Pinchart [Mon, 17 Oct 2016 22:41:12 +0000 (01:41 +0300)]
drm: WARN when calling drm_format_info() for an unsupported format

The format helpers have historically treated unsupported formats as part
of the default case, returning values that are likely wrong. We can't
change this behaviour now without risking breaking drivers in difficult
to detect ways, but we can WARN on unsupported formats to catch faulty
callers.

The only exception is the framebuffer_check() function that calls
drm_format_info() to validate the format passed from userspace. This is
a valid use case that shouldn't generate a warning.

Change-Id: I57ea2b59765006e9f160f0e85e77f019ab6b977a
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1476744081-24485-5-git-send-email-laurent.pinchart@ideasonboard.com
5 years agodrm: Implement the drm_format_*() helpers as drm_format_info() wrappers
Laurent Pinchart [Mon, 17 Oct 2016 22:41:10 +0000 (01:41 +0300)]
drm: Implement the drm_format_*() helpers as drm_format_info() wrappers

Turn the drm_format_*() helpers into wrappers around the drm_format_info
lookup function to centralize all format information in a single place.

Change-Id: I599e5a857b267f5ef24746991b7f3c25a9d92479
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1476744081-24485-3-git-send-email-laurent.pinchart@ideasonboard.com
5 years agodrm/edid: Rename local variable block to edid
Chris Wilson [Mon, 17 Oct 2016 08:35:12 +0000 (09:35 +0100)]
drm/edid: Rename local variable block to edid

The "block" variable points to the entire edid, not individual blocks
despite it being named such.

Change-Id: Ief86411390d9368c6e179a65e11ffc0065fd3b7f
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161017083514.21772-1-chris@chris-wilson.co.uk
5 years agodrm/fb-helper: reject any changes to the fbdev
Stefan Agner [Tue, 11 Oct 2016 23:15:04 +0000 (16:15 -0700)]
drm/fb-helper: reject any changes to the fbdev

The current fbdev emulation does not allow to push back changes in
width, height or depth to KMS, hence reject any changes with an
error. This makes sure that fbdev ioctl's fail properly and user
space does not assume that changes succeeded.

Change-Id: Iaefb728b04d4599ef5bd6f32b37dd9dcab830989
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161011231504.17688-1-stefan@agner.ch
5 years agodrm: Use drm_format_info() in DRM core code
Laurent Pinchart [Mon, 17 Oct 2016 22:41:11 +0000 (01:41 +0300)]
drm: Use drm_format_info() in DRM core code

Replace calls to the drm_format_*() helper functions with direct use of
the drm_format_info structure. This improves efficiency by removing
duplicate lookups.

Change-Id: I731a8def0d5835d0488e3a100794a09790f4f9fc
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1476744081-24485-4-git-send-email-laurent.pinchart@ideasonboard.com
5 years agodrm: Centralize format information
Laurent Pinchart [Mon, 17 Oct 2016 22:41:09 +0000 (01:41 +0300)]
drm: Centralize format information

PD#170175: drm: Centralize format information

Various pieces of information about DRM formats (number of planes, color
depth, chroma subsampling, ...) are scattered across different helper
functions in the DRM core. Callers of those functions often need to
access more than a single parameter of the format, leading to
inefficiencies due to multiple lookups.

Centralize all format information in a data structure and create a
function to look up information based on the format 4CC.

Change-Id: I25dc415450c89e5eb69726b3dda521c5800c4d68
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1476744081-24485-2-git-send-email-laurent.pinchart@ideasonboard.com
5 years agodrm: Use u64 for intermediate dotclock calculations
Chris Wilson [Fri, 21 Oct 2016 14:15:40 +0000 (15:15 +0100)]
drm: Use u64 for intermediate dotclock calculations

We have reached the era where monitor bandwidths now exceed 31bits in
frequency calculations, though as we stored them in kHz units we are
safe from overflow in the modelines for some time.

[   48.723720] UBSAN: Undefined behaviour in ../drivers/gpu/drm/drm_modes.c:325:49
[   48.726943] signed integer overflow:
[   48.728503] 2240 * 1000000 cannot be represented in type 'int'

Change-Id: Ib0ab1c82e0f5fb9d11244a5dbc53b565e1179127
Reported-by: Martin Liška <marxin.liska@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98372
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161021141540.26837-1-chris@chris-wilson.co.uk
5 years agodrm: Add drm_rotation_90_or_270()
Ville Syrjälä [Mon, 26 Sep 2016 16:30:46 +0000 (19:30 +0300)]
drm: Add drm_rotation_90_or_270()

We have intel_rotation_90_or_270() in i915 to check if the rotation is
90 or 270 degrees. Similar checks are elsewhere in drm, so let's move
the helper into a central place and use it everwhere.

v2: Drop the BIT()
    Convert all new intel_rotation_90_or_270() calls
    Deal with superfluous code shuffling

Change-Id: I84d48ebfa010f7c28fad6e492fdda2bddd305ccf
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1474907460-10717-2-git-send-email-ville.syrjala@linux.intel.com
5 years agoRevert "Fix up non-directory creation in SGID directories"
Ao Xu [Fri, 10 Aug 2018 06:14:25 +0000 (02:14 -0400)]
Revert "Fix up non-directory creation in SGID directories"

This reverts commit d2c7c52431819aa05d76fae77bb3f95dd0955da1.

Change-Id: I096cd7fd49ccad4bd032bb365211930fa1aa74d4
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
5 years agocodec_mm: fix some coverity error.
Peng Yixin [Fri, 27 Jul 2018 02:18:54 +0000 (10:18 +0800)]
codec_mm: fix some coverity error.

PD#170543: codec_mm: fix some coverity error.

fix some coverity error

Change-Id: Idf234f08bc6d7522fdeb04c14956d046c94012c4
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agoatv_demod: add atv all band scan [8/8]
nengwen.chen [Fri, 10 Aug 2018 11:46:10 +0000 (19:46 +0800)]
atv_demod: add atv all band scan [8/8]

PD#171216: add atv all band scan

Change-Id: If5c0664a25206b9a330d05af04574da4a1e5e016
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agoatv_demod: modify atv audio state disable when search [1/1]
nengwen.chen [Tue, 7 Aug 2018 07:34:20 +0000 (15:34 +0800)]
atv_demod: modify atv audio state disable when search [1/1]

PD#171279: modify atv audio state disable when search

Change-Id: I15c3fddb77bfe1125dafd1f63f8a74ff141bf1df
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
5 years agodtv_demod: txl: fix dvbc can't lock
Jihong Sui [Fri, 10 Aug 2018 01:48:27 +0000 (09:48 +0800)]
dtv_demod: txl: fix dvbc can't lock

PD#169985: txl: fix dvbc can't lock

Change-Id: I6094cfb546832cc4c54dae4a065147a05d20c251
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
5 years agohdmirx: set rxsense sync with hpd for every port
Hang Cheng [Mon, 6 Aug 2018 12:06:08 +0000 (20:06 +0800)]
hdmirx: set rxsense sync with hpd for every port

PD#159499: hdmirx: set rxsense sync with hpd for every port

Change-Id: Ief053dc7772b12516153ef733d057a6b9a02aca2
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
5 years agohdmitx: add dynamic hdr info to vpp
Yi Zhou [Wed, 8 Aug 2018 08:45:26 +0000 (16:45 +0800)]
hdmitx: add dynamic hdr info to vpp

PD#171350: hdmitx: add dynamic hdr info to vpp

cat /sys/class/amhdmitx/amhdmitx/hdr_cap
cat /sys/class/display/vinfo

Change-Id: I0d42c33e33ccc1f8d56545df25efc2cc60e08f58
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
5 years agolcd: mipi-dsi: optimize mipi read function for video mode
Evoke Zhang [Tue, 7 Aug 2018 11:13:39 +0000 (19:13 +0800)]
lcd: mipi-dsi: optimize mipi read function for video mode

PD#171352: lcd: mipi-dsi: optimize mipi read function for video mode

Change-Id: I7fec036ad568c00ca3573feb3eb5d0544050bfb2
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
5 years agodefconfig: remove WQ_WATCHDOG amd DETECT_HUNG_TASK
Jianxin [Fri, 10 Aug 2018 10:59:46 +0000 (18:59 +0800)]
defconfig: remove WQ_WATCHDOG amd DETECT_HUNG_TASK

PD#171500
WQ_WATCHDOG amd DETECT_HUNG_TASK are debug options to detect task/workqueue are
blocked for a long time. Sometimes, error messages are misreported.

Change-Id: Ia898429359b2ff4c656b8b9b009c4a7fa1888931
Signed-off-by: Jianxin <jianxin.pan@amlogic.com>
5 years agoscritp: update merge check pl
Jianxin [Fri, 10 Aug 2018 10:54:11 +0000 (18:54 +0800)]
scritp: update merge check pl

PD#146811
':' and extral message folling PD#xxxx is not a must in line three

Change-Id: Ibe115f6a64bc267730020aaa52f8b21adb2f66a5
Signed-off-by: Jianxin <jianxin.pan@amlogic.com>
5 years agoboard: add CONFIG_ARM64_A32 and CONFIG_COMPAT
Ao Xu [Wed, 1 Aug 2018 11:56:37 +0000 (19:56 +0800)]
board: add CONFIG_ARM64_A32 and CONFIG_COMPAT

PD#169652: add CONFIG_ARM64_A32 and CONFIG_COMPAT

add CONFIG_ARM64_A32 support and add missing
CONFIG_COMPAT

Change-Id: Id041292cccd39618ba9932d123a219f0583fd4c5
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
5 years agodts: Rename the dts name for u220.[2/2]
Tong Li [Mon, 13 Aug 2018 02:26:52 +0000 (10:26 +0800)]
dts: Rename the dts name for u220.[2/2]

PD#171618: update dts name g12a_s905d2_u220 to g12a_s905y2_u220

Rename the dts name for u220.[2/2]

Change-Id: I3a9dde9210772bb50f26b68a884d7bdc6346752c
Signed-off-by: Tong Li <tong.li@amlogic.com>
5 years agoaudio:fix dtv no sound output issue[3/3]
live.li [Mon, 23 Jul 2018 01:33:48 +0000 (09:33 +0800)]
audio:fix dtv no sound output issue[3/3]

PD#170315: audio:fix dtv no sound output issue

add dtv patch in tsync

Change-Id: Idad75b7b3563a251e6bf96141b4d9b2314c2983b
Signed-off-by: live.li <live.li@amlogic.com>
5 years agoosd: wait for vsync no need lock [1/1]
shuze.ma [Thu, 19 Jul 2018 13:59:30 +0000 (21:59 +0800)]
osd: wait for vsync no need lock [1/1]

PD#170791

wait for vsync no need lock

Change-Id: I61f9090b03c3b1d6971265bd1aacf9740a6ce168
Signed-off-by: shuze.ma <shuze.ma@amlogic.com>