Files
linux/scripts/Makefile.lib
jiejing.wang 6b2d479409 ODROID-COMMON:Merge AMLogic BSP 181208
ODROID-COMMON:Merge AMLogic BSP 181208
audioinfo: fix kasan compile problem [1/1]

PD#173553

Problem:
check stack out of bounds

Solution:
change variable's definition

Verify:
verifyed by r311

Change-Id: Id6efc3ac56b297b6812e2af786732e65867a07da
Signed-off-by: jiejing.wang <jiejing.wang@amlogic.com>

buildroot: Enable fb memory allocation in g12b_skt dts [1/1]

PD#SWPL-802

Problem:
  Kernel crash when run GPU slt program

Solution:
  Enable meson fb memory allocation in g12b_skt dts

Verify:
  w400

Change-Id: I3074c2053cda06cf4ae237d24bad2c89d789f90d
Signed-off-by: Blance Tang <guofeng.tang@amlogic.com>

amvecm: hdr: add hdr10 plus support [1/2]

PD#SWPL-869

Problem:
new feature, add hdr10 plus support

Solution:
1. add hdr10 plus metadat parser
2. add hdr10 plus code support
3. add hdr10 plus bypass mode

Verify:
verify on U200

Change-Id: I957954ce148021882e17f2913dd2552e64f1298c
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>

irqchip: add a new gpio IRQ driver to support double-edge detection [1/1]

PD#SWPL-922

Problem:
the existing gpio IRQ driver(porting from the upstream) does not
double-edge detection

Solution:
add a new gpio IRQ driver to support the double-edge detection,
the new driver is with different software structure but compatible
with functions of the existing driver

Verify:
test pass on s400

Change-Id: Id69dd0b4459eef20a6755947c7d95a24d7b17fa9
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>

pinctrl: fix some mistakes [1/1]

PD#172438

Problem:
1. return a negative when parsing the dts property
"output-high/output-low"
2. the prefix "bt565" don't meet corepinmux document

Solution:
1. add break statement in case PIN_CONFIG_OUTPUT to avoid
returning a negative value.
2. rename the "bt565" to "bt656" according to corepinmux document

Verify:
test pass on U200

Change-Id: Ieeb98367e2269007a6774592abac86ef05ee8f64
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>

amvecm: fix flicker when change between Launcher and Signal Source [1/1]

PD#SWPL-848

Problem:
ioctrl set the same gamma value again

Solution:
if the gamma value is same as the ioctrl userspace value, do not set again

Verify:
txlx

Change-Id: I6f17f5ff234513c5a886004aedea81b9945c5b98
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>

vpu: add support for tl1 [1/1]

PD#172587

Problem:
Bringup vpu for TL1.

Solution:
Add vpu support for TL1.

Verify:
Verified on PTM/PXP.

Change-Id: Ic2fb7682ddc1b21840e1be1d8462d4c0902e739d
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>

lcd: add tl1 support [1/1]

PD#172587

Problem:
not support tl1

Solution:
add tl1 support

Verify:
test pass on PTM

Change-Id: I5a9073fc08a98ae95d4961297a7427864d92279b
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>

backlight: add support for tl1 [1/1]

PD#172587

Problem:
do not suppoert for tl1

Solution:
add backlight support for fl1

Verify:
verified on PTM

Change-Id: I052a7ef93ec9cb21a544e4823a4c9a339d38b5f9
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>

arm: dts: tl1: add decoder device tree [3/3]

PD#174543

PD#172587

Problem:
new added function for tl1

Solution:
add vdin afbce support for tl1

Verify:
verified on PTM

Change-Id: I42054b8228161713ac10446491ebdb50a71975ad
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>

media: add codec support for tl1 [1/1]

PD#172587

Problem:
Bringup codec for TL1.

Solution:
Add codec iomap device tree node for TL1.
Add canvas device tree node for TL1.

Verify:
Verified on PXP/PTM.

Change-Id: I8b9a6645f1f9fd7d4aa9cae6166895e61ddc3e36
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

rdma: add rdma support for tl1 [1/1]

PD#172587

Problem:
Bringup rdma for TL1.

Solution:
Add rdma support for TL1.

Verify:
Verified on PXP/PTM.

Change-Id: I425edc1e47db2ea834fcc5acb0e3d0ee1f30a9f7
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

osd: tl1: add osd support for tl1 [1/1]

PD#172587

Problem:
Bringup osd for TL1.

Solution:
Add osd support for TL1.
Add ge2d device tree node for TL1.

Verify:
Verified on PXP/PTM.

Change-Id: I3d20934f015108f545c3c72b979d1bd8187b282e
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

amvideo: add amvideo support for tl1 [1/1]

PD#172587

Problem:
TL1 needs support amvideo driver.

Solution:
1. Add amvideo node into dts file, default enable.
2. Change the vd mif and sr reg offset.
3. Force bypass dolby vision function.
4. Change the register following hardware design.
5. Make amvideo afbc work for tl1.

Verify:
On PTM.

Change-Id: I0d857f8a707328383328daa23e6ba8e156c2e6e0
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>

audio: auge: add sound card support for tl1 [1/1]

PD#172587

Problem:
Bringup tl1 sound card.

Solution:
Add tl1 sound card.
Add external interface for audio input/output.

Verify:
Tested by PTM
Sound card is setup.
TDM and SPDIF internel loopback is ok

Change-Id: I60830ca44a62ee2a8e16343e91e7311152cab161
Signed-off-by: Xing Wang <xing.wang@amlogic.com>

vdac: vdac: add vdac support for tl1 [1/1]

PD#172587

Problem:
do not suppoert for tl1

Solution:
add vdac support for fl1

Verify:
test pass on local

Change-Id: I7b3da34289dfe0638a24b812658db7e462ebdd4c
Signed-off-by: Nian Jing <nian.jing@amlogic.com>

avin: add avin detect support for tl1 [1/1]

PD#172587

Problem:
do not suppoert for tl1

Solution:
add avin detect support for fl1

Verify:
just coding for tl1 will test later

Change-Id: I809f7068c9d0a45c89bd7dc4e6615db99b11f015
Signed-off-by: Nian Jing <nian.jing@amlogic.com>

tvin: add vdin and viu support for tl1 [1/1]

PD#172587

Problem:
do not suppoert for tl1

Solution:
add vdin and viu support for fl1

Verify:
verified on PTM

Change-Id: If4e267356fa666541853cfc7b49008795f9ec301
Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com>

vdin: add afbce function for tl1 [1/1]

PD#172587

Problem:
new added function for tl1

Solution:
add vdin afbce support for tl1

Verify:
verified on PTM

Change-Id: I5e3e2487b6cdbed2d2ca794a6a21ed885e4bf469
Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com>

hdmirx: hdmirx driver for tl1 [1/1]

PD#172587

Problem:
hdmirx bringup for tl1

Solution:
1.modify write top api, add addr offset -qy
2.modify write edid api -qy
3.replace top hw reset api
4.add aocec access register idle -qy
5.for tl1 bypass sw eq -qy
6.replace pddq api -qy
7.modify arc control for tl1 -qy
8.add n/cts auto mode
9.add hdcp balance path
10.add sscp mode
11.optimize reg map(rm unused reg addr)
12.add recent commits from 4.9 trunk
13.modify top clk cntl bit definition
14.modify top offset addr handle(x4)
15.add audio pll setting -qy
16.update phy setting - qy
17.modify audio pll ctrl api for tl1 -qy
	-add clk monitor function
	-add clk stable api for tl1
18.add emp data to pfifo -qy
19.modify edid write and other function -qy
20.add emp data to ddr -qy
21.add tmds data to ddr -qy
22.add cec for tl1 -qy
	-fix ctc 7-1
	-add status register for cec a/b
23.add cec and hdmirx dts -qy
24.clean tl1 rx related clk measure
25.hdmirx and cec dts

Verify:
1.run PTM
2.need verify on chip

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

audio: codec: add tl1_acodec support for tl1 [1/1]

PD#172587

Problem:
Add aml_tl1_acodec driver support for tl1

Solution:
1.add files sound/soc/codecs/amlogic/aml_codec_tl1.acodec.c(.h)
2.update files sound/soc/codecs/amlogic/Kconfig(Makefile)

Verify:
kernel build passed, need verified after chipback

Change-Id: I19717a442f22f5b6844627475992ef7c8cc20a71
Signed-off-by: shuyu.li <shuyu.li@amlogic.com>

hdmirx: add hdmirx repeater function [1/6]

PD#SWPL-323:

Problem:
add hdmi repeater function

Solution:
1.add the edid receive and mix.
2.add the flow of repeater.

Verify:
R321

Change-Id: I9942c5f345e2fdfff110f01d4d0c2b4b23120c07
Signed-off-by: hongmin hua <hongmin.hua@amlogic.com>

ddr: fix bandwidth read result 0 on 32bit OS [1/1]

PD#SWPL-960

Problem:
Reading bandwidth of DDR from sysfs get all 0 result on 32
bit kernel

Solution:
Fix overflow when calculating bandwidth.

Verify:
P212

Change-Id: I35837db653bdc2d97ced98689546a9ffc0db21c7
Signed-off-by: tao zeng <tao.zeng@amlogic.com>

mm: reduce watermark if free cma is too large [1/1]

PD#SWPL-807

Problem:
Sometimes driver can't allocation memory under atomic environment.
And free pages is enough but they are nearly ALL CMA pages.

Solution:
Reduce watermark with harf of free cma pages even allocation support
CMA.

Verify:
P212

Change-Id: I8e49768d4384ed064775537754a2b7f09a5bbb7c
Signed-off-by: tao zeng <tao.zeng@amlogic.com>

avb: avb enable need to translate more types [1/1]

PD#SWPL-1095

Problem:
avb need more command line size.

Solution:
change max size to 2048

Verify:
verify by ampere

Change-Id: I9c1089a3ea0888e8ccd82f16d2b1111b6d88922a
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

mm: avoid pages migrated to different zone [1/1]

PD#SWPL-881

Problem:
Amlogic modified code when compatcion from normal case.
And side effect is that pages in normal zone maybe migrated to
highmem zone. Which caused page_address get a NULL value and
kernel panic occurred.

Solution:
Avoid pages migarte to different zone by adding forbid_to_cma
flags.

Verify:
P212

