Commit Graph

165 Commits

Author SHA1 Message Date
chuangcheng peng f9a7a52110 demux: sync kernel 5.4 to 5.15 [1/2]
PD#SWPL-100311

Problem:
sync kernel 5.4 to 5.15

Solution:
sync kernel 5.4 to 5.15

Verify:
not verified

Change-Id: I4d046cb9a54689ad53fbbc18bf8c16b3701d535f
Signed-off-by: chuangcheng peng <chuangcheng.peng@amlogic.com>
2022-11-09 06:15:41 -07:00
binqi zhang 6e5be361c0 uvm: add 10bit soft fbc feature [1/2]
PD#SWPL-93620

Problem:
implement truncate the 10bit data

Solution:
add 10bit fbc feature

Verify:
ohm

Change-Id: I97f507451b284836228b61716f06ee3cbf929452
Signed-off-by: binqi zhang <binqi.zhang@amlogic.com>
2022-11-08 06:04:24 -07:00
Wanwei Jiang 812361a4e9 pm: combine pm and reboot modules [1/1]
PD#SWPL-95684

Problem:
combine pm and reboot modules

Solution:
result: amlogic-pm.ko
original: amlogic-pm.ko amlogic-reboot.ko

Verify:
sc2

Change-Id: I25366f4413a7e7ec84131321e9b686b337358d70
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2022-11-05 12:06:33 +08:00
Wanwei Jiang 0b2a96838a Revert "debug: add filp_open debug function [2/3]"
PD#SWPL-95914

Problem:
it's break gki

Solution:
Use other method to implement, so revert old method
This reverts commit 073082327a.

Change-Id: I93e8a56d6e6a354f3d2dd27029913b5c79b797fc
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2022-11-05 12:06:11 +08:00
hang cheng 245c8ea296 hdmitx: adjust edid parsing for TV_TS [1/2]
PD#SWPL-97387

Problem:
TV_TS/2.4_R2 failed

Solution:
remove useless parsing code, and adjust
edid parsing and fallback policy
1.if edid checksum invalid in any block,
or header of cta extension block is 0,
then use fallback mode list
2.if base block header invalid, of
checksum invalid, then don't parse
base block except dtd / standard timing
3.for cta extension block, if block
byte0 != 0x2, it means not valid
extension block, skip parsing whole
block. if block byte1 <= 2, it means
that it's DVI block, skip parsing data
block, just parse DTD.
4.fallback mode list:
480p/720p/1080p60hz, RGB,8bit, and uplayer
should use 720p60hz RGB,8bit by default

Verify:
ah212

Test:
TV_TS/2.4_R2 tested pass, hdmi1.4/2.0 CTS no side effect

Change-Id: I9e24a16cd6d645f2e28f3238b2f20ace0b5090bb
Signed-off-by: hang cheng <hang.cheng@amlogic.com>
2022-11-03 19:55:11 -07:00
Wenjie Qiao fbd2325487 hdmitx: add new format 2560x1440p60hz [1/1]
PD#SWPL-91287

Problem:
lack format 2560x1440p60hz

Solution:
add new format 2560x1440p60hz

Verify:
sc2/g12a

Signed-off-by: Wenjie Qiao <wenjie.qiao@amlogic.com>
Change-Id: If7d1c24c39361b5ead9905b454dc5493a1e552a6
2022-11-01 23:29:16 -07:00
chen.xu 7fbd7dbc22 video_processor: Kernel 5.4 to Kernel 5.15 Bringup [1/1]
PD#SWPL-97096

Problem:
Kernel 5.4 to Kernel 5.15 Bringup

Solution:
sync video_processor code

Verify:
sc2

Signed-off-by: chen.xu <chen.xu@amlogic.com>
Change-Id: I05aae8fff3f4dbd37e05000b04f186e02fc4d7d0
2022-11-01 04:40:29 -07:00
Jian Cao cc868b2008 gdc: sync code from the lastest branch [1/1]
PD#SWPL-97096

Problem:
sync code changes from 5.4 to 5.15

