Commit Graph

1274415 Commits

Author SHA1 Message Date
Wangqiang Guo
1f0e792e84 media: rockchip: hdmirx: fix put_user fail on kernel-6.1.
Type: Fix
Redmine ID: #500594
Associated modifications: gerrit links
Test: echo 1 > /sys/module/rockchip_hdmirx/parameters/low_latency
      and preview hdmiin.

Change-Id: Idd9fc6613b2fc547674ecaed8c5c940dee8526e6
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2024-08-30 19:55:22 +08:00
ZiHan Huang
870fe4496a ARM: dts: rockchip: rk3506-evb1-v10: Change ubi.mtd id to 5
Support vendor storage.

Change-Id: Iafc7fdf69ab9a6e38977f50c7da3b2809e5ee21c
Signed-off-by: ZiHan Huang <zack.huang@rock-chips.com>
2024-08-30 19:55:04 +08:00
Chen Yifu
278603e9f7 arm64: dts: rockchip: Support rk3562-toybrick
Change-Id: If32113314cfdc9d008bd2169edb3bb9e0f85042d
Signed-off-by: Chen Yifu <chenyf@rock-chips.com>
2024-08-30 19:52:20 +08:00
Algea Cao
8bd12d0266 drm/bridge: synopsys: dw-hdmi-qp: Clear ddc write/read bits when ddc transfer failed
If don't clear write/read bits when ddc
transmission fails, ddc transmission may
always fail no matter how many times retry.

Change-Id: I8f1a64432a1fb2afffc9404dcfb911f01f8188ad
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-08-30 19:51:59 +08:00
Jianwei Fan
597735698e media: i2c: rk628: rk628_clk_set_rate need after version check access
Fixes: dd812e1c19 ("media: i2c: rk628: set CPLL_REF_CLK to 1194M")

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ib406041a530cea8e86cee36deff267e2ec02719d
2024-08-30 18:41:20 +08:00
Shawn Lin
b16bce2f60 arm64: dts: rockchip: rk3576: Remove prefetchable support from pcie0
Rockchip platform actually doesn't support prefetchable, make pcie0
and pcie0 consistent with each other.

This also remove the invalid type warning from Firmware when using
kernel DTB.

=> pci e
pci_uclass_pre_probe, bus=0/pcie@2a200000, parent=root_driver
decode_regions: len=28, cells_per_record=7
decode_regions: region 0, pci_addr=20000000, addr=20000000, size=100000, space_code=0
decode_regions: region 0, pci_addr=20100000, addr=20100000, size=100000, space_code=1
 - type=1, pos=0
decode_regions: region 1, pci_addr=20200000, addr=20200000, size=e00000, space_code=2
 - type=0, pos=1
decode_regions: region 2, pci_addr=900000000, addr=900000000, size=80000000, space_code=3
 - type=8, pos=2
pcie@2a200000: PCIe Linking... LTSSM is 0x0
pcie@2a200000: PCIe Linking... LTSSM is 0x0
pcie@2a200000: PCIe Link up, LTSSM is 0x130011
pcie@2a200000: PCIE-0: Link up (Gen2-x1, Bus0)
pcie@2a200000: invalid flags type

Change-Id: I24ed9d105d68d05508697e5db54b3f3909520adc
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-08-30 17:33:42 +08:00
Chaoyi Chen
99d9bea0a0 drm/rockchip: vop: make vop version code more readable
Change-Id: I0d95ba93c1fa2d837a867a69ff8646b8143d36f2
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-08-30 08:48:21 +00:00
Damon Ding
c1483412f9 drm/rockchip: vop: add support to assign mcu bypass timing in dts
Use user-defined mcu bypass timing if mcu-bypass-timing
node has been found in dts, otherwise setup the default
timing which can meet the read/write timing requirements
of most mcu panel.

Change-Id: I1225eed1e9dbca5adafd2d674bc9b6c709b2b1dd
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-08-30 16:00:43 +08:00
Damon Ding
116a45108a drm/rockchip: vop: add support to read regs from mcu panel
The reading function can be used for debugging while trying
to bring up the mcu panel, or reading some specific status
regs during the frame blanking period, and etc.

Change-Id: I29b153a78aa4a0ebb64f3156a37fddc67986bb49
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-08-30 16:00:43 +08:00
Damon Ding
add998a29e drm/rockchip: vop: separate default mcu bypass config by platforms
For RK3506 and later platforms, it is recommended to sync
mcu bypass timing with dclk rather than hclk on earlier
platforms as IC design. And different platform has its
own recommended mcu bypass timing to meet the needs of
most mcu panels.