Change-Id: I1d9c6653dc1069562db3c1be3f53a3510a51f0d1
Signed-off-by: tao zeng <tao.zeng@amlogic.com>

usb: adb reboot and then adb disconnect [1/1]

PD#174155

Problem:
complete_ep 0xffffffc05bed2858, ep->queue empty!
1. After adb process be killed, data buffer is freed and
this memory is allocated for the other. But the address
is hold by the controller.
2. Adbd in PC is running. So, the controller receive the
data and write to this memory.
3.The value of this memory is modified by the controller.
This could cause the memory problem.

Solution:
whenever io_data->aio equals 1, the data buffer is from a fixed array.

Verify:
Test: adb devices, adb shell, exit, adb push
in android8(p212) and android9(w400)
verified by he he

Change-Id: Idac755d3646639e2944a82f42abf9adb9aeaea8c
Signed-off-by: he.he <he.he@amlogic.com>

dts: support 32bit for gxm_q201 [1/1]

PD#SWPL-1140

Problem:
add support 32bit for gxm_q201.

Solution:
add 32bit dts for gxm_q201.

Verify:
gxm_q201

Change-Id: I3c9a6ae72fad6575bd814818967d9ff80e62f5d4
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

amvecm: pq: add amvecm support for tl1 [1/1]

PD#172587

Problem:
new feature, add amvecm support for tl1

Solution:
1. add cm hist for tl1
2. add 3dlut for tl1
3. add hdr support for tl1
4. add wb for tl1
5. add local contrast

Verify:
verify on tl1 ptm

Change-Id: I1c7ebb83a1fb72a4529415fb9bf4acfd134e6b11
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>

dts: add ir cut control GPIO [1/1]

PD#SWPL-900

Problem:
add ir cut control

Solution:
add ir cut control GPIO

Verify:
g12b-skt

Change-Id: I16c7d03ed4cc1dd3842cab80a987dde1a83e5cbc
Signed-off-by: yu.zhang <yu.zhang@amlogic.com>

hdmitx: add init code for repeater [2/6]

PD#SWPL-323

Problem:
For TXLX/T962E, it has both HDMI Rx and TX, and lacks of HDMI repeater
functions, including HDCP repeater function.

Solution:
Add the init code for hdmi repeater

Verify:
TXLX/T962E/R321

Change-Id: Iaf17ae62c590ff4f8478dd5556f3ed24b9ff3bb1
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>

atv_demod: switch channel with the script, the ATV shows no signal [1/1]

PD#SWPL-791

Problem:
Switch channel with the script lasts 14 hours, the ATV shows no signal.

Solution:
To avoid conflict, don't need to check the CLK
and PLL states in atv demod write and read function.

Verify:
verified by p321

Change-Id: I033c54f14541ed540dfce1b9c4e21d2b5a8b9487
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>

media: keep last normal frame before reset [2/2]

PD#OTT-71

Problem:
google cast display green lump when seek.
reset after seek opration.

Solution:
keep last normal frame before reset and buf free.

Verify:
U211, Atom

Change-Id: I02304998c9434f1055de1138700510f4c19f466f
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>

unifykey: add the hdmirx repeater key block [3/6]

PD#SWPL-323:

Problem:
add the hdmirx repeater key block

Solution:
add the hdmirx repeater key block.

Verify:
R321

Change-Id: I61920b706b5dd08c6be9647add287f85b35fb0ee
Signed-off-by: hongmin hua <hongmin.hua@amlogic.com>

mm: make sure the gtp flag is low default [1/1]

PD#SWPL-807

Problem:
The app's window cound be black screen when launched if the ion system
does not retry to allocate memory with the gtp high flag.

Solution:
make sure the gtp flag is low default

Verify:
P212

Change-Id: I562125573f8175cd180196ca73eb04d7dd36add0
Signed-off-by: an.xi <an.xi@amlogic.com>

dts: emmc: uboot enable emmc config [2/3]

PD#SWPL-736

Problem:
The s400 emmc platform uboot cannot be loaded
into kernel normally

Solution:
enable enable emmc node in dtb by fdt command.
    and modify malloc max size to 18M.

Verify:
s400

Change-Id: Iaef58f1b05a952793d414eb82ac476d88d910fe1
Signed-off-by: yuegui.he <yuegui.he@amlogic.com>

dts: GVSDK: modify loopback and led device name [1/1]

PD#173996

Problem:
1. to support hw loopback channel 2,3 for GVSDK.
2. led is31fl32xx device name register fail.

Solution:
1. change boolback to channel 2,3
2. register led is31fl32xx name success.

Verify:
S400_GVSDK/S420_GVSDK

Change-Id: Ie1bbc01c4624fd1e2e2662c4d9c876e56c301a99
Signed-off-by: Renjun Xu <renjun.xu@amlogic.com>

mm: exclude free cma pages when calculate watermark [1/1]

PD#SWPL-1210

Problem:
Some drivers(eth/wifi) occasionally can't allocate memory under
atomic context. From mem status print, there are enough free
pages but most of them are CMA.

Solution:
Exclude free cma pages when calculate water mark. This can push
kswapd/compaction work more aggressive.

Verify:
P212

Change-Id: Ia723f21c0316eff1a38e759ff9f044bb59aa8efa
Signed-off-by: tao zeng <tao.zeng@amlogic.com>

dv: set stb core run_mode_delay as 0 [1/1]

PD#SWPL-781

Problem:
when starting to play video, the manu bar shakes

Solution:
stb core don't need run mode delay.

Verify:
t962e (txlx)

Change-Id: I22ba5d778eedd72f87b4c687b38acf1b8c6d6fc9
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>

dv: fix the green screen when changing dv mode [1/1]

PD#SWPL-1029

Problem:
when changing dv mode from standard to ll mode.
wn tp vks should be enabled

Solution:
enable wn tp vks when setting ll mode

Verify:
t962e (txlx)

Change-Id: I3b399132cf1a3c7b1799f36f9bc3a0696883029f
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>

lcd: lcd_extern: fix get invalid extern_driver null pointer mistake [1/1]

PD#SWPL-1152

Problem:
There is a null pointer mistake in lcd_extern_get_driver for invalid driver

Solution:
add null pointer protection

Verify:
txlx r311

Change-Id: I171d10ab26e6c298b8eb4065dfa054a237bfd53b
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>

crypto: Enable ARMCE and set aes dma to slow mode [1/1]

PD#SWPL-574

Problem:
xfrm test failed randomly in VtsKernelNetTest
due to random failed in gcm(aes)

Solution:
Use ARMCE for small sized crypto processing and use
copy mode when HW dma is used

Verify:
verified on ampere

Change-Id: I31cd75cfcd85da9fc9e9640135c7ce76623ef715
Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>

USB: host: tuning disconnect threshold on g12a/g12b [2/2]

PD#174736

Problem:
Some usb device may disconnect when handshake

Solution:
tuning disconnect threshold when usb host initial
now default is 0x24, only three value can tuning, 0x2c,0x34,0x3c
we set 0x34 now

Verify:
Google estelle boards which return from factory
no side effect on refernce u200 board

Change-Id: I71d974a6bac43452b20bd7f2a6827d3a46fa39fb
Signed-off-by: qi duan <qi.duan@amlogic.com>

audio: solve av out output level low issue [2/2]

PD#SWPL-766

Problem:
  av output level only 100mv

Solution:
  change the channel map for av out,
  use orignal pcm for output w/o volume
  control and postprocess.

Verify:
  verified by r311

Change-Id: Ibeaf0ecfda03f81ff6061dc9c4975049452ba659
Signed-off-by: Lianlian Zhu <lianlian.zhu@amlogic.com>
Signed-off-by: Jian Xu <jian.xu@amlogic.com>

chipid: meson: add ops id for S805Y [1/2]

PD#SWPL-940

Problem:
Need ops id api for S805Y

Solution:
Add ops id api

Verify:
s805y_p215

Change-Id: I179f87acbc3f57456e0359bd0d502c58cc3a9b9c
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>

hdmitx: add feature limited [3/3]

PD#174490

Problem:
Lack feature limited for certain types

Solution:
Add feature limited for certain types

Verify:
TBD

Change-Id: Ifbe104fe98fe1e3875f2f1af7793348856275b92
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>

dts: support 32bit for g12b_w400 [1/1]

PD#SWPL-1010

Problem:
add support 32bit for g12b_w400

Solution:
add 32bit dts of g12b_w400.

Verify:
g12b_a311d_w400

Change-Id: I30ac9cb80721b04a13532ceb5c14f76bdf1cc575
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

display: dts modify [1/1]

PD#TV-405

Problem:
Should create a 720p ui display mode on p321.

Solution:
Created a folder named t962_p321_720p under device/amlogic
and modified some variate.
The diffs that compare with txl_t962_p321.dts
amlogic-dt-id = "txl_p321_v1_720p";
	size = <0x400000>;
	alloc-ranges = <0x3fc00000 0x400000>;
	mem_size = <0x00400000 0x00b00000 0x00100000>;
	/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x0b51000*/
	display_mode_default = "720p60hz";
	/*1280*720*4*3 = 0xA8C000*/
	display_size_default = <1280 720 1280 2160 32>;
	logo_addr = "0x3fc00000";

Verify:
p321

Change-Id: Ia397cd6cbcf4fdd9fb139259099805bdad90b92f
Signed-off-by: Guotai Shen <guotai.shen@amlogic.com>

dts: support 32bit for gxl_p230 [1/1]

PD#SWPL-1116

Problem:
add support 32bit for gxl_p230.

Solution:
add 32bit dts for gxl_p230.

Verify:
gxl_p230

Change-Id: Icc62c45e7bd36e8248ad0bb11a67a0151cf7ea34
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

dts: sync difference between arch32 and arch64 [1/1]

PD#SWPL-959

Problem:
sync arch32 and arch64 dts.

Solution:
sync arch32 and arch64 dts.

Verify:
r311

Change-Id: I493c83f38899628ac65c637e81f053a7c22bd24f
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

cec: for support multi-logical address [1/2]

PD#SWPL-418

Problem:
cec: for support mult-logical address

Solution:
1.add interface: remove logical address
2.for support multi-logical address

Verify:
r311 r321

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

cec: for support multi-logical address [2/2]

PD#SWPL-418

Problem:
cec: support multi-logical address