Solution:
1. add the stride support in gdc_process_phys
2. add load/release firmware interface

Verify:
verified on t7-an400

Change-Id: I1e861f474c27be66f03cebd6d01d01582e763a0b
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
2022-11-01 02:12:23 -07:00
Jianxiong Pan f1fec716d4 mm: modify the watchpoint to ko. [2/2]
PD#SWPL-92714

Problem:
need modify the watchpoint to ko.

Solution:
modify the watchpoint to ko.

Verify:
sc2_ah212.

Change-Id: I26e5e451690fb557264d8bbd6bcceb7701494cc5
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2022-10-29 08:05:00 -07:00
Wenjie Qiao b060d61432 hdmitx: set mode vic=2/3 return valid mode 1 [1/1]
PD#SWPL-94658

Problem:
set mode 4x3, return valid mode 0, lead to no output

Solution:
when set mode 4x3 and 16x9, return valid mode 1

Verify:
sc2

Signed-off-by: Wenjie Qiao <wenjie.qiao@amlogic.com>
Change-Id: I8ae7466bd92c927a9953fbd2f22335862ad02b8f
2022-10-28 04:13:06 -07:00
qiang.liu b5f500b8c7 adc: print and debug state optimize [1/1]
PD#SWPL-94506

Problem:
adc default print too much

Solution:
print and debug state optimize

Verify:
t5w

Signed-off-by: qiang.liu <qiang.liu@amlogic.com>
Change-Id: Id383cc0bdd87619241a6ceb4421906fd39ec0974
2022-10-25 06:20:38 -07:00
xiang.wu1 da6bf92396 hdmitx: HDCP failure on resume, EDID read failed [1/1]
PD#SWPL-93674

Problem:
there's such case: plugin irq->hdmitx resume + read EDID +
resume uevent->mode setting + hdcp auth->plugin handler
read+ EDID,now EDID already read done and hdcp already
started, not read EDID again.

Solution:
not read EDID again if EDID already read done

Verify:
s905y4

Change-Id: I5241c7555f3e07c22b559b12273b4499c4ceb2c0
Signed-off-by: xiang.wu1 <xiang.wu1@amlogic.com>
2022-10-24 22:05:59 -07:00
qinglin.li a6e49c140c debug_file: optimize debugfile with poll [1/1]
PD#SWPL-94401

Problem:
repeat open file crash
read return error

Solution:
repeat open file wait file close
optimize read file poll

Verify:
sc2

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: Iec70f2461d047f96ccbf80d9508c01ebb5092267
2022-10-24 00:25:58 -07:00
mingxiu.sun 6dbb171315 tvafe/vdin: Typo Check Failed Fix [1/1]
PD#SWPL-97153

Problem:
Typo Check Failed

Solution:
Modify error words

Verify:
typo check pass

Change-Id: Ic92023b5e48282723d3251573b57a057999745c4
Signed-off-by: mingxiu.sun <mingxiu.sun@amlogic.com>
2022-10-20 22:15:11 -07:00
Zongdong Jiao 08aa7f4d57 hdmitx: optimise the audio setting flow [1/1]
PD#SWPL-83336

Problem:
Need to optimise the audio setting flow

Solution:
Optimise the audio setting flow

Verify:
g12

Change-Id: Id2b65d233f3abc0baaa4c77f7369ae693ac93845
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
2022-10-20 18:05:39 -07:00
Jianxiong Pan 2271989942 mm: pin locked file after fault. [2/2]
PD#SWPL-95400

Problem:
If we pin a file in android, the whole data of this file
will be loaded to DDR, but most of these data may not be
used, this caused memory waste.

Solution:
delay mark mlocked flags for unevictable pages until
it has been faulted.
You can use following command to disable this function:
echo 0 > /proc/sys/vm/shrink_unevictable

Verify:
sc2_ah212.

Change-Id: I3981b36114ab331c558198b80140aaa91fe7e7df
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2022-10-18 13:46:23 +08:00
Hanjie Lin 908c1c3c19 debug: fix iotrace break gki issue [2/3]
PD#SWPL-94447

