Use the new dmaengine_synchronize() function to make sure that all complete
callbacks have finished running before the runtime data, which is accessed
in the completed callback, is freed.
This fixes a long standing use-after-free race condition that has been
observed on some systems.
Change-Id: Id99a1acaa2db537fcee6d10ecc94c831bb0a6faa
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit bc0e734516)
for get last log from /sys/fs/pstore/console-ramoops
Change-Id: I17ec56687c3f2f95d5780166349bd5cf403e8f91
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Enable VB2_USERPTR mode. vb2_dma_contig takes care
the rest of details except the vb2_plane_vaddr().
Change-Id: Id23e0c9ef7b3332fcb3be57c71c4178e181d7141
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
The mipi interrupt is auto on in resume operation,
so we may receive interrupt before isp clock resume,
and the kernel will be dead when access isp register in mipi isr function.
Change-Id: I73779111cb103457b0a4f125d8e4c9420a2d8553
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Waitting 100ms for time out is too short, which may cause
system crash when hdmi hotplug.
Change-Id: I46c8520e9a8cfe8ac2c65abb555d86bb0ecaa3ee
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Now we set the load of fixed rate scene to 100%, it isn't accurate,
it is better to update stats if auto freq is enabled.
Change-Id: I7de2c5f0b218cbeb32340bf3287cee0565773785
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
FM25S01, HYF1GQ4UPACAE, EM73E044SNA-G, GD5F2GQ5UEYIG
Change-Id: Id6f50b06a27631cf14e1df6deb39cf0600866bec
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
kref_init initializes the reference count to 1, not 0. This additional
reference is never released since the conversion to reference counters.
As a result, uvc_delete is not called anymore when UVC cameras are
disconnected.
Fix this by adding an additional kref_put in uvc_disconnect and in the
probe error path. This also allows to remove the temporary additional
reference in uvc_unregister_video.
Change-Id: Ief203c8e090b57174ab76e9b0a8f88b7afd17cbb
Fixes: 9d15cd958c ("media: uvcvideo: Convert from using an atomic variable to a reference count")
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit f9ffcb0a21)
When RK3399 work as a host connect to RK1808 work as a ep:
1. RK3399 pcie DO NOT enter L2 state when suspend, because RK1808 won't
send the ACK.
2. Hand the link operation to userspace when RK3399 resume
3. Before RK1808 suspend or reboot, RK3399 do following first to break
the link:
echo 0x2 > sys/devices/platform/f8000000.pcie/pcie_reset_ep
4. After RK1808 resumed or booted, RK3399 do following to restart
the link:
echo 0x1 > sys/devices/platform/f8000000.pcie/pcie_reset_ep
Change-Id: Idc94ab4d2f123744c80ad34a57e1036fec9c53f2
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
When switching from another color to yuv422, neither
encoder input color nor encoder output color is rgb.
CSC coeff will be incorrectly selected as
csc_coeff_full_to_limited, which causes the display
turn to green. To solve this problem, choose
csc_coeff_full_to_limited only if the input and output
colors are both RGB.
Change-Id: I080e18eb8fcca975cd0e6c46d2ed9e7513a26609
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
We need to dynamically resize the TxFIFOs for some cases
where the default values don't match.
Test on RK1808-stick board, configurate the usb with four
functions "rndis, ntb, mass_storage, acm", the default
values of TxFIFOs is:
GTXFIFOSIZ(0) = 0x00000042
GTXFIFOSIZ(1) = 0x00420184
GTXFIFOSIZ(2) = 0x01c60184
GTXFIFOSIZ(3) = 0x034a0184
GTXFIFOSIZ(4) = 0x04ce0184
GTXFIFOSIZ(5) = 0x06520184
GTXFIFOSIZ(6) = 0x07d6002a
The ep6-in is used for acm ep-in which maxpacket is 1024B,
but the default fifo size of ep6-in is only 336B, less than
the length of the ep maxpacket, it cause acm works abnormally.
This patch creates a simple function to allocate enough TxFIFO
space for each of the enabled endpoints.
Change-Id: I389ffdba4f3721ed6ef192f0c85f41fdeff645ce
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch adds a new property "snps,tx-fifo-resize" to
enable resize the TxFIFOs dynamically.
Change-Id: I0714b8a5b3a7f461ae0527c99729db8cf202e066
Signed-off-by: William Wu <william.wu@rock-chips.com>
RK1808 have 8 uart ports, so increase max uart number to 8.
Change-Id: I01dcf83d5f98e57523f6f61049f5fbb7a8a62639
Signed-off-by: Lin Huang <hl@rock-chips.com>
The early (RK_EXCAVATOR_MAIN_V10_20160627) v10 board had some hardware
issues, for example, pwm regulator even a small miscalculation by hardware
and the emmc can't work on hs400 mode. But there still have someone used
the old v10 boards on their hands.
Anyway, that should support the old v10 board with this patch.
Change-Id: If80d890ba713b8dc2893aba406a75af18c0fea03
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
A message can be forged to crash the stack; here we make sure we don't
completely break the system if this occurs
Change-Id: Id5ae7509c7d629c62ce5fe567c551a1e424e0bf3
Signed-off-by: Michel Pollet <michel.pollet@bp.renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 1ca532e991)
The early used the fb for display, the new drm display can't callback
the suspend to resume function in gsl3673 driver.
Change-Id: I36c7d89edaf4052e614c5a354f7a0a12c9c4275a
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
The Linux SDK have a common issue with rk809/rk805/rk817..etc, the
regulator can't be disabled during suspending since the linux config
hadn't enable the CONFIG_PINCTRL_RK805 pinctrl for PMIC.
This config include the rk805/rk809/rk809..pinctrl to control for
pmic. So the related config need be enabled by default.
Change-Id: I284976df9d9d95d8a0104ba96a27464883c8b8e1
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
This adds support to get simple_ondemand governor data from devicetree.
Change-Id: Ic897ad6227152c4ce695d6cee8085b4d303339bf
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
The recommended max voltage of vdd_npu is 0.88V in the datasheet.
Change-Id: I9713810692c5d32b8c41b0b0e0d02405c01dd0b7
Signed-off-by: Liang Chen <cl@rock-chips.com>
The recommended max voltage of vdd_npu is 0.88V in the datasheet.
Change-Id: Id29b97b82ea35f3db03140ebdd8bab85e3f375df
Signed-off-by: Liang Chen <cl@rock-chips.com>
There is an obvious mistake defined on rk3399pro linux.
Change-Id: I89c5589175fa5c8b712d856647442e96330bc669
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
AFAWK, there are four layers in RK3399's VOPB, and two layers for
RK3399's VOPL.
And RK3399's VOBL has the win0 and win2 layers, the formats they support
as below.
win0:
XR24 AR24 XB24 AB24 RG24 BG24 RG16 BG16 NV12 NV16 NV24 NA12 NA16 NA24
win2:
XR24 AR24 XB24 AB24 RG24 BG24 RG16 BG16
So only win0 layer supports NV12 format (for video decode format),
adjust the overlay for video and primary layer for display.
It didn't care this case if some platforms had handled the display in
application (e.g android), then on the Linux platform, it's hard to handle
the all kinds of cases in Display application, perhaps the linux needn't
this patch fixes it in the future.
Depend-CL:76144
Fixes: d82f1d3e58
("arm64: dts: rockchip: reasonable alllcation of VOP on rk3399 linux")
Change-Id: Id93b315b6e3ae670bf5ea4dc0a64e140c6e37e80
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
The zpos currently configure is the order in vop_win_data array,
which is related to the actual hardware plane.
But in the Linux platform, such as video hardware and camera preview,
it can only be played on the nv12 plane.
So set the order of zpos to PRIMARY < OVERLAY (if have) < CURSOR (if have).
Change-Id: Ia9ab3cb9225fd2c385703109afbfbb42a1564110
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>