Solution:
1.enable cec_a, cec_b
2.enable two interrupt
3.enable two pinmux oa_7, ao_8
4.cec_a only send all msg
5.cec_b only receive all msg
6.discard ceca broadcast msg

Verify:
r311 r321

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

emmc: ffu: add emmc ffu update support [1/1]

PD#174683

Problem:
kernel emmc ffu is not supported.

Solution:
add emmc ffu update support with mmc untils.

Verify:
p212

Change-Id: Ice9ffb174c061e3f114b0b68af290492808b0a5e
Signed-off-by: Nan Li <nan.li@amlogic.com>

codec_mm: add reserved & cma support for 4.9. [1/1]

PD#172483

Problem:
Add reserved & cma support for 4.9.

Solution:
1. add tvp padding, for test.
2. add no-cma-tvp,to force not used cma for tvp.
3. add nomap for reserved memroy detective.
4. add res & cma two mem region on same board.
5. add clear-map property for codec_mm_cma.

Verify:
Test this function with Android_O-MR1(GTVS) & ExoPlayer.

Change-Id: Ib20e0e9bc4725afb271de97543ce5ebf3bfcfb29
Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com>

mm: clear MMU mapping for secure os memory [1/1]

PD#SWPL-1631

Problem:
If Cortex A73 accessed memory near secure memory range, an
SError may occur due to prefetch of A73 core.

Solution:
Remove mmu maping of secure memory range.
Note: must add clear-map and set clear range property in DTS

Verify:
W400

Change-Id: I718919c1b4873584eb87e00332622a1626672808
Signed-off-by: tao zeng <tao.zeng@amlogic.com>

cec: revert changesy [1/1]

PD#SWPL-418

Problem:
TXL can't bootup

Solution:
revert it

Verify:
p321

Revert "cec: for support multi-logical address [2/2]"
This reverts commit cc185dc81d.

Revert "cec: for support multi-logical address [1/2]"
This reverts commit b7922078ea.

Change-Id: I1cef0ac194464d75ffff3fe765f15b5f944406b2
Signed-off-by: Lei Qian <lei.qian@amlogic.com>

aarch64: enable swp software emulation [1/1]

PD#IPTV-14

Problem:
3D Benchmark.apk crash

Solution:
Add swp instruction support on armv8

Verify:
local

Change-Id: Ice2bef5c0ef7110b3adb4af811f99d4bfca1e8dc
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>

emmc: Modify delay of command line to 1/4 command window [1/1]

PD#SWPL-1184

Problem:
emmc data crc error

Solution:
Modify delay of command line

Verify:
A113d_s400

Change-Id: I7211da9da75569aebaf0c2790e3134e88a6f3077
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>

adc_key: delete early_suspend code [1/1]

PD#OTT-144

Problem:
after the dark screen, the adc button does not work

Solution:
The adc_keypad introduces earlysuspend for MID project:
after the LCD backlight disable, prevent the user from
pressing the key to open some applications and not complete standby.
Now check the adc button using the "system_freezable_wq" system queue,
which replaces the function of the code.So can remove it.

Verify:
g12b socket

Change-Id: I2333ba3dc406d2624962d116293a0b9d36f97534
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>

audio: fix errors of coverity [1/1]

PD#166793

Problem:
coverity check errors of format

Solution:
fix err

Verify:
verify locally

Change-Id: Ie3a404fe50c5bdaa6a9cf4a4194659502defdbd2
Signed-off-by: jiejing.wang <jiejing.wang@amlogic.com>

hdmirx: fix sound noise when switch hdmi port [1/1]

PD#SWPL-1224

Problem:
There will sound noise when switch hdmi port.

Solution:
Remove bandgap off when close port.

Verify:
Locally

Change-Id: Ibd9be3aa6f32072918f7b1ec151463452b2b879a
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>

mm: clear MMU mapping for secure os memory [1/1]

PD#SWPL-1631

Problem:
If Cortex A73 accessed memory near secure memory range, an
SError may occur due to prefetch of A73 core.

Solution:
Add clear mmu property for arm platform

Verify:
W400

Change-Id: I2e396f77772aeea231d0bf5f38a81440117ecdd6
Signed-off-by: tao zeng <tao.zeng@amlogic.com>

video: merged from A wait AFBC idle when report state [1/1]

PD#169128:

[Problem]
When quick switch video between 2 vsync isr, the AFBC may read wrong
data, and green screen or distortion image occurs.

[Solution]
1. Add delay when get video layer state, to make sure afbc is stopped
2. Remove ambiguous log print

[Platform]
Blanche
BranchTo: NONE

[Test]

Change-Id: I94ccf25373f29ce188829ab1b7db6f9df1fb49ad
Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com>

dts: add isp and galcore support to w400-buildroot [1/2]

PD#SWPL-1819

Problem:
lack of isp and galcore support in buildroot dts

Solution:
merge configurations from skt board

Verify:
local

Change-Id: I5936341fc24719f345c7707e16e692ae292ca6fe
Signed-off-by: Jun Zhang <jun.zhang@amlogic.com>

dts: modified atom.dts support 32bit. [1/1]

PD#SWPL-1942

Problem:
add atom.dts support 32bit.

Solution:
modified length of reg, mem etc.

Verify:
r321

Change-Id: I2a518af2a76b8cb17ded68e994c3065072b92b9c
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

vccktest: add vccktest dts for buildroot [1/1]

PD#174851

Problem:
buildroot no vccktest dts

Solution:
add vccktest dts

Verify:
g12a/g12b test pass

Change-Id: I6907fa3cfc087ac84395956ddbda678f7a5e3f4b
Signed-off-by: Huan Biao <huan.biao@amlogic.com>

script: segments can appear in descriptive information [1/1]

PD#174488

Problem:
segmentation in descriptive information is reasonable and
should be allowed.

Solution:
modify the check codes.

Verify:
test locally.

Change-Id: I5e34ef2dd26077bb54adee7597a1aa3c789566c9
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

vlock: optimize vlock process for interlace input [1/1]

PD#SWPL-743

Problem:
The picthre is shaking when press DVD remote
control in AV source

Solution:
add delay work for vlock process interlace input

Verify:
T962X-R311

Change-Id: Ic2ed077e0684ecc6b0990336e7a4ab7022931886
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>

atv_demod: pc bad value in panic after change source [1/1]

PD#SWPL-1636

Problem:
1.pc bad value in kernel panic after change source.
2.System crash down when change source.

Solution:
optimize atv demod code.

Verify:
verified by p321

Change-Id: I655d1253950475dfb49ae1b174597797000adb73
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>

vout: add bist test on vout [1/1]

PD#SWPL-1630

Problem:
add cvbs/hdmi/lcd bist test on vout

Solution:
add cvbs bist test on vout

Verify:
test pass on u200/p212

Change-Id: Ie61d9b0d63649ec3022fd720068b689f4d721e3b
Signed-off-by: Nian Jing <nian.jing@amlogic.com>

osd: meson-hwc screen always blank [1/1]

PD#163001

Problem:
TL1 code merged caused meson-hwc screen always blank

Solution:
fix meson-hwc screen always blank

Verify:
verified in u200 board

Change-Id: I0a9371b42546e2713e6dcb926e7c94598e29da1d
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

osd: osd shift-workaround one line fixed [1/1]

PD#163001

Problem:
current osd code have one line missing issue in meson-hwc

Solution:
osd blend used +1 line to fix shift issue,
and used freescale to cut it.

Verify:
verified in u200 board

Change-Id: I2354742d456327d9f1aa5713ee782648895034db
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

smartcard: fix defects for coverity [1/1]

PD#166793

Problem:
conditional statement not is valid.

Solution:
change type u32 to type int.

Verify:
module owner confirmed.

Change-Id: I9fdfa444b29104c7afc9b7a380748ebe82ed390b
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

osd: uboot logo scaler down in 4k issue [1/1]

PD#163001

Problem:
uboot logo scaler down in 4k

Solution:
uboot logo size adjust when vout changed before
first page flip command

Verify:
verified in u200 board

Change-Id: Ic23e695fe716811eaf3faa62069c808a03c26f9d
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

osd: add hdr mode set via meson-hwc support [1/1]

PD#163001

Problem:
hdr mode set not supported

Solution:
add hdr mode set via meson-hwc support

Verify:
verified in u200 board

Change-Id: Iaad75982003870f9469e4155aedb9c13349b60b9
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

dts: fix some errors on g12b_w400 for 32bit [1/1]

PD#SWPL-1010

Problem:
some errors of reg address.

Solution:
modify to support 32bit.

Verify:
w400.

Change-Id: Ia35e95ac59084a9c57a9a4ab32fecb64f78c772e
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

ddr: detect bandwidth except mali and reduce bandwidth [2/3]

PD#SWPL-122

Problem:
ddr bandwidth is tightly in many cases, such as HDR/4K video playing,
and then refresh osd at the same time

Solution:
in most cases the problem is refreshing osd when bandwidth tightly,
so detect ddr bandwidth usage except mali and reduce it when it is tightly

Verify:
verify by p321/r311

Change-Id: Ia594f08dbe9a8a7a8d78b5104c93bddaa8229c0b
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>

arm: dts: gxl: replace watchdog with new version [1/1]

PD#SWPL-1600

Problem:
The current watchdog is not the upstream standard driver.

Solution:
Replace watchdog device tree to use the standard watchdog driver.

Verify:
S905X P215/P212 Android-32bit Kernel-32bit.

Change-Id: I972c8ebb0158caa2df393d9a2d687d9298181102
Signed-off-by: Bo Yang <bo.yang@amlogic.com>

arm64: dts: g12a: fine-tune voltage OPP [1/1]

PD#165143

Proble:
fine-tune voltage OPP

Solution:
fine-tune voltage OPP

Verify:
G12A/G12B,PASS

Change-Id: I0b3fb0e4624e2ddfa635c8225a740ed7a8ff3e51
Signed-off-by: Hong Guo <hong.guo@amlogic.com>

audio: fix audio driver del_timer BUG_ON crash issue  [1/1]

PD#SWPL-972

Problem:
    audio crash when ATV switch channel long time burning test

