Commit Graph

865370 Commits

Author SHA1 Message Date
Sugar Zhang
57bb0f725d ASoC: rockchip: i2s-tdm: Delay for reset successfully
This patch adds delay for rockchip_snd_reset().

Fixes: 03eca20525 ("ASoC: rockchip: i2s-tdm: Delay for reset successfully")

Change-Id: I59c507dd8d4cc8fe756230e1eaab2ab35b33331a
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-30 16:16:02 +08:00
Jianqun Xu
f5d0e3dded ARM: dts: rv1126-dictionary-pen-v11: disable usb host0
Change-Id: Ib7208c5b075cd6fa699fdce344771c663c02f3d6
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-30 11:37:39 +08:00
Yu Qiaowei
2ed15814a0 video/rockchip: rga2: Fix the misconfiguration of srcover's globalalpha
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I547ce7a8938a37ac96223f7435b94ec839b3ceba
2021-08-27 14:12:52 +08:00
Herman Chen
0691bb0b69 video: rockchip: mpp: rkvdec2: Add task timing
NOTE: On link mode the timing is start from driver push task to hardware
linked queue. So the timing is not actual the hardware timing on multi
decoder case.

echo 0x100 > /sys/module/rk_vcodec/parameters/mpp_dev_debug

This command for hardware performance test is still valid. But the
hardware timing output is accurate only on single decoder case.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I4db4a35955cb1e42e3f250583e83d88c2fde5872
2021-08-27 14:10:55 +08:00
Huang zhibao
b98a82f772 arm64: configs: add rk3568_nvr_lite.config for nvr lite sdk
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: If402327e113f1d03aad12801b66af61af3b7d88d
2021-08-26 10:20:23 +08:00
Andy Yan
dc04341b10 drm/rockchip: Use normalized zpos on vop2
Some linux app may be set zpos without any check.
For example mpv: change the zpos of overlay
plane from default value 2 to 1, but the primary
plane zpos is also 1.

Change-Id: I6015c171c6512dc7f10bed7c56933941c9d64a2e
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-08-26 09:52:11 +08:00
Zefa Chen
e631f93c53 media: rockchip: cif supports dummy buffer configurable
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Icc62c1324affd65934872dfb7c1d29f15e28bb3b
2021-08-25 14:48:27 +08:00
Zefa Chen
662b81ed79 media: i2c: imx335 increase hdr exposure restrictions
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ia097778ddd050a566801cede46f575f6954b01d7
2021-08-25 14:45:32 +08:00
Finley Xiao
a569e31cd0 arm64: dts: rockchip: rk3568: Add cpu bandwidth for dmc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia29bfccacb72fa1f9f9fbeb68e23aa2b51b25563
2021-08-25 14:43:44 +08:00
Finley Xiao
05ecfc59fb arm64: dts: rockchip: rk3568: Add nocp device node
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I6b429393383588d7fc763bc0947a793c10bbb0ef
2021-08-25 14:43:44 +08:00
Finley Xiao
53cd839938 PM / devfreq: rockchip_dmc: Change frequency according to cpu bandwidth
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I69376a2e620292642b1118f770c50f9002c450b4
2021-08-25 14:43:44 +08:00
Finley Xiao
d9106d56d5 PM / devfreq: rockchip-nocp: Add support for rk3568
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2d311d48a54a1f254eda749aa6d9d157d106e02b
2021-08-25 14:43:44 +08:00
Finley Xiao
e1e243372d arm64: dts: rockchip: rk3568: Modify vop-bw-dmc-freq
Add support for display screen whose resolution is 1920x1200.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I22b9a8d1fbd095f08d4b58c0c41252ebbfb985f0
2021-08-25 14:43:44 +08:00
Finley Xiao
30c691f565 PM / devfreq: rockchip_dmc: Add sysfs interface for ondemand_data
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I399a78aa2f63b266824a5cd302328a0d3e2aadcd
2021-08-25 14:43:44 +08:00
Elaine Zhang
ed3555fd11 clk: rockchip: optimize static memory consume
Before:
	text    data    bss    dec    hex    filename
	2384    144     0      2528   9e0    drivers/clk/rockchip/clk-pvtm.o
        684     0       0      684    2ac    drivers/clk/rockchip/clk-inverter.o
	1157    0       0      1157   485    drivers/clk/rockchip/clk-dclk-divider.o

