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
Add iomap support for non-tailpacking uncompressed data in order to
support DIO and DAX.
Direct I/O is useful in certain scenarios for uncompressed files.
For example, double pagecache can be avoid by direct I/O when
loop device is used for uncompressed files containing upper layer
compressed filesystem.
This adds iomap DIO support for non-tailpacking cases first and
tail-packing inline files are handled in the follow-up patch.
Link: https://lore.kernel.org/r/20210805003601.183063-2-hsiangkao@linux.alibaba.com
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
[ Add include linux/uio.h and replace filemap_read with generic_file_buffered_read ]
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I421298df25eb8b5cf22ad43339d168ac50777012
(cherry picked from commit a08e67a028)
The unit of VOP stride is word, so we return error to avoid userspace to
commit legal alignment.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I147f4985f4c6304db68efb0876c3f918da76ff52
This reverts commit 79c6a1e08b.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I0351b2a839fa984729ca167c66ca10231475ec5e
This reverts commit 21f2fd663e.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ica9d2358c14956a8233523b7b91e1a9d09d50632
This reverts commit 10e18d6585.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I32e5e13c2d9765c9cf1bbda4622731ec7a8c1848
This reverts commit 8880c05e5a.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1b00ac9fabb0825dcedf8719a840ac8138bdc81e
This reverts commit 383018f42d.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I27099b713ac3249acb628868c7255c51b2881371
This reverts commit 9d91ed824a.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ibb891bd5d9c8a1a56208b8b39402b9b7b04bdd4f
This reverts commit a22edac69e.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iae81cc96b1e1ac3073d1e0fe4cf6cdb55abf6103
This reverts commit 33b98bf612.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id265fd16b1531708478f07187f50fe23e74e427e
This reverts commit e165028391.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iaa80d3480d2e039cdd530e3278035c84553d07e7
This reverts commit 4925881228.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib7e1dd75ff948b7a190b4169037df83d4596b70e
This reverts commit 3212cfb965.
Use rk_system_heap.c instead of system_heap.c now, reverts all changes.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I023ebda5731f5c509c703799bfb96115701bdf9e