platform/kernel/linux-amlogic.git
6 years agodefconfig: update buildcheck defconfig
Ao Xu [Tue, 24 Apr 2018 12:44:18 +0000 (20:44 +0800)]
defconfig: update buildcheck defconfig

PD#149771: update buildcheck defconfig

in fs/proc/uid.c file, compile will fail
when CONFIG_CPU_FREQ_TIMES is not set

Change-Id: Icdab57085749c1d8ce1b5886f2c1b52a2acc913d
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
6 years agoaudio: auge: add spdifin sample rate and audio type event
Xing Wang [Tue, 24 Apr 2018 08:21:44 +0000 (16:21 +0800)]
audio: auge: add spdifin sample rate and audio type event

PD#149689: audio: auge: add spdifin sample rate and audio type event

Change-Id: I1991711ddfda438ad5c0ffa602e4364eec0737a8
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
6 years agoMerge branch 'android-4.9' into amlogic-4.9-dev
Victor Wan [Tue, 24 Apr 2018 09:43:19 +0000 (17:43 +0800)]
Merge branch 'android-4.9' into amlogic-4.9-dev

Signed-off-by: Victor Wan <victor.wan@amlogic.com>
Conflicts:
arch/arm/configs/bcm2835_defconfig
arch/arm/configs/sunxi_defconfig
include/linux/cpufreq.h
init/main.c

6 years agodts: add g12a x2 u211 buildroot config
wenbiao zhang [Thu, 19 Apr 2018 02:49:16 +0000 (10:49 +0800)]
dts: add g12a x2 u211 buildroot config

PD#165073: dts: add g12a x2 u211 buildroot config

Change-Id: I3e47f0b8bdd2f08add89b122edc7426651fdf5c7
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
6 years agoatv_demod: Modify atv sys for search and optimize code.
nengwen.chen [Fri, 20 Apr 2018 14:52:33 +0000 (22:52 +0800)]
atv_demod: Modify atv sys for search and optimize code.

PD#164878: Modify atv sys for search and optimize code.

Change-Id: I4ba7c6c38a742ebfe9cb8488277b0d04cf12230e
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agodts: fine-tune U211 OPP
Qiufang Dai [Tue, 24 Apr 2018 06:48:45 +0000 (14:48 +0800)]
dts: fine-tune U211 OPP

PD#164888: fine-tune U211 OPP for stability.

Change-Id: Ib99fb68971b7593381f82051c881e5200a3af9c7
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
6 years agodts: txlx add unify key for panel ini param
wenbiao zhang [Fri, 20 Apr 2018 08:26:10 +0000 (16:26 +0800)]
dts: txlx add unify key for panel ini param

PD#163711: dts: txlx add unify key for panel ini param

Change-Id: If1ee0c9ed2cc68db9c2b518aba1f019e1c67f7ec
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
6 years agohdmitx: fix no scdc in 4k60 under some special tv
Yi Zhou [Wed, 18 Apr 2018 11:09:42 +0000 (19:09 +0800)]
hdmitx: fix no scdc in 4k60 under some special tv

PD#164688: hdmitx: fix no scdc in 4k60 under some special tv

Change-Id: I647400d643c80051ea4bb8e4ea38fdb35e321941
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
6 years agohdmirx: add pddq selection interface when suspend/resume
Hang Cheng [Fri, 13 Apr 2018 08:19:53 +0000 (16:19 +0800)]
hdmirx: add pddq selection interface when suspend/resume

PD#164216: hdmirx: add pddq selection interface when suspend/resume

when suspend, set pddq down by default, use another Rxsense pulse
during resume to recovery MTK box from hdcp2.2 transaction

Change-Id: Icc574847105a00c5d441fdd589b928eaaf2acf05
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
6 years agoethernet: chage u200 default as internal phy
Zhuo Wang [Sun, 8 Apr 2018 07:52:23 +0000 (15:52 +0800)]
ethernet: chage u200 default as internal phy

PD#163830: change u200 use internal phy

Change-Id: I1e60f66b8d624534a337f134c69d9256e517f766
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
6 years agodts: add dts for p212 720p.[1/2]
Luan Yuan [Fri, 13 Apr 2018 03:33:17 +0000 (11:33 +0800)]
dts: add dts for p212 720p.[1/2]

PD#164268: dts: add dts for p212 720p.[1/2]

Change-Id: I3511eb72c8eb35a09875e809e06fe1c13e2506ac
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
6 years agoamvecm: add overscan iocontrol
wenfeng.guo [Wed, 21 Mar 2018 02:44:00 +0000 (10:44 +0800)]
amvecm: add overscan iocontrol

PD#162552: amvecm: add overscan iocontrol

Change-Id: I1aa4b2469e7360029a0c647a0a1e46c73c71e7cd
Signed-off-by: wenfeng.guo <wenfeng.guo@amlogic.com>
6 years agohdmitx: fix HDR compatibility
Kaifu Hu [Mon, 23 Apr 2018 06:29:06 +0000 (14:29 +0800)]
hdmitx: fix HDR compatibility

PD#161939: HDMITX: fix HDR compatibility.

Fix HDR compatibility for the samsung TV of need to
disable and enable hdmi phy when sdr to hdr.

Change-Id: I5fa648a35ff32f1d4eb544cc12ce759d4c7bcfae
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
6 years agodts: p230 add dvb module
Cheng Tong [Tue, 3 Apr 2018 08:15:59 +0000 (16:15 +0800)]
dts: p230 add dvb module

PD#163384: dts: p230 add dvb module

