Test code of embedded DMA design based on dwc controller.
Show the controller registered with dmatest, and you can assigned the
correspond test_dev for test:
echo show > ./sys/module/pcie_dw_dmatest/parameters/dmatest
Check the value of the current parameter:
grep -H . /sys/module/pcie_dw_dmatest/parameters/*
Fix parameter and run the dmatest:
echo 0 > ./sys/module/pcie_dw_dmatest/parameters/test_dev
echo 1 > ./sys/module/pcie_dw_dmatest/parameters/chn_en
echo 1 > ./sys/module/pcie_dw_dmatest/parameters/rw_test
echo 0x100 > ./sys/module/pcie_dw_dmatest/parameters/size
echo 0x1 > ./sys/module/pcie_dw_dmatest/parameters/cycles_count
echo 0x3c000000 > ./sys/module/pcie_dw_dmatest/parameters/local_addr
echo 0x3c000000 > ./sys/module/pcie_dw_dmatest/parameters/bus_addr
echo run > ./sys/module/pcie_dw_dmatest/parameters/dmatest
Change-Id: I1b48f849e5e37baec27bc62d2a8cf4945fb40cbc
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
1.Optimize DMA hook to support multiple independent DMA channels
2.Add interrupt callback to support multiple independent DMA channels
Change-Id: I42a638a4cb9fa61ebc1cd51d4e9f6d6942715fd1
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This patch can save 0.6mA for PMUIO2(3V3).
Tested on RK3588_EVB1_LP4_V10 platform.
Change-Id: If9298b7de5859e8bfd28baf3e1022b71efd78218
Signed-off-by: Liang Chen <cl@rock-chips.com>
Some NVR product want skip-ref-fb, destroy logo
fb after some delay to make sure the plane is
disabled.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ia257a510ea2382b5ee6aa4f65b2fef856687b0bc
Before this commit the following scenario maybe disable win failed:
-> disable win and config done
-> vop fs coming, this time win state is disabled.
-> enable win and config done
-> disable win[the fs haven't come yes, so win state is disabled, this will
skip to disable win and lead to disable win failed]
->fs coming, this time win state is still enabled.
so we add judge win backup register state to avoid disable win failed.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie08aa141616291fc900313d99fbc07622b5d1a83
1. fixed bug caysed by commit 75dc121c3a
2. enable dma capture in fs intr, otherwise,
if enable during vblank will cause VICAP to use the buffer address of last runtime,
but the buffer is released.
Fixes: 75dc121c3a ("media: rockchip: vicap support wake up buffer with mode of rdbk by isp driver")
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I51d6e0aaf513dc1e5039980e7643faa7505c271b
MX35UF1GE4AC, MX35UF1GE4AD, MX35UF2GE4AD, MX35UF4GE4AD
Change-Id: Ief8230ac8d37ad28d3253a9bec8786506698c8c3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
The boundary of different frequency points is set as the default value
to avoid CED interruption being triggered by mistake.
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I0b1257586d43e335496e87803628da72bc2a7c0c
The process is "startup->prepare->trigger".
Others, fix the pdm + vad do not work well since use the patch:
'commit 3437162327 ("ASoC: rockchip: pdm: Fix pop noise in the beginning")'
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ifdc40af04695f4082d536b83309c76ed0426fece
vop2_crtc_load_lut need to sync with vysnc, so we should
make sure the VP exit standby and setting the right dclk,
or we will meet a cfg done timeout:
[drm:vop2_wait_for_fs_by_done_bit_status] *ERROR* wait vp1 done bit
status timeout, vcnt: 0
Fixes: 5aa1d0e08f ("drm/rockchip: vop2: fix double config done at one
frame time")
Change-Id: I66d1e7ba260dc376c7f7ce132dad2212649b31e8
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Add support to change fan speed according to temperature,
and force to update pwm state when suspend and resume as
the configuration of pwm is lost.
Signed-off-by: Shaohan Yao <shaohan.yao@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I05b286d1373dd4ace2fb519f4598008b851e4eff
pre_restart will rewrite reboot mode with normal mode when panic.
Fixes: c0b196cd5b ("power: reset: reboot-mode: Register callback for kernel pre restart")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I8ad03b8f699b9c1a544a46bbdb60d118381d8356
Bring back CLK ASAP after cfg changed to make SINK devices active
on HDMI-PATH-ALWAYS-ON situation, this workaround for some TVs no
sound issue. at the moment, it's 8K@60Hz display situation.
On HDMI-PATH-ALWAYS-ON situation, we almost keep XFER always on,
so, for new data start, suggested to STOP-CLEAR-START to make sure
data aligned.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I56f97d7246cf790ea33a7410eff418baeeecc6d0
CMA alloc may failure due to page busy caused by isolated failure,
it's helpful to dump page owner stack for debug.
To use this debug, there should enable PAGE_OWNER debug first by
- CONFIG_PAGE_OWNER=y
- add “page_owner=on” to boot cmdline
then it will shows as following:
page allocated via order 0, migratetype Movable, gfp_mask 0x6212ca(GFP_HIGHUSER_MOVABLE|__GFP_NOWARN|__GFP_NORETRY)
get_page_from_freelist+0x1404/0x1920
__alloc_pages_nodemask+0xf4/0xe90
__do_page_cache_readahead+0x104/0x1f0
filemap_fault+0x3d4/0x618
ext4_filemap_fault+0x30/0x50
__do_fault+0x50/0x118
__handle_mm_fault+0x7e4/0xb40
handle_mm_fault+0xcc/0x1a0
do_page_fault+0x1f0/0x4a8
do_translation_fault+0x5c/0x64
do_mem_abort+0x54/0xf8
el0_da+0x1c/0x20
Change-Id: I94b02a7c4ce9174f8151e0979e18adba4011c1d2
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
The Sonix webcam (idVendor=0x0c45,idProduct=0x636a)
can't support auto-suspend well on rockchip platforms.
With auto-suspend, the usb mic of the webcam fail to
start capture. So we need to disable auto-suspend for
this Sonix webcam.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Icc59c4fe1fda78be73441dc4320d6d738d031efd
sometimes the signal is locked, but the resolution is not stable.
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I4088690c58159dbdc6a36a1f3fe1db4dada4bfbb
The mst of yrgb/uv must start at a byte aligned address with a full
group of pixel.
For a pixel with NV15 format, the y channel has 10 bits and uv channel
has 5 bits. So limit the alignment to 8 pixel(10 bytes for Y, and 5 bytes
for UV) to meet this requirement.
For a pixel with NV12 format, we should limit the alignment to 2 pixel.
Change-Id: I23eccca6d706d3da25d2deac29e5a862e4bf355d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Show the CMA pages used by cma_alloc in meminfo node.
Tested on RV1126 EVB DDR3:
CmaTotal: 270336 kB
CmaAllocated: 44408 kB
CmaReleased: 225928 kB
CmaFree: 0 kB
The CmaTotal = CmaAllocated + CmaReleased, and the CmaFree is pages
under cma area unused by system.
The CmaAllocated can be calculated by CMA_DEBUGFS.
Tested on RV1126 EVB DDR3:
cat /sys/kernel/debug/cma/*/used
10756
346
The results from cma used is in page count, 1 page = 4kByte
CmaAllocated = 44408kB = 10756 + 346 pages
Change-Id: Ib79001367562c968e6432816b158cba551978173
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
1. Add need_hack check for rk356x
2. Use cancel_delayed_work replace cancel_delayed_work_sync
3. Remove the operation of resetting rkvdec2 before suspend
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: If826ce65fa1db164a99067bdc9ab5092474a88a3
This reverts commit d3bf1f97b4.
Convert to use rk_cma_heap.c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I463c67387fc8fba06b4cf5b09e8d4d1c7f0e4856
This reverts commit dcbfe3bd8c.
Convert to use rk_cma_heap.c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Iee39ced1023abce09116d73143bb81a6b15ca54f
This partially reverts commit 61a32e157e.
Convert to use rk_cma_heap.c and keep fixes to dma-heap.c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I740d0de75d8b526f7de987b0b1c18dc3f6298705
This reverts commit 78a3c0db57.
Convert to use rk_cma_heap.c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I799107c485187d99f1c71e58ede360865337cf3e
The userland (gralloc or libdmaheap) fixed to use a heap name "cma-heap"
to be the device name, without this patch, the dt file should named the
cma default node name as "cma". otherwise it is defaultly to be "reserved"
that make the userland fail to open the device.
This patch fixes the cma-heap default name to "cma-heap".
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I09befb35bb8d4cd042b8c1c66c5d99c7d58fbbb6
Make the partial sync separated from normal sync.
Fixes: dcbfe3bd8c ("dma-buf: cma_heap: support dmabuf partial sync")
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I07342cf850f212e9682a589818069977ef4b78a8
Fix probabilistic no signal output in samsung 8K TV.
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I366311b61595534ce8fefeb235bc9b20cb3991e0
Renamed from cma_heap.c and add copyright from Rockchip.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: If67e0a76d95389b34027c1990f0816c0b95f2a28
The layout about meta has been changed and defined in rv1106-thunder-boot.dtsi.
Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: I9d658cdcd01905e74e7a9faaaaead6396171dd84
Fixes: 39c3a52c25 ("media: rockchip: isp: stop without waiting if isp idle for readback mode")
Change-Id: I80446449bf705819b0266e6a0cbdc9e2ee67b57e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
size vmlinux:
before:
text data bss dec hex filename
2595092 1136900 85540 3817532 3a403c vmlinux
after:
text data bss dec hex filename
2639206 1147196 121300 3907702 3ba076 vmlinux
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2c88bec947fe1cf5f28cc0a8e2251fa4012f6165