Problem:
iotrace break gki10

Solution:
modify iotrace still builtin but not break gki10
also enabled DEBUG_PRINTK

Verify:
sc2

Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
Change-Id: Iffc6a21f28de871b7289ca671c2c226c40e9a66a
2022-10-15 03:28:18 -07:00
Hanjie Lin e6d82ef16c debug: fix gki10 break issue [2/3]
PD#SWPL-94447

Problem:
debug break gki10

Solution:
1, support amlogic_debug build to module, amlogic_debug module
   includes debug_lockup, cpu_mhz and meson_atrace for now.
2, amlogic_debug some function still build in kernel but not break
   gki10, for example: irq_check function on builtin kernel code,
   module_debug, workqueue debug etc.
3, new config CONFIG_AMLOGIC_HARDLOCKUP_DETECTOR still builtin but
   not break gki.
4, other functions for example iotrace still under developing

Verify:
sc2

Signed-off-by: Hanje Lin <hanjie.lin@amlogic.com>
Change-Id: I9c11465e3e879f999ae6fd13dc12c044efd2417a
2022-10-14 16:53:03 -07:00
sky zhou 483825b01b hdmitx_common: fix config cmd value error [1/1]
PD#SWPL-97326

Problem:
hw config cmd value should larger than CMD_CONF_OFFSET.

Solution:
enum part start from CMD_CONF_OFFSET + 0x2000 to follow
legacy define.

Verify:
verify on OHM

Test:
DRM-TX-18

Change-Id: Icd7aa397cbd6f6ec3a638f90b822c78fe4edf893
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2022-10-14 04:08:11 -07:00
sky zhou 58607d7c8e hdmitx_common: refact read_phy_state function [1/1]
PD#SWPL-95465

Problem:
abstract read_phy_state for tx20&tx21

Solution:
move get_state to hdmitx_hw_common, and add read_phy_state
in get_state

Verify:
verify on OHM

Test:
DRM-TX-13

Change-Id: Ia1573cf63c4e42bdae2bfa8cd8e39ca156abbd99
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2022-10-13 03:44:19 -07:00
Wenjie Qiao e452ec2c5b hdmitx: add hpd extcon [1/1]
PD#SWPL-87506

Problem:
lack extcon

Solution:
add extcon

Verify:
sc2

Change-Id: Iad1c509cf0616e719697670cab13a0501b17e846
Signed-off-by: Wenjie Qiao <wenjie.qiao@amlogic.com>
2022-10-13 02:04:43 -07:00
hai.cao db3d8ee5e0 vpp: add afd callback [1/1]
PD#SWPL-96745

Problem:
No afd callback in vpp

Solution:
Add afd callback in vpp

Verify:
t3

Change-Id: Ibe5a3fe27a8dee108efaa4ef2e6fb285dc03b4ce
Signed-off-by: hai.cao <hai.cao@amlogic.com>
2022-10-13 02:04:39 -07:00
Wenjie Qiao 8afd8d8207 hdmitx: 5.15 Expand the memory defined of physical size [1/1]
PD#SWPL-96666

Problem:
the edid physical size error

Solution:
Expand the memory defined of physical size

Verify:
sc2

Change-Id: I6f6d4884ee71c0801df30849fe37374494faddd5
Signed-off-by: Wenjie Qiao <wenjie.qiao@amlogic.com>
2022-10-12 18:48:32 -07:00
sky zhou 833791fbb7 hdmitx_common: share set_content_type for tx20&tx21 [1/1]
PD#SWPL-95126

Problem:
share set_content_type function for tx20&tx21.

Solution:
move cntlconfig to common hw api and implement
set_content_type drm api and sysfs.

Verify:
verify on OHM.

Test:
DRM-TX-15

Change-Id: Ie06229130175cc0b02d2816db48c9f8884777f2d
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2022-10-12 02:07:34 -07:00
sky zhou dccba28921 hdmitx_common: share setphy/avmute function for tx20/tx21 [1/1]
PD#SWPL-95125