Solution:
    there is a risk to fetch the timer lock. when input stop, stop_timer
    will call del_timer, at the same time the function
    "aml_i2s_hrtimer_callback" is waiting for the timer lock,after
    stop_timer release the lock,"aml_i2s_hrtimer_callback" get the
    lock and call mod_timer again, which will set the timer to pending
    status. It will cause the next  "start input" stage,add_timer will
    trigger BUG_ON.Now we put the lock before the active status
    checking then we will not touch the timer.

Verify:
    Need burning test

Change-Id: I1fb66903a4d31e9491ac0533e477e1597575d4cf
Signed-off-by: Jian Xu <jian.xu@amlogic.com>

hdmitx: enable repeater_tx in r321/atom dts [2/3]

PD#SWPL-1303

Problem:
For TXLX/T962E/R321 cases, there are both HDMI TX and RX.
Should consider it as repeater.

Solution:
Enable repeater_tx in r321/atom dts
Also, add a missing ksv_lists[] clear.

Verify:
r321/atom

Change-Id: I7b512c34123481380220f9262466fde56b0ae6e3
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>

hdmitx: remove a wrong Y422 format judgement [1/1]

PD#IPTV-55

Problem:
When connect to a Samsung TV(support 4k60 422 12bit), get a wrong
0 of 'echo 2160p60hz422,12bit > valid_mode'

Solution:
Remove a wrong Y422 format judgement

Verify:
P212

Change-Id: Ic0f2cefc1e0893390ac38298b55272877d81e04b
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>

tsync: tsync change the apts set code [1/2]

PD#SWPL-1774

Problem:
DD program has avysnc problem over one night play

Solution:
fix the apts set bug

Verify:
p321

Change-Id: I0f6a5b47d3e3171a3dd8fa9a0b721cd11ec20b9e
Signed-off-by: live.li <live.li@amlogic.com>

amvecm: overscan: fix video local play, screen mode set error [1/1]

PD#SWPL-206

Problem:
overscan set error when local play

Solution:
overscan don't set at vpp

Verify:
verify on txlx

Change-Id: Ifd4ad4f5fcdb9fbc7ad05a540d0ed11b24d4ca66
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>

thermal: sensor: fix thermal disabled mode issue [1/1]

PD#SWPL-2130

Problem:
tsensor driver update thermal event when mode disabled

Solution:
fix tsensor disable mode issue

Verify:
A311D W400 pass

Change-Id: If9e3d3ea15732a0efbd8314003b27bc0bdf3e476
Signed-off-by: Huan Biao <huan.biao@amlogic.com>

deinterface: add afbc support on g12a and txlx [1/1]

PD#SWPL-1618

Problem:
Add afbc support on g12a and txlx

Solution:
add afbc support on g12a and txlx

Verify:
T962X-R311, U200(G12A)

Change-Id: Ia0cce8516a98653b01c3bc628e812c3a81b1df59
Signed-off-by: huaihao.guo <huaihao.guo@amlogic.com>

dts: change CMA layout [1/1]

PD#SWPL-1909

Problem:
On 32bit kernel, codec cma is located in normal zone by
"alloc-ranges" parameter with large size. This takse up
memory space for kernel and drivers. Sometimes we can see
memory allocation fail log but there are still enought
free pages. But most of these pages are CMA pages.

Solution:
Move codec cma location to high memzone. On 32bit, low
768MB memory is normal zone.
This change also correct first 1MB memory lost problem
for chips later than TXLX

Verify:
P212

Change-Id: I4592d34d08ee4dbb6700bbbfc4e0fadaceab0310
Signed-off-by: tao zeng <tao.zeng@amlogic.com>

media: remap the addr to prevent crash on the 32bit & 2G board [1/1]

PD#SWPL-1909

Problem:
mem rw exception caused crashed.

Solution:
1. add mapping the highmem address by the func vmap().
2. remove the flag CODEC_MM_FLAGS_CPU if not necessary.

Verify:
p212, w400

Change-Id: I982c775d7c009335cae5802f0eb6287d22037db6
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>

media: fix some coverity error: [1/1]

PD#SWPL-2053

Problem:
Coverity detected some code defects.

Solution:
Fixed these code defects.

Verify:
Verified u212

Change-Id: Ie3c0907c7ee3db94f65f58aa5d5c96812a7fe38c
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>

dts: modify the remaining 64bit dts to support 32bit [1/1]

PD#SWPL-2046

Problem:
some of the remaining 64bit boards do not support 32bit.

Solution:
modify the dts to support 32bit.

Verify:
axg, g12a, g12b, gxl, gxm, txl, txlx.

Change-Id: I951f8d32b18243a64e2abc5008bbb015c2e21e7a
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

dv: set avi info limited range when dv output hdr mode [1/1]

PD#SWPL-1127

Problem:
when dv output hdr mode, the quantization range is default value
instead of limited range

Solution:
set quantization range to limited range in avi info

Verify:
t962e (txlx)

Change-Id: Ib4fbeb1c7efcedd7194143772ee5c663284a1c77
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>

drm: pq: G12A DRM support gamma and ctm setting [1/1]

PD#165492

Problem:
G12A DRM add gamma and ctm setting  support

Solution:
1. amvecm: add gamma apis for drm
2. drm: add gamma and ctm setting

Verify:
Verified on customer platfor

Change-Id: Iff5204ae7f719542463ac15140e471cd762c9c27
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>

di: fix dump_status log error [1/1]

PD#174473

Problem:
dump_status log error

Solution:
fix dump_status log error

Verify:
verified in t962X_r311 board

Change-Id: I53cec7b93f6e2649bd527b8591995d54bec6450d
Signed-off-by: wenfeng.guo <wenfeng.guo@amlogic.com>

sdio: optimize sd & wifi TDMA [1/1]

PD#SWPL-1908

Problem:
sdio wifi error TDMA.

Solution:
optimize host reg value set error.

Verify:
u211 & u212

Change-Id: I0e0d52ac2bce42cf163f0065d46badc938832a65
Signed-off-by: Nan Li <nan.li@amlogic.com>

atv_demod: Output big "PO" sound when change source from ATV [1/3]

PD#SWPL-318

Problem:
Output big "PO" sound when change source from ATV to others,
or switch between small window and full screen in ATV source.

Solution:
disable atv status early when exit ATV source.

Verify:
verified by p321

Change-Id: I82af7f8eaef181f1f72ef1f9d194e33c1efdcdb5
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>

deinterlace: fix di coverity & di_trace [1/1]

PD#SWPL-2138

Problem:
Fix di coverity & di_trace

Solution:
fix di coverity & di

Verify:
T962X-R311

Change-Id: I9be91832eeed89ebd715276c75414e4e6da55240
Signed-off-by: wenfeng.guo <wenfeng.guo@amlogic.com>

vdin: enable vdin0 urgent for T950 default [1/1]

PD#TV-288

Problem:
There is flicker and jitter in HDMI

Solution:
enable vdin0 urgent for T950 default

Verify:
p321-T950

Change-Id: I17e472d7a47411093e9ade70a342807bed060a3a
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>

clk: g12a/g12b: fix 32bit set mpll clk overflow [1/1]

PD#SWPL-1933

Problem:
32bit system clk overflow

Solution:
let mpll clock not overflow

Verify:
g12b

Change-Id: Ie1c7c611e637776348bb35a3e0c1624cee57716f
Signed-off-by: shunzhou.jiang <shunzhou.jiang@amlogic.com>

reboot: reason: add reboot_reason quiescent [1/4]

PD#SWPL-1887

Problem:
Android TV need reboot_reason quiescent

Solution:
add reboot_reason quiescent

Verify:
ampere

Change-Id: Ie5a748faae05be93c56722b7806df6179116a047
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>

arm64: dts: p230: add dvb module

PD#172865

Problem:
Customer requests a new release for linux dvb
Need enable dvb for QA testing

Solution:
Need enable dvb for QA testing

Verify:

Change-Id: Ib082c457d6f43ef4d6a5d16059a7e8ce068a332e
Signed-off-by: yeping.miao <yeping.miao@amlogic.com>

emmc: clean emmc reg val for probe [1/1]

PD#SWPL-2286

Problem:
emmc response crc error in emmc init.

Solution:
clean emmc reg val from uboot to kernel.

Verify:
w400

Change-Id: I6a4763187f18e9e284c887c5c788f3a88c8548ff
Signed-off-by: Nan Li <nan.li@amlogic.com>

dts: dtsi: add dtsi for ab update [1/6]

PD#SWPL-1513

Problem:
ab update can not work on P

Solution:
add dtsi for ab update for P

Verify:
test pass in ampere

Change-Id: I6ff219170a16c0081fba7297110e8dfaadcff401
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>

backlight: ldim: update usage for new spi driver [1/1]

PD#SWPL-1603

Problem:
don't support old spi driver now

Solution:
update new spi driver api for ldim driver

Verify:
txlx r311

Change-Id: I4dff13e4cab5666a30488730e27c6275b933a922
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>

hdmitx: fix wrong power uevent in suspend/resume [1/1]

PD#SWPL-1931

Problem:
Wrong hdmi_power uevent in suspend/resume flow

Solution:
Remove current mode judgement

Verify:
R321

Change-Id: Ib36e8d6cb4988f7b2be91146b12e974c194526ca
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>

ddr: fix dmc_monitor register bit missmatch on G12A/G12B [1/1]

PD#172256

Problem:
On G12A/G12B, bit for ddr0 protection 0 vilation is not same

Solution:
Fix bit missmatch problem

Verify:
U212

Change-Id: I5dca14c8bc96bdcb85dbe8bbd5a9a18157834bcf
Signed-off-by: tao zeng <tao.zeng@amlogic.com>

deinterlace: fix kasan bug in di_task_handle [1/1]

PD#173820

Problem:
kasan bug in di_task_handle

Solution:
delete cma_mutex because it has no effect

Verify:
P321

Change-Id: Ie6ca7973576e7350870c5466b54b38b490dff65e
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>

mmc: fixup toshiba emmc secure discard [1/1]

PD#SWPL-1937

Problem:
secure discard and trim may cost 5mins on toshiba
"004GA0" emmc.

Solution:
using normal discard operation instead.

Verify:
W400

Change-Id: I7fd23867f8ae0af9192377de8f8c15609ef809ed
Signed-off-by: Yonghui Yu <yonghui.yu@amlogic.com>

ionvideo: Add thread stop protection when the process exits [1/1]

PD#SWPL-1689

Problem:
The thread still exists when the process exits