Change-Id: I0345718b0469218cb88a1f65aabdfe26a81f898f
Signed-off-by: Cheng Tong <cheng.tong@amlogic.com>
6 years agodvb: fix can't set frontend and get DTV_TS_INPUT
Cheng Tong [Mon, 9 Apr 2018 11:02:28 +0000 (19:02 +0800)]
dvb: fix can't set frontend and get DTV_TS_INPUT

PD#163384: dvb: fix can't set frontend and get DTV_TS_INPUT

Change-Id: I5143aa3b653207901bbb940e6a70e66e2ac741af
Signed-off-by: Cheng Tong <cheng.tong@amlogic.com>
6 years agovpp: merge the adapter pic mode function from 3.14
Brian Zhu [Tue, 17 Apr 2018 08:03:40 +0000 (16:03 +0800)]
vpp: merge the adapter pic mode function from 3.14

PD#163892: vpp: merge the adapter pic mode function from 3.14
1.PD#159260: video: add new pic_mode interface in vframe
2.PD#157527: vpp: add new display mode, custom AR and AFD

Change-Id: I8714cd434001703a3c4a5aadeb4b18498cb16dc4
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
6 years agoamvideo: add video_global_output sysfs control interface
jintao xu [Mon, 9 Apr 2018 03:20:20 +0000 (11:20 +0800)]
amvideo: add video_global_output sysfs control interface

PD#163190: screen still displays the last frame after HDMI disconnect

Change-Id: Ic3b31a6af6a00a83a58d5d293a2fcab2a4369b04
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
6 years agodts: enable amvecm modules for r311 chips
Bencheng Jing [Thu, 19 Apr 2018 03:43:26 +0000 (11:43 +0800)]
dts: enable amvecm modules for r311 chips

PD#163826: dts: enable amvecm modules for r311 chips

Change-Id: I9dc67fe8267c79083c5eb2e1d7f1bec169626cff
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
6 years agohdmitx: add sspll for hdmi modes
Zongdong Jiao [Mon, 19 Mar 2018 11:47:20 +0000 (19:47 +0800)]
hdmitx: add sspll for hdmi modes

PD#162511: hdmitx: add sspll for hdmi modes
To reduce EMI issue, enable sspll function under certain modes.

Change-Id: Ib5187aaafbc92eccbdd6a77d1c4828776ff596be
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
6 years agodrm_vpu: logo memory manage in drm_vpu
pengcheng chen [Thu, 19 Apr 2018 08:53:20 +0000 (16:53 +0800)]
drm_vpu: logo memory manage in drm_vpu

PD#160546: drm_vpu: logo memory manage in drm_vpu

Change-Id: I590caf78301f09f71dc005559a79656e8ff9c206
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
6 years agoosd: optimize osd dts
pengcheng chen [Thu, 19 Apr 2018 06:59:39 +0000 (14:59 +0800)]
osd: optimize osd dts

PD#164824: osd: optimize osd dts

Change-Id: I7cc372a4124b136bf999a73888ba6fd5671e9b5f
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
6 years agodvb: add dvb module dts & modify demux define
Peng Chuangcheng [Mon, 12 Mar 2018 08:51:11 +0000 (16:51 +0800)]
dvb: add dvb module dts & modify demux define

PD#156734: add dvb module dts & modify demux define

Change-Id: I6125be7c0f489687524529a547b9d426eb5de4ac
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
6 years agodrm: Add support for ABGR and XBGR for scanout
Yalong Liu [Fri, 20 Apr 2018 01:27:09 +0000 (09:27 +0800)]
drm: Add support for ABGR and XBGR for scanout

PD#160546: Add support for ABGR and XBGR for scanout

Change-Id: Id846f2db2431737a956a8f3474278938bd2905a1
Signed-off-by: Yalong Liu <yalong.liu@amlogic.com>
6 years agoa113d: dts: add axg_s400emmc_512m.dts configuration
yuehu mi [Fri, 20 Apr 2018 02:10:50 +0000 (10:10 +0800)]
a113d: dts: add axg_s400emmc_512m.dts configuration

PD#164463: add 512M dts configuration

Change-Id: Id777ae85a9d4b645f74962184ce76048eaba8be1
Signed-off-by: yuehu mi <yuehu.mi@amlogic.com>
6 years agoatv_demod: Modify atv entry and leave mode status.
nengwen.chen [Thu, 19 Apr 2018 12:55:43 +0000 (20:55 +0800)]
atv_demod: Modify atv entry and leave mode status.

PD#163853: Modify atv entry and leave mode status.

Change-Id: I508574f7c0328342e0dff7657f79de4e60443d9a
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agoaudio: auge: fix pdm to 133m directly, not using dividor
Xing Wang [Wed, 18 Apr 2018 11:29:52 +0000 (19:29 +0800)]
audio: auge: fix pdm to 133m directly, not using dividor

PD#164405: audio: auge: fix pdm to 133m directly, not using dividor

Change-Id: I4a26abdb6b2555275a7126cefcfa1d2575bb721b
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
6 years agoPM_sleep: add alarm wakeup function.
Hong Guo [Thu, 12 Apr 2018 03:08:34 +0000 (11:08 +0800)]
PM_sleep: add alarm wakeup function.

PD#161914: PM_sleep: add alarm wakeup function.

Change-Id: Ib24fd030631f77be3d607a32cfd53f7a0b143b05
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
6 years agoclk: fix gp0_pll typo
Qiufang Dai [Thu, 19 Apr 2018 09:40:44 +0000 (17:40 +0800)]
clk: fix gp0_pll typo

PD#164749: fix gp0_pll typo

Change-Id: Id50fc1fbc0f0af4a6d2364271317b6b75d963a34
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
6 years agotrace: add meson trace func [2/2]
binqi.zhang [Fri, 13 Apr 2018 06:08:14 +0000 (14:08 +0800)]
trace: add meson trace func [2/2]

