This two bit is reserved for hdr and it is enabled by default,
is less this commit, vp1 will display black screen always.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I38862d187a1e26322c3e8930b615c4eb9d5f4ef8
There are one Temperature Sensor on rk3562, channel 0 is for chip.
Signed-off-by: Shaohan Yao <shaohan.yao@rock-chips.com>
Change-Id: Ided46b86470bb9cd506206bb4880ca024c0ec5cf
This adds the necessary data for handling otp on the rk3562.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I5083f7881146b18532bcee170ef78274b31ee4be
This driver is modified to support RK3562 SoC.
Add support to ungate clk.
Add support to shut down memory for rk3562.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ideeaf378b0548a9a32e05345f56a6d6bfb037a20
According to a description from TRM, add all the power domains.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia188dad23c884521775f9e608203d1281b093a39
Add the dt-bindings header for the rk3562, that gets shared between
the clock controller and the clock references in the dts.
Add softreset ID for rk3562.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I25c4b2b8276f7d371ae861fdd24bd98fcf7c1629
To make backport and upstream work easier. After this patch,
we just need to focus some rk specific additional code.
Sync to upstream commit a0753ef66c ("mmc: sdhci-of-dwcmshc: Re-enable support for the BlueField-3 SoC").
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ie3b76ea2848ac3570bb9bc0be09c6f6a67685658
Since we modify the sdhci driver to match upstream, so the compatible
property should be adjust to match it.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ia768d530047db95c29d5740ed5b039e7d92428cc
drivers/media/platform/rockchip/cif/subdev-itf.c:1172:12: warning: 'sditf_runtime_resume' defined but not used [-Wunused-function]
error, forbidden warning:subdev-itf.c:1172
1172 | static int sditf_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/cif/subdev-itf.c:1167:12: warning: 'sditf_runtime_suspend' defined but not used [-Wunused-function]
error, forbidden warning:subdev-itf.c:1167
1167 | static int sditf_runtime_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I537818f182741704e55f0bb59c623e1118bf5838
The f_uac1 driver uses the fixed address matching for EP-IN
and EP-OUT (0x82 for EP-IN and 0x01 for EP-OUT) when set/get
sample rate. It has limitation that can only support uac1 func
with EP2-IN and EP1-OUT to set/get sample rate. This patch use
the in_ep->address and out_ep->address instead of the fixed
addresses.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I85f4da663535b4e832e52b42bc1a7d57b85270ee
Set uvc state to UVC_STATE_STREAMING when stream on uvc
for both isoc and bulk transfer, then it can schedule
video pump work in uvc_v4l2_qbuf.
Fixes: c15a7cecb8 ("usb: gadget: uvc: support streaming bulk transfer")
Change-Id: Ie6fab6529cd83d59b34c6dd0028d6ad5b5eed010
Signed-off-by: William Wu <william.wu@rock-chips.com>
The reg FIELD2_OFST should be half the number of pixel/line
in interlace mode.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I3b0de9199768d965a945bf5db5a0902f2103e30e
The input supply is always-on, so this mistake doesn't affect
whether the supply is actually enabled correctly.
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ie6411c6fdcf4865290ba725d8203334f1bf8ad35
drivers/video/rockchip/dvbm/rockchip_dvbm.c: In function 'rk_dvbm_setup_iobuf':
./include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'dma_addr_t' {aka 'long long unsigned int'} [-Wformat=]
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ia18c7da7ea47e168741f76365eedc6b9e630e527
The default is DMA and IRQ transmission mode. You can change the
transmission mode to only support cpu polling transmission by adding
"rockchip,poll-only" to the device-tree node.
Change-Id: Icee3f4e899533ee51caab68fb85ec45f64b89d91
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This patch fixes a compile warning as following:
drivers/rtc/rtc-rockchip.c: In function 'rockchip_rtc_probe':
drivers/rtc/rtc-rockchip.c:669:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
669 | rtc->mode = (unsigned int)of_device_get_match_data(&pdev->dev);
| ^
Fixes: 7344989b7e ("rtc: support rockchip rtc")
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I53128355e34c6560ccd652631e67c8fc267928f5
In __alloc_and_insert_iova_range, there is an issue that retry_pfn
overflows. The value of iovad->anchor.pfn_hi is ~0UL, then when
iovad->cached_node is iovad->anchor, curr_iova->pfn_hi + 1 will
overflow. As a result, if the retry logic is executed, low_pfn is
updated to 0, and then new_pfn < low_pfn returns false to make the
allocation successful.
This issue occurs in the following two situations:
1. The first iova size exceeds the domain size. When initializing
iova domain, iovad->cached_node is assigned as iovad->anchor. For
example, the iova domain size is 10M, start_pfn is 0x1_F000_0000,
and the iova size allocated for the first time is 11M. The
following is the log information, new->pfn_lo is smaller than
iovad->cached_node.
Example log as follows:
[ 223.798112][T1705487] sh: [name:iova&]__alloc_and_insert_iova_range
start_pfn:0x1f0000,retry_pfn:0x0,size:0xb00,limit_pfn:0x1f0a00
[ 223.799590][T1705487] sh: [name:iova&]__alloc_and_insert_iova_range
success start_pfn:0x1f0000,new->pfn_lo:0x1efe00,new->pfn_hi:0x1f08ff
2. The node with the largest iova->pfn_lo value in the iova domain
is deleted, iovad->cached_node will be updated to iovad->anchor,
and then the alloc iova size exceeds the maximum iova size that can
be allocated in the domain.
After judging that retry_pfn is less than limit_pfn, call retry_pfn+1
to fix the overflow issue.
Signed-off-by: jianjiao zeng <jianjiao.zeng@mediatek.com>
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Cc: <stable@vger.kernel.org> # 5.15.*
Fixes: 4e89dce725 ("iommu/iova: Retry from last rb tree node if iova search fails")
Acked-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20230111063801.25107-1-yf.wang@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Bug: 265596669
(cherry picked from commit dcdb3ba7e2)
Change-Id: I810ad7023267c7c276961eefbceb652439799c30
[Yunfei: Resolved minor conflict for variable low_pfn_new]
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
commit fd3d91ab1c upstream.
The dvb-core tries to sync the releases of opened files at
dvb_dmxdev_release() with two refcounts: dvbdev->users and
dvr_dvbdev->users. A problem is present in those two syncs: when yet
another dvb_demux_open() is called during those sync waits,
dvb_demux_open() continues to process even if the device is being
closed. This includes the increment of the former refcount, resulting
in the leftover refcount after the sync of the latter refcount at
dvb_dmxdev_release(). It ends up with use-after-free, since the
function believes that all usages were gone and releases the
resources.
This patch addresses the problem by adding the check of dmxdev->exit
flag at dvb_demux_open(), just like dvb_dvr_open() already does. With
the exit flag check, the second call of dvb_demux_open() fails, hence
the further corruption can be avoided.
Also for avoiding the races of the dmxdev->exit flag reference, this
patch serializes the dmxdev->exit set up and the sync waits with the
dmxdev->mutex lock at dvb_dmxdev_release(). Without the mutex lock,
dvb_demux_open() (or dvb_dvr_open()) may run concurrently with
dvb_dmxdev_release(), which allows to skip the exit flag check and
continue the open process that is being closed.
CVE-2022-41218 is assigned to those bugs above.
Bug: 248356119
Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/20220908132754.30532-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I5a0dd4444ca25d07a050dcb07609c7c7ccf658af