Solution:
Check if the thread exits when the process exits

Verify:
local

Change-Id: I6d805da6bfa0df85b6d39d065c95eed49b3cb7da
Signed-off-by: Renjiang Han <renjiang.han@amlogic.com>

dts: the memory of the reserved 1MB was recovered. [1/1]

PD#SWPL-2250

Problem:
h265 & vp9 4K playback abnormal because HEVC FRONT &
VPU READ2 pollute the phy address of near 0x0.

Solution:
it's only a temporary modification, the real reason
needs to take more time fixed.

Verify:
U212

Change-Id: I3dcc47f8979960e95c89cf53fe10eadc1a7ae5ad
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>

dts: r314: increase board dts file [2/3]

PD#SWPL-1978

Problem:
bring up board r314.

Solution:
increase board dts file

feature:
The Dts file with Einstein is identical except for the memory difference
R314 1.5G, Einstein 1G.

Verify:
Verified on txlx_t962x_r314  board.

Change-Id: I271cb92a9cbcab174fb0bb76cfbc8beff9c730d3
Signed-off-by: guotai.shen <guotai.shen@amlogic.com>

vrtc: vrtc time update for stick mem [2/2]

PD#174867

Problem:
vrtc time update for stick mem.

Solution:
vrtc time update for stick mem.

Verify:
g12a txl.

Change-Id: I65074422569370b253882a4e66fb771da10ccdbf
Signed-off-by: Hong Guo <hong.guo@amlogic.com>

irblaster: add synchronous transmit [1/1]

PD#SWPL-2170

Problem:
cts fail
android.hardware.consumerir.cts.ConsumerIrTest#test_timing

Solution:
add synchronous transmit
when it returns the pattern has been transmitted

Verify:
verify on franklin

Change-Id: I7e490236e5effc13f81e4fab3a1c7fc10c5dcfb3
Signed-off-by: Wencai You <wencai.you@amlogic.com>

amvecm: pq: add dnlp/bri/contrast for tl1 [1/1]

PD#172587

Problem:
dnlp/bri/contrast can not finetune

Solution:
1. add dnlp regisiter 10bit write
2. add brightness/contrast/sr for tl1

Verify:
verify on tl1

Change-Id: I90b363f57fbf2cd485e2acaddb5ce60a8715a47b
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>

ramdump: add ramdump support for ARM32 [1/1]

PD#165764

Problem:
ramdump is not enabled on ARM32

Solution:
Enable it and fix compatible with ARM64

Verify:
R311

Change-Id: I337ef019ecab05d25b7d9dc0cacab7a03149aa7b
Signed-off-by: tao zeng <tao.zeng@amlogic.com>

avsync: tsync: fix the avsync problem [1/1]

PD#SWPL-1158

Problem:
The video will become un-smooth after change
between several audio languages

Solution:
when apts and vpts distance is large then 60*90000
then set the tsync mode to vmaster and  set the tysnc
enable to 0

Verify:
P321

Change-Id: I7c7e32f49ca12645cf6a1aa58caeb968a9234c8c
Signed-off-by: live.li <live.li@amlogic.com>

dtv_demod: fix dtv demod crash switch once every 2s [1/1]

PD#SWPL-2293

Problem:
dtv demod switch once every 2s cause crash

Solution:
fix dtv demod crash switch once every 2s

Verify:
P321

Change-Id: Ibfd919a503e3dae41f51637cdff6e01ed27bac71
Signed-off-by: wenfeng.guo <wenfeng.guo@amlogic.com>

ramdump: fix a warning of cast [1/1]

PD#165764

Problem:
have a warning of the "ram" variable cast.

Solution:
add a "void *" to the ram variable.

Verify:
test locally.

Change-Id: I037a89a28e98ae8c8ab965e908877bf4a72d3ead
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>

vpp: fix p212 osd sdr2hdr luma too dark [1/1]

PD#SWPL-1707

Problem:
{NTS}Manual,HDR-001-TC2 Failed step 8/12/16/20 VID
and GFX doesn't match

Solution:
add osd hdr2sdr convert table for 400nit on p212

Verify:
verify on p212

Change-Id: I9a9dcf13ab0deaa8b676c5c409919367420b6d1b
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>

vpp: fix p212 osd sdr2hdr luma too dark compile [1/1]

PD#SWPL-1707

Problem:
{NTS}Manual,HDR-001-TC2 Failed step 8/12/16/20 VID
and GFX doesn't match

Solution:
add osd hdr2sdr convert table for 400nit on p212

Verify:
verify on p212

Change-Id: I16637652b6d07ba81b25f46c2684ff7ae3e1c68c
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>

vdac: fix atv/dtv resume no signal issue [1/1]

PD#SWPL-2351

Problem:
atv/dtv no signal when suspend after switch from hdmi

Solution:
disable vdac bandgap when suspend

Verify:
test pass on P321

Change-Id: I0449f0d9673f46928b8951249f5759a4a1f16562
Signed-off-by: Nian Jing <nian.jing@amlogic.com>

spicc: fix miss bytes/time consume/loopback issue [1/1]

PD#SWPL-215

Problem:
1. additional or missing bytes be sent on mosi sometimes.
2. Customer DSP load firmware through SPICC. the loading time is 12s with
buildroot release 20180907 while 6s with 20180131.
3. rx error when work in loopback mode at high speed.

Solution:
1. change to disable irq at the irq-handle begining;
change to enable irq after all data pulled.
2. pre-setup of every spi transfer spends most of time on clk_set_rate().
this time is not obvious while cpu work at a high frequence such as
1000MHz.
In fact, a slave speed is almost fixed and we needn't set it for every
transfer but set only when speed changed.
3. disable auto io delay when in loopback mode.

Verify:
verified on axg-s400-v03 and tl1-skt

Change-Id: I61bcceccc243b218879b2b0711d0aff7538151f6
Signed-off-by: Sunny Luo <sunny.luo@amlogic.com>

framebuffer: remove lock in fbmem ioctl. [1/1]

PD#SWPL-2497

Problem:
on 32bit kernel, when user space call WAITFORVSYNC,
we cannot send other command to framebuffer.

Solution:
remove lock in fbioctl as fb compat_ioctl do.
Our driver have locks to protect internal resources.

Verify:
verified on franklin.

Change-Id: I1789c09a7ea459aed4b782748847687c7f974526
Signed-off-by: sky zhou <sky.zhou@amlogic.com>

dv: fix osd color matrix when dv enabled [1/1]

PD#SWPL-1804

Problem:
fix osd color matrix when dv enabled

Solution:
enable osd matrix when dv enabled

Verify:
verified on u212 dev board

Change-Id: I4b4206f4d8c447873f23a3a0066af0d0fa85e18c
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>

osd: fix osd color error when osd hdr enabled [1/1]

PD#SWPL-1804

Problem:
osd color error when osd hdr enabled

Solution:
div alpha when osd hdr enabled

Verify:
verified on u212 dev board

Change-Id: I1f5ea0db404d1956f454bd5da2532bded89626ee
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

osd: add meson-hwc repodution rate support [1/2]

PD#SWPL-1810

Problem:
osd blend repodution rate not supported

Solution:
add meson-hwc repodution rate support

Verify:
verified on u212 dev board

Change-Id: Ied10393e240e8d3f2a1eefe17a2d4d3c965e3383
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

dts: GXL: defendkey: support secure upgrade check [3/3]

PD#SWPL-2100

Problem:
GXL need to support secure upgrade check

Solution:
add defendkey support in all GXL dts

Verify:
GXL skt board verify pass

Change-Id: I73b84b86f23f512ddc556b61f3a07d015c717e8c
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>

GXL: defendkey: support secure upgrade check [2/3]

PD#SWPL-2100

Problem:
GXL need to support secure upgrade check

Solution:
1.add dtb decrypt support
2.add 32bit defendkey support

Verify:
GXL skt board verify pass

Change-Id: I501967530b2a61d9b90c20241b82f92b00829453
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>

PM_SUSPEND: suspend: set wakeup reason to stick mem [2/2]

PD#SWPL-2287

Problem:
set wakeup reason to stick mem

Solution:
set wakeup reason to stick mem

Verify:
gxl,test pass

Change-Id: Iff6f1824ea4ac9ec12b8295d4283992fdac03b14
Signed-off-by: Hong Guo <hong.guo@amlogic.com>

deinterlace: fix CMA layout adaptation di_cma_reserved [1/1]

PD#SWPL-2308

Problem:
CMA layout adaptation di_cma_reserved cause crash

Solution:
fix CMA layout adaptation di_cma_reserved

Verify:
P321

Change-Id: Ia24e811a02d47d70afa1c06361fd0852c357394c
Signed-off-by: wenfeng.guo <wenfeng.guo@amlogic.com>

media: media_sync: remove serial port debug logs [1/1]

PD#SWPL-2494

Problem:
serial port always print timestamp log

Solution:
remove this log output

Verify:
P321

Change-Id: I875dffab483269374b9939f556a3ed01e9d2b215
Signed-off-by: xiaoming.sui <xiaoming.sui@amlogic.com>

dts: GXL/TXL: adjust defendkey_reserved location [1/1]

PD#SWPL-2539

Problem:
defendkey_reserved have influenced on display
during the system boot up

Solution:
adjust defendkey_reserved node location

Verify:
GXL/TXL skt board verify pass

Change-Id: I5cf0245f9653e20224c4e3bab1f6f05527011210
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>

DTS: p230 board config spdif out pin [3/3]

PD# SWPL-1223

Problem:
p230 board spdif out no audio sound

Solution:
config p230 board spdif out pin

Verify:
verify on p230

Change-Id: I0c35e6d526aab98955206f78322fcc873ff01b8c
Signed-off-by: Chaomin Zheng <chaomin.zheng@amlogic.com>

hdmitx: disable encryption hdcp1.4 fail [1/1]

PD#SWPL-2302

Problem:
Play online video,half an hour later, the TV shows
a pink screen and the sound is normal.

Solution:
Check hdcp1.4 status and disable encryption when fail.

Verify:
S922X

Change-Id: I6ce51824726b267d140750f9e9d80aa8bb921cac
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>

dv: fix the flickered problem [1/1]

PD#SWPL-1207

Problem:
fix the filckered problem when playing transition
video in sdr tv

Solution:
when dv core2 don't run, the reset can't be executed

