Commit Graph

649563 Commits

Author SHA1 Message Date
zhiwei.yuan
c64ebd3261 tvafe: T962E2 Low probability of crashing at startup [1/1]
PD#SWPL-9276

Problem:
mem allocate fail sometimes by using dma_alloc_coherent

Solution:
use kzalloc instead

Verify:
verified by t962x3_ab301

Change-Id: Iec58746b7e269d307f88037216b7a778d18774ec
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
2019-07-09 22:30:14 -07:00
Ville Syrjälä
c7245fe462 drm/atomic: Make private objs proper objects
Make the atomic private object stuff less special by introducing proper
base classes for the object and its state. Drivers can embed these in
their own appropriate objects, after which these things will work
exactly like the plane/crtc/connector states during atomic operations.

v2: Reorder to not depend on drm_dynarray (Daniel)

Change-Id: I475f3c46440934b8d6f461935b6413624b7d34c7
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
Signed-off-by: Ville Syrj?l? <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170712155102.26276-3-ville.syrjala@linux.intel.com
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2019-07-09 19:27:50 +08:00
Pandiyan, Dhinakaran
90f028c3da drm: Add driver-private objects to atomic state
It is necessary to track states for objects other than connector, crtc
and plane for atomic modesets. But adding objects like DP MST link
bandwidth to drm_atomic_state would mean that a non-core object will be
modified by the core helper functions for swapping and clearing
it's state. So, lets add void * objects and helper functions that operate
on void * types to keep these objects and states private to the core.
Drivers can then implement specific functions to swap and clear states.
The other advantage having just void * for these objects in
drm_atomic_state is that objects of different types can be managed in the
same state array.

v7: Use __for_each_private_obj to define for_each_private_obj (Maarten)
v6: More kernel-doc to keep 0-day happy
v5: Remove more NULL checks (Maarten)
v4: Avoid redundant NULL checks when private_objs array is empty (Maarten)
v3: Macro alignment (Chris)
v2: Added docs and new iterator to filter private objects (Daniel)

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Harry Wentland <Harry.wentland@amd.com>

Change-Id: I1d906ca120167b8b25a5e959b332c5bea55a97b7
Acked-by: Harry Wentland <harry.wentland@amd.com>
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1492753893-3748-2-git-send-email-dhinakaran.pandiyan@intel.com
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2019-07-09 19:27:36 +08:00
Cheng Tong
35d05d4d14 dts: T312 add config for dtv tuner si2169 [1/2]
PD#SWPL-10672

Problem:
Add config for dtv tuner si2169

Solution:
Add dtv tuner si2169 as default
and add tuner i2c config

Verify:
Verified by T312

Change-Id: Ib64871f37e03f84beb8d8174e9e5b5ec0f722115
Signed-off-by: Cheng Tong <cheng.tong@amlogic.com>
2019-07-09 04:12:47 -07:00
nengwen.chen
d94280e10c 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>
2019-07-09 04:08:02 -07:00
Zhuo Wang
1602000efd ethernet: enhance window function [1/1]
PD#SWPL-10876

Problem:
add del 2ns function

Solution:
add del 2ns function

Verify:
verify on u200 board

Change-Id: I949a1d85e41d0b0e03708243f9559f8de63b0e54
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
2019-07-09 04:07:33 -07:00
Zhe Wang
7e884b65a3 audio: add clip thd control interface [1/3]
PD#SWPL-10716

Problem:
when audio signal change from -30dB to 0dB, audio suddenly output power
is higher than 150% instantaneous maximum power

Solution:
add clip thd control interface

Verify:
verified on TL1-X301

Change-Id: Id16ba3c220a22b473eaa1e3ff87bf5dde2a83227
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
2019-07-09 03:00:46 -07:00
Huan Biao
135498c51c thermal: update read sensor times for performance [1/1]
PD#SWPL-10836

Problem:
read sensor time too long

Solution:
read sensor once

Verify:
verified on t1 t962x2 x301

Change-Id: Iddf4c903ba8a3836666943adb5c02c5d287728df
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
2019-07-09 02:52:15 -07:00
Pengcheng Chen
496d72c593 osd: add wait_hw_vsync_viu2 [1/1]
PD#TV-7584

Problem:
osd on viu2 present timeout

Solution:
add wait_hw_vsync_viu2

Verify:
Verified on X30A1-T962X2

Change-Id: Iab80f4cef830652923e1de73eba6d87715bad855
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2019-07-08 23:21:01 -07:00
apollo.ling
941aca6132 vfm: string without null-termination [1/1]
PD#OTT-4743

