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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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
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>
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>
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>
PD#SWPL-13498
Problem:
The printing may delay the usb_disconnect processing, result to
USB transfer error during reconnecting.
Solution:
Moving the print in proc_setconfig of devio.c .
Verify:
test pass on sm1
Change-Id: I5c45abb2d5d640e2e02dc3e0c08b10ca7a294eeb
Signed-off-by: he.he <he.he@amlogic.com>
PD#SWPL-11362
Problem:
A deadlock happens when a task initiates a CMA allocation that triggers
a page migration *AND* the tasks holding the subsequent pages have to
writeback their pages using CMA allocations.
In such a situation, the task that has triggered the page migration
holds a mutex that prevents other tasks from migrating their pages using
that same CMA allocator. This leads to a deadlock.
Solution:
The CMA is incapable of honoring the NOIO flags in some scenario, thus
cannot be used for writeback. The fix allows the code that chooses which
allocator to use in the ARM platform to avoid the CMA case for that
scenario.
The ARM DMA layer checks for allow blocking flag (_GFP_BDEV) to decide
whether to go for CMA or not. That test is not sufficient to cover the
case of writeback (GFP_NOIO).
The fix consists in adding a gfp_allow_writeback helper that tests for
the __GFP_IO flag. Then, the DMA layer uses it to decide not to go for
CMA in case of writeback.
Verify:
TL1
Change-Id: I175eb94de588234d3de2dc7f65dafe980e2636af
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
PD#SWPL-4225
Problem:
This interface is added to facilitate debugging the voltage-
table in pwm regulator, which can output different percentages
of waveforms in a fixed pwm cycle.
example:
echo 50 100 > sys/class/pwm/pwmchipx/pwmx/relative_duty
output 50% duty pwm
Solution:
add relative_duty interface in pwm sysfs
Verify:
test pass on tl1_X301_v1 tl1_skt_v1
Change-Id: Icd01e681694b81f3790f7cce8c326db02674a48c
Signed-off-by: Bichao Zheng <bichao.zheng@amlogic.com>
PD#SWPL-7960
Problem:
There is no min ddr bandwidth data
Solution:
Add this value in sysfs
Verify:
p212
Change-Id: I9d90476d30c0ca7789046d8d205f0802de2b4acf
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#SWPL-4863
Place drm_event_vblank in a new union that includes that and a bare
drm_event structure. This will allow new members of that union to be
added in the future without changing code related to the existing vbl
event type.
Assignments to the crtc_id field are now done when the event is
allocated, rather than when delievered. This way, delivery doesn't
need to have the crtc ID available.
v2:
* Remove 'dev' argument from create_vblank_event
It wasn't being used anyways, and if we need it in the future,
we can always get it from crtc->dev.
* Check for MODESETTING before looking for crtc in queue_vblank_event
UMS drivers will oops if we try to get a crtc, so make sure
we're modesetting before we try to find a crtc_id to fill into
the event.
(cherry picked from commit dc695b85fde88eca3ef3b03fcd82f15b6bc6e462)
Change-Id: I6f0feabcba9373fcc434b148752d9cd28bea67e6
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
PD#SWPL-4863
With the atomic API, it is possible that a single commit affects
multiple crtcs. If the user requests an event with that commit, one
event will be sent for each CRTC, but it is not possible to distinguish
which crtc an event is for in user space. To solve this, the reserved
field in struct drm_vblank_event is repurposed to include the crtc_id
which the event is for.
The DRM_CAP_CRTC_IN_VBLANK_EVENT is added to allow userspace to query if
the crtc field will be set properly.
[daniels: Rebased, using Maarten's forward-port.]
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170404165221.28240-2-daniels@collabora.com
Change-Id: Ide7657bdc38563d2de91edc2d649b53262002c39
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
PD#SWPL-7960
Problem:
There is no min ddr bandwidth data
Solution:
Add this value in sysfs
Verify:
p212
Change-Id: I9d90476d30c0ca7789046d8d205f0802de2b4acf
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#SWPL-7728
Problem:
bandwidth measure on tm2 is not enabled
Solution:
Adding port description of ddr controller for tm2
Also enable dmc monitor function for tm2
Verify:
AB301
Change-Id: I0127ac04fe29723669525f6ff1161e2fa35d69ca
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#TV-8696
Problem:
DMC can't set up from bootargs. For easy debug, we need
set a monitor from bootargs.
Solution:
Add a funciton for this feature. You can using following patten
to set up a DMC monitor:
dmc_montiro=[start_addr],[end_addr],[mask]
Example:
setenv initargs $initargs dmc_monitor=0x0,0x20000000,0xff58
This command set up monitor for following device on GXL:
RANGE:0 - 20000000
MONITOR DEVICE:
HDCP
HEVC
USB3.0
VPU READ1
VPU READ2
VPU READ3
VPU WRITE1
VPU WRITE2
VDEC
HCODEC
GE2DV
Verify:
P212
Change-Id: I864ff97325981fe62f18a4a4a24700b6b6ea7482
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#TV-5802
Problem:
irq of dmc violation happens very qiuckly, which may
have some wrong report if violation print in workqueu.
Solution:
Add a data to identify it. If data is null, then it's a
fake violation
Verify:
txhd
Change-Id: I402763fa2d20cfae3dc2d9647f7b2c2fb29ce966
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>