After:
	text    data    bss    dec    hex    filename
        0       0       0      0      0      drivers/clk/rockchip/clk-pvtm.o
        0       0       0      0      0      drivers/clk/rockchip/clk-inverter.o
        0       0       0      0      0      drivers/clk/rockchip/clk-dclk-divider.o

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I157205014ed3240d51e1bf445c6163a5da9a7939
2021-08-25 14:37:54 +08:00
Elaine Zhang
a0b3d093d3 clk: rockchip: rv1126: optimize static memory consume
./scripts/bloat-o-meter clk-rv1126_old.o clk-rv1126.o
add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-6992 (-6992)
Function                                     old     new   delta
__compound_literal                          1116     900    -216
rv1126_clk_pmu_branches                     2880    2432    -448
rv1126_pll_rates                            1344     504    -840
rv1126_cpuclk_rates                         3472     992   -2480
rv1126_clk_branches                        20480   17472   -3008
Total: Before=32936, After=25944, chg -21.23%

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I2ac55c646b2b02bf3cfcb7102f80209d18a80ac1
2021-08-25 14:37:54 +08:00
Fenrir Lin
afd6fc2034 ARM: dts: rockchip: fix ircut's gpio for rv1126-bat-evb-v10
fix the reverse problem.

Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: I924f5c272a37a7959cc4c44552c5035610b06a58
2021-08-25 14:34:59 +08:00
Zhenke Fan
34b4a03fee media: i2c: imx415 add 1080p binning mode
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I5b4a1f2c728d6f45406c2efd5c3cc9c9306ccb3a
2021-08-25 11:27:27 +08:00
Sugar Zhang
6fc680cb0d ASoC: rockchip: i2s-tdm: Make soc_data symbol const
Change-Id: Id78f5f2d79f6345c97456e99ae107716e1a5f560
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-25 10:19:42 +08:00
Yiqing Zeng
4fcf674a20 media: i2c: gc4663 change mclk from 27Mhz to 24Mhz
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I9721b400111954589a8dc4c24fcda25cb7eb77f1
2021-08-24 16:56:17 +08:00
Jianqun Xu
b1782ee4d7 pinctrl: rockchip: sync with upstream only codingstyle
Do coding style for mux route struct.

The mux route tables take many lines for each SoC, and it will be more
instances for newly SoC, that makes the file size increase larger.

This patch only do coding style for mux route struct, by adding a new
definition and replace the structs by script which supplied by
huangtao@rock-chips.com