Verify:
r321

Change-Id: I719325f1722589e02a40d46442258b0d1e3feb17
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>

display: Modify the value of register afbc_gclk_ctrl [1/1]

PD#SWPL-2565

Problem:
The splash screen problem for first frame after starting up.

Solution:
Modify the value of register afbc_gclk_ctrl.

Verify:
u211

Change-Id: Ie1ddfade0566ff8cd571c43ba8490a8c277a8758
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>

dts: fix SD card read issue for g12a board [2/3]

PD#SWPL-2588

Problem:
g12a u220/u221 boad cann't read SD card

Solution:
auto detect revA and revB chip

Verify:
test pass on u220/u221 board

Change-Id: Ia153bb3f966fe2a58d5f3ed1bf1d3f610d00ff5a
Signed-off-by: Sandy Luo <sandy.luo@amlogic.com>

frame_sync: fix last few seconds of the DD+ stream are not smooth [4/4]

PD#SWPL-714

Problem:
The last few seconds of the DD+ stream are not smooth by DTV playback.

Solution:
check the apts and vpts both discontinue,then replay the stream.

Verify:
P321

Change-Id: I6cbbdecc052dfe9fef76b44f36545b231332ee12
Signed-off-by: Yinming Ding <yinming.ding@amlogic.com>

dvb: tuner: USB DVB tuner support from Google

PD#SWPL-932

Problem:
USB DVB Dongle search program Function is not implemented

Solution:
merge usb dvb tuner from kernel3.14
http://10.8.9.5/kernel/common/commit/?h=amlogic-3.14-dev&id=7af9c5c38efdc96f5d3235f17788232a630b3d32
fixed frontend.h structures

Verify:
Ampere P

Change-Id: I16d68c2507711eda43313619d210d05699abcc25
Signed-off-by: qi duan <qi.duan@amlogic.com>

scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110

PD#SWPL-2193

This adds the following commits from upstream:

b1a60033c110 tests: Add a test for overlays syntactic sugar
737b2df39cc8 overlay: Add syntactic sugar version of overlays
497432fd2131 checks: Use proper format modifier for size_t
22a65c5331c2 dtc: Bump version to v1.4.5
c575d8059fff Add fdtoverlay to .gitignore
b6a6f9490d19 fdtoverlay: Sanity check blob size
8c1eb1526d2d pylibfdt: Use Python2 explicitly
ee3d26f6960b checks: add interrupts property check
c1e7738988f5 checks: add gpio binding properties check
b3bbac02d5e3 checks: add phandle with arg property checks
fe50bd1ecc1d fdtget: Split out cell list display into a new function
62d812308d11 README: Add a note about test_tree1.dts
5bed86aee9e8 pylibfdt: Add support for fdt_subnode_offset()
46f31b65b3b3 pylibfdt: Add support for fdt_node_offset_by_phandle()
a3ae43723687 pylibfdt: Add support for fdt_parent_offset()
a198af80344c pylibfdt: Add support for fdt_get_phandle()
b9eba92ea50f tests: Return a failure code when any tests fail
155faf6cc209 pylibfdt: Use local pylibfdt module
50e5cd07f325 pylibfdt: Add a test for use of uint32_t
ab78860f09f5 pylibfdt: Add stdint include to fix uint32_t
36f511fb1113 tests: Add stacked overlay tests on fdtoverlay
1bb00655d3e5 fdt: Allow stacked overlays phandle references
a33c2247ac8d Introduce fdt_setprop_placeholder() method
0016f8c2aa32 dtc: change default phandles to ePAPR style instead of both
e3b9a9588a35 tests: fdtoverlay unit test
42409146f2db fdtoverlay: A tool that applies overlays
aae22722fc8d manual: Document missing options
13ce6e1c2fc4 dtc: fix sprintf() format string error, again
d990b8013889 Makefile: Fix build on MSYS2 and Cygwin
51f56dedf8ea Clean up shared library compile/link options
21a2bc896e3d Suppress expected error message in fdtdump test
2a42b14d0d03 dtc: check.c fix compile error
a10cb3c818d3 Fix get_node_by_path string equality check
548aea2c436a fdtdump: Discourage use of fdtdump
c2258841a785 fdtdump: Fix over-zealous version check
9067ee4be0e6 Fix a few whitespace and style nits
e56f2b07be38 pylibfdt: Use setup.py to build the swig file
896f1c133265 pylibfdt: Use Makefile constructs to implement NO_PYTHON
90db6d9989ca pylibfdt: Allow setup.py to operate stand-alone
e20d9658cd8f Add Coverity Scan support
b04a2cf08862 pylibfdt: Fix code style in setup.py
1c5170d3a466 pylibfdt: Rename libfdt.swig to libfdt.i
580a9f6c2880 Add a libfdt function to write a property placeholder
ab15256d8d02 pylibfdt: Use the call function to simplify the Makefile
9f2e3a3a1f19 pylibfdt: Use the correct libfdt version in the module
e91c652af215 pylibfdt: Enable installation of Python module
8a892fd85d94 pylibfdt: Allow building to be disabled
741cdff85d3e .travis.yml: Add builds with and without Python library prerequisites
14c4171f4f9a pylibfdt: Use package_dir to set the package directory
89a5062ab231 pylibfdt: Use environment to pass C flags and files
4e0e0d049757 pylibfdt: Allow pkg-config to be supplied in the environment
6afd7d9688f5 Correct typo: s/pylibgfdt/pylibfdt/

Change-Id: Ib23ca90f1e34ed85db3aae9d223fc921e6f2114e
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>

deinterface: temporary remove afbc support on chip after g12a [1/1]

PD#172587

Problem:
afbc now support on chip txlx and g12a,
but we use cpu_after_eq(G12A) to judge
if afbc is support or not.

Solution:
use is_meson_g12a_cpu() replace cpu_after_eq(G12A).

Verify:
u200(g12a),t962x_r311

Change-Id: I3fb7ed54f7137fada97481177e40a2543cf8df9f
Signed-off-by: huaihao guo <huaihao.guo@amlogic.com>

osd: osd: a black line below the screen when play video [1/1]

PD#SWPL-2558

Problem:
a black horizontal line below the screen when play video

Solution:
set dummy data alpha

Verify:
verified on p321

Change-Id: I36dc924b9bc89f4f8ea61eb86c6f5bc9199e40ae
Signed-off-by: Jian Cao <jian.cao@amlogic.com>

osd: call osd_update_enable if needed [2/2]

PD#SWPL-2580

Problem:
The vd1 postblend bit in vpp misc is overwriten.

Solution:
osd: call osd_update_enable if needed

Verify:
verify by p212

Change-Id: I438848dc843ea370d65dc3c6b4befb32d1f2b5f8
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

video: vpp: add more check for vd1 postblend in vpp_misc [1/2]

PD#SWPL-2580

Problem:
The vd1 postblend bit in vpp misc is overwriten.

Solution:
add more check for vd1 postblend bit in vsync

Verify:
verify by p212

Change-Id: I367e920c13764af41446d7d759aaf8388fb08722
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>

osd: adjust free_scale_dst if interlaced [1/1]

PD#SWPL-2600

Problem:
osd display half menu when in 1080i

Solution:
osd: adjust free_scale_dst if interlaced

Verify:
verify by p212

Change-Id: Ie9faffbb5942faa317b380ca0cdbee072a30c01f
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
Signed-off-by: Jian Cao <jian.cao@amlogic.com>

osd: call osd_update_enable directly if osd cursor [1/1]

PD#SWPL-2744

Problem:
osd mouse can't see before platform g12a

Solution:
call osd_update_enable directly if osd cursor

Verify:
verify by p212

Change-Id: Ia8488a5bd0f707de2a02aa2b74e4a07582ef7f60
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>

deinterlace: there's a change to hang in shutdown [1/1]

PD#OTT-778

Problem:
1.kernel received reboot command, but hang in shutdown

Solution:
move tasklet_disable behind tasklet_kill

Verify:
P321

Change-Id: I994c21c5aeb42dbbb4e3b50ccac8376db4d4039d
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>

Conflicts:
	drivers/amlogic/media/deinterlace/deinterlace.c

fdto: peripheral driver support dtbo [1/4]

PD#SWPL-2193

Problem:
We cannot compile dtbo file in a way like
make ARCH=arm foo.dtbo

Solution:
Add dtbo target and reuse the dtb rules

Verify:
Locally verifed

Change-Id: I34b88e61b409defe553cf5ed1077c160b9a6f350
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>

fdto: peripheral driver support dtbo [2/4]

PD#SWPL-2193

Problem:
Node dummy-battery and dummy-charger are android version
dependent, and should be "fdt overlayed"

Solution:
Add fdt overlay file android_p_overlay_dt.dts, and configure
dummy-battery and dummy-charger in it

Verify:
Locally on P212 and R311

Change-Id: I75a27a0ad1253556cae5273f36e0eb828291fd73
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>

dts: fdto: the fdt is damaged in booting process [1/1]

PD#SWPL-2960

Problem:
If the overlay dts refers to a node which does not exist in the base
device tree, the final fdt will be in a damaged state after doing fdt
overlay

Solution:
Use the standard overlay dts syntax to note node to be applied instead
of the google recommended one

Verify:
Locally on P230

Change-Id: Ibf45abff1348437bc3fc2745e6d955cc8292db46
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>

dv: fix the error hsize and vsize of dv core 2 [1/1]

PD#OTT-776

Problem:
dv core 2 get the error hsize and vsize from OSD module

Solution:
when opening 3 osd paths. we get the accurate the parameters again

Verify:
g12b s922

Change-Id: Ib6af084910c8cf1896060295c7cea75971cd86b6
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>

codec_mm: show current tvp flag [1/2]

PD#OTT-937

Problem:
When kill mediacodec during playing drm, tvp memory not be freed

Solution:
Check tvp flag in kernel, free tvp memory if flag is not zero

Verify:
P212

Change-Id: I35cbb2808bf179710ec59bd5227995949946ee77
Signed-off-by: Tao Guo <tao.guo@amlogic.com>

Revert "arm: dts: gxl: replace watchdog with new version [1/1]"

This reverts commit d932cb0022.

Change-Id: Ie9af906663de4f49a5f21fe026d68e55238b3642

defendkey: G12A: support secure upgrade check [3/4]