PD#164734: meson: Aid to kernel debug

echo 1 >
/sys/kernel/debug/tracing/events/meson_atrace/tracing_mark_write/enable

Change-Id: I11d56296ae8f5bd7427b292b0c98c6b4541b6faa
Signed-off-by: binqi.zhang <binqi.zhang@amlogic.com>
6 years agoBT: introduce power_down_disable property in DT
Kuibao Zhang [Fri, 13 Apr 2018 11:53:38 +0000 (19:53 +0800)]
BT: introduce power_down_disable property in DT

PD#163673: BT: introduce power_down_disable property in DT

introduce a power_down_disable property in the DT file, we need to
keep power on for the ap62x8 in order to pass the vts test

Change-Id: I1984ded1e7f96732630b4e94a97bbb2705a8fbd6
Signed-off-by: Kuibao Zhang <kuibao.zhang@amlogic.com>
6 years agoamvecm: close mtx_only
Bencheng Jing [Wed, 28 Mar 2018 13:02:57 +0000 (21:02 +0800)]
amvecm: close mtx_only

PD#163270: amvecm: close mtx_only

Change-Id: Id6c92cba47d41bc7ef271dc3caa24b5bf2208ac7
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
6 years agoaudio: auge: support raw output[2/2]
Lianlian Zhu [Wed, 18 Apr 2018 08:11:03 +0000 (16:11 +0800)]
audio: auge: support raw output[2/2]

PD#162366: audio: auge: add ac3 eac3 dts output

Change-Id: If77a02601ad1fba4985f361188db1abf732043c0
Signed-off-by: Lianlian Zhu <lianlian.zhu@amlogic.com>
6 years agoosd: fix osd suspend fail issue
pengcheng chen [Wed, 18 Apr 2018 07:53:37 +0000 (15:53 +0800)]
osd: fix osd suspend fail issue

PD#164508: osd: fix osd suspend fail issue

Change-Id: I30c9efd77748a795b341ad4bedafa5f379ae52f1
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
6 years agoemmc: optimize sd & wifi TDMA.
Nan Li [Wed, 18 Apr 2018 09:04:15 +0000 (17:04 +0800)]
emmc: optimize sd & wifi TDMA.

PD#164677: optimize sd & wifi TDMA patch
to bring errors to v2 controller.

Change-Id: I2859af721953ab4bd8ad34a1f6722321dd6b1d00
Signed-off-by: Nan Li <nan.li@amlogic.com>
6 years agoatv_demod: Add atv demod
nengwen.chen [Tue, 17 Apr 2018 14:01:19 +0000 (22:01 +0800)]
atv_demod: Add atv demod

PD#163853: Add atv demod

Change-Id: Ia3a7f51927df92025a67923e5acce2f0f07e674c
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agoemmc: hs200 200M on g12a [2/2]
Ruixuan Li [Wed, 18 Apr 2018 03:04:04 +0000 (11:04 +0800)]
emmc: hs200 200M on g12a [2/2]

PD#160968: emmc: hs200 200M on g12a

Change-Id: Iabfa18880dcf356f92be4319b948b0f132fc4704
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
6 years agoosd: fix osd rdma recovery reg
pengcheng chen [Wed, 18 Apr 2018 01:44:17 +0000 (09:44 +0800)]
osd: fix osd rdma recovery reg

PD#160942: osd: fix osd rdma recovery reg
           1. modify VIU_OSD1_BLK0_CFG_W0 init value in update_color_mode
           2. add DOLBY_CORE2A_SWAP_CTRL1&CTRL2 in recovery table

Change-Id: I04c569bc4919e8adc5bd17d376ee65d084e49082
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
6 years agoemmc: add dtb backup machinisim
Ruixuan Li [Mon, 16 Apr 2018 06:31:43 +0000 (14:31 +0800)]
emmc: add dtb backup machinisim

PD#162119: emmc: change memory alloction mode

Change-Id: I108557d914d42158820d5cba00e2fc60e3d38451
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
6 years agogpio-led: add system led
bichao.zheng [Thu, 12 Apr 2018 02:56:45 +0000 (10:56 +0800)]
gpio-led: add system led

PD#163340: gpio-led: add system led

1.Add CONFIG_LEDS_TRIGGER_CPU=y in meson64_defconfig
2.Turns on green light when booting and resume.
3.Turns off green light,turns on red light when suspend and shutdown

Change-Id: I237745e87737682364ab946abd2253025ac89984
Signed-off-by: bichao.zheng <bichao.zheng@amlogic.com>
6 years agohdmitx: update hdmitx pll parameter
Yi Zhou [Mon, 9 Apr 2018 12:21:46 +0000 (20:21 +0800)]
hdmitx: update hdmitx pll parameter

PD#163960: hdmitx: update hdmitx pll parameter

Change-Id: I4a770a976586d42b510c128586a5239ade54a7c0
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
6 years agodefect: fix section mismatch warning
jiamin ma [Wed, 18 Apr 2018 00:37:52 +0000 (08:37 +0800)]
defect: fix section mismatch warning

PD#164617: section mismatch warning

When a variable or function with __initxxx anotation refers a
variable or function without it, there will be a section mismatch
warning.
In such case, memory belong to the latter will be released after
kernel booting up, if the former still refers the latter, strange
things happens
So we have to use __initxxx anotations correctly or add __refxxx
anotations to teach modpost that it is okay and save to use __init
anotations in this way.

Change-Id: Ic97dac8998b2a01c82dd7a3bae12fa9c7a113bc4
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>
6 years agoamlvideo: fix H264/VP9 adaptiveSkipBack cts errors
kunpeng.tang [Fri, 13 Apr 2018 04:18:20 +0000 (12:18 +0800)]
amlvideo: fix H264/VP9 adaptiveSkipBack cts errors