sed -i -e "
/static struct rockchip_mux_route_data /bcheck
b
:append-next-line
N
:check
/^[^;]*$/bappend-next-line
s/[[:blank:]]*.bank_num = \([[:digit:]]*,\)\n/\tRK_MUXROUTE_SAME(\1/g
s/[[:blank:]]*.pin =[[:blank:]]*0,\n/ RK_PA0,/g
s/[[:blank:]]*.pin =[[:blank:]]*1,\n/ RK_PA1,/g
s/[[:blank:]]*.pin =[[:blank:]]*2,\n/ RK_PA2,/g
s/[[:blank:]]*.pin =[[:blank:]]*3,\n/ RK_PA3,/g
s/[[:blank:]]*.pin =[[:blank:]]*4,\n/ RK_PA4,/g
s/[[:blank:]]*.pin =[[:blank:]]*5,\n/ RK_PA5,/g
s/[[:blank:]]*.pin =[[:blank:]]*6,\n/ RK_PA6,/g
s/[[:blank:]]*.pin =[[:blank:]]*7,\n/ RK_PA7,/g
s/[[:blank:]]*.pin =[[:blank:]]*8,\n/ RK_PB0,/g
s/[[:blank:]]*.pin =[[:blank:]]*9,\n/ RK_PB1,/g
s/[[:blank:]]*.pin =[[:blank:]]*10,\n/ RK_PB2,/g
s/[[:blank:]]*.pin =[[:blank:]]*11,\n/ RK_PB3,/g
s/[[:blank:]]*.pin =[[:blank:]]*12,\n/ RK_PB4,/g
s/[[:blank:]]*.pin =[[:blank:]]*13,\n/ RK_PB5,/g
s/[[:blank:]]*.pin =[[:blank:]]*14,\n/ RK_PB6,/g
s/[[:blank:]]*.pin =[[:blank:]]*15,\n/ RK_PB7,/g
s/[[:blank:]]*.pin =[[:blank:]]*16,\n/ RK_PC0,/g
s/[[:blank:]]*.pin =[[:blank:]]*17,\n/ RK_PC1,/g
s/[[:blank:]]*.pin =[[:blank:]]*18,\n/ RK_PC2,/g
s/[[:blank:]]*.pin =[[:blank:]]*19,\n/ RK_PC3,/g
s/[[:blank:]]*.pin =[[:blank:]]*20,\n/ RK_PC4,/g
s/[[:blank:]]*.pin =[[:blank:]]*21,\n/ RK_PC5,/g
s/[[:blank:]]*.pin =[[:blank:]]*22,\n/ RK_PC6,/g
s/[[:blank:]]*.pin =[[:blank:]]*23,\n/ RK_PC7,/g
s/[[:blank:]]*.pin =[[:blank:]]*24,\n/ RK_PD0,/g
s/[[:blank:]]*.pin =[[:blank:]]*25,\n/ RK_PD1,/g
s/[[:blank:]]*.pin =[[:blank:]]*4,\n/ RK_PA4,/g
s/[[:blank:]]*.pin =[[:blank:]]*5,\n/ RK_PA5,/g
s/[[:blank:]]*.pin =[[:blank:]]*6,\n/ RK_PA6,/g
s/[[:blank:]]*.pin =[[:blank:]]*7,\n/ RK_PA7,/g
s/[[:blank:]]*.pin =[[:blank:]]*8,\n/ RK_PB0,/g
s/[[:blank:]]*.pin =[[:blank:]]*9,\n/ RK_PB1,/g
s/[[:blank:]]*.pin =[[:blank:]]*10,\n/ RK_PB2,/g
s/[[:blank:]]*.pin =[[:blank:]]*11,\n/ RK_PB3,/g
s/[[:blank:]]*.pin =[[:blank:]]*12,\n/ RK_PB4,/g
s/[[:blank:]]*.pin =[[:blank:]]*13,\n/ RK_PB5,/g
s/[[:blank:]]*.pin =[[:blank:]]*14,\n/ RK_PB6,/g
s/[[:blank:]]*.pin =[[:blank:]]*15,\n/ RK_PB7,/g
s/[[:blank:]]*.pin =[[:blank:]]*16,\n/ RK_PC0,/g
s/[[:blank:]]*.pin =[[:blank:]]*17,\n/ RK_PC1,/g
s/[[:blank:]]*.pin =[[:blank:]]*18,\n/ RK_PC2,/g
s/[[:blank:]]*.pin =[[:blank:]]*19,\n/ RK_PC3,/g
s/[[:blank:]]*.pin =[[:blank:]]*20,\n/ RK_PC4,/g
s/[[:blank:]]*.pin =[[:blank:]]*21,\n/ RK_PC5,/g
s/[[:blank:]]*.pin =[[:blank:]]*22,\n/ RK_PC6,/g
s/[[:blank:]]*.pin =[[:blank:]]*23,\n/ RK_PC7,/g
s/[[:blank:]]*.pin =[[:blank:]]*24,\n/ RK_PD0,/g
s/[[:blank:]]*.pin =[[:blank:]]*25,\n/ RK_PD1,/g
s/[[:blank:]]*.pin =[[:blank:]]*26,\n/ RK_PD2,/g
s/[[:blank:]]*.pin =[[:blank:]]*27,\n/ RK_PD3,/g
s/[[:blank:]]*.pin =[[:blank:]]*28,\n/ RK_PD4,/g
s/[[:blank:]]*.pin =[[:blank:]]*29,\n/ RK_PD5,/g
s/[[:blank:]]*.pin =[[:blank:]]*30,\n/ RK_PD6,/g
s/[[:blank:]]*.pin =[[:blank:]]*31,\n/ RK_PD7,/g
s/[[:blank:]]*.func = \([[:digit:]]*,\)\n/ \1/g
s/[[:blank:]]*.route_location =[[:blank:]]*\([[:print:]]*,\)\n//g
s/[[:blank:]]*.route_offset = \(0x[[:xdigit:]]*,\)\n/ \1/g
s/[[:blank:]]*.route_val =[[:blank:]]*\([[:print:]]*\),\n/ \1),/g
s/\t{\n//g
s/\t}, {\n//g
s/\t},//g
s/[[:blank:]]*\(\/\*[[:print:]]*\*\/\)\n[[:blank:]]*RK_MUXROUTE_SAME(\([[:print:]]*\)),\n/\tRK_MUXROUTE_SAME(\2), \1\n/g
s/[[:blank:]]*\(\/\*[[:print:]]*\*\/\)\n[[:blank:]]*RK_MUXROUTE_SAME(\([[:print:]]*\)),/\tRK_MUXROUTE_SAME(\2), \1\n/g
" drivers/pinctrl/pinctrl-rockchip.c

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Link: https://lore.kernel.org/r/20210420091240.1246429-1-jay.xu@rock-chips.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit fe202ea8e5)

