Commit Graph

649472 Commits

Author SHA1 Message Date
nengwen.chen
e71c50ecda atv_demod: after afc adjusts freq and stable, sync to settings to get freq [1/1]
PD#TV-7462

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

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

Verify:
Verified by x301

Change-Id: Id78a7f974345fd428f9bb185c36fcbe7b93f4ac2
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
f862a26dfe atv_demod: add nicam detection when current signal fm-mono change to nicam [1/1]
PD#TV-7335

Problem:
add nicam detection when current signal fm-mono change to nicam.

Solution:
1.add nicam detection when current signal fm-mono change to nicam.

Verify:
Verified by x301

Change-Id: If2e35d018d2df803c5458cc93974352b06e90a11
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
733fe98e69 atv_demod: fix atv audio control interface. [1/1]
PD#SWPL-9934

Problem:
1.audio control calls crash on a non-tl1 platform.
1.fix atv audio control interface.

Solution:
1.fix atv audio control interface.

Verify:
Verified by r311 and x301.

Change-Id: Ib6d58cec96e7d57e1bfd8ae18524dcb5517c317e
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
34fa1acab7 atv_demod: fix commit "c12f8957d441e99d3c037dfe1f36029f55421fe3". [1/1]
PD#TV-6044, PD#TV-6047

Problem:
1.fix commit "c12f8957d441e99d3c037dfe1f36029f55421fe3".

Solution:
1.fix commit "c12f8957d441e99d3c037dfe1f36029f55421fe3".

Verify:
Verified by x301

Change-Id: I8e8632e608b8e0ddd8757409af6c5509bafd801d
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
48782cae1e atv_demod: fix atv non standard signal audio handle [1/1]
PD#TV-6044, PD#TV-6047

Problem:
ATV sound output has noise when input non standard signal.

Solution:
1.fix atv non standard signal audio handle.
2.remove atv audio source selection in audio module.
3.atv demod selects audio source according to signal.
4.atv demod version: V2.12.

Verify:
Verified by x301

Change-Id: Ie0fce492f1ce7f5a5866d8674c95c97ee32452c0
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
2ad71349f2 atv_demod: enable the nicam switch [1/1]
PD#TV-6144

Problem:
enable the nicam switch.

Solution:
1.enable the nicam switch.

Verify:
Verified by x301

Change-Id: I3961233c6093b372692098ddbb24737063ad59de
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
9315856b63 atv_demod: optimize set frontend time [1/1]
PD#SWPL-8072

Problem:
optimize set frontend time.

Solution:
1.To optimize the atv demod init.
2.Turn off nicam/btsc/A2 recognition by default.
3.atv demod version: V2.11.

Verify:
Verified by x301

Change-Id: I4f894626da18fef61ce8283260e1d75adb0e3640
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
93a7749565 atv_demod: tm2: add audio gain and interrupt. [1/1]
PD#SWPL-5661, PD#SWPL-5659

Problem:
1.add gain register to control the L and R channel audio gain.
2.add atv interrupt for signal lock and unlock.

Solution:
1.add gain register to control the L and R channel audio gain.
2.add atv interrupt for signal lock and unlock.

Verify:
verified by ab301 and ab311.

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

Conflicts:
	arch/arm64/boot/dts/amlogic/tm2_t962x3_ab301.dts
2020-06-29 11:45:36 +09:00
nengwen.chen
4b7e9a3be9 atv_demod: fix frequency closer when channel searching [1/1]
PD#TV-6452, PD#TV-6643, PD#TV-6144

Problem:
fix frequency closer when channel searching.

Solution:
1.fix frequency closer when channel searching.
2.Frequency offset cause errors in CVBS or audio recognition.

Verify:
Verified by x301

Change-Id: Ieab13a5b5d8d901cfc61ea09e5e47eb9e938bf34
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
12d93f47c2 atv_demod: enable the nicam switch [1/1]
PD#TV-6144

Problem:
enable the nicam switch.

Solution:
1.enable the nicam switch.

Verify:
Verified by x301

Change-Id: I3961233c6093b372692098ddbb24737063ad59de
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
269ac650f3 atv_demod: fix a2/nicam/mono sound output power [1/1]
PD#TV-6140

