afbdc should be closed before vop disable, otherwise will
abfdc will access AXI with error address, this will lead to
appear vop post empty or iommu pagefault error.
Change-Id: Ia811d629d12aa7fff8bb26ead4c97cc84b35e9b6
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
When we use /sys/class/udc/<udc>/soft_connect to do
a logical disconnection from the USB Host, the func
usb_udc_softconn_store() anusb_gadget_remove_driver(
both call dwc3_gadget_stop(). This results in a
'Trying to free already-free IRQ' warning and stack
trace. To solve the problem, don't call free_irq()
in dwc3_gadget_stop() if dwc->gadget_driver is NULL.
Change-Id: I9d5b5b354612c3ce3677b3d15cf6af1fcbf3f399
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch fix the issue that users fail to do a logical
disconnection from the USB Host via the kernel node:
/sys/class/udc/<udc>/soft_connect
Fixes: 3099e13bdb ("usb: gadget: f_uvc: support uvc and adb use independently")
Change-Id: I2a19f72dc0a5dc34e430d384f5b475b488731311
Signed-off-by: William Wu <william.wu@rock-chips.com>
The original order of sound cards registration were really messy......
The hdmi is the first sound card by default.
for linux:
[ 1.870252] ALSA device list:
[ 1.871548] #0: rockchip,hdmi
[ 1.871863] #1: realtek,rt5651-codec
[ 1.872248] #2: ROCKCHIP,SPDIF
Then after adding this patch, the sound cards as below:
[ 1.863328] ALSA device list:
[ 1.863601] #0: realtek,rt5651-codec
[ 1.863942] #1: rockchip,hdmi
[ 1.864236] #2: ROCKCHIP,SPDIF
Change-Id: I884df2752e84d95dbddba9b23c7dbd778ffb9357
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
This patch adds bulk endpoint for uvc to be used as
video streaming transfer. By default, the uvc gadget
still uses isoc endpoint for video streaming.
The important difference between the bulk and isoc
method is that, alt-settings in a video streaming
interface are supported only for isoc endpoints as
there are different alt-settings for zero-bandwidth
and full-bandwidth use-cases, but the same is not
true for bulk endpoints, as they support only a single
alt-setting.
How to use:
1. Enable the bulk transfer:
echo 1 > /config/usb-gadget/g1/functions/uvc.name/streaming_bulk
2. Disable the bulk transfer:
echo 0 > /config/usb-gadget/g1/functions/uvc.name/streaming_bulk
3. Testing the uvc bulk function transfer:
device: run the uvc-gadget program
# uvc-gadget -b -u /dev/video<uvc video node #> -v /dev/video<vivid video node #>
where uvc-gadget is this program:
http://git.ideasonboard.org/uvc-gadget.git
with these patches:
http://www.spinics.net/lists/linux-usb/msg99220.html
Change-Id: Ifedfe3f5c4354dd2bdf07382290107e9bcc89f59
Signed-off-by: William Wu <william.wu@rock-chips.com>
Also add unpack_bootimg and update mkbootimg
AOSP 96fd8874ef8e ("Check DTB image size for boot image header version 2 and above")
Change-Id: I4582913b21f711c84d62bed0ffd024b583a094f7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
8bit logo convert to 24bit enlarge triple buffer size which
some chips can't reserve.
Change-Id: I769602f9d04e46a039d7a9158e25c1bb2067df32
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
support yuyv output by setting the input mode to raw8
Change-Id: Ie33fa1e5d5cee532ebcfb23d57cac3700ee25042
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
The dwc2 programming guide section 3.5 'Halting a Channel'
says that the application can disable any channel by
programming the HCCHARn register with the HCCHARn.ChDis
and HCCHARn.ChEna bits set to 1'b1. This enables the
dwc_otg host to flush the posted requests (if any) and
generates a Channel Halted interrupt.
But it also requires that channel disable must not be
programmed for non-split periodic channels. At the end
of the next uframe/frame (in the worst case), the core
generates a channel halted and disables the channel
automatically.
If we disable non-spilt periodic channels to halt the
channels, it will easily to cause data transfer fail.
A typical case is take photo with usb camera or close
usb camera, Specifically, the observed order is:
1. uvc driver calls usb_kill_urb
2. usb_kill_urb calls urb_dequeue to cancel urb
3. urb_dequeue call dwc_otg_hc_halt to disable
non-spilt periodic channels
4. usb core doesn't halt the non-spilt periodic
channels immediately, and the application
reallocates the channels for other transactions
without waiting for the HCINTn.ChHltd interrupt.
5. uvc driver calls usb_set_interface to start
control transfer, and gets a channel which used
for non-spilt periodic transfer before. The core
generates a channel halted and disables the channel
automatically. This cause control transfer fail.
Change-Id: I95424a99b77b552396a9fb95a5058258270ed4c2
Signed-off-by: William Wu <william.wu@rock-chips.com>
Because rk3308 vop win empty isn't reliable, so we delete it.
Change-Id: If033eb02c4d7174db8dde7984581e39c98ee4998
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
__sync_icache_dcache unconditionally skips the cache maintenance for
anonymous pages, under the assumption that flushing is only required in
the presence of D-side aliases [see 7249b79f6b ("arm64: Do not flush
the D-cache for anonymous pages")].
Unfortunately, this breaks migration of anonymous pages holding
self-modifying code, where userspace cannot be reasonably expected to
reissue maintenance instructions in response to a migration.
This patch fixes the problem by removing the broken page_mapping(page)
check from the cache syncing code, otherwise we may end up fetching and
executing stale instructions from the PoU.
Change-Id: Ie304b57c7a8597beff653e9a2a13b7cf3725a365
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
(cherry picked from commit 20c27a4270)
1. use the same mutex to serialize the calls from user application.
2. keep iommu attached state when last video is closed,
because the user application may still access the buffer allocated
by v4l2 driver.
Change-Id: I667a42a07672e5d30cc4383e9f54388fe1b91f1c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Compatible with cif only have single dma mode in driver
Change-Id: I5f2296549e20e3db1d8883474936e2892afc3ff0
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
64bit SoCs with 32bit code need some different configs, eg. textofs...
So we need a independent defconfig.
Change-Id: I76b6259078991d2936a568b43fe1ed67247de995
Signed-off-by: Liang Chen <cl@rock-chips.com>