Change-Id: I73d2c2ae52197211e68db8f30082830cff53b91a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-24 15:39:37 +08:00
Wang Panzhenzhuan
8d3dc35ee7 media: i2c: gc2093: update sensor driver
1. fix linear mode ae flicker issue.
2. add hdr mode exposure limit issue.
3. fix hdr mode highlighting pink issue.
4. add some debug info.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I270501bfc382f6d811d4267469cc9406cf6e99c7
2021-08-24 15:39:15 +08:00
Finley Xiao
a60e77777e PM / devfreq: Remove DEVFREQ_GOV_SIMPLE_ONDEMAND dependency for dmc
Change-Id: Ie08689996ee4f3554c2d0e6bef61d23029bc5d07
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-24 15:07:05 +08:00
Finley Xiao
232af002ef PM / devfreq: rockchip_dmc: Add rockchip_simple_ondemand_data
Add a new struct rockchip_simple_ondemand_data so that rockchip_dmc.c
does not need to depend on CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND.

Change-Id: Iafe7ec8bbc9a36aaf3dffbe669a8ee927f45d3a1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-24 14:54:33 +08:00
Jianqun Xu
e649ca006e rknpu: add fake platform device to rknpu device
The device 'fake_dev' under rknpu_dev is registered by rknpu_drv, which
is a virtual platform device.

The rknpu partial sync should use a platform device without iommu, so to
use rknpu_dev->fake_dev.

Change-Id: I33f1b05d308063f235d31044f8e562755c1217f4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Felix Zeng <felix.zeng@rock-chips.com>
2021-08-24 14:21:35 +08:00
Zhen Chen
c7641517d1 MALI: utgard: select DEVFREQ_GOV_SIMPLE_ONDEMAND when MALI_DEVFREQ enabled
MALI_DEVFREQ is enabled by default.

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I8fdbcc2c45bba35c514ca6ddc58b0e9c6a38cf2c
2021-08-24 11:32:01 +08:00
Zhen Chen
ccf17141f9 MALI: midgard: select DEVFREQ_GOV_SIMPLE_ONDEMAND when MALI_DEVFREQ enabled
MALI_DEVFREQ is enabled by default.

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I1b86565fc72ab6678c0252ddba0d7098e4997bd3
2021-08-24 11:31:58 +08:00
Zhen Chen
bd982a6809 MALI: bifrost: select DEVFREQ_GOV_SIMPLE_ONDEMAND when MALI_BIFROST_DEVFREQ enabled
MALI_BIFROST_DEVFREQ is enabled by default.

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I25b8af723f33d6d262bbaa30c69c16377eaaa3a4
2021-08-24 11:31:56 +08:00
Shawn Lin
585dcf2413 mmc: dw_mmc: Set vqmmc to 3v3 before disabling it
Disabling vqmmc without setting IO domain could
cause SoC damage found in some Rockchip platforms.
To cope with the fix from IO domain, add this patch

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I05c53e78c073737cd0f7af9a206b9f588ffa4636
2021-08-24 09:26:44 +08:00
Finley Xiao
7b83efeaa4 PM / devfreq: rockchip_dmcdbg: build depends on CPU config
This optimizes the size of rockchip-otp.o, details as follows.

./scripts/bloat-o-meter rockchip_dmc_dbg-old.o rockchip_dmc_dbg.o
add/remove: 0/3 grow/shrink: 1/1 up/down: 248/-640 (-392)
Function                                     old     new   delta
rv1126_dmcdbg_init                           588     836    +248
px30_dmcdbg_init                              92       -     -92
rk_dmcdbg_sip_smc_match_ver                  164       -    -164
proc_dmcdbg_init                             188       -    -188
rockchip_dmcdbg_of_match                     588     392    -196
Total: Before=9476, After=9084, chg -4.14%

Change-Id: Ib8b3ef4ebffe9c73e4a2b4541a696ed4b3524180
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-23 17:33:57 +08:00
Finley Xiao
85ab7a4805 PM / devfreq: rockchip-dfi: build depends on CPU config
This optimizes the size of rockchip-otp.o, details as follows.