Change-Id: I9ce07e63dc7d2a717dbbb31ed13c98b41f25edc8
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-08-30 16:00:43 +08:00
Yu Qiaowei
2e967fa6c3 video: rockchip: rga3: modify 'time' debug log
1. Add timestamp structure.
2. Add stats for each stage.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I306d03ce92ac722ea7face112a044c990a787022
2024-08-30 15:58:26 +08:00
Yu Qiaowei
7dbb2695f0 video: rockchip: rga3: modify 'msg' debug log
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I457297760e3ee725f31b957e5ff8df4bfad75a7e
2024-08-30 15:58:26 +08:00
Yu Qiaowei
6bfd57a670 video: rockchip: rga3: log adds job/request/mm info
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8f0983914aa9de9973ef411a3664680eea69b813
2024-08-30 15:58:26 +08:00
Yu Qiaowei
c81e0d308d video: rockchip: rga3: log adds process info(tgid/pid)
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I2a2a6c6c23e78687c476515c71765c518d140620
2024-08-30 15:58:26 +08:00
Yu Qiaowei
b0cac0a410 video: rockchip: rga3: "load" node supports querying session active status
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If875c401015baf6f34172c3c10a61b603df345ae
2024-08-30 15:58:26 +08:00
Yu Qiaowei
9d05629d69 video: rockchip: rga3: fix the wrong reserved memory size in rga_req
Fixes: 0d6962db93 ("video: rockchip: rga3: add support guass3x3")

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I7c3d62bcb9e2d7bafdcc01e1e93c6a84e365ffc9
2024-08-30 15:58:14 +08:00
Zhibin Huang
9822fbad0a arm64: dts: rockchip: rk3399-sapphire-excavator-edp: fix wake up after sleep can't display when low brightness
Type: Fix
Redmine ID: #453222
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I3f35e09f5b862f9e4e38ba079b8864d8002f33a7
2024-08-30 11:16:06 +08:00
Sandeep Patil
a97d21ab42 ANDROID: GKI: export cma symbols for cma heap as a module
Bug: 140294230
Test: builds

Change-Id: I04c12174934c24a704d5c1e5be3e7e948c777a78
Signed-off-by: Sandeep Patil <sspatil@google.com>
2024-08-29 20:46:09 +08:00
John Stultz
c5c98fa168 ANDROID: dma: Rework so dev_get_cma_area() can be called from a module
Export dma_contiguous_default_area so dev_get_cma_area() can be called
from a module.

This allows the CMA dma-buf heap to be configured and built as a module.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I8ae944c147ff83dcd8d42a39efa6769dae4039b7
Bug: 155218010
Link: https://lore.kernel.org/lkml/20191025234834.28214-2-john.stultz@linaro.org/
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2024-08-29 20:46:09 +08:00
Bian Jin chen
9fdcd51c80 input: sensors: accel: mxc6655xa: add missing sync events.
If there is no mutex lock between run and active in aidl,
closing the sensor when reporting an event will cause an address exception.

After we added the mutex lock, we found that the reading process
would be blocked probabilistically when waking up from deep sleep,
and activating the sensor at this time would cause a deadlock.
Adding a sync event fixed this issue.

Type: Fix
Redmine ID: 472806
Associated modifications:
https://10.10.10.29/c/android/rk/hardware/rk29/sensor/+/232874
Test: Deep sleep test

Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: I5275af261be189ef70a30a8b544fcbd0c356ff41
2024-08-29 15:00:14 +08:00
Sugar Zhang
ec0b65dbc5 dmaengine: pl330: Optimize scatterlist transfer
Use hardware link-list instead of soft link-list to make sure
no gap among the scatter-list transfer.

Merge multiple descs [first ... last] into the last desc,
and drop the descs which have been merged into last one.

Now we get the union one rather than a soft SGL.

Obviously, this require much more MCODE buf size, because we
merge multiple descs into a union one. Increase MCODE buf size
if needed.

e.g.

  -#define MCODE_BUFF_PER_REQ	256
  +#define MCODE_BUFF_PER_REQ	512

or parsed from DT

  arm,pl330-mcbufsz-bytes = <512>;