Problem:
fix a2/nicam/mono sound output power.

Solution:
1.fix a2/nicam/mono sound output power.

Verify:
Verified by x301

Change-Id: I0dc192cd841d2b1c4d25d2d6c5569a69575ce735
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
ed65e5ad65 atv_demod: fix nicam audio [1/1]
PD#TV-5660

Problem:
fix nicam audio.

Solution:
1.fix nicam audio.

Verify:
Verified by x301

Change-Id: I35d508d1772b9c37ad71a62c2844e1776e81fd09
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:36 +09:00
nengwen.chen
7ecef0f642 atv_demod: optimize set frontend time [1/1]
PD#SWPL-8072

Problem:
optimize set frontend time.

Solution:
1.To optimize the atv demod init.
2.Turn off nicam/btsc/A2 recognition by default.
3.atv demod version: V2.11.

Verify:
Verified by x301

Change-Id: I4f894626da18fef61ce8283260e1d75adb0e3640
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
nengwen.chen
cb0e99b47d atv_demod: tm2: atv demod basic functin bringup [1/1]
PD#SWPL-6731

Problem:
atv demod basic functin bringup.

Solution:
atv demod basic functin bringup.

Verify:
Verified by ab301 and ab309.

Change-Id: Ie2d92aad9d2ebf2493f26c50ff7ded57cd040b1c
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
nengwen.chen
6ad87a6ca1 atv_demod: fix BG/DK sound output power [1/1]
PD#TV-6012

Problem:
fix BG/DK sound output power.

Solution:
1.fix BG/DK sound output power.

Verify:
Verified by x301

Change-Id: I428d8a1ed97c8da5fdfe55f8dd7ac2fda9200814
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
nengwen.chen
8078be9b47 atv_demod: fix atbm2040 tuner channel scanning [1/1]
PD#TV-5499

Problem:
fix atbm2040 tuner channel scanning.

Solution:
1.fix atbm2040 tuner channel scanning.
2.modify tune interface.

Verify:
Verified by x301

Change-Id: Id135bcdca797ab93e8a2902476157b2ce324a2ce
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
nengwen.chen
0013eb6e2b atv_demod: add atbm2040 tuner support [1/3]
PD#TV-5499

Problem:
add atbm2040 tuner support.

Solution:
add atbm2040 tuner support.

Verify:
Verified by x301.

Change-Id: I89f82727c7c11f5fc6377584d519a17fe3449c4a
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
nengwen.chen
2ed11e94e1 atv_demod: add atv demod tune interface [1/2]
PD#TV-4499

Problem:
add atv demod tune interface.

Solution:
add atv demod tune interface.

Verify:
Verified by x301.

Change-Id: I4b62ee8b87d218bf639c02a34ba7e1c116a22249
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
nengwen.chen
8ff6518095 atv_demod: optimize the stereo audio recognition [1/1]
PD#TV-3569

Problem:
optimize the stereo audio recognition.

Solution:
1.optimize the stereo audio recognition.
2.remove redundant code.
3.atv demod version: V2.10.

Verify:
verified by x301.

Change-Id: If8933bdd897a7c3e6b6ff9753d7ff971a0432ef9
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
nengwen.chen
4bd63b2275 atv_demod: fix audio output when adjust the input amplitude [1/1]
PD#TV-4901

Problem:
fix audio output when adjust the input amplitude.

Solution:
fix audio output when adjust the input amplitude.

Verify:
verified by x301

Change-Id: If08e4adff6f4d0355448687ebe6756fa2e155704
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
nengwen.chen
ca0814f267 atv_demod: fix audio config (PAL_M, NTSC_M) when video is PAL [1/1]
PD#TV-4274

Problem:
fix audio config (PAL_M, NTSC_M) when video is PAL.

Solution:
fix audio config (PAL_M, NTSC_M) when video is PAL

Verify:
verified by x301.

Change-Id: I9be8d71d52a226b6422317be0b77ca6331f23147
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
Nian Jing
9b63ffb463 tvafe: lower shutdown power for tl1 [1/1]
PD#SWPL-6165