./scripts/bloat-o-meter rockchip-dfi-old.o rockchip-dfi.o
add/remove: 0/20 grow/shrink: 0/1 up/down: 0/-3564 (-3564)
Function                                     old     new   delta
rk3368_dfi_set_event                           8       -      -8
rk3288_dfi_set_event                           8       -      -8
rk3128_dfi_set_event                           8       -      -8
rk3368_dfi_ops                                20       -     -20
rk3288_dfi_ops                                20       -     -20
rk3128_dfi_ops                                20       -     -20
rk3368_dfi_disable                            36       -     -36
rk3288_dfi_disable                            36       -     -36
rk3128_dfi_disable                            36       -     -36
rk3368_dfi_enable                             40       -     -40
rk3288_dfi_enable                             40       -     -40
rk3128_dfi_enable                             40       -     -40
rk3368_dfi_init                               76       -     -76
rk3128_dfi_init                               76       -     -76
rk3328_dfi_init                              212       -    -212
rk3128_dfi_get_event                         212       -    -212
rk3288_dfi_init                              240       -    -240
rockchip_dfi_init                            256       -    -256
rk3368_dfi_get_event                         260       -    -260
rk3288_dfi_get_event                         352       -    -352
rockchip_dfi_id_match                       1960     392   -1568
Total: Before=5144, After=1580, chg -69.28%

Change-Id: Ibb2b001fb9afdcb6fec5db9d075c71b3abb6fbf3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-23 17:30:31 +08:00
Finley Xiao
e3f1c67586 nvmem: rockchip-otp: build depends on CPU config
This optimizes the size of rockchip-otp.o, details as follows.

./scripts/bloat-o-meter rockchip-otp-old.o rockchip-otp.o
add/remove: 0/9 grow/shrink: 0/1 up/down: 0/-2224 (-2224)
Function                                     old     new   delta
px30_otp_clocks                               12       -     -12
rk3568_otp_clocks                             16       -     -16
rk3568_data                                   24       -     -24
px30_data                                     24       -     -24
rockchip_otp_reset                           128       -    -128
px30_otp_ecc_enable                          164       -    -164
px30_otp_wait_status                         176       -    -176
px30_otp_read                                416       -    -416
rockchip_otp_match                           980     392    -588
rk3568_otp_read                              676       -    -676
Total: Before=4721, After=2497, chg -47.11%

Change-Id: I960a51e826a17112d822daa2b77470e482e729d7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-23 17:27:51 +08:00
Jon Lin
7072fb7bc5 drivers: rkflash: Add RK_SFTL configuration
Avoid adding redundant FTL code to SPI Nand MTD case.

make ARCH=arm rv1126_defconfig test, size -t drivers/rkflash/built-in.a
the former size:
CONFIG_RK_SFC_NAND=y
CONFIG_RK_SFC_NAND_MTD=y
CONFIG_RK_SFC_NOR=y
CONFIG_RK_SFC_NOR_MTD=y
text    data     bss     dec     hex filename
83237    2757   23716  109710   1ac8e (TOTALS)

after adjust:
31677    2705    3624   38006    9476 (TOTALS)

For Nor only:
CONFIG_RK_SFC_NOR=y
CONFIG_RK_SFC_NOR_MTD=y
19350    1237    2568   23155    5a73 (TOTALS)

Change-Id: I46186393de26512566cc62ceb1490ef35a70be1d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-08-23 17:24:51 +08:00
Jianqun Xu
69a034d297 power/avs: rockchip-io-domain: rv1126 use separated notify
RV1126 set 3.3V before regulator disable.

Do a fix to rockchip io-domain, follow this orders:

* system running state
  -> io-domain vsel to 3.3V (actually is done by event-disable)
    -> regulator_enable
      -> vsel change according to regulator voltage

* system running state
  -> regulator_disable
    -> io-domain vsel to 3.3V

The bug only instance on RV1126, and tested on RV1126 EVB DDR3 V10.

Change-Id: Ic9d6b05d07b050c392e415786cf6390cc1c5aa9e
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-23 14:45:41 +08:00
Jianqun Xu
15957347d6 regulator: core: notify regulator enable with the voltage value on rv1126
Get the voltage of regulator and then pass it as the parameter of
notify, the driver could take it.

The origin parameter for notify is NULL, so this patch do nothing effect
to other driver who not care about the voltage value.

Change-Id: I22a626132d99501f6f9b25371543ab3c99cb0e02
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-23 14:44:33 +08:00
Jianqun Xu
481558c7e6 power/avs: rockchip-io-domain: build depends on CPU config
Before:
   text	   data	    bss	    dec	    hex	filename
   9217	    240	      0	   9457	   24f1	drivers/power/avs/rockchip-io-domain.o