Problem:
share setphy/avmute function for tx20/tx21.

Solution:
move cntlmisc to common hw api and implement
setphy/avmute drm api and sysfs.

Verify:
verify on ohm.

Test:
DRM-TX-13,DRM-TX-14

Change-Id: Id231252241e30be2d88d4789b77b392c9cf10abb
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2022-10-08 07:47:14 -07:00
Jianxiong Pan c1916ee5d3 mm: move the config to meet the gki request. [3/3]
PD#SWPL-94445

Problem:
gki break.

Solution:
move the config to meet the gki request.

Verify:
build pass.

Change-Id: I6b878a5d8fc10317634143b815a69b2206753033
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2022-10-01 00:57:49 +08:00
Jianxiong Pan 84db0bfa95 gki: not export cma_mmu_op() func to meet gki requirements. [1/3]
PD#SWPL-94445

Problem:
the system cannot export new func for ko.

Solution:
not export cma_mmu_op() func.

Verify:
sc2_a212.

Change-Id: I8e146339f51838cc004739af77496111152df9ca
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2022-10-01 00:43:53 +08:00
Jianxiong Pan b913e58067 mm: remove forbid_to_cma to meet gki requirements. [2/2]
PD#SWPL-94445

Problem:
add member to struct will break gki.

Solution:
remove forbid_to_cma member.

Verify:
sc2_ah212.

Change-Id: I4ba2eedf0f82329557f17d2b9eafa8cf6c498006
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2022-09-30 02:59:15 -07:00
sky zhou 062653801e hdmitx_common: share edid related sysfs implement [1/1]
PD#SWPL-95124

Problem:
tx20&tx21 share edid related implement.

Solution:
reimplement sysfs in hdmitx_sysfs_common

Verify:
verify on OHM.

Test:
DRM-TX-8, DRM-TX-9, DRM-TX-10, DRM-TX-11, DRM-TX-12

Change-Id: I0131cecbaea544544bf103ac0302559014f29315
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2022-09-29 06:15:54 -07:00
xiang.wu1 0a6934558c hdmitx: enable null packt for special TV [1/2]
PD#SWPL-93252

Problem:
flash screen time to time under 1080p 444,10/12bit

Solution:
enable NULL packet for this special TV

Verify:
ah212

Change-Id: Ib6cfc98724dc8cb18c39a712df2ce7121f67be83
Signed-off-by: xiang.wu1 <xiang.wu1@amlogic.com>
2022-09-28 06:46:58 -07:00
Xiang Wu1 acb7d64e5f Revert "hdmitx: enable null packt for special TV [1/2]"
This reverts commit ac4629a608.

Change-Id: Ie7f1bd33f16d6ac5cd80b9638ddec8175a311cec
2022-09-28 00:00:25 -07:00
xiang.wu1 ac4629a608 hdmitx: enable null packt for special TV [1/2]
PD#SWPL-93252

Problem:
flash screen time to time under 1080p 444,10/12bit

Solution:
enable NULL packet for this special TV

Verify:
ah212

Change-Id: I17bd2c587994ec43c719fdf62fe92595d0af7e98
Signed-off-by: xiang.wu1 <xiang.wu1@amlogic.com>
2022-09-27 21:31:48 -07:00
sky zhou dbadb608b8 hdmitx_common: share edid related struct & drm api [1/1]
PD#SWPL-94820

Problem:
share get_content_types/get_dv_info/get_hdr_info code
for tx20&tx21.

Solution:
move edid related struct & drm api to hdmitx_common.

Verify:
verify on OHM.

Test:
DRM-TX-8, DRM-TX-9, DRM-TX-10, DRM-TX-11, DRM-TX-12

Change-Id: I9f0358e4690ab035dcbf38d2ed06b5939aedd919
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2022-09-27 02:46:56 -07:00
min.yang a4cc1a45ff dvb_extern: add cxd2878 demod id [1/1]
PD#SWPL-95455

Problem:
should support ext-demod build.