Problem:
string withou null-termination

Solution:
ensure there is a null-termination in the string

Verify:
p212

Change-Id: Icfb6e39741b5d26611bbd316d6c423b8d4715105
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
2019-07-08 01:34:36 -07:00
MingLiang Dong
2adfd7ee62 vpp: optimize rgb screen convert coef [1/1]
PD#TV-7280

Problem:
rgb screen pattern white balance data is a little high

Solution:
optimize convert coef

Verify:
verify on TL1

Change-Id: Iae1e8134d1a48fe0bbf206dd9b148c264951da2a
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
2019-07-08 01:04:11 -07:00
Wenfeng Guo
23ca747a1a di: fix sawtooth in the lower patr of AV video [1/1]
PD#SWPL-10831

Problem:
sawtooth in the lower patr of AV video

Solution:
adjust motion num condition

Verify:
marconi

Change-Id: Id42f1cb2d3f702e04cd640dbc99c4f7a97447faf
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
2019-07-08 00:56:38 -07:00
Yong Qin
d1946521e3 vdin: hdr mode force 10bit mode [1/1]
PD#TV-7517

Problem:
hdmi hdr color deepth mode is auto, if input
is 8bit mode, output is 8bit mode

Solution:
when is hdr mode, force set 10bit mode to frame
buffer.

Verify:
tl1

Change-Id: If958f687e3923389277880e19d47f933421a8292
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2019-07-07 21:11:45 -07:00
Zhe Wang
1947ddba87 audio: set master/channel default volume higher [1/1]
PD#SWPL-10609

Problem:
spk sound is too low

Solution:
set master/channel default volume higher

Verify:
r341

Change-Id: Id2928a7d0fdfbb745d272c82a7600a6f4fb9b7e6
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
2019-07-05 06:43:57 -07:00
Luan Yuan
39758a8e7e dts: set s912 adb. [1/1]
PD#SWPL-10860

Problem:
s912 need to support adb.

Solution:
update dts

Verify:
verify by hertz

Change-Id: I085a0442d229d13d02b963c948d390920aea3dd0
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2019-07-05 04:22:30 -07:00
Jihong Sui
a1b045ac7c deinterace: add cue init setting [1/1]
PD#SWPL-7864

Problem:
the red and blue areas of the fourth frequency band
are missing color serious

Solution:
debug by VLSI(yanling), add cue init setting;

Verify:
S905X3

Change-Id: Idc8e5e811e0f2a8195cc70ebb8df0af8f080b174
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
2019-07-05 01:37:29 -07:00
Sunny Luo
61057c3618 dts: T312: config spicc amlogic driver to support dirspi_xxx [1/1]
PD#SWPL-9815

Problem:
One T312-T962X3 project need use the dirspi_xxx interfaces to
communicate with a extern mcu(spi device).

Solution:
config dts to use spicc amlogic-driver to support dirspi_xxx

Verify:
T312

Change-Id: Icad0e516b5d694b86350fec1e9322170e84d9c8f
Signed-off-by: Sunny Luo <sunny.luo@amlogic.com>
2019-07-05 14:50:55 +08:00
Jian Cao
f39d253426 ge2d: add return value check for kstrtoint call [1/1]
PD#OTT-4875

Problem:
missing return value check for kstrtoint

Solution:
add this check for kstrtoint

Verify:
verified on g12b-w400

Change-Id: I0515b4b445c78d950201df6547e83578cac32d16
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
2019-07-04 20:04:42 -07:00
deng.liu
6063649172 common: modify the dtsi config of sm1 and tm2 [1/2]
PD#SWPL-10241

Problem:
{Score:5}{vts_r9}[S905X3] VtsHalNeuralnetworksV1_1Target module 644 fail;
v0624 new add, v0613 ok;

Solution:
npu not insmod  successfully,modify dtsi config

Verify:
Local on sm1

Change-Id: I986e37acab4a76cdf6ad52620520994193a06448
Signed-off-by: deng.liu <deng.liu@amlogic.com>
2019-07-04 19:25:40 -07:00
Zongdong Jiao
61c83f5cf9 hdmitx: correct g12 rx_sense detect setting [1/1]
PD#SWPL-4684

Problem:
g12 rx_sense can't work well

Solution:
correct g12 rx_sense detect setting

Verify:
G12/U212

Change-Id: I26ae578bdf278592956dff092e60d13faf4905bf
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
2019-07-04 18:33:06 -07:00
renjiang.han
d85652151e amlvideo2: null pointer causes panic. [1/1]
PD#TV-7022