PD#163463: fix H264/VP9 adaptiveSkipBack cts errors

1.android.media.cts.AdaptivePlaybackTest#testH264_adaptiveSkipBack
2.android.media.cts.AdaptivePlaybackTest#testVP9_adaptiveSkipBack

Change-Id: Ib5f514ceb9a312b2bc608fa8192208dc49be74c9
Signed-off-by: kunpeng.tang <kunpeng.tang@amlogic.com>
6 years agowifi: add fw path to support mt7668 wifi fw load
Rongjun Chen [Thu, 15 Mar 2018 08:02:46 +0000 (16:02 +0800)]
wifi: add fw path to support mt7668 wifi fw load

PD# 161514

Change-Id: I5e067f2fb6503f1f2b537a6b36fb69b0e8f30b87
Signed-off-by: Rongjun Chen <rongjun.chen@amlogic.com>
6 years agomm: optimize for lowmemory killer
tao zeng [Tue, 17 Apr 2018 07:29:50 +0000 (15:29 +0800)]
mm: optimize for lowmemory killer

PD#164558: mm: optimize for lowmemory killer

1. Remove change for LRU;
2. Only subtract cma file caches when task is not kswapd.

Change-Id: I09ad86fc9754c1136cd976d656a023dee6cbe2eb
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
6 years agopinctrl: axg: fix w/r error for partial ao pins and add TESTN support
Xingyu Chen [Sat, 14 Apr 2018 02:28:40 +0000 (10:28 +0800)]
pinctrl: axg: fix w/r error for partial ao pins and add TESTN support

PD#164428: pinctrl: axg: fix w/r error for partial ao pins and add TESTN support

it returns error when operating the pins include the GPIOAO_10 - GPIOAO_13 which
are used as gpio.

Change-Id: I1337ab4d59110b87bd6b685e4ce7481cee02be46
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
6 years agosd: add port base addr in the matchdata.
Nan Li [Tue, 17 Apr 2018 11:51:22 +0000 (19:51 +0800)]
sd: add port base addr in the matchdata.

PD#163048: add port base addr in the matchdata,
for sd & sdio TDMA check.

Change-Id: Ib7432ffbf26c749d8799bfa5f60eaaff7735539d
Signed-off-by: Nan Li <nan.li@amlogic.com>
6 years agodts: optimize txlx_t962x_r311_720p memory usage[2/3]
Lei Qian [Tue, 17 Apr 2018 07:08:33 +0000 (15:08 +0800)]
dts: optimize txlx_t962x_r311_720p memory usage[2/3]

PD# 164558: dts: decrease memory usage

Change-Id: I0822e43ba8ecab264963d12a14fe102686d4ed70
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
6 years agosdemmc/sdio: g12a revA/B compatible
Nan Li [Tue, 17 Apr 2018 08:18:11 +0000 (16:18 +0800)]
sdemmc/sdio: g12a revA/B compatible

PD#163379: sdemmc: g12a revA/B compatible

Change-Id: I5edaf1e490de73d160b25d5976a71edda50038d6
Signed-off-by: Nan Li <nan.li@amlogic.com>
6 years agosd: add sd & sdio wifi TDMA on portB.
Nan Li [Tue, 3 Apr 2018 11:16:06 +0000 (19:16 +0800)]
sd: add sd & sdio wifi TDMA on portB.

PD#163048: add sd & sdio wifi time division multiple access
on portB.

Change-Id: Ie38a56daf03d5066af160575a322812ab5ffe5be
Signed-off-by: Nan Li <nan.li@amlogic.com>
6 years agohdmitx: config DDC to 100kHz
Kaifu Hu [Tue, 17 Apr 2018 03:06:47 +0000 (11:06 +0800)]
hdmitx: config DDC to 100kHz

PD#164530: hdmitx: config DDC to 100kHz

Config DDC to 100kHz for HDMI I2C.

Change-Id: I9b450bb8f9b727a3f468f55138aa64596abe92ef
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
6 years agocec: support 4 hdmi ports in board R311
wei wang [Mon, 16 Apr 2018 09:15:59 +0000 (17:15 +0800)]
cec: support 4 hdmi ports in board R311

PD#162758: modify dts to support hdmi4

Change-Id: I2216bc2c1f5a6dabd6890025075f7b40ad082799
Signed-off-by: wei wang <wei.wang@amlogic.com>
6 years agoatv_demod: Add atv demod
nengwen.chen [Sat, 14 Apr 2018 12:12:25 +0000 (20:12 +0800)]
atv_demod: Add atv demod

PD#163853: Add atv demod

Change-Id: I6e1fe3b50cccc2d6ee734ca77cf8593b95f47671
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agoemmc: optimized emmc timing parameter configuration method
Long Yu [Fri, 23 Mar 2018 09:50:00 +0000 (17:50 +0800)]
emmc: optimized emmc timing parameter configuration method

PD#162872: emmc: Optimizing eMMC/sd/sdio timing parameter configuration method

Change-Id: I5e9991a42d6f262a58e2b2c5635eadc690e39d4d
Signed-off-by: Long Yu <long.yu@amlogic.com>
6 years agohdmirx: revert audio fifo reset alternatively
Hang Cheng [Thu, 12 Apr 2018 02:59:26 +0000 (10:59 +0800)]
hdmirx: revert audio fifo reset alternatively

PD#154135: hdmirx: revert audio fifo reset alternatively

MIK-8267R device outputs 4 channel audio of pcm, which
txlx doesn't support. So revert this workaround and
avoid side effect.