After:
   text	   data	    bss	    dec	    hex	filename
   2739	    144	      0	   2883	    b43	drivers/power/avs/rockchip-io-domain.o

Change-Id: Ibdaeb4f9e73b4c653fe854c101d181f28d52b481
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-23 14:22:27 +08:00
Andy Yan
649b7048be drm/rockchip: abort commit when drm_atomic_helper_swap_state failed
cleanup_planes and return when swap_state failed.

Change-Id: Icbdceb83a16747d42826bd443a6c43fcf3675592
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-08-23 10:14:52 +08:00
Shawn Lin
6b6c461051 arm64: dts: rockchip: rk356x-evb: fix pcie supply to regulator-fixed
Commit 6de4caa7df ("arm64: dts: rockchip: rk356x-evb: fix pcie supply
to regulator-fixed") cleanup these stuff but we still have some left.

Then commit e81fbbddde ("arm64: dts: rockchip: rk356x-evb: fix pcie
supply to regulator-fixed") cleanup it but introduce a new bug in dts
property name. Fix the name didn't make it work stabe since we found
some boards need a delay before enabling trainning for power to be
stable from the measurement.

By measurement, 5ms is enough for power and refclk to be stable.

Fixes: 6de4caa7df ("arm64: dts: rockchip: rk356x-evb: fix pcie supply to regulator-fixed")
Fixes: e81fbbddde ("arm64: dts: rockchip: rk356x-evb: fix pcie supply to regulator-fixed")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ibebca2464f3b432114111a774ace14ed1e249ddb
2021-08-19 19:14:27 +08:00
Cai YiWei
360cca1de4 media: rockchip: isp: fix sp no output when hdr dynamic switch
Change-Id: Idbb35a9c40e62fbc876345aaa516a842416c1bb3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-19 19:13:19 +08:00
Cai YiWei
d0eadda766 media: rockchip: isp: off unused interrupt of csi
Change-Id: Iecbd33f2f48dc73fc34af8ee90738db031ee2ffe
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-19 19:13:19 +08:00
Cai YiWei
a577b34708 media: rockchip: ispp: off unused interrupt
Change-Id: I72a7d6b494a5bfc9a7b265d6b8a31beb233addac
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-19 19:13:19 +08:00
Jianqun Xu
9436928e3f Revert "ANDROID: GKI: add ARCH_NR_GPIO for ABI match"
This reverts commit f7853bfd22.

Get codes from include/asm-generic/gpio.h
* #ifndef ARCH_NR_GPIOS
* #if defined(CONFIG_ARCH_NR_GPIO) && CONFIG_ARCH_NR_GPIO > 0
* #define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
* #else
* #define ARCH_NR_GPIOS		512
* #endif
* #endif

So the default value is 512 after this revert.

Change-Id: I93e89f5b3ddb6bfdd1f2ec285e053234124b44f9
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-19 15:42:56 +08:00
Yandong Lin
a112273253 video: rockchip: mpp: fix hw hang issue
When the CPU is busy, there may be a situation:
1. After the software timeout task of the current task is mounted
2. Than the thread is cut away for too long, and the hardware is
   not configured at this time,
3. The software timeout is triggered to go to reset and poweroff.
4. The thread switches back to configure the hardware
5. The hardware is stuck.

Solution:
In the software timeout processing function, judge whether the hardware
at this time has been configured to start.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I00c0794bb2f27690ab8a2341b3bee2d3f942adf8
2021-08-19 15:02:09 +08:00
Yu Qiaowei
6ecd6c18bc video/rockchip: rga2: Change the way to alloc memory in rga slt mode.
1. Fix compile error when debugfs is disable.
2. Using get_page to alloc memory can save 1250KB(64-bit)/625KB(32-bit)
   of memory in the data segment.

./scripts/bloat-o-meter -c drivers/video/rockchip/rga2/rga2_drv.o.old
drivers/video/rockchip/rga2/rga2_drv.o
add/remove: 1/0 grow/shrink: 1/1 up/down: 396/-104 (292)
Function                                     old     new   delta
rga2_slt                                     864    1124    +260
rga2_service_session_clear.constprop           -     136    +136
rga2_release                                 292     188    -104
Total: Before=18736, After=19028, chg +1.56%
add/remove: 1/3 grow/shrink: 0/0 up/down: 8/-1280008 (-1280000)
Data                                         old     new   delta
__addressable_rga2_init2808                    -       8      +8
__addressable_rga2_init2895                    8       -      -8
src_buf                                   640000       - -640000
dst_buf                                   640000       - -640000
Total: Before=1282092, After=2092, chg -99.84%
add/remove: 0/0 grow/shrink: 1/0 up/down: 9/0 (9)
RO Data                                      old     new   delta
__func__                                      57      66      +9
Total: Before=1537, After=1546, chg +0.59%

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I21c36a268c86b75da7b9e8da5eaf4f1f698c9737
2021-08-18 19:50:50 +08:00
Elaine Zhang
dd0cb993be clk: rockchip: optimize static memory consume
./scripts/bloat-o-meter clk-pll_old.o clk-pll.o
add/remove: 3/36 grow/shrink: 3/3 up/down: 1832/-7395 (-5563)
Function                                     old     new   delta
rockchip_pll_clk_set_by_auto.constprop         -     908    +908
rockchip_rk3066_pll_clk_set_by_auto.constprop       -     508    +508
rockchip_rk3036_pll_init                     236     416    +180
rockchip_rk3036_pll_set_rate                  80     228    +148
rockchip_rk3036_pll_get_params                 -      72     +72
rockchip_rk3036_pll_recalc_rate              336     352     +16
clk_boost_list                                 4       -      -4
__initcall_boost_debug_init7                   4       -      -4
clk_boost_lock                                20       -     -20
boost_summary_open                            20       -     -20
boost_config_open                             20       -     -20
rockchip_rk3399_pll_is_enabled                24       -     -24
rockchip_rk3399_pll_disable                   24       -     -24
rockchip_rk3066_pll_is_enabled                24       -     -24
rockchip_rk3066_pll_disable                   24       -     -24
rockchip_rk3399_pll_enable                    32       -     -32
rockchip_rk3066_pll_enable                    32       -     -32
rockchip_rk3036_pll_set_params               376     344     -32
rockchip_boost_disable_recovery_sw            64       -     -64
boost_config_show                             76       -     -76
rockchip_rk3399_pll_clk_ops                  104       -    -104
rockchip_rk3399_pll_clk_norate_ops           104       -    -104
rockchip_rk3066_pll_clk_ops                  104       -    -104
rockchip_rk3066_pll_clk_norate_ops           104       -    -104
rockchip_rk3399_pll_set_rate                 108       -    -108
rockchip_rk3399_pll_wait_lock                116       -    -116
rockchip_rk3066_pll_set_rate                 120       -    -120
rockchip_boost_add_core_div                  120       -    -120
rockchip_clk_register_pll                   1124    1000    -124
rockchip_boost_enable_recovery_sw_low        144       -    -144
rockchip_rk3066_pll_init                     156       -    -156
boost_summary_fops                           160       -    -160
boost_config_fops                            160       -    -160
rockchip_rk3066_pll_recalc_rate              172       -    -172
rockchip_pll_wait_lock                       236       -    -236
rockchip_rk3399_pll_init                     240       -    -240
rockchip_pll_con_to_rate                     252       -    -252
__func__                                     404     141    -263
rockchip_rk3399_pll_recalc_rate              288       -    -288
boost_debug_init                             316       -    -316
rockchip_rk3399_pll_set_params               392       -    -392
boost_summary_show                           404       -    -404
rockchip_rk3066_pll_set_params               436       -    -436
rockchip_boost_init                          864       -    -864
rockchip_get_pll_settings                   1508       -   -1508
Total: Before=10678, After=5115, chg -52.10%

./scripts/bloat-o-meter clk-cpu_old.o clk-cpu.o
add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-72 (-72)
Function                                     old     new   delta
rockchip_cpuclk_notifier_cb                 1716    1700     -16
rockchip_clk_register_cpuclk                 728     672     -56
Total: Before=2694, After=2622, chg -2.67%

./scripts/bloat-o-meter clk-ddr_old.o clk-ddr.o
add/remove: 0/9 grow/shrink: 0/1 up/down: 0/-780 (-780)
Function                                     old     new   delta
ddr_clk_cached                                 4       -      -4
rockchip_clk_register_ddrclk                 352     312     -40
rockchip_ddrclk_scpi_recalc_rate              44       -     -44
rockchip_ddrclk_scpi_round_rate               48       -     -48
rockchip_ddrclk_scpi_set_rate                 96       -     -96
rockchip_ddrclk_sip_ops                      104       -    -104
rockchip_ddrclk_scpi_ops                     104       -    -104
rockchip_ddrclk_sip_round_rate               108       -    -108
rockchip_ddrclk_sip_recalc_rate              112       -    -112
rockchip_ddrclk_sip_set_rate                 120       -    -120
Total: Before=1761, After=981, chg -44.29%

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I469229b9566af1cab6cc3a6bb9f4f8e308e0eded
2021-08-18 18:09:20 +08:00
Xiao Ya peng
b914f22e17 arm64: configs: rk3568_nvr.config: enabled CONFIG_HZ_100.
disabled CONFIG_HIGH_RES_TIMERS

Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
Change-Id: I8fcfa9880d1988536888081b2fccc2e3c58431ed
2021-08-18 18:05:33 +08:00
Elaine Zhang
8d535fdb81 thermal: rockchip: optimize static memory consume
$ ./scripts/bloat-o-meter rockchip_thermal_olg.o rockchip_thermal.o
add/remove: 0/32 grow/shrink: 1/1 up/down: 500/-6844 (-6344)
Function                                     old     new   delta
rk_tsadcv2_get_temp                           20     520    +500
temp_last                                      4       -      -4
prob_last                                      4       -      -4
bounding_cnt                                   4       -      -4
rk_tsadcv2_irq_ack                            16       -     -16
rk_tsadcv3_control                            24       -     -24
rk_tsadcv2_tshut_mode                         44       -     -44
rk_tsadcv2_initialize                         48       -     -48
rk_tsadcv5_initialize                         68       -     -68
rk_tsadcv4_initialize                         68       -     -68
rv1108_tsadc_data                             84       -     -84
rk3568_tsadc_data                             84       -     -84
rk3399_tsadc_data                             84       -     -84
rk3368_tsadc_data                             84       -     -84
rk3366_tsadc_data                             84       -     -84
rk3328_tsadc_data                             84       -     -84
rk3308_tsadc_data                             84       -     -84
rk3288_tsadc_data                             84       -     -84
rk3228_tsadc_data                             84       -     -84
rk1808_tsadc_data                             84       -     -84
px30_tsadc_data                               84       -     -84
rk_tsadcv7_initialize                        180       -    -180
rk_tsadcv3_initialize                        208       -    -208
rk_tsadcv3_get_temp                          244       -    -244
rk3328_code_table                            280       -    -280
rv1108_table                                 288       -    -288
rk3568_code_table                            288       -    -288
rk3399_code_table                            288       -    -288
rk3368_code_table                            288       -    -288
rk3288_code_table                            288       -    -288
rk3228_code_table                            288       -    -288
rk1808_code_table                            288       -    -288
rk_tsadcv2_code_to_temp                      556       -    -556
of_rockchip_thermal_match                   2548     392   -2156
Total: Before=12093, After=5749, chg -52.46%

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I506a6135907942abcb60684f9f0888a238950421
2021-08-18 16:58:37 +08:00
Liang Chen
289a92b87e cpufreq: rockchip: do not select CONFIG_CPUFREQ_DT_PLATDEV for cpufreq-dt
cpufreq-dt-platdev.c is useless on rockchip platform, remove it and save
memory.

$ ./scripts/bloat-o-meter vmlinux_before vmlinux
add/remove: 0/4 grow/shrink: 0/0 up/down: 0/-18284 (-18284)
Function                                     old     new   delta
__initcall_cpufreq_dt_platdev_init6            4       -      -4
cpufreq_dt_platdev_init                      248       -    -248
blacklist                                   8232       -   -8232
whitelist                                   9800       -   -9800
Total: Before=10211366, After=10193082, chg -0.18%

Change-Id: Ibcc15aa3a8b13afa208c77979b75c617aeaef5fb
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-08-18 16:44:33 +08:00
Liang Chen
745d67d98a cpufreq: rockchip: optimize static memory consume
$ ./scripts/bloat-o-meter drivers/cpufreq/rockchip-cpufreq.o.before drivers/cpufreq/rockchip-cpufreq.o
add/remove: 0/3 grow/shrink: 0/1 up/down: 0/-2196 (-2196)
Function                                     old     new   delta
px30_get_soc_info                            208       -    -208
rk3399_get_soc_info                          360       -    -360
rk3288_get_soc_info                          648       -    -648
rockchip_cpufreq_of_match                   1568     588    -980
Total: Before=5053, After=2857, chg -43.46%

Change-Id: I7db697bf92ee552b6e3b28211ee64e509e99b0d3
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-08-18 16:38:56 +08:00
Herman Chen
1cbabbe2f1 arm64: dts: rockchip: rk3568: rkvdec enable link mode
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Iecec544986ef0a5bccddef58a2d1e1cedfff69fd
2021-08-18 15:07:43 +08:00