Otherwise, you may see the warning log on the long SGL situation.

  dma-pl330 2ab90000.dmac: pl330_submit_req: Try increasing mcbufsz (403/256)

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iea31fc9dba08d36570d4bdbe2c5fcb61f5fed0d4
2024-08-29 14:24:37 +08:00
Sugar Zhang
aab600d7f0 dmaengine: pl330: Add support SRC_INC/DST_INC for interleaved
Used for DSMC which both SRC and DST are increment.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib6deb12458eb9f9b867ecc7739b0428998ed1873
2024-08-29 14:24:37 +08:00
Shawn Lin
5d9046c0b3 PCI: rockchip: dw: Extract out rk_pcie_host_config()
rk_pcie_host_config() takes responsibility to init the registers
needed.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I2a0c995c6b404dbd622fa36c8ebab9dcb83a4146
2024-08-29 14:24:04 +08:00
Algea Cao
373267df33 drm/rockchip: dw_hdmi: Restore hpd elimination buffeting time to 150ms
There is a bug in the old software of quantumdata 980 used
by the hdmi cts. If hdmi responds to plug in too early,
cts hfr1-10 will fail.
Quantumdata 980 software update resolves this bug and
hdmitx does not require additional delay.

Fixes: e7163be259 ("drm/bridge: synopsys: dw-hdmi-qp: Add flt thread for frl cts")

Change-Id: I4b2abbdd4c851a9b510db3e3b8e61e2cebcaf8b4
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-08-29 14:15:04 +08:00
Luo Wei
57816781c4 arm64: dts: rockchip: rk3576-vehicle-evb: init v20 dts files
Signed-off-by: Luo Wei <lw@rock-chips.com>
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I1d9067c261ed75101d078e39368740869ffed7e2
2024-08-29 09:05:38 +08:00
Chen Shunqing
8e53398960 media: i2c: rk628: cancel audio work when hdmirx reset
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: If26bb87365ded184d96bd4f0cdd1e7ac983b3ec7
2024-08-28 19:36:36 +08:00
XiaoTan Luo
291dcddefa ASoC: rockchip: multicodecs: Correct error code for tdm slot configuration
Prevent returning an error for unsupported set_tdm_slot operations.