Change-Id: Id969f27ed44567c9bcb6bfd8e77d8ff33d70b0f6
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
6 years agodrm: add drm buildroot dts for g12a
liangzhuo.xie [Fri, 13 Apr 2018 09:38:44 +0000 (17:38 +0800)]
drm: add drm buildroot dts for g12a

PD#162577: add drm buildroot dts for g12a

1. g12a default buildroot dts use g12a_s905d2_u200_buildroot.dts
2. g12a drm buildroot dts use g12a_s905d2_u200_drm_buildroot.dts

Change-Id: I08616ab1ce38b8db24ca78c1133294fff8e82ff8
Signed-off-by: liangzhuo.xie <liangzhuo.xie@amlogic.com>
6 years agousb: set bit18 of GUCTL1.[1/1]
Yue Wang [Thu, 12 Apr 2018 07:35:00 +0000 (15:35 +0800)]
usb: set bit18 of GUCTL1.[1/1]

PD#164190: usb: set bit18 of GUCTL1.[1/1]

for improve bulk transfer performance.

Change-Id: I986ddea677a9a31a6613cf00936b4c4e79449c1e
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
6 years agodts: axg: fixed audio dts error of U211 & U221
Zhe Wang [Fri, 13 Apr 2018 13:52:45 +0000 (21:52 +0800)]
dts: axg: fixed audio dts error of U211 & U221

PD#163841: change dts for U211 & U221

Change-Id: I49e3a5fb7d740aa77e277f97c1fea14bd9b9da71
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
6 years agovideo: change the correct config define for notify amvideo
Brian Zhu [Thu, 12 Apr 2018 08:21:36 +0000 (16:21 +0800)]
video: change the correct config define for notify amvideo

PD#163615: video: change the correct config define for notify amvideo

Change-Id: I57a049060e355b396591003463454292e10ad164
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
6 years agou200: dts: modify panel P070ACB reset sequence
Evoke Zhang [Wed, 28 Mar 2018 05:49:35 +0000 (13:49 +0800)]
u200: dts: modify panel P070ACB reset sequence

PD#163160: u200: dts: modify panel P070ACB reset sequence
also optimize place check state function into dsi_on_init sequence.

Change-Id: I22cbb057b278bd44efb2e7b141f6426c03c1945f
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
6 years agovout: optimize same mode checking for 1st setting
Evoke Zhang [Mon, 9 Apr 2018 09:56:03 +0000 (17:56 +0800)]
vout: optimize same mode checking for 1st setting

PD#163691: vout: optimize same mode checking for 1st setting

Change-Id: Ia2be46b0f0433f09106cb8f08937baea371d4c62
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
6 years agoatv_demod: Add atv demod
nengwen.chen [Thu, 12 Apr 2018 03:11:22 +0000 (11:11 +0800)]
atv_demod: Add atv demod

PD#163853: Add atv demod

Change-Id: I572568d30136801cfb244757a5d1114974158192
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
6 years agohdmitx: move AVI position from line4 to line10
Kaifu Hu [Thu, 12 Apr 2018 07:47:48 +0000 (15:47 +0800)]
hdmitx: move AVI position from line4 to line10

PD#163964: hdmitx: move AVI position from line4 to line10

Move AVI position from line4 to line10 for HDMI1.4 CTS 7.24
fail in QD980.

Change-Id: I6c84445de942cce383c3bb339223589e3fb39d5f
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
6 years agoremote: add remote led blink function to u211
Qianggui Song [Mon, 9 Apr 2018 04:23:54 +0000 (12:23 +0800)]
remote: add remote led blink function to u211

PD#163342: add remote led blink function to u211

Change-Id: I92ba57af1f3c83e6d432a344d35021734dfecf3c
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
6 years agoBT: Bluetooth poweroff by default
Kuibao Zhang [Thu, 12 Apr 2018 10:22:46 +0000 (18:22 +0800)]
BT: Bluetooth poweroff by default

PD#164170: BT: Optimize the bluetooth code structure

Change-Id: Iadc70c12f85c0ad48597f0066ae235b3d67716a9
Signed-off-by: Kuibao Zhang <kuibao.zhang@amlogic.com>
6 years agoaudio: meson: fix i2s/spdif buffer for split mode when bootup to play
Xing Wang [Sun, 8 Apr 2018 14:03:48 +0000 (22:03 +0800)]
audio: meson: fix i2s/spdif buffer for split mode when bootup to play

PD#162285: audio: meson: fix i2s/spdif buffer for split mode when bootup to play

Change-Id: I730993dd183cee40c92d232414d6752f75cb2b06
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
6 years agodrm: modify drm framework
Yalong Liu [Tue, 10 Apr 2018 02:25:32 +0000 (10:25 +0800)]
drm: modify drm framework

PD#162577: modify drm framework
1. add component framework, support dynamic loading modules
2. remove DRM_MESON_BYPASS_MODE config, abandon
Unnecessary code and Optimization code

Change-Id: Ib7698190254d147d9749c30f479477103ed52af7
Signed-off-by: Yalong Liu <yalong.liu@amlogic.com>
6 years agolcd: mipi phy timing adjustment
Weiming Liu [Mon, 9 Apr 2018 08:17:25 +0000 (16:17 +0800)]
lcd: mipi phy timing adjustment

PD#163895: lcd: mipi phy timing adjustment

Change-Id: I87d563d6b9040ef7af0ed7874c99e6414675118e
Signed-off-by: Weiming Liu <weiming.liu@amlogic.com>
6 years agolcd: prevent lcd enable repeatedly to avoid abnormal display
Evoke Zhang [Tue, 10 Apr 2018 10:30:26 +0000 (18:30 +0800)]
lcd: prevent lcd enable repeatedly to avoid abnormal display

PD#164037: lcd: prevent lcd enable repeatedly to avoid abnormal display
also optimize backlight init state by detect lcd state