PD#SWPL-2347

Problem:
G12A need to support secure upgrade check

Solution:
1.modify reserve memory mode
2.only use cpu0 in defendkey write process

Verify:
G12A skt board verify pass

Change-Id: Iad771381e959a79dcba7a0adb862295fa5ba5dee
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>

dts: G12A: defendkey: support secure upgrade check [4/4]

PD#SWPL-2347

Problem:
G12A need to support secure upgrade check

Solution:
add defendkey support in all G12A dts

Verify:
G12A skt board verify pass

Change-Id: I7343c2c553dfe776eefcfff9ab3a270c87014118
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>

emmc: modify device node name [1/1]

PD#SWPL-2719

Problem:
Can't idetify correctlly when move disk have multi
partition

Solution:
Remove the function of using the partition name as
the device node name

Verify:
test pass on tl1 ref board

Change-Id: I113e63f209c529149fb94b0bb10b0b254717c2bf
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>

arm: dts: gxl: replace watchdog with new version [1/1]

PD#SWPL-1600

Problem:
The current watchdog is not the upstream standard driver.

Solution:
Replace watchdog device tree to use the standard watchdog driver.

Verify:
S905X P215/P212 Android-32bit Kernel-32bit.

Change-Id: I972c8ebb0158caa2df393d9a2d687d9298181102
Signed-off-by: Bo Yang <bo.yang@amlogic.com>

watchdog: Change the feed watchdog mode [1/1]

PD#SWPL-2378

Problem:
Using Android to feed watchdog is not easy to debug the
crash problem, in addition, the Android does not open
the dog feeding service.

Solution:
Change the DTS configuration and change into driver feed watchdog.

Verify:
test pass on g12a-u200

Change-Id: Ie0a91fd8451fdccf3038ba6290a277c9048c52cd
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>

hdmitx: add parsing for non-standard dv edid [1/1]

PD#SWPL-1968

Problem:
some error edid need to be parsed

Solution:
add parsing for non-standard dv edid

Verify:
t962e (txlx)

Change-Id: Ia952ed59650fd0b1c665ca03175a38c1cf3ae5bb
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>

media: video: fix cvbs black dot issue [1/1]

PD#SWPL-1910

Problem:
Black dot on cvbsout when local play 4k

Solution:
Set limit rang when vpp output yuv for cvbs

Verify:
test pass on u200/s905x

Change-Id: Ia3e93078eb1a00d8c974bae8cc373a3a679f8b9f
Signed-off-by: Nian Jing <nian.jing@amlogic.com>

hdmitx: fix a resmue panic isse [1/1]

PD#SWPL-3188

Problem:
When HDMI cable is not connected(that is CVBS out), and system
may be panic after resume.

Solution:
Add NULL pointer protection check

Verify:
P212

Change-Id: I60818faaf7049667501e31990fa557b754ea7f1b
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>

dts: G12B: defendkey: support secure upgrade check [3/3]

PD#SWPL-2348

Problem:
G12B need to support secure upgrade check

Solution:
add defendkey support in all G12B dts

Verify:
G12B skt board verify pass

Change-Id: I2c3f51e761531cf2169dda483991b3d876039686
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>

dts: GXL: defendkey: modify reserve memory mode [2/2]

PD#SWPL-2100

Problem:
GXL need to modify reserve memory mode

Solution:
remove defendkey reserved memory in GXL dts

Verify:
GXL skt board verify pass

Change-Id: Ie5ed01c6dd8f88c5594d6bc73f13282e535071a2
Signed-off-by: Zhongfu Luo <zhongfu.luo@amlogic.com>

cec: for support multi-logical address [1/1]

PD#SWPL-418

Problem:
cec: support multi-logical address

Solution:
if working on multi-logical address, enable two ip
1.enable cec_a, cec_b
2.enable two interrupt
3.enable two pinmux oa_7, ao_8
4.cec_a only send all msg
5.cec_b only receive all msg
6.discard ceca broadcast msg

Verify:
r311
r321
p321

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

cec: add device match for tl1 [1/1]

PD#172587

Problem:
add device match for tl1

Solution:
1.add cecb ver
2.add ceca status reg flag

Verify:
1.run TPM
2.run chip

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

cec: update cec platform data for tl1 [1/1]

PD#172587

Problem:
the line check always return low.
the print of check too much.

Solution:
modify the cec gpio from 7 to 10.
modify the check line.

Verify:
tl1 x301 board

Change-Id: I09ae5eee455d83e51e65957cd293e07da1c0046a
Signed-off-by: hongmin hua <hongmin.hua@amlogic.com>

cec: auto shutdown case crash [1/1]

PD#SWPL-2258

Problem:
1.running autoshutdown cause device crashed

Solution:
1.optimize cec power on proble flow

Verify:
1.p212

Change-Id: Ia78c76cdb4b72a1a275628b3ad77ea6d71696d89
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2019-01-04 15:31:37 +09:00

466 lines
16 KiB
Makefile