Problem:
TL1 vdee power too high when shutdown

Solution:
close bandgap when shut down for tl1
close vafe ctrl
close adc pll

Verify:
X301

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

Conflicts:
	drivers/amlogic/media/vout/vdac/vdac_dev.c
2020-06-29 11:45:35 +09:00
nengwen.chen
c120aa81ed atv_demod: modify atv demod support multi tuner load [1/3]
PD#TV-1539

Problem:
modify atv demod support multi tuner load.

Solution:
1.add fine tune.
2.add set/get if info.
3.add tuner type set/get.
4.add multi tuner config in dts.
5.atv demod ver: V2.09.

Verify:
verified by x301

Change-Id: I23328bfab3d3508db67cef3e327002563eb1a87e
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:35 +09:00
nengwen.chen
7513077a2d atv_demod: Fix ATV audio output noise when switching channels to play [1/1]
PD#SWPL-2297, PD#SWPL-5450, PD#TV-2311

Problem:
Fix ATV audio output noise when switching channels to play.

Solution:
1.Add the judgment of SNR to prevent the weak signal
  from entering the OV mode.
2.Wait for the signal to be completely stable before OV detection.
3.OV detection is turned off by default,
  and will be turned on again when non-standard signals are encountered.
4.The OV detection moves from afc timer to monitor.
5.Optimize detection of A2/FM.
6.atv demod ver: V2.08.

Verify:
verified by x301

Change-Id: I3064230472ce51e1192a2d08ef6cc6f4ba10abaa
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
nengwen.chen
2437137b48 atv_demod: Fix non standard for analog signal [1/1]
PD#TV-1549, PD#TV-2829, PD#TV-2830

Problem:
Fix non standard for analog signal.

Solution:
1.Add non standard config 3 for analog signal.
2.Fix non standard default value.
3.Fix audio control register an bits.
4.After correcting the frequency offset success,
 reset tuner to prevent audio from identifying errors.

Verify:
verified by x301

Change-Id: I65335dbe9ce9dc66d4ccaae3c1ff591660790616
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
Nian Jing
45a51a5728 tvafe: fix pali recognize for palcn [1/1]
PD#SWPL-3395

Problem:
recognized fsc358 flag when signal weak

Solution:
increase fsc358-flag recognized threshold
avoid fsc443 be recognized as fsc358

Verify:
verify on x301

Change-Id: I7b759bd0621c153e5abd3dee8fdf55a2426400a7
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
2020-06-29 11:45:34 +09:00
nengwen.chen
c8438a3a79 atv_demod: Tuner crashes easily when fast finetune [1/1]
PD#SWPL-4421

Problem:
Tuner crashes easily when fast fine tune

Solution:
Delay afc work to prevent tuner crash

Verify:
verified by x301

Change-Id: I011f7c3f71a30f95a9b7aa371d5fabe71f249051
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
nengwen.chen
1e94a666b4 atv_demod: Add audio carrier offset detect [1/1]
PD#TV-2564

Problem:
Torture room teset report SND0810 sound carrier deviation

Solution:
Add audio carrier offset detect

Verify:
verified by x301

Change-Id: I2d715891fb268452f95e05f998864e9b7321ff38
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
nengwen.chen
6d51e6415e atv_demod: Optimizing ATV auto scan Speed. [1/2]
PD#SWPL-4123

Problem:
Optimizing ATV auto scan Speed.

Solution:
optimizing the step of scanning.

Verify:
verified by x301

Change-Id: I0f616f14488be49be67c40eca7fc9f30108545b8
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
nengwen.chen
dc911319b2 atv_demod: modify atv demod code [1/1]
PD#SWPL-3469

Problem:
1.add mono audio only config.
2.fix offset -0.5M lose channel when scanning.
3.fix a2 audio mono mode detection threshold.
4.add audio detection when scanning.
5.Ver: V2.06.

Solution:
add mono audio only config

Verify:
verified by einstein

Change-Id: I774d7aa42ffbfcbec58b9b21f05368c5166331c8
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
Xing Wang
a3975b6783 audio: fix no sound when atv switch to other source [1/1]
PD#SWPL-3440

