This patch add a DMABUF_DEBUG_ADVANCED to try to attach and map
dmabufs who have no valid scatter list table.
Update the rk_dmabuf_procfs node to be a directory tree as:
/proc/rk_dmabuf/
/proc/rk_dmabuf/dev
/proc/rk_dmabuf/sgt
/proc/rk_dmabuf/size
The "dev" to show all attached devices, such as:
ffffff816f8bb600 (null) system-uncached 8288 KiB display-subsystem fb000000.gpu fb000000.gpu
The "sgt" to show scatter list table address range, such as
ffffff8124856200 (null) system-uncached 52 KiB 0: 0x00000001712d0000..0x00000001712d0fff ( 4 KiB)
1: 0x00000001712d2000..0x00000001712d2fff ( 4 KiB)
2: 0x00000001712c6000..0x00000001712c6fff ( 4 KiB)
3: 0x00000001712c8000..0x00000001712c8fff ( 4 KiB)
4: 0x00000001712ca000..0x00000001712cafff ( 4 KiB)
5: 0x00000001712cc000..0x00000001712ccfff ( 4 KiB)
6: 0x00000001712ce000..0x00000001712cefff ( 4 KiB)
7: 0x00000001712d1000..0x00000001712d1fff ( 4 KiB)
8: 0x00000001712c7000..0x00000001712c7fff ( 4 KiB)
9: 0x00000001712c9000..0x00000001712c9fff ( 4 KiB)
10: 0x00000001712cb000..0x00000001712cbfff ( 4 KiB)
11: 0x00000001712cd000..0x00000001712cdfff ( 4 KiB)
12: 0x00000001712cf000..0x00000001712cffff ( 4 KiB)
The "size" to show total dmabuf size, such as:
Total: 79836 KiB
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I62292094407696e410e2ce2973a60f569964e8bd
This patch add a DMABUF_DEBUG to switch on/off the debug codes for
dmabuf, including set a name for each dmabuf.
Support to set a name with pid+taskname for a exported dmabuf, this is
enabled depends on DMABUF_DEBUG.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I84f2c3c66d407d7af29df1d7d85d62d0679d2218
The queue nodes will be deleted, the driver cannot get it, add
status "okay" attributes to avoid deletion.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ia0a62d14b3a769e6cc3a631389a54c1190d9d6e2
RK3568 usb phy0 and phy1 linestate irq can be set as
wakeup source, but the default linestate filter time
is based on the usb phy grf pclk 100MHz. So it needs
to reconfigure the linestate filter time base on 32KHz
clk when enter deep sleep.
In addition, it needs to enable the host port (usb3
host1 and usb2 host1) wakeup irq because of legacy
reason.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I9151d49721e8e9d917fdb51228f3ca2627090156
If miss isoc event happens, the current code just set
the req status to -EXDEV and giveback the req to the usb
gadget driver, and then stop the active transfer with the
cmd DWC3_DEPCMD_ENDTRANSFER and wait for a XferNotReady
event to restart a transfer again. However, for isoc
ep in transfer, it cause to lost the isoc data of the
req.
This patch moves the miss isoc req to pending_list in
order to restart transfer immediately instead of give
back the req to the usb gadget driver.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Idf38d9fd4d483854473c18f792d1996fb5fcab4b
The commit a7027ca69d ("usb: dwc3: gadget: Give back
staled requests") move all started request to cancelled
list and expect to give back all the started requests.
However, it fails to give back the started requests
if the dep->flags isn't set to DWC3_EP_TRANSFER_STARTED,
in this case, we need to skip the trbs and giveback the
req. And we also need to skip the trbs of the req in the
pending_list to make the dequeue pointers useless.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I123ff779d5e2933449581f8b570e2e6ad6b75458
1.Some 8K frames took more than 200ms to decode,causing software timeout.
Solution:
Increase the software timeout threshold to 500ms
2.After power off av1dec, read/write reg in cache irq causing kernel
crash.
Solution:
There are two irq for av1:
a. vcd_irq is decode irq what we need to care about.
b. cache irq what we do not need to care about.
So disable the cache irq temporarily.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I282b8e0614321b5adf0fac5f31bb88e2bdb2bf6c
1.Protect clock and iomux resources used by AMP.
2.Support AMP cpu on/off.
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: If53e893fac916217bfa5618350b1706b742b34e7
Delete nodes in case of:
* node is null, without any property and children node
* node with 'status' property but not "okay" or "ok"
Change-Id: Ic7d2ba1cb60350c21fa6a46222c20870c74359d4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
before:
text data bss dec hex filename
6301 23000 8 29309 727d drivers/clk/rockchip/clk-rv1106.o
after:
text data bss dec hex filename
5483 22892 8 28383 6edf drivers/clk/rockchip/clk-rv1106.o
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ibb023c4353fa3bbd85b15d415c46d70774f4fcca
Use the driver's mmu configuration to replace the user's mmu configuration.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib6c535bf0f8d714e6535c27cc0181f5c3a39d7ae
For dmabuf, owner has set a name for the buffer, use the dmabuf->name to
replace orig_alloc to save several memory.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ifad14ed886580d2a9f3000900e1849b0b5a3858e
For some Rockchip platforms (e.g. RV1106 UVC), it needs to
get the offset in the plane which used for the start of data
in the uvc buffer.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I0144709f33b1d3ca955779be487134901468923f
Add a new helper function to get the offset in the plane
to the start of data for the usb gadget uvc function.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Id2d2c928a531d0272e6241b967fb0deaf3f3e122
For DPTX controller, It may be work abnormal when hsync less
than 32. Filtering the display mode whose hsyncd is less
than 32.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I857b1f7af51f7c04633526ae9239917e75e3e0d0
We now don't wait FIFO status at the end of request but
at the beginning of upcoming request, which is the same way
we did for unbusy check in the past. By doing that, we can
hand out cpu.
Fixes: 6eca689b99 ("mmc: dw_mmc: Workaround for RV1106/1103 sdmmc")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ie5934b49d2babada81cc447763bb8f980b4884ec
The dwc2_queue_transaction() do data transfer for DMA
mode if both the params.host_dma and chan->qh are true.
In a test-case with an otg cable hot plug stress test
in DMA mode, if the chan->qh is NULL, it is possible to
do dwc2_hc_write_packet() which should only be called
in Slave mode and cause a crash:
[ 633.852937] usb 1-1: reset high-speed USB device number 71 using dwc2
[ 633.853115] Unable to handle kernel read from unreadable memory at virtual address 0000000000000000
...
[ 633.974040] Call trace:
[ 633.974289] dwc2_hc_write_packet.isra.6+0xfc/0x128
[ 633.974734] dwc2_queue_transaction+0xc4/0x1f0
[ 633.975142] dwc2_hcd_queue_transactions+0x10c/0x4b8
[ 633.975595] dwc2_release_channel+0x12c/0x2a8
[ 633.975992] dwc2_complete_non_periodic_xfer.isra.5+0x2c/0x48
[ 633.976514] dwc2_hc_xfercomp_intr+0x370/0x488
[ 633.976921] dwc2_hc_n_intr+0x2c8/0x840
[ 633.977282] dwc2_handle_hcd_intr+0x424/0x7e0
[ 633.977677] _dwc2_hcd_irq+0x10/0x18
[ 633.978018] usb_hcd_irq+0x2c/0x48
Change-Id: I33f7976710d6cdceb1b4758655dba7890488585d
Signed-off-by: William Wu <william.wu@rock-chips.com>
The parent clock of sclk_sfc are 500m_300m_200m_24m, so that can't set
sclk_sfc to 118.8MHz.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I71b60000a465c23e88155ac9da95cf046717a6d8
Guarantee that initramfs been mounted until hardware decompress is
completed.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I58fb197040d0c1880e4dd710e99161e19dee26da