Change-Id: I517c3c47aa5fcb0f5026f6dd782e5f522ec847aa
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
6 years agoi2c: fix different frequency duty according to I2C-BUS spec
Jian Hu [Wed, 11 Apr 2018 08:11:55 +0000 (16:11 +0800)]
i2c: fix different frequency duty according to I2C-BUS spec

PD#164083: i2c: fix duty of different frequency

1.General usage
Frequency   Duty    mode

100k     1:2     standard
400k     1:3     fast
3400k     1:3     high

2.Frequency below 100k can be configured as fast mode

Change-Id: Ib6254efabfbd614c014c98bbeb3d07c35cf7b904
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
6 years agodi: add protection for odd width
kele bai [Mon, 9 Apr 2018 02:36:12 +0000 (10:36 +0800)]
di: add protection for odd width

PD#163274: di: enable protection for odd width

enable odd protection patch mask by g12a bringup

Change-Id: I74793acc664981c23c3bbf2f8e892c8b4c8d8b84
Signed-off-by: kele bai <kele.bai@amlogic.com>
6 years agoavin: dynamic en/disable avdetect for compatibility
Nian Jing [Wed, 4 Apr 2018 10:28:02 +0000 (18:28 +0800)]
avin: dynamic en/disable avdetect for compatibility

PD#161632: dynamic en/disable avdetect for compatibility

Change-Id: Icb3038323292ca246c5aaac499b58c75a89c2ec1
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
6 years agoPD#162660: hdmirx: enable hdcp22 related clk when resume
yicheng shen [Wed, 11 Apr 2018 09:21:52 +0000 (17:21 +0800)]
PD#162660: hdmirx: enable hdcp22 related clk when resume

fix the issue "black screen after resume".

Change-Id: I654a6dad8347d5bd04af0faeb46fc77be184514f
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
6 years agohdmitx: remove NULL characters of aud_cap
Kaifu Hu [Wed, 11 Apr 2018 05:14:43 +0000 (13:14 +0800)]
hdmitx: remove NULL characters of aud_cap

PD#164062: hdmitx: remove NULL characters of aud_cap

remove NULL characters of aud_cap.

Change-Id: Ie82de9879071d87c204058e7b81498fe72eb3a19
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
6 years agoamvecm: serial print unexpected information
wenfeng.guo [Wed, 11 Apr 2018 02:17:07 +0000 (10:17 +0800)]
amvecm: serial print unexpected information

PD#163944: amvecm: serial print unexpected information

Change-Id: Ia18adf8426e25a1a960609df2d25c76f8adf5690
Signed-off-by: wenfeng.guo <wenfeng.guo@amlogic.com>
6 years agohdmitx: use bt2020 in aviinfo on dv LL mode
Yi Zhou [Tue, 10 Apr 2018 06:39:33 +0000 (14:39 +0800)]
hdmitx: use bt2020 in aviinfo on dv LL mode

PD#163981: hdmitx: use bt2020 in aviinfo on dv LL mode

1.add bt2020 in aviinfo
2.porting PD151662 to kernel4.9
3.use system 422 mode

Change-Id: Ia4cd60c02e6fc02eef001d296ca20b504f1f3e2a
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
6 years agousb: phy3: USB3.0 PHY Tuning for S905
Jianxin Qin [Tue, 27 Mar 2018 09:16:29 +0000 (17:16 +0800)]
usb: phy3: USB3.0 PHY Tuning for S905

PD#163833: usb: phy3: USB3.0 PHY Tuning for S905

As the weak compatibility of USB 3.0 interface, we set some proper
values to the Parameter controls of USB3.0 PHY.

Change-Id: Icdaf4d3620f25f98f72eb9ddc7738bcc4328ded7
Signed-off-by: Jianxin Qin <jianxin.qin@amlogic.com>
6 years agoRevert "ANDROID: sched/tune: Initialize raw_spin_lock in boosted_groups"
Vikram Mulukutla [Fri, 22 Sep 2017 00:24:24 +0000 (17:24 -0700)]
Revert "ANDROID: sched/tune: Initialize raw_spin_lock in boosted_groups"

This reverts commit c5616f2f874faa20b59b116177b99bf3948586df.

If we re-init the per-cpu boostgroup spinlock every time that
we add a new boosted cgroup, we can easily wipe out (reinit)
a spinlock struct while in a critical section. We should only
be setting up the per-cpu boostgroup data, and the spin_lock
initialization need only happen once - which we're already
doing in a postcore_initcall.

For example:

     -------- CPU 0 --------   | -------- CPU1 --------
cgroupX boost group added      |
schedtune_enqueue_task         |
  acquires(bg->lock)           | cgroupY boost group added
                               |  for_each_cpu()
                               |    raw_spin_lock_init(bg->lock)
  releases(bg->lock)           |
      BUG (already unlocked)   |
                               |

This results in the following BUG from the debug spinlock code:
BUG: spinlock already unlocked on CPU#5, rcuop/6/68

Bug: 32668852

Change-Id: I3016702780b461a0cd95e26c538cd18df27d6316
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
6 years agoANDROID: uid_sys_stats: Replace tasklist lock with RCU in uid_cputime_show
Pavankumar Kondeti [Wed, 21 Jun 2017 03:52:45 +0000 (09:22 +0530)]
ANDROID: uid_sys_stats: Replace tasklist lock with RCU in uid_cputime_show

Tasklist lock is acuquired in uid_cputime_show for updating the stats
for all tasks in the system. This can potentially disable preemption
for several milli seconds. Replace tasklist_lock with RCU read side
primitives.