Problem:
A null pointer causes panic.

Solution:
Add a judgment on the null pointer in the
amlvideo2_stop_thread function.

Verify:
on x301

Change-Id: Ic2cb9476fa97e27fe8b1160d74330d1ba7bc93a8
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
2019-07-04 06:05:41 -07:00
yao liu
44318e5c20 dolby: demo-debug.apk test fail [1/1]
PD#SWPL-10167

Problem:
Apk drop several frames at beginning, but
dolby frames are not consumed, decoder has
no idle buffers.

Solution:
Ignore drop for dual layer dolby video

Verify:
verified on u212

Change-Id: I732d82e71c190c62a14c05accea44b4c55d04239
Signed-off-by: yao liu <yao.liu@amlogic.com>
2019-07-03 23:59:05 -07:00
Jian Cao
455f583dc8 dts: add memory-region for gxm logo [1/1]
PD#SWPL-5522

Problem:
S912 display S912 Android P support for osd

Solution:
add memory-region for gxm logo

Verify:
verified on gxm-q201

Change-Id: If4efec47f939a944530ef1dc0f7a3b8abf245a47
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
2019-07-04 10:26:08 +08:00
Jian Cao
fdcae78480 deinterace: set driver_data to NULL on shutdown release [1/1]
PD#SWPL-10079

Problem:
use-after-free issue
driver_data is relesed on shutdown, it is used in kthread_di
this thread is not stopped, will return if driver_data is NULL

Solution:
set driver_data to NULL on shutdown release

Verify:
verified on TL1-X301

Change-Id: I64fd1e39e6cedcc801d4d451eb1a56ca2ccc3364
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
2019-07-03 02:20:47 -07:00
Evoke Zhang
391be171d9 tvafe: update avin ntsc-m config for tl1 [1/1]
PD#TV-7095

Problem:
avin ntsc-m display need optimized

Solution:
fix avin ntsc-m config mistake for cvd reg 0x01

Verify:
x301

Change-Id: Iba48a37332ab9b1a6e4de79c12e6f0d3bc25e43c
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
2019-07-03 00:57:27 -07:00
Zongdong Jiao
3be60ff420 hdmitx: add missing pin mux for HPD [1/1]
PD#SWPL-10457

Problem:
Lack pin mux for HPD

Solution:
Add missing pin mux for HPD

Verify:
GXL/P212

Change-Id: If6ec414f03294dc8a858593294b9bb54a4f3fb21
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
2019-07-02 22:59:00 -07:00
yicheng shen
b1c09a2fdc hdmitx: update phy setting of 3G for SM1 [2/2]
PD#SWPL-8791

Problem:
HDMITX Eye Diagram of SM1 test fail

Solution:
Optimize the PHY setting.

Verify:
SM1

Change-Id: I33d8b8a1a515fe478845287c44271524b256c5f1
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
2019-07-02 19:59:42 -07:00
Pengcheng Chen
244d6689e6 osd: add osd virtual fb support [1/1]
PD#SWPL-8187

Problem:
need implement the new virtual FB device

Solution:
add osd virtual fb support

Verify:
Verified on U200 spi lcd board

Change-Id: I52c4257f6a0a202eb63b2ee3383f6e306e5ec16a
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2019-07-02 04:22:19 -07:00
nengqin.zhu
39702ff6fe audio: Play non-48K exception [1/1]
PD# SWPL-9328

Problem:
memory is 1G,the sound was intermittent
when hdmi play music of non-48k sampling rate

Solution:
set resample module src

Verify:
test ok using x301

Change-Id: I2245161a58a014b9dfbf0324799f5e8bd4acd184
Signed-off-by: nengqin.zhu <nengqin.zhu@amlogic.com>
2019-07-02 02:30:37 -07:00
Hang Cheng
c834af9bb5 hdmitx: correct vid pll div shift preset length [1/3]
PD#SWPL-9589

Problem:
shift preset length of vid pll div is wrong

Solution:
modify shift preset length of vid pll div

Verify:
gxl-p281

Change-Id: Iac897db9d9a36e26df40e8c1ed303e02bddeb92f
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
2019-07-02 01:49:28 -07:00
Evoke Zhang
cb9fbb115c tvafe: support nostd config nostd_vs_th in dts [1/1]
PD#TV-6046

Problem:
nostd atv display flicker

Solution:
config nostd_vs_th in dts for special tuner

Verify:
x301

Change-Id: Ibdb6422b0a9f031dab0a88b1654c566bcaa0c0d0
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
2019-07-02 01:46:32 -07:00
Lei Qian
402f235397 video_sink: fix print too much issue [1/1]
PD#TV-7043