Fixes: 818669da27 ("ASoC: rockchip: multicodecs: add tdm support")
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I7bc292905100a7938ba0b55b92c267ada471d097
2024-08-28 19:01:36 +08:00
William Wu
27d840843a arm64: dts: rockchip: rk3326-evb-lp3-v10: Add vbus-supply for usb2 otg
This patch adds vbus-supply for usb2 otg to support
vbus control in u-boot via kernel dtb.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ic1c414bef56e68cea79c0e316824b4d915e8d63e
2024-08-28 18:44:18 +08:00
Shawn Lin
0f7094037e PCI: rockchip: dw: Remove forward definition of rk_pcie_{enable, disable}_power
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I3e04e0ef5e320fcf6cc86e2923557e5dddedc4da
2024-08-27 19:26:49 +08:00
Shawn Lin
c54772e75b PCI: rockchip: dw: Reorder and document steps of rk_pcie_really_probe()
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Iffc9e7e04cc4329b7d0b71f9cc1dd1ee3080e7b6
2024-08-27 19:26:49 +08:00
Shawn Lin
5fd5f84e05 PCI: rockchip: dw: Move debugfs all into rockchip_pcie_debugfs_init()
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I34d9bdc41afa4051f903adf00a37eebaabc25524
2024-08-27 19:26:49 +08:00
Shawn Lin
52729bfaff PCI: rockchip: dw: Move dma_obj initialization into rk_pcie_init_dma_trx()
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Id8c744d891c00fb9b121baf33637dfe47b73a69f
2024-08-27 19:26:49 +08:00
Shawn Lin
b4ce92d9e0 PCI: rockchip: dw: Move irq and wq into rk_pcie_init_irq_and_wq()
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Iad6e116a43d72c198ec5b032cfc46229651f70d8
2024-08-27 19:26:48 +08:00
Shawn Lin
a8e681d542 PCI: rockchip: dw: Release PCIe reset/clock before phy initial
In order to let combo phy check the mplla_state/mpllb_state.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I22da2ad35a12c1f135dcbb940e235f9cb179c439
2024-08-27 19:26:06 +08:00
Shawn Lin
6d90c6b513 PCI: rockchip: dw: Move getting lpbk and comp into rk_pcie_resource_get()
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Iaa9e7b22c402ad528e7ba839bcf4bd7d697dcedd
2024-08-27 19:26:06 +08:00
Shawn Lin
deccf139df PCI: rockchip: dw: Move getting skip_scan_in_resume into rk_pcie_resource_get()
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I422ad5e53d1a377e7e0b2a11e5144ce54b938be9
2024-08-27 19:26:06 +08:00
Shawn Lin
a7ee33c78d PCI: rockchip: dw: Move getting vpcie3v3 into rk_pcie_resource_get()
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I7fb17e48c7ee795454a0a15d0331ffeee4046c98
2024-08-27 19:26:05 +08:00
Shawn Lin
95a000fc6c PCI: rockchip: dw: Move getting clkreq, HP and bifurcation into rk_pcie_resource_get()
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ifb3a16eadbbb50a64a6b53967fa906f363998674
2024-08-27 19:26:05 +08:00
Shawn Lin
b1d095908b PCI: rockchip: dw: Move getting rsts into rk_pcie_resource_get()
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I7c46fc1425037cc43e768a23a678ef5a348ee280
2024-08-27 19:26:05 +08:00
Shawn Lin
b58cb3ff2b PCI: rockchip: dw: Remove rk_pcie_clk_init()
Move devm_clk_bulk_get_all into rk_pcie_resource_get()

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I4115faaa1fd84f7c7b521a025c3b9682e920c362
2024-08-27 19:26:05 +08:00
XiaoTan Luo
818669da27 ASoC: rockchip: multicodecs: add tdm support
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I7fccc0ad5214399b0354899f2a5f81b2f16161b7
2024-08-27 14:21:00 +08:00
Yifeng Zhao
6732e1af29 exfat: fix memory leak in exfat_load_bitmap()
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I50523d98e269dea3837bc520a7588bf245a01cd3
2024-08-27 14:09:47 +08:00
Tao Huang
70046cbf84 ARM: rk3506_defconfig: Disable CONFIG_ROCKCHIP_CLK_INV/PVTM/CONFIG_ROCKCHIP_PVTM
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If22b930f24fa99b41d6e8ef7bdab3e63c9d35734
2024-08-27 11:24:44 +08:00
Tao Huang
ee672f753b media: rockchip: flexbus_cif: Add MODULE_IMPORT_NS(DMA_BUF)
ERROR: modpost: module flexbus_cif uses symbol dma_buf_put from namespace DMA_BUF, but does not import it.
ERROR: modpost: module flexbus_cif uses symbol dma_buf_fd from namespace DMA_BUF, but does not import it.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3a512a9b4efc899dc16b61b6cbc867d5cabe70d1
2024-08-27 10:55:31 +08:00
Damon Ding
e3b31a037d drm/rockchip: tve: add .loader_protect() support for tve
If logo display enabled, the rockchip_tve_encoder_loader_protect()
helps to set the tve enable/disable status and call
pm_runtime_get_sync()/pm_runtime_put(), which allows for
the continuation of the display state from the U-Boot stage.

In addition, fix the check of tve mode setting in .mode_set()
to avoid display flashing, which caused by the off/on switch of dac.

Change-Id: I6f1fcaf05cb6e362ce375e447c566fb5356c5380
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-08-26 16:44:53 +08:00
Damon Ding
1dcd984537 drm/rockchip: tve: add support to enable/disable tve/vdac clks dynamically for rk3528
It doesn't make sense to always enable tve/vdac clks in probing.
The clks dynamic switching can also help to reduce the power
consumption.

Change-Id: Id93b5552d6e984d7a6306508f5ee74b383a0d3c5
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-08-26 16:44:46 +08:00
Damon Ding
c60bd1fdea drm/rockchip: tve: add clk error check for rk3528
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I00f83467aa82da3a023c7e2e7cd40d44b7a70b3a
2024-08-26 16:44:32 +08:00
Finley Xiao
e7bf974d33 clk: rockchip: rk3506: Remove frac parent clk for dclk vop
Change-Id: I0c6d95eb180393f90e769f43f7b6dd08a49cc308
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-08-26 12:03:28 +08:00
Alex Zhao
09deb2e9df net: wireless: rockchip_wlan: bcmdhd: Remove unnecessary code to resolve gki compilation errors
Change-Id: I16b6fa727946d64fbf90ee2acdebd9744748da32
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2024-08-23 10:29:35 +08:00
Sandy Huang
d866beb995 drm/rockchip: vop2: NV12/NV21/NV15/NV51 format src_h must aligned as 2 line
RK3528/RK3562/RK3576 NV12/NV21/NV15/NV51 format src_h must aligned as 2 line,
otherwise the last line will be error.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I2df24bbaa318fb78bb632a6d9d42cbc4ee66656b
2024-08-22 19:57:49 +08:00