Change-Id: Ife69cb577bfdceaae6eb21b9bda09a0fe687e140
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
6 years agovpp: increase the vskip count to 8 for scale down
Brian Zhu [Thu, 29 Mar 2018 10:01:20 +0000 (18:01 +0800)]
vpp: increase the vskip count to 8 for scale down

PD#163431: vpp: increase the vskip count to 8 for scale down

Change-Id: I2022a031a95c0598ad31276e7a2aebd5ba2a977c
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
6 years agolcd_extern: update mipi_tv070wsm init_table
Weiming Liu [Thu, 29 Mar 2018 08:39:25 +0000 (16:39 +0800)]
lcd_extern: update mipi_tv070wsm init_table

PD#163292: lcd_extern: update mipi init code for boe panel on g12a board

Change-Id: I8a9aea07b23423c268943c754d4f64131e0c4c6f
Signed-off-by: Weiming Liu <weiming.liu@amlogic.com>
6 years agosd: del sd no-use caps on g12a dts.
Nan Li [Wed, 28 Mar 2018 06:27:06 +0000 (14:27 +0800)]
sd: del sd no-use caps on g12a dts.

PD#162559: remove sd no-use caps, or UHS-I SD card will init
fail on g12a.

Change-Id: Ib4fede1e03fce87ad9766370b405eb34054f97e0
Signed-off-by: Nan Li <nan.li@amlogic.com>
6 years agodrm: add vblank sent while disable crtc
Yalong Liu [Sun, 8 Apr 2018 09:19:18 +0000 (17:19 +0800)]
drm: add vblank sent while disable crtc

PD#163846: add vblank sent while disable crtc
shutdown results in hung atomic commit cause DRM hangup a few secs

Change-Id: I54dcbe33b05ab9cb3487ae0509ce23e61e67a4ca
Signed-off-by: Yalong Liu <yalong.liu@amlogic.com>
6 years agoANDROID: arm64: mark kpti_install_ng_mappings as __nocfi
Greg Hackmann [Mon, 9 Apr 2018 20:48:49 +0000 (13:48 -0700)]
ANDROID: arm64: mark kpti_install_ng_mappings as __nocfi

4.9.93 panics on boot when CFI_CLANG and UNMAP_KERNEL_AT_EL0 are both
enabled.  From Sami Tolvanen:

"kpti_install_ng_mappings makes an indirect call to a physical address,
which trips CFI. Adding the __nocfi attribute to this function should
fix the problem."

Bug: 77811249
Change-Id: I87d1ceb29f1ba2caee8954547596f4236bdfc31f
Reported-by: Jean-Baptiste Theou <jb@essential.com>
Signed-off-by: Greg Hackmann <ghackmann@google.com>
6 years agoMerge tag 'v4.9.93' into android-4.9
Greg Hackmann [Mon, 9 Apr 2018 18:39:13 +0000 (11:39 -0700)]
Merge tag 'v4.9.93' into android-4.9

This is the 4.9.93 stable release

Change-Id: I4293d83f45982c6fd479bddbf9b0f811248ddc30
Signed-off-by: Greg Hackmann <ghackmann@google.com>
6 years agoosd_drm: fix osd drm vsync irq error
pengcheng chen [Mon, 9 Apr 2018 07:32:49 +0000 (15:32 +0800)]
osd_drm: fix osd drm vsync irq error

PD#160546: osd_drm: fix osd drm vsync irq error

Change-Id: Ieebc611553142ccc41052d1395f323f693b9330a
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
6 years agovpp: adjust the max process height by checking vpu clk
Brian Zhu [Fri, 6 Apr 2018 14:15:16 +0000 (22:15 +0800)]
vpp: adjust the max process height by checking vpu clk

PD#163431: vpp: adjust the max process height by checking vpu clk

Change-Id: Ic7c264d9b287839a457b0cd4e2f090b459739a80
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
6 years agoemmc: add dtb backup machinisim
Ruixuan Li [Mon, 2 Apr 2018 03:37:27 +0000 (11:37 +0800)]
emmc: add dtb backup machinisim

PD#162119: emmc: add dtb backup machinisim

Change-Id: Ie8fd8f1a72f0e04c2ceacf5338add3c5c3862b84
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
6 years agog12a_u220_v1: g12a_u220_v1 bring up.[2/3]
Tong Li [Mon, 9 Apr 2018 04:16:31 +0000 (12:16 +0800)]
g12a_u220_v1: g12a_u220_v1 bring up.[2/3]

PD#163870: g12a_u220_v1 bring up.

Change-Id: I9347c8f955c09186092ce73364378e2ff13956d0
Signed-off-by: Tong Li <tong.li@amlogic.com>
6 years agoLinux 4.9.93 v4.9.93
Greg Kroah-Hartman [Sun, 8 Apr 2018 10:13:01 +0000 (12:13 +0200)]
Linux 4.9.93

6 years agospi: davinci: fix up dma_mapping_error() incorrect patch
Greg Kroah-Hartman [Fri, 6 Apr 2018 08:18:25 +0000 (10:18 +0200)]
spi: davinci: fix up dma_mapping_error() incorrect patch

commit aabb797b4c1204b2e8518538b2616e476f2bac92, which is commit
c5a2a394835f473ae23931eda5066d3771d7b2f8 upstream had an error in it.

Ben writes:
The '!' needs to be deleted.  This appears to have been fixed upstream
by:

commit 8aedbf580d21121d2a032e4c8ea12d8d2d85e275
Author: Fabien Parent <fparent@baylibre.com>
Date:   Thu Feb 23 19:01:56 2017 +0100

    spi: davinci: Use SPI framework to handle DMA mapping

which is not suitable for stable.