Problem:
ATV switch to other source, such as DTV/HDMI/AV, no sound

Solution:
ATV switch to other source, atv demond is disabled when
audio is reading data, so it's blocked.
In normal, ATV sends audio data to FRATV,
then FRATV sends data to audio fifo, then to DDR.
If ATV stops to send audio data, no interrupt from FRATV to fifo,
no data is updated to DDR.
When exit from audio atv patch, it's a block signal to
wait in_read finished, but ATV is disabled
TimeCheckThread will check any routine is blocked,
if there is one, signal SIGABRT would rise and cause audio server restart
So we  make a delay before ATV is disabled to waiting audio data is readed.

Verify:
x301

Change-Id: I47dc88d2c8565c16c739ffea69a88152fa4d5f13
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
2020-06-29 11:45:34 +09:00
nengwen.chen
a8fcbb728d atv_demod: atv demod code optimization for audio [1/1]
PD#TV-1448

Problem:
1.atv demod code optimization for audio
2.amlogic-4.9-dev

Solution:
atv demod code optimization for audio

Verify:
verified by einstein

Change-Id: Ic1c6a26ef97fbaf288ae37f2761c0df83ec7cf1e
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
nengwen.chen
9ba7c8f814 atv_demod: reduce atv demod debug info when searching. [1/1]
PD#SWPL-2712

Problem:
reduce atv demod debug info when searching.

Solution:
reduce atv demod debug info when searching.

Verify:
verified by r311

Change-Id: I01f1cebabdacdea4bb7695c2133b99157d8db19d
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
nengwen.chen
f54861b2ff atv_demod: modify atv demod code [1/1]
PD#SWPL-2295

Problem:
1.modify atv demod code for coverity.
2.add ntsc-m ring filter for t962x2.
3.merge code optimization from android l.
4.add tuner compatible info in dts for tuner debug.

Solution:
1.modify atv demod code for coverity.
2.add ntsc-m ring filter for t962x2.
3.merge code optimization from android l.
4.add tuner compatible info in dts for tuner debug.

Verify:
verified by einstein

Change-Id: I9696aa628315ee11f0c9dd279c7cc03797f04331
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
nengwen.chen
ed47de1158 atv_demod: add atv demod support for tl1 [1/1]
PD#172587

Problem:
1.add atv demod driver and dts config for tl1.
2.merge from bringup/amlogic-4.9/tl1-20181111.

Solution:
add atv demod driver and dts config for tl1

Verify:
verified by t962x2_x301

Change-Id: Ibbc00f9d478a9f5e52c6333b9a819aac381894ec
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
2020-06-29 11:45:34 +09:00
Dianzhong Huo
0e013d8f9b ipc: add ircut driver for ipc camera [1/1]
PD#SWPL-4078

Problem:
Need porting ircut driver for ipc camera.

Solution:
Add ircut driver.
ircut auto on/off by light in sensor.

Verify:
Verify on W411 platform.

Change-Id: I4f20f0a1e117e8e4e7f94dead6a65f243169827f
Signed-off-by: Dianzhong Huo <dianzhong.huo@amlogic.com>
2020-06-29 11:45:33 +09:00
Lei Qian
d14d9e5f7d fix compile error
PD#SWPL-15312
2020-06-29 11:45:33 +09:00
Viresh Kumar
a330ef9cff PM / wakeup: Rework wakeup source timer cancellation
commit 1fad17fb1b upstream.

If wakeup_source_add() is called right after wakeup_source_remove()
for the same wakeup source, timer_setup() may be called for a
potentially scheduled timer which is incorrect.

To avoid that, move the wakeup source timer cancellation from
wakeup_source_drop() to wakeup_source_remove().