Problem:
too much kernel log cause system hang up

Solution:
protect the log by debug flag

Verify:
verify by marconi

Change-Id: I7cb2cdf5e3bee92e136d948a974d9a1240609867
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
2019-07-01 21:26:16 -07:00
Rongjun Chen
a7f6736093 wifi: delate unuse file [2/2]
PD#SWPL-9659

Problem:
some file not have License

Solution:
delete unuse file and add License

Verify:
verify by einstein

Change-Id: Ia0a4eb82bc100129f71c7c88d0a403b482449314
Signed-off-by: Rongjun Chen <rongjun.chen@amlogic.com>
2019-07-01 20:15:36 -07:00
Yong Qin
7ba414d7fb cec: ceca interrupt cost long time [1/1]
PD#SWPL-6068

Problem:
ceca isr cost long time, and delayed vdin vs.

Solution:
move function to tasklet

Verify:
txlx

Change-Id: I861dd2ba145a64a88ad126abc00944d2358914c8
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
2019-07-01 20:01:22 -07:00
Pengcheng Chen
d051919837 buildroot: fix buildroot compile error and ge2d crash issue [1/1]
PD#SWPL-10483

Problem:
1. buildroot autobuild error
2. buildroot ge2d crash on s400

Solution:
1. fix buildroot compile error
2. move video_keep_init from _init to probe

Verify:
verified on s400,w400

Change-Id: I624fed9669387c94a50974f77b32a4730db08314
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2019-07-01 17:49:46 -07:00
Jianxin Pan
ce6d552378 cpu_hotplug: fix dead lock between flush work and ipa [1/1]
PD#TV-7161

Problem:
dead lock between flush work and ipa

Solution:
fix dead lock between flush work and ipa

Verify:
TL1

Change-Id: I479869601c0816bbaeaa693a26bf606b6a168da0
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2019-07-01 08:32:14 -07:00
huijie.huang
2ae2cb81f7 dts: debug: enable ftrace_ramoops for p212 [1/1]
PD#SWPL-6028

Problem:
enable ftrce in ramoops for p212 dtbs

Solution:
enable ftrce in ramoops for p212 dtbs

Verify:
P212

Change-Id: I2a4cb76614b44b91996d33775a5f73f91e457d0e
Signed-off-by: huijie.huang <huijie.huang@amlogic.com>
2019-07-01 04:21:00 -07:00
zhiwei.yuan
b335bb5fd1 vdin: Get video hdr status from vdin [1/1]
PD#SWPL-9636

Problem:
upper layer get signal type is too late,cause screen flash

Solution:
report signal type to upper layer directly in vdin module

Verify:
verified by t962x2_x301

Change-Id: I08f7754f20ba8b6b00a34387dcaf4aee7fdc2185
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
2019-07-01 04:19:34 -07:00
Cheng Tong
85e8bb7d68 audio: S905X2 add clk tuning_enable control in dts [1/1]
PD#SWPL-10180

Problem:
can't enable clk tuning

Solution:
add control interface in dts to enable clk tuning
and start clk before codec init for s905x2

Verify:
verify on franklin

Change-Id: Icc97b04923bcc317b8259449ba068d1eddef0854
Signed-off-by: Cheng Tong <cheng.tong@amlogic.com>
2019-07-01 00:21:48 -07:00
Hanjie Lin
feea4603d7 Makefile: dtb makefile update [1/1]
PD#SWPL-9776

Problem:
let dtb make comptabile with below ways:
make ARCH=arm meson-g12a-u200.dtb
make ARCH=arm amlogic/meson-g12a-u200.dtb

Solution:
modify makefile

Verify:
w400

Change-Id: Ic2bb196f67c632cdc9acae61645fe3dd45c7bb1a
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2019-06-30 23:59:41 -07:00
Pengcheng Chen
6eebad0acf video: black_threshold valid when vscale_skip=8 && hscale_skip=1 [1/1]
PD#TV-6827

Problem:
when input source is 4k and output axis's height <228, screen blank

Solution:
1. need set echo 20 250 > /sys/class/video/black_threshold,
when video scaler can't process, disable video
2. black_threshold valid when vscale_skip_count=8 && hscale_skip_count=1

Verify:
t972

Change-Id: I4459c9989adf4c8acb6061756393384cee6f438f
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2019-06-30 22:53:42 -07:00
Pengcheng Chen
bb43d62012 osd: need set_afbcd enable for dv certification [1/4]
PD#SWPL-10128

Problem:
dv certification uncorrect