# Backward compatibility
asflags-y += $(EXTRA_AFLAGS)
ccflags-y += $(EXTRA_CFLAGS)
cppflags-y += $(EXTRA_CPPFLAGS)
ldflags-y += $(EXTRA_LDFLAGS)
#
# flags that take effect in sub directories
export KBUILD_SUBDIR_ASFLAGS := $(KBUILD_SUBDIR_ASFLAGS) $(subdir-asflags-y)
export KBUILD_SUBDIR_CCFLAGS := $(KBUILD_SUBDIR_CCFLAGS) $(subdir-ccflags-y)
# Figure out what we need to build from the various variables
# ===========================================================================
# When an object is listed to be built compiled-in and modular,
# only build the compiled-in version
obj-m := $(filter-out $(obj-y),$(obj-m))
# Libraries are always collected in one lib file.
# Filter out objects already built-in
lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
# Handle objects in subdirs
# ---------------------------------------------------------------------------
# o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o
# and add the directory to the list of dirs to descend into: $(subdir-y)
# o if we encounter foo/ in $(obj-m), remove it from $(obj-m)
# and add the directory to the list of dirs to descend into: $(subdir-m)
# Determine modorder.
# Unfortunately, we don't have information about ordering between -y
# and -m subdirs. Just put -y's first.
modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko))
__subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y)))
subdir-y += $(__subdir-y)
__subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m)))
subdir-m += $(__subdir-m)
obj-y := $(patsubst %/, %/built-in.o, $(obj-y))
obj-m := $(filter-out %/, $(obj-m))
# Subdirectories we need to descend into
subdir-ym := $(sort $(subdir-y) $(subdir-m))
# if $(foo-objs) exists, foo.o is a composite object
multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))), $(m))))
multi-used := $(multi-used-y) $(multi-used-m)
single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m)))
# Build list of the parts of our composite objects, our composite
# objects depend on those (obviously)
multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y)))
multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y)))
multi-objs := $(multi-objs-y) $(multi-objs-m)
# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to
# tell kbuild to descend
subdir-obj-y := $(filter %/built-in.o, $(obj-y))
# $(obj-dirs) is a list of directories that contain object files
obj-dirs := $(dir $(multi-objs) $(obj-y))
# Replace multi-part objects by their individual parts, look at local dir only
real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y)
real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m)))
extra-y += $(dtb-y)
extra-$(CONFIG_OF_ALL_DTBS) += $(dtb-)
# Add subdir path
extra-y := $(addprefix $(obj)/,$(extra-y))
always := $(addprefix $(obj)/,$(always))
targets := $(addprefix $(obj)/,$(targets))
modorder := $(addprefix $(obj)/,$(modorder))
obj-y := $(addprefix $(obj)/,$(obj-y))
obj-m := $(addprefix $(obj)/,$(obj-m))
lib-y := $(addprefix $(obj)/,$(lib-y))
subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y))
real-objs-y := $(addprefix $(obj)/,$(real-objs-y))
real-objs-m := $(addprefix $(obj)/,$(real-objs-m))
single-used-m := $(addprefix $(obj)/,$(single-used-m))
multi-used-y := $(addprefix $(obj)/,$(multi-used-y))
multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y))
multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m))
subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
obj-dirs := $(addprefix $(obj)/,$(obj-dirs))
# These flags are needed for modversions and compiling, so we define them here
# already
# $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will
# end up in (or would, if it gets compiled in)
# Note: Files that end up in two or more modules are compiled without the
# KBUILD_MODNAME definition. The reason is that any made-up name would
# differ in different configs.
name-fix = $(squote)$(quote)$(subst $(comma),_,$(subst -,_,$1))$(quote)$(squote)
basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget))
modname_flags = $(if $(filter 1,$(words $(modname))),\
-DKBUILD_MODNAME=$(call name-fix,$(modname)))
orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \
$(ccflags-y) $(CFLAGS_$(basetarget).o)
_c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
orig_a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \
$(asflags-y) $(AFLAGS_$(basetarget).o)
_a_flags = $(filter-out $(AFLAGS_REMOVE_$(basetarget).o), $(orig_a_flags))
_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
#
# Enable gcov profiling flags for a file, directory or for all files depending
# on variables GCOV_PROFILE_obj.o, GCOV_PROFILE and CONFIG_GCOV_PROFILE_ALL
# (in this order)
#
ifeq ($(CONFIG_GCOV_KERNEL),y)
_c_flags += $(if $(patsubst n%,, \
$(GCOV_PROFILE_$(basetarget).o)$(GCOV_PROFILE)$(CONFIG_GCOV_PROFILE_ALL)), \
$(CFLAGS_GCOV))
endif
#
# Enable address sanitizer flags for kernel except some files or directories
# we don't want to check (depends on variables KASAN_SANITIZE_obj.o, KASAN_SANITIZE)
#
ifeq ($(CONFIG_KASAN),y)
_c_flags += $(if $(patsubst n%,, \
$(KASAN_SANITIZE_$(basetarget).o)$(KASAN_SANITIZE)y), \
$(CFLAGS_KASAN), $(CFLAGS_KASAN_NOSANITIZE))
endif
ifeq ($(CONFIG_UBSAN),y)
_c_flags += $(if $(patsubst n%,, \
$(UBSAN_SANITIZE_$(basetarget).o)$(UBSAN_SANITIZE)$(CONFIG_UBSAN_SANITIZE_ALL)), \
$(CFLAGS_UBSAN))
endif
ifeq ($(CONFIG_KCOV),y)
_c_flags += $(if $(patsubst n%,, \
$(KCOV_INSTRUMENT_$(basetarget).o)$(KCOV_INSTRUMENT)$(CONFIG_KCOV_INSTRUMENT_ALL)), \
$(CFLAGS_KCOV))
endif
# If building the kernel in a separate objtree expand all occurrences
# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
ifeq ($(KBUILD_SRC),)
__c_flags = $(_c_flags)
__a_flags = $(_a_flags)
__cpp_flags = $(_cpp_flags)
else
# -I$(obj) locates generated .h files
# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
# and locates generated .h files
# FIXME: Replace both with specific CFLAGS* statements in the makefiles
__c_flags = $(if $(obj),-I$(srctree)/$(src) -I$(obj)) \
$(call flags,_c_flags)
__a_flags = $(call flags,_a_flags)
__cpp_flags = $(call flags,_cpp_flags)
endif
c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
$(__c_flags) $(modkern_cflags) \
$(basename_flags) $(modname_flags)
a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
$(__a_flags) $(modkern_aflags)
cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
$(__cpp_flags)
ld_flags = $(LDFLAGS) $(ldflags-y)
dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
-I$(srctree)/arch/$(SRCARCH)/boot/dts \
-I$(srctree)/arch/$(SRCARCH)/boot/dts/include \
-I$(srctree)/drivers/of/testcase-data \
-undef -D__DTS__
# Finds the multi-part object the current object will be linked into
modname-multi = $(sort $(foreach m,$(multi-used),\
$(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=))))
# Useful for describing the dependency of composite objects
# Usage:
# $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add)
define multi_depend
$(foreach m, $(notdir $1), \
$(eval $(obj)/$m: \
$(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s)))))))
endef
ifdef REGENERATE_PARSERS
# GPERF
# ---------------------------------------------------------------------------
quiet_cmd_gperf = GPERF $@
cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $<
.PRECIOUS: $(src)/%.hash.c_shipped
$(src)/%.hash.c_shipped: $(src)/%.gperf
$(call cmd,gperf)
# LEX
# ---------------------------------------------------------------------------
LEX_PREFIX = $(if $(LEX_PREFIX_${baseprereq}),$(LEX_PREFIX_${baseprereq}),yy)
quiet_cmd_flex = LEX $@
cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $<
.PRECIOUS: $(src)/%.lex.c_shipped
$(src)/%.lex.c_shipped: $(src)/%.l
$(call cmd,flex)
# YACC
# ---------------------------------------------------------------------------
YACC_PREFIX = $(if $(YACC_PREFIX_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy)
quiet_cmd_bison = YACC $@
cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $<
.PRECIOUS: $(src)/%.tab.c_shipped
$(src)/%.tab.c_shipped: $(src)/%.y
$(call cmd,bison)
quiet_cmd_bison_h = YACC $@
cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $<
.PRECIOUS: $(src)/%.tab.h_shipped
$(src)/%.tab.h_shipped: $(src)/%.y
$(call cmd,bison_h)
endif
# Shipped files
# ===========================================================================
quiet_cmd_shipped = SHIPPED $@
cmd_shipped = cat $< > $@
$(obj)/%: $(src)/%_shipped
$(call cmd,shipped)
# Commands useful for building a boot image
# ===========================================================================
#
# Use as following:
#
# target: source(s) FORCE
# $(if_changed,ld/objcopy/gzip)
#
# and add target to extra-y so that we know we have to
# read in the saved command line
# Linking
# ---------------------------------------------------------------------------
quiet_cmd_ld = LD $@
cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \
$(filter-out FORCE,$^) -o $@
# Objcopy
# ---------------------------------------------------------------------------
quiet_cmd_objcopy = OBJCOPY $@
cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
# Gzip
# ---------------------------------------------------------------------------
quiet_cmd_gzip = GZIP $@
cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
(rm -f $@ ; false)
# DTC
# ---------------------------------------------------------------------------
DTC ?= $(objtree)/scripts/dtc/dtc
# Disable noisy checks by default
ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),)
DTC_FLAGS += -Wno-unit_address_vs_reg \
-Wno-simple_bus_reg \
-Wno-unit_address_format \
-Wno-pci_bridge \
-Wno-pci_device_bus_num \
-Wno-pci_device_reg
endif
ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),2)
DTC_FLAGS += -Wnode_name_chars_strict \
-Wproperty_name_chars_strict
endif
# Generate an assembly file to wrap the output of the device tree compiler
quiet_cmd_dt_S_dtb= DTB $@
cmd_dt_S_dtb= \
( \
echo '\#include <asm-generic/vmlinux.lds.h>'; \
echo '.section .dtb.init.rodata,"a"'; \
echo '.balign STRUCT_ALIGNMENT'; \
echo '.global __dtb_$(subst -,_,$(*F))_begin'; \
echo '__dtb_$(subst -,_,$(*F))_begin:'; \
echo '.incbin "$<" '; \
echo '__dtb_$(subst -,_,$(*F))_end:'; \
echo '.global __dtb_$(subst -,_,$(*F))_end'; \
echo '.balign STRUCT_ALIGNMENT'; \
) > $@
$(obj)/%.dtb.S: $(obj)/%.dtb
$(call cmd,dt_S_dtb)
quiet_cmd_dtc = DTC $@
cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
$(DTC) -@ -O dtb -o $@ -b 0 \
-i $(dir $<) $(DTC_FLAGS) \
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
$(obj)/%.dtb: $(src)/%.dts FORCE
$(call if_changed_dep,dtc)
ifeq ($(CONFIG_AMLOGIC_MODIFY),y)
$(obj)/%.dtbo: $(src)/%.dts FORCE
$(call if_changed_dep,dtc)
endif
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
# cat
# ---------------------------------------------------------------------------
# Concatentate multiple files together
quiet_cmd_cat = CAT $@
cmd_cat = (cat $(filter-out FORCE,$^) > $@) || (rm -f $@; false)
# Bzip2
# ---------------------------------------------------------------------------
# Bzip2 and LZMA do not include size in file... so we have to fake that;
# append the size as a 32-bit littleendian number as gzip does.
size_append = printf $(shell \
dec_size=0; \
for F in $1; do \
fsize=$$(stat -c "%s" $$F); \
dec_size=$$(expr $$dec_size + $$fsize); \
done; \
printf "%08x\n" $$dec_size | \
sed 's/\(..\)/\1 /g' | { \
read ch0 ch1 ch2 ch3; \
for ch in $$ch3 $$ch2 $$ch1 $$ch0; do \
printf '%s%03o' '\\' $$((0x$$ch)); \
done; \
} \
)
quiet_cmd_bzip2 = BZIP2 $@
cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
# Lzma
# ---------------------------------------------------------------------------
quiet_cmd_lzma = LZMA $@
cmd_lzma = (cat $(filter-out FORCE,$^) | \
lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
quiet_cmd_lzo = LZO $@
cmd_lzo = (cat $(filter-out FORCE,$^) | \
lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
quiet_cmd_lz4 = LZ4 $@
cmd_lz4 = (cat $(filter-out FORCE,$^) | \
lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
# U-Boot mkimage
# ---------------------------------------------------------------------------
MKIMAGE := $(srctree)/scripts/mkuboot.sh
# SRCARCH just happens to match slightly more than ARCH (on sparc), so reduces
# the number of overrides in arch makefiles
UIMAGE_ARCH ?= $(SRCARCH)
UIMAGE_COMPRESSION ?= $(if $(2),$(2),none)
UIMAGE_OPTS-y ?=
UIMAGE_TYPE ?= kernel
UIMAGE_LOADADDR ?= arch_must_set_this
UIMAGE_ENTRYADDR ?= $(UIMAGE_LOADADDR)
UIMAGE_NAME ?= 'Linux-$(KERNELRELEASE)'
UIMAGE_IN ?= $<
UIMAGE_OUT ?= $@
quiet_cmd_uimage = UIMAGE $(UIMAGE_OUT)
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(UIMAGE_ARCH) -O linux \
-C $(UIMAGE_COMPRESSION) $(UIMAGE_OPTS-y) \
-T $(UIMAGE_TYPE) \
-a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \
-n $(UIMAGE_NAME) -d $(UIMAGE_IN) $(UIMAGE_OUT)
# XZ
# ---------------------------------------------------------------------------
# Use xzkern to compress the kernel image and xzmisc to compress other things.
#
# xzkern uses a big LZMA2 dictionary since it doesn't increase memory usage
# of the kernel decompressor. A BCJ filter is used if it is available for
# the target architecture. xzkern also appends uncompressed size of the data
# using size_append. The .xz format has the size information available at
# the end of the file too, but it's in more complex format and it's good to
# avoid changing the part of the boot code that reads the uncompressed size.
# Note that the bytes added by size_append will make the xz tool think that
# the file is corrupt. This is expected.
#
# xzmisc doesn't use size_append, so it can be used to create normal .xz
# files. xzmisc uses smaller LZMA2 dictionary than xzkern, because a very
# big dictionary would increase the memory usage too much in the multi-call
# decompression mode. A BCJ filter isn't used either.
quiet_cmd_xzkern = XZKERN $@
cmd_xzkern = (cat $(filter-out FORCE,$^) | \
sh $(srctree)/scripts/xz_wrap.sh && \
$(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
quiet_cmd_xzmisc = XZMISC $@
cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
xz --check=crc32 --lzma2=dict=1MiB) > $@ || \
(rm -f $@ ; false)
# ASM offsets
# ---------------------------------------------------------------------------
# Default sed regexp - multiline due to syntax constraints
#
# Use [:space:] because LLVM's integrated assembler inserts <tab> around
# the .ascii directive whereas GCC keeps the <space> as-is.
define sed-offsets
's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \
/^->/{s:->#\(.*\):/* \1 */:; \
s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
s:->::; p;}'
endef
# Use filechk to avoid rebuilds when a header changes, but the resulting file
# does not
define filechk_offsets
(set -e; \
echo "#ifndef $2"; \
echo "#define $2"; \
echo "/*"; \
echo " * DO NOT MODIFY."; \
echo " *"; \
echo " * This file was generated by Kbuild"; \
echo " */"; \
echo ""; \
sed -ne $(sed-offsets); \
echo ""; \
echo "#endif" )
endef