Moreover, make wakeup_source_remove() clear the timer function after
canceling the timer to let wakeup_source_not_registered() treat
unregistered wakeup sources in the same way as the ones that have
never been registered.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: 4.4+ <stable@vger.kernel.org> # 4.4+
[ rjw: Subject, changelog, merged two patches together ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: Iae10e0d836e4933ef0311c72508c5cf246bbe437
2020-06-29 11:45:33 +09:00
Qiufang Dai
c1d043ac2c suspend: fix freeze hangup which caused by insmod [1/1]
PD#TV-10472

Problem:
When system on, enter freeze mode lead to flush deferd probe.
Init.rc also run insmod in parallel, if insmod task
atomic_inc(&probe_count), and this task is freezed,
deadlock happends.

Solution:
Move flush deferd probe action before freeze task

Verify:
X32A0-T972

Change-Id: I8949db32aea14e2da37e77658a9c999af39e2c83
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2020-06-29 11:45:33 +09:00
Martijn Coenen
de02da7990 Android Security Bulletin - November 2019-11 - Kernel components binder driver - CVE-2019-2214 [1/1]
PD#OTT-6799

Problem:
In case the target node requests a security context, the
extra_buffers_size is increased with the size of the security context.
But, that size is not available for use by regular scatter-gather
buffers;

Solution:
make sure the ending of that buffer is marked correctly.

Verify:
Raven

Change-Id: I896f86a92a4b937a7a731ce9839ff53a700b298a
Signed-off-by: Martijn Coenen <maco at android.com>
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2020-06-29 11:45:33 +09:00
Todd Kjos
99effa825b RAVENPLAT 2652: RAVEN - Android Security Bulletin - September 2019-09 - Kernel components binder driver - CVE-2019-2181 [1/]
PD#OTT-5999

[Problem]
In binder_transaction of binder.c, there is a possible out of bounds
write due to an integer overflow. This could lead to local escalation of
privilege with noadditional execution privileges needed. User interaction
is needed for exploitation.
The fix is designed to check for the integer overflow.

[Solution]
UPSTREAM: binder: check for overflow when alloc for security context

commit 0b0509508b upstream.

When allocating space in the target buffer for the security context,
make sure the extra_buffers_size doesn't overflow. This can only
happen if the given size is invalid, but an overflow can turn it
into a valid size. Fail the transaction if an overflow is detected.

Bug: 130571081
Change-Id: Ibaec652d2073491cc426a4a24004a848348316bf
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2020-06-29 11:45:33 +09:00
Aaro Koskinen
5741242073 net: stmmac: use correct DMA buffer size in the RX descriptor
PD#TV-11316

[ Upstream commit 583e636141 ]

We always program the maximum DMA buffer size into the receive descriptor,
although the allocated size may be less. E.g. with the default MTU size
we allocate only 1536 bytes. If somebody sends us a bigger frame, then
memory may get corrupted.

Fix by using exact buffer sizes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>

Change-Id: I32f3f0758ee6df0217dd9d1275c08b04163d811b
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2020-06-29 11:45:33 +09:00
Aaro Koskinen
2c43efce4c net: stmmac: don't stop NAPI processing when dropping a packet
PD#TV-11316

[ Upstream commit 07b3975352 ]

Currently, if we drop a packet, we exit from NAPI loop before the budget
is consumed. In some situations this will make the RX processing stall
e.g. when flood pinging the system with oversized packets, as the
errorneous packets are not dropped efficiently.

If we drop a packet, we should just continue to the next one as long as
the budget allows.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>

Change-Id: Ib13615c2e413af86519c1cec0a6638b88ceaf4de
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2020-06-29 11:45:33 +09:00
qi duan
74fa5c3141 ETH: add eth reset bit when resume. [1/1]
PD#SWPL-12602

Problem:
omni phy can not connect network probably
after long stress suspend test
for gxl/txl/txlx

Solution:
In suspend/resume sequeue, add eth reset

Verify:
verify on p212/r311

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

Conflicts:
	arch/arm/boot/dts/amlogic/axg_s400_v03gva_sbr.dts
	arch/arm/boot/dts/amlogic/axg_s400_v03sbr.dts
	arch/arm/boot/dts/amlogic/gxl_p281_1g.dts
	arch/arm/boot/dts/amlogic/gxl_p281_2g.dts
	arch/arm64/boot/dts/amlogic/axg_s400_v03gva_sbr.dts
	arch/arm64/boot/dts/amlogic/axg_s400_v03sbr.dts
	arch/arm64/boot/dts/amlogic/gxl_p212_2g_drm_buildroot.dts
	arch/arm64/boot/dts/amlogic/gxl_p281_1g.dts
	arch/arm64/boot/dts/amlogic/gxl_p281_2g.dts
2020-06-29 11:45:33 +09:00
Tao Zeng
4b8aa1d903 reserved_memory: change print of all reserved memory [1/1]
PD#SWPL-16049

Problem:
When boot, print information of all reserved memory is not nice
for reading.

Solution:
Change print format of reserved memory like:
        07400000 - 07500000,     1024 KB, ramoops@0x07400000
        05000000 - 05400000,     4096 KB, linux,secmon
        3f800000 - 40000000,     8192 KB, linux,meson-fb
        31c00000 - 3f800000,   225280 KB, linux,codec_mm_cma
        31c00000 - 31c00000,        0 KB, linux,codec_mm_reserved
        2e000000 - 30000000,    32768 KB, linux,ion-dev
        30800000 - 31c00000,    20480 KB, linux,vdin1_cma
        30000000 - 30800000,     8192 KB, linux,demod_cma
        2b800000 - 2e000000,    40960 KB, linux,di_cma
        2b400000 - 2b800000,     4096 KB, linux,emp_cma

Verify:
TL1 X301

Change-Id: I5a010118665a886896c7db8be2bb911813647e9e
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2020-06-29 11:45:33 +09:00
Yue Wang
6d76b270cc usb: detect stop endpoint race using pending timer instead of counter. [1/1]
PD#SWPL-13177

Problem:
stop endpoint race

Solution:
A counter was used to find out if the stop endpoint completion raced with
the stop endpoint timeout timer. This was needed in case the stop ep
completion failed to delete the timer as it was running on anoter cpu.

The EP_STOP_CMD_PENDING flag was not enough as a new stop endpoint command
may be queued between the command completion and timeout function, which
would set the flag back.

Instead of the separate counter that was used we can detect the race by
checking both the STOP_EP_PENDING flag and timer_pending in the timeout
function.

Verify:
franklin

Change-Id: Ie958ffd530a6bd176d0cf451894a5bd4dece38da
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2020-06-29 11:45:33 +09:00
Yue Wang
d6bff5638e usb: bringup TM2 usb3 [2/2]
PD#SWPL-5609

Problem:
bringup TM2 usb3.

Solution:
bringup TM2 usb3.

Verify:
TM2

Change-Id: Ib2c80e7e586ddbe6f85a6d046efdbd650b81b030
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2020-06-29 11:45:32 +09:00
Greg Kroah-Hartman
91bda24fc8 Revert "USB: core: only clean up what we allocated"
commit cf4df407e0 upstream.

This reverts commit 32fd87b3bb.

Alan wrote a better fix for this...

Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: stable <stable@vger.kernel.org>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-29 11:45:32 +09:00
Hanjie Lin
81f9f4946c RAVENPLAT-252: Kernel components USB - CVE-2017-17558[1/1]
PD#SWPL-15901

Problem:
In usb_destroy_configuration of config.c, there is a possible
out of bounds write due to a missing bounds check. This could
lead to local escalation of privilege with no additional execution
privileges needed. User interaction is not needed for exploitation.

Solution:
The fix is designed to make sure the driver only frees as many
configurations and interfaces as it could have allocated.

Platform:
Raven

Verify:
Raven

Change-Id: I4a3d2ad27d09e606d4e363a75ce09a2e2fcf0070
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2020-06-29 11:45:32 +09:00
he.he
09ba5865c8 usb: xHCI host not responding to stop endpoint command [1/1]
PD#SWPL-14053

Problem:
Read and write simultaneously on two disks on a hub,
and then the XHCI controller would halted.

Solution:
Set the GUCTL1 BIT 17 to 1 for disable park mode.

Verify:
test pass on u200, ODROID-N2

Change-Id: I007804fa6b97a103da4a05be12c1193b9dd422cb
Signed-off-by: he.he <he.he@amlogic.com>
2020-06-29 11:45:32 +09:00