Solution:
sync cxd2878 demod id with 5.4.

Verify:
verified by T + ohm

Change-Id: Ib0670c623c15c27e1f96d7d75293034ce3dbbcbf
Signed-off-by: min.yang <min.yang@amlogic.com>
2022-09-27 02:29:08 -07:00
yao liu 32e6e3df54 amdv: sync code from kernel-5.4 [1/1]
PD#SWPL-95643

Problem:
5.15 kernel missing many patches

Solution:
sync code from kernel-5.4

Verify:
ohm

Signed-off-by: yao liu <yao.liu@amlogic.com>
Change-Id: I26cfa46574781c980abb0024b859655901d71dcf
2022-09-27 00:13:40 -07:00
Bin.Wang2 e8358867e0 amvecm: match ioctl struct with pq server [1/1]
PD#SWPL-93488

Problem:
luma,saturation,hue ioctl struct type not match with pq server

Solution:
use the same struct type

Verify:
sc2/tm2/t3

Signed-off-by: Bin.Wang2 <bin.wang2@amlogic.com>
Change-Id: I53f335f4f1b248a24ecc3dcdd48b37f1e38eafb9
2022-09-26 23:16:52 -07:00
sky zhou ea8949c2c0 hdmitx_common: add hdmitx_sysfs_common [1/1]
PD#SWPL-92851

Problem:
tx20&tx21 should share same sysfs implement

Solution:
create hdmitx_sysfs_common to share sysfs implement.

Verify:
verify on OHM.

Tests:
DRM-TX-4, DRM-TX-5

Change-Id: I0edc39ea8bd26bbee6ddfcea0146dfaa95b394f2
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2022-09-23 07:02:55 -07:00
sky zhou bbb52bbfd3 hdmitx_common: add common drm bind in hdmitx_common [1/1]
PD#SWPL-92711

Problem:
tx20&tx21 should share drm bind part.

Solution:
move out drm bind code and re-implement tx hook apis.

Verify:
verify on OHM.

Tests:
DRM-TX-3,DRM-TX-4,DRM-TX-5

Change-Id: I27f31bc3114b792a035accbe205f19c9ed0657cf
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2022-09-23 04:07:51 -07:00
binqi zhang c46b1b7637 dmaheap: get and handle buffer flag from gralloc [1/1]
PD#SWPL-52253

Problem:
implementation of GPU DDK and gralloc
due to switching from ION to DMA-BUF heaps

Solution:
1.get and handle buffer flag from gralloc
2.change dambuf and ion heap size

Verify:
AndroidT kernel5.15 ohm

Change-Id: I55b7206bf366dadd2499adc53713686e6d4c5684
Signed-off-by: binqi zhang <binqi.zhang@amlogic.com>
2022-09-22 23:45:40 -07:00
song.han b7fc4f5f71 iotrace: add iotrace function [2/2]
PD#SWPL-92722

Problem:
iotrace miss function

Solution:
add function in iotrace driver,like smc/sched/clk/pw

Verify:
S4D_AP222

Change-Id: Ie59bac5863e5a4420b90d95a0ecae0bcb0584fb6
Signed-off-by: song.han <song.han@amlogic.com>
2022-09-22 22:54:00 -07:00
xiang.wu1 73d39fb18a hdmitx: Do not reset found SAD count during parsing [1/1]
PD#SWPL-93372

Problem:
SAD count is being reset when starting to parse a new extended block
resulting in loss of audio capabilities

Solution:
Do not reset variables when starting to parse a new block. They
should be reset before starting to parse EDID and are already
being reset before starding the EDID parse

Verify:
ap222

Change-Id: I31d6b0edc16a481684784e5be404546d85695f0b
Signed-off-by: xiang.wu1 <xiang.wu1@amlogic.com>
2022-09-22 02:41:14 -07:00
min.yang 4d69a70eaa Demod: optimize the interface call by tuner [1/1]
PD#SWPL-95019

Problem:
reduce demod header file dependencies for tuner

Solution:
move the interface to aml_demod_common.h