So I'm just fixing this up directly.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "ip6_vti: adjust vti mtu according to mtu of lower device"
Greg Kroah-Hartman [Fri, 6 Apr 2018 07:45:22 +0000 (09:45 +0200)]
Revert "ip6_vti: adjust vti mtu according to mtu of lower device"

This reverts commit 1139d77d8a7f9aa6b6ae0a1c902f94775dad2f52 which is
commit 53c81e95df1793933f87748d36070a721f6cb287 upstream.

Ben writes that there are a number of follow-on patches needed to fix
this up, but they get complex to backport, and some custom fixes are
needed, so let's just revert this and wait for a "real" set of patches
to resolve this to be submitted if it is really needed.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Petr Vorel <pvorel@suse.cz>
Cc: Alexey Kodanev <alexey.kodanev@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "mtip32xx: use runtime tag to initialize command header"
Greg Kroah-Hartman [Fri, 6 Apr 2018 07:28:46 +0000 (09:28 +0200)]
Revert "mtip32xx: use runtime tag to initialize command header"

This reverts commit db54facd56a40e7766bf7f7cda1ae138e72a691c which was
commit a4e84aae8139aca9fbfbced1f45c51ca81b57488 upstream.

Ben writes:
    MQ IO schedulers were introduced in 4.11, so this shouldn't be
    needed in older branches.  It also causes a performance
    regression (fixed upstream).  Please revert this for 4.4 and
    4.9.

So let's revert it!

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "spi: bcm-qspi: shut up warning about cfi header inclusion"
Greg Kroah-Hartman [Fri, 6 Apr 2018 07:08:12 +0000 (09:08 +0200)]
Revert "spi: bcm-qspi: shut up warning about cfi header inclusion"

This reverts commit c30e6636ce101fd61331092c490b9d9c55b2d143.

Florian writes:
Sorry for noticing so late, but this appears to be bogus, there
is no MTD_NORFLASH symbol being defined in 4.9, in fact I can't
find this Kconfig symbol in any kernel version, so this
effectively results in the driver no longer being selectable, so
this sure does silence the warning.

It's not good to just disable a whole driver :(

So let's revert the patch for now, Arnd can work on a better build
fix...

Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "ARM: dts: omap3-n900: Fix the audio CODEC's reset pin"
Greg Kroah-Hartman [Fri, 6 Apr 2018 06:56:45 +0000 (08:56 +0200)]
Revert "ARM: dts: omap3-n900: Fix the audio CODEC's reset pin"

This reverts commit e5ca83f556925b86133af12ef7f17c1a52c39d7e which was
commit 7be4b5dc7ffa9499ac6ef33a5ffa9ff43f9b7057 upstream.

It requires a driver that was not merged until 4.16, so remove it from
this stable tree as it is pointless.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin"
Greg Kroah-Hartman [Fri, 6 Apr 2018 06:47:29 +0000 (08:47 +0200)]
Revert "ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin"

This reverts commit 272b5eef085c23cd71eec30fe040fb1592682508 which was
comit e153db03c6b7a035c797bcdf35262586f003ee93 upstream.

It requires a driver that was not merged until 4.16, so remove it from
this stable tree as it is pointless.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoFix slab name "biovec-(1<<(21-12))"
Mikulas Patocka [Wed, 21 Mar 2018 16:49:29 +0000 (12:49 -0400)]
Fix slab name "biovec-(1<<(21-12))"

commit bd5c4facf59648581d2f1692dad7b107bf429954 upstream.

I'm getting a slab named "biovec-(1<<(21-12))". It is caused by unintended
expansion of the macro BIO_MAX_PAGES. This patch renames it to biovec-max.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agonet: hns: Fix ethtool private flags
Matthias Brugger [Thu, 15 Mar 2018 16:54:20 +0000 (17:54 +0100)]
net: hns: Fix ethtool private flags

commit d61d263c8d82db7c4404a29ebc29674b1c0c05c9 upstream.

The driver implementation returns support for private flags, while
no private flags are present. When asked for the number of private
flags it returns the number of statistic flag names.

Fix this by returning EOPNOTSUPP for not implemented ethtool flags.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agomd/raid10: reset the 'first' at the end of loop
Guoqing Jiang [Thu, 6 Apr 2017 01:12:18 +0000 (09:12 +0800)]
md/raid10: reset the 'first' at the end of loop

commit 6f287ca6046edd34ed83aafb7f9033c9c2e809e2 upstream.

We need to set "first = 0' at the end of rdev_for_each
loop, so we can get the array's min_offset_diff correctly
otherwise min_offset_diff just means the last rdev's
offset diff.

[only the first chunk, due to b506335e5d2b ("md/raid10: skip spare disk as
'first' disk") being already applied - gregkh]

Suggested-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoARM: dts: am57xx-idk-common: Add overide powerhold property
Keerthy [Thu, 10 Nov 2016 05:09:20 +0000 (10:39 +0530)]
ARM: dts: am57xx-idk-common: Add overide powerhold property

commit 8804755bfb1f3cbc003e4ebe99eac491672f354c upstream.

The PMICs have POWERHOLD set by default which prevents PMIC shutdown
even on DEV_CTRL On bit set to 0 as the Powerhold has higher priority.
So to enable pmic power off this property lets one over ride the default
value and enable pmic power off.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoARM: dts: am57xx-beagle-x15-common: Add overide powerhold property
Keerthy [Thu, 10 Nov 2016 05:09:19 +0000 (10:39 +0530)]
ARM: dts: am57xx-beagle-x15-common: Add overide powerhold property

commit 1f166499ce006b3770a3166122eda64e160736ab upstream.

The PMICs have POWERHOLD set by default which prevents PMIC shutdown
even on DEV_CTRL On bit set to 0 as the Powerhold has higher priority.
So to enable pmic power off this property lets one over ride the default
value and enable pmic power off.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>