Solution:
need set_afbcd enable for dv certification

Verify:
Verified on sm1

Change-Id: I141769ee1ae4b1cf224513c62b84414d0638c6f5
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2019-06-30 22:44:27 -07:00
yao liu
919e3b9869 dolby: Graphics blending tests fail when 4k output [4/4]
PD#SWPL-10128

Problem:
Osd scaling algorithm has bad effect

Solution:
Add repeat mode
echo 0 > /sys/module/fb/parameters/osd_auto_adjust_filter
echo 9 > /sys/module/fb/parameters/osd_h_filter_mode
echo 9 > /sys/module/fb/parameters/osd_v_filter_mode

Verify:
Verified on sm1

Change-Id: Ibcb3925c0c7674043e10a249c7ee7dbeb029ca93
Signed-off-by: yao liu <yao.liu@amlogic.com>
2019-06-30 22:43:39 -07:00
yao liu
f83fa5a672 dolby: Graphics blending tests fail on sdr tv [3/4]
PD#SWPL-10128

Problem:
graphic max 100 is too low

Solution:
need set graphic max to 380

Verify:
Verified on sm1

Change-Id: Ibbea07439a99500bdcc051aa9ed7ea8d1ee00fc8
Signed-off-by: yao liu <yao.liu@amlogic.com>
2019-06-30 22:38:29 -07:00
zhenxin.pu
6e261515da dts: thermal: ipa parameter optimization for tm2 [1/1]
PD#SWPL-10287

Problem:
ipa parameter optimization for tm2

Solution:
change the dyn_coeff of cpufreq and gpufreq, and the sustainable power

Verify:
ab311 pass

Change-Id: Iec472fef8cbd51486a697720ec3015a2e49f37b6
Signed-off-by: zhenxin.pu <zhenxin.pu@amlogic.com>
2019-06-30 22:28:18 -07:00
Jianxin Pan
4da6019112 wakeup: fix endless loop in wakeup source show [1/1]
PD#SWPL-10134

Problem:
endless loop in wakeup source show

Solution:
fix endless loop in wakeup source show

Verify:
TL1

Change-Id: If2318e31388b4a656cf8d99058f8aeaf76ff97a0
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2019-06-30 19:59:20 -07:00
Xihai Zhu
90cd1714a2 amvecm: fix screen flashing while applying gamma [1/1]
PD#TV-6785

Problem:
screen flash while applying gamma

Solution:
apply gamma directly without disable/enable

Verify:
TL1

Change-Id: Iedce17b97608542630dc21d603f3d9c813322375
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
2019-06-30 19:53:46 -07:00
Xihai Zhu
6e55859a19 amvecm: fix factory mode test pattern abnormal LC effect [1/1]
PD#TV-5977

Problem:
customer platform, when LC is on, test pattern abnormal

Solution:
there is two frame delay for LC histogram, do not enable LC precess
before it is ready

Verify:
TL1

Change-Id: I78febb9f978dba44faff74677d84075fdf1fd8c7
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
2019-06-30 19:53:01 -07:00
Zhuo Wang
1ec07a08bb ethernet: g12b/A exphy,change default param [1/1]
PD#SWPL-10391

Problem:
g12b revA and revB need one code for two parameter

Solution:
dts set g12b revB parameter
read chipversion,if g12b revA, change the parameter by default value

Verify:
verify on g12b w200 board,revA and revB

Change-Id: I9cc4cd6c370207dce22dd0c7df51a6c71397e235
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
2019-06-27 23:19:54 -07:00
Jiamin Ma
594e7bb8d7 efuse: fix potential memory info leakage issue [1/1]
PD#OTT-4656

Problem:
When handling the set attribute IOCTL EFUSE_INFO_GET the driver
makes a call to efuse_getinfo(line 177) passing it a potentially
non-null terminated string. efuse_getinfo() function then uses
this potentially non-null terminated string in strcmp (line 99).
the method efuse_getinfo does not cater to non-null terminated
strings and thus can likely be made to overrun the "item" string
beyond any printable ascii data.
Further more, if attackers can control the item value well enough,
the function efuse_getinfo can be used to potentially disclose
values in kernel memory i.e. by checking the results of lots of
strcmp calls on items values, essentially acting as an oracle for
memory values surrounding the efusekey_info[n].keyname variable in
stack memory.

Solution:
force a null terminator for the keyname argument before comparing
it to kernel memory

Verify:
U200

Change-Id: I851dd7045d0a9e7855e9899c4745eac475cb9233
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2019-06-27 23:00:22 -07:00