This maybe also an iommu isuue(without page fault), we need
to do disable then enable display pipeline to revcovery it.
Change-Id: If6886d624d6a354952bb7c9d1a6369707d432d92
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Report ROCKCHIP_DRM_ERROR_EVENT_POST_BUF_EMPTY to userspace
if a POST_BUF_EMPTY storm lasts more than 1 minute.
The userspace should try to avoid use VOP for ovelay and scale
down after receive such event.
Change-Id: Ibd5be1cdb5a64708616e46e1729a16130e6afaf9
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Userspace can do a error recovery by disable/enable all
the display pipeline when get such error event like IOMMU_FAULT.
Change-Id: I4fb5bc7f6f1c04eb3559462ef5ffee5960507d2f
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
vop2_crt_debugfs_dump may call by iommu fault handler,
this may case BUG: scheduling while atomic.
Change-Id: Ia9505a3c4ded48652c1ebc63839a16e48de7a90f
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
when hpd irq coming, the dptx will access dpcd registers, but
the phy may be disabled. it need enable phy first.
Change-Id: I0a07659eafdbf5d093949d85e9f6f18651dc04ec
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
This reverts commit f14693316b.
A better solution to avoid the fifo overflow is to adjust the
config order between vop and dp, which has been applied. So
revert this commit.
Change-Id: I972ff9d92f348657421b510c992c82f0d5b4bd4a
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
There is nothing worth to do when rebooting in normal system
as the whole thing is going to be reset in a clean way. However
if the reboot process doesn't reset the anything, then reset
PCIe controller in probe would throw a glitch which could generate
a spurious irq. Work around this by disabling misc irq before rebooting.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I7b6e53ecbce385581a6beb0333a2df320a32cc9e
Don't force reset iommu when enable vop iommu firstly on RK3576 platform
Change-Id: I4cc27d051fec1d3f6a26f0a2fc9913bb9760c892
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Merge from kernel-5.10
media: rockchip: vicap skip fs/fe match detect when use smartsens sensor and work with hdr mode
media: vicap: fixed the sequence not increasing in one frame mode
media: rockchip: vicap support soft sync mode
media: rockchip: vicap support get timestamp for rtt_stream_on buffer
media: rockchip: vicap support mipi/dvp reset together below rk3588
media: rockchip: vicap fixes error of frame interval info
media: rockchip: vicap remove interrupt flags of IRQF_SHARED for rv1106/rv1103b
media: rockchip: vicap fixes error of buf update seconds in one frame interval
media: rockchip: vicap fixes lack_buf_cnt error
media: rockchip: vicap clean to_stop_dma state before start stream
media: rockchip: vicap fixes error of rtt stream on
media: rockchip: vicap add pipe stop stream to function of shutdown
media: rockchip: vicap skip direct reset when size err occurs and work in online mode
media: rockchip: vicap proc node add group info
media: rockchip: vicap: error print of mipi csi2 add base address to distinguish device
media: rockchip: vicap fixes error of wake up time in thundboot mode
media: rockchip: vicap support rtt stream on
media: rockchip: vicap make sure sequence of first frame send to isp is zero
media: rockchip: vicap rdbk_auto mode support group sync
media: rockchip: vicap add register debug info to proc node
media: rockchip: vicap support online_unite with thunderboot
media: rockchip: vicap support set csi2 quick stream on/off
media: rockchip: vicap fixes logic of thunderboot skip
media: rockchip: vicap clean fs intr state before set fs intr enable
media: rockchip: vicap use addr force update to replace dma reset for chip after rk3562
media: rockchip: vicap add complete for restart stream with aov
media: rockchip: vicap fixes soft reset error of chips after rv1103b
media: rockchip: vicap set capture mode to isp when resume one frame mode
media: rockchip: vicap remove line intr disable each frame after rk3588
media: rockchip: vicap wait fe to stop stream when stream suspend
media: rockchip: vicap remove cif-rockit init limit
media: rockchip: vicap add vblank check
media: rockchip: vicap: fastboot reserved buffer count according to isp
media: rockchip: vicap: single dev need to config toisp when resume
media: rockchip: vicap fixes null point of cur_stream
media: rockchip: vicap disable fs inf intr when stop dma capture to reduce unnecessary intr consume
media: rockchip: vicap fixes error of common dual camera aov
media: rockchip: vicap add frame skipping to ensure frame integrity when using sensor flip
media: rockchip: vicap remove limit of x_offset/y_offset
media: rockchip: vicap support rounding 2/4bit for rv1103b
media: rockchip: vicap support online hdr wrap for rv1103b
media: rockchip: vicap fixes cru rst sequence of rv1103b
media: rockchip: vicap fixes stream off issue when restart to multi frame mode
media: rockchip: rv1103b vicap support online unite
media: rockchip: vicap move toisp stop operation to toisp fs for more secure
media: rockchip: vicap fixes same error with more toisp mode
media: rockchip: vicap change work mode according to isp
media: rockchip: vicap support rv1103b
media: rockchip: vicap fixes isp timeout error
media: rockchip: vicap fixes error of multi frame mode to singgle frame
media: rockchip: vicap: rv1106 isp_unite not support change to online
media: rockchip: vicap: rv1106 unite fixes error of write toisp register
media: rockchip: vicap: rv1106 unite fix loss stream frame one frame to multi frame mode
media: rockchip: vicap support distinguish toisp on/off
media: rockchip: vicap check dev cnt acording to rkisp sd cxonnect state
media: rockchip: vicap fixes error call soft reset below rk3588
media: rockchip: vicap support change to multi frame mode during capture in one frame mode
media: rockchip: vicap add limit of rdbk_mode from app for aov
media: rockchip: vicap fixes stream loss with rockit
media: rockchip: vicap wait thunderboot ready when open video
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Icc7c03e5d15bd4ea789deaa785a4534eafd53ce9
During board verification, there is a need to test the various supported
eMMC/SD speed modes. However, since the framework chooses the best mode
supported by the card and the host controller's caps, this currently
necessitates changing the devicetree for every iteration.
Allow the various speed mode host capabilities to be modified via
debugfs in order to allow easier hardware verification. The values to
be written are the raw MMC_CAP* values from include/linux/mmc/host.h.
This is rather low-level, and these defines are not guaranteed to be
stable, but it is perhaps good enough for the intended use case.
MMC_CAP_AGGRESSIVE_PM can also be set, in order to be able to
re-initialize the card without having to physically remove and re-insert
it.
/sys/kernel/debug/mmc0# grep timing ios
timing spec: 9 (mmc HS200)
// Turn on MMC_CAP_AGGRESSIVE_PM and re-trigger runtime suspend
/sys/kernel/debug/mmc0# echo $(($(cat caps) | (1 << 7))) > caps
/sys/kernel/debug/mmc0# echo on > /sys/bus/mmc/devices/mmc0\:0001/power/control
/sys/kernel/debug/mmc0# echo auto > /sys/bus/mmc/devices/mmc0\:0001/power/control
// MMC_CAP2_HS200_1_8V_SDR
/sys/kernel/debug/mmc0# echo $(($(cat caps2) & ~(1 << 5))) > caps2
/sys/kernel/debug/mmc0# echo on > /sys/bus/mmc/devices/mmc0\:0001/power/control
/sys/kernel/debug/mmc0# grep timing ios
timing spec: 8 (mmc DDR52)
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20230929-mmc-caps-v2-2-11a4c2d94f15@axis.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit ff369d7b98426abf7bccb0722253f5d4490f3c17)
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I6ea2fc093234785e05d05128556c60ef42da02a4
Raise the voltage of bus(vdd_loigc) when A72 is at high
frequency.
Change-Id: I4444eab3a4d97c28c42702624c65d57713b39577
Signed-off-by: Liang Chen <cl@rock-chips.com>
Merge from kernel-5.10
media: rockchip: isp: fix isp33 unite error for fastboot
media: rockchip: isp: fix unite mode for fast
media: rockchip: isp: output stream burst 16 for isp33
media: rockchip: isp: write burst adjust to 8 for isp33
media: rockchip: isp: fix free bay3d buf fd to get again fail
media: rockchip: isp: wait aiq params for isp33 fast
media: rockchip: isp: fix multi switch to online no work for fast
media: rockchip: isp: isp33 change input to 4 align
media: rockchip: isp: fix isp33 multi online resume
media: rockchip: isp: drop 2 frame if rockit switch resolution
media: rockchip: isp: disable isp33 dma write gather
media: rockchip: isp: fix isp33 multi sensor resume
media: rockchip: isp: isp33 add api to get params
media: rockchip: isp: fix isp33 unite switch online for fast
media: rockchip: isp: w3a overflow check for isp33
media: rockchip: isp: fix isp33 params sram config
media: rockchip: isp: fix memory leak
media: rockchip: isp: add sync for multi online mode
media: rockchip: isp: limit bp crop and scl for isp33
media: rockchip: isp: fix hold at register irq if mcu still running
media: rockchip: isp: enable bay3d FST_FRAME if change bypass
media: rockchip: isp: fix 4k unite effect
media: rockchip: isp: add api for raw buf cnt and hdr wrap
media: rockchip: isp: fix resume for multi online mode
media: rockchip: isp: frame start irq to send dvbm event
media: rockchip: isp: fix hist for isp33 unite mode
media: rockchip: isp: fix buf update for multi online mode
media: rockchip: isp: resume early for isp33
media: rockchip: isp: fix rd_mode for vicap to send buf
media: rockchip: isp: fix fast stop no to clean flag
media: rockchip: isp: fix isp2enc wrap for isp33 fast
media: rockchip: isp: support online hdr wrap for isp33
media: rockchip: isp: support unite online for isp33
media: rockchip: isp: support two sensor online for isp33
media: rockchip: isp: support mirror for wrap mode
media: rockchip: isp: more mode for vicap to isp
media: rockchip: isp: add isp2enc frame count to rockit
media: rockchip: isp: add rv1103b config
media: rockchip: isp: add isp33
media: rockchip: isp: fix rockit switch resolution
media: rockchip: isp: fix params buffersize for tb case
media: rockchip: isp: fix isp32 bp no output if suspend
media: rockchip: isp: rockit buf add offset
Change-Id: I7d3720165e9fb045e88be34c2f58fe83c0f700bc
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This reverts commit 35a788ded3.
This driver is unused since linux 5.10, drop it.
Change-Id: I5cafde24e924034ed9daed37f64c2bf370603732
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Need to reset hardware when driver exits.
Update driver version to 1.3.6
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I4c6cb394a1339cf689d2d0d011d5df3fb24f0425
To fix the unnecessary RC's bar allocation warning:
[ 2.226288] pci 0000:00:00.0: BAR 0: no space for [mem size 0x40000000]
[ 2.226305] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x40000000]
[ 2.226317] pci 0000:00:00.0: BAR 1: no space for [mem size 0x40000000]
[ 2.226327] pci 0000:00:00.0: BAR 1: failed to assign [mem size 0x40000000]
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I617cfa3408115d7c73190c6b9816d48ae82a37c8
[ Upstream commit 3f0ab59e6537c6a8f9e1b355b48f9c05a76e8563 ]
This expands the validation introduced in commit 07bf790895 ("xfrm:
Validate address prefix lengths in the xfrm selector.")
syzbot created an SA with
usersa.sel.family = AF_UNSPEC
usersa.sel.prefixlen_s = 128
usersa.family = AF_INET
Because of the AF_UNSPEC selector, verify_newsa_info doesn't put
limits on prefixlen_{s,d}. But then copy_from_user_state sets
x->sel.family to usersa.family (AF_INET). Do the same conversion in
verify_newsa_info before validating prefixlen_{s,d}, since that's how
prefixlen is going to be used later on.
Reported-by: syzbot+cc39f136925517aed571@syzkaller.appspotmail.com
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
commit ef08c0fadd upstream.
After we fixed the uprobe inst endian in aarch_be, the sparse check report
the following warning info:
sparse warnings: (new ones prefixed by >>)
>> kernel/events/uprobes.c:223:25: sparse: sparse: restricted __le32 degrades to integer
>> kernel/events/uprobes.c:574:56: sparse: sparse: incorrect type in argument 4 (different base types)
@@ expected unsigned int [addressable] [usertype] opcode @@ got restricted __le32 [usertype] @@
kernel/events/uprobes.c:574:56: sparse: expected unsigned int [addressable] [usertype] opcode
kernel/events/uprobes.c:574:56: sparse: got restricted __le32 [usertype]
>> kernel/events/uprobes.c:1483:32: sparse: sparse: incorrect type in initializer (different base types)
@@ expected unsigned int [usertype] insn @@ got restricted __le32 [usertype] @@
kernel/events/uprobes.c:1483:32: sparse: expected unsigned int [usertype] insn
kernel/events/uprobes.c:1483:32: sparse: got restricted __le32 [usertype]
use the __le32 to u32 for uprobe_opcode_t, to keep the same.
Fixes: 60f07e22a7 ("arm64:uprobe fix the uprobe SWBP_INSN in big-endian")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: junhua huang <huang.junhua@zte.com.cn>
Link: https://lore.kernel.org/r/202212280954121197626@zte.com.cn
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 3d1c651272cf1df8aac7d9b6d92d836d27bed50f upstream.
Clang 19 prints a warning when we pass &th->guid to efi_pa_va_lookup():
drivers/acpi/prmt.c:156:29: error: passing 1-byte aligned argument to
4-byte aligned parameter 1 of 'efi_pa_va_lookup' may result in an
unaligned pointer access [-Werror,-Walign-mismatch]
156 | (void *)efi_pa_va_lookup(&th->guid, handler_info->handler_address);
| ^
The problem is that efi_pa_va_lookup() takes a efi_guid_t and &th->guid
is a regular guid_t. The difference between the two types is the
alignment. efi_guid_t is a typedef.
typedef guid_t efi_guid_t __aligned(__alignof__(u32));
It's possible that this a bug in Clang 19. Even though the alignment of
&th->guid is not explicitly specified, it will still end up being aligned
at 4 or 8 bytes.
Anyway, as Ard points out, it's cleaner to change guid to efi_guid_t type
and that also makes the warning go away.
Fixes: 088984c8d54c ("ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context")
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://patch.msgid.link/3777d71b-9e19-45f4-be4e-17bf4fa7a834@stanley.mountain
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>