Verify:
verified by T + ah212

Change-Id: I5292ea3dcf09968a1d3f7dcea4355673a35ca668
Signed-off-by: min.yang <min.yang@amlogic.com>
2022-09-21 22:14:16 -07:00
dehong.chen bde3a82993 Common_drivers: CB2 common_drivers have typo error [1/1]
PD#SWPL-93154

Problem:
common_drivers have typo error

Solution:
clear common_drivers typo error

Verify:
ohm

Change-Id: I492462889bd19f57483c843fe03cfb963466873d
Signed-off-by: dehong.chen <dehong.chen@amlogic.com>
2022-09-21 22:14:08 -07:00
Bin.Wang2 424de41130 amvecm: t7c sync code for bring up [1/1]
PD#SWPL-94196

Problem:
sync code from kernel 5.4 to 5.15 for t7c bring up

Solution:
sync code

Verify:
t7/t7c

Signed-off-by: Bin.Wang2 <bin.wang2@amlogic.com>
Change-Id: Ib3cd0c53058c9115dc4b06bbdbce6fc139a2b51f
2022-09-20 22:53:26 -07:00
pengzhao.liu c2a22ec002 typo: fix typo issue [1/1]
PD#SWPL-89627

Problem:
typo check issue

Solution:
fix typo issue

Verify:
Typo

Change-Id: I388cdac5f7d1e4448225c13aa91bb5d641e5d146
Signed-off-by: pengzhao.liu <pengzhao.liu@amlogic.com>
2022-09-20 22:15:28 -07:00
Wenjie Qiao 6ce8cbb164 hdmitx21: 422 correct map and enable the dither [1/1]
PD#SWPL-93463

Problem:
When output y422 colorspace, the VP_OUTPUT_MAPPING_IVCTX needs to
configure correctly. Otherwise the low bits will be skipped.
The dither of 10 bit to 8 bit not enable.

Solution:
Correct the colorspace y422 mapping.
Enable the dither of 10 bit to 8 bit.

Verify:
T7

Change-Id: I6641499e036e535333a4caad3ea67f11249735e3
Signed-off-by: Wenjie Qiao <wenjie.qiao@amlogic.com>
2022-09-20 22:15:24 -07:00
sky zhou 64f128cbb1 hdmitx: abstract tx common struct [1/1]
PD#SWPL-93233

Problem:
abstract tx common struct

Solution:
add hdmitx_dev_common in hdmitx_common,
and move uboot parameter to it.

Verify:
verify on OHM.

Tests:
DRM-TX-1

Change-Id: Ie23e1d96975724bcc35f19ef6d5a5a55a044cef1
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
2022-09-20 22:15:20 -07:00
min.yang 45e5a0d144 Tuner: sync tuner id with 5.4 [1/1]
PD#SWPL-84715

Problem:
keep tuner id synchronized.

Solution:
porting id from 5.4

Verify:
verified by T + ah212

Change-Id: Iba63050a4e81bf87f7a4549bf386cfe3f97e3125
Signed-off-by: min.yang <min.yang@amlogic.com>
2022-09-20 00:06:29 -07:00
xiang.wu1 09bf1863a6 typo check: Hdmitx modify the wrong word [1/1]
PD#SWPL-93141

Problem:
Some words are misspelled

Solution:
Change to correct

Verify:
S905X4

Change-Id: I0cbeb8fca54e14f7d0c50b56ca353142fa89f4d3
Signed-off-by: xiang.wu1 <xiang.wu1@amlogic.com>
2022-09-15 10:38:31 +08:00
xiang.wu1 73421e7693 hdmitx: add DDC reset before do EDID transaction [1/1]
PD#SWPL-80565

Problem:
after resume, EDID read abnormally

Solution:
after resume, add DDC reset before do EDID transaction.

Verify:
S905X2

Change-Id: Ibd411dc3da67406aed455a0698018afbe3428857
Signed-off-by: xiang.wu1 <xiang.wu1@amlogic.com>
2022-09-14 06:09:56 -07:00