use DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE to instead of
DRM_BUS_FLAG_PIXDATA_NEGEDGE.
Fixes: d5272ec9bd ("drm/rockchip: use DRM_BUS_FLAG_PIXDATA_NEGEDGE to identify dclk polarity")
Change-Id: Ifaa376f1d71e77a83096c1e8fd8e1d245fea63d5
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
The DRM_BUS_FLAG_PIXDATA_POSEDGE and DRM_BUS_FLAG_PIXDATA_NEGEDGE macros
and their DRM_BUS_FLAG_SYNC_* counterparts define on which pixel clock
edge data and sync signals are driven. They are however used in some
drivers to define on which pixel clock edge data and sync signals are
sampled, which should usually (but not always) be the opposite edge of
the driving edge. This creates confusion.
Create four new macros for both PIXDATA and SYNC that explicitly state
the driving and sampling edge in their name to remove the confusion. The
driving macros are defined as the opposite of the sampling macros to
made code simpler based on the assumption that the driving and sampling
edges are opposite.
Change-Id: I262d7c66791f5de18042e627b32c64851fcaf1ee
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
(cherry picked from commit a792fa0e21)
This reverts commit 455796818d.
and deal with this issue by following commit:
commit 1f525e2416b3 ("drm/rockchip: reset conn->state->best_encode")
Change-Id: I239296a0a618a3034c6502ca95050dd85da7b5fe
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This reverts commit 4492caa259.
remove rockchip private flag.
use DRM_BUS_FLAG_PIXDATA_NEGEDGE to instead of DRM_MODE_FLAG_PPIXDATA.
Change-Id: I24ce988a84a4a5793f7eb3e26e51293988d854d0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Get rid of devm_* de-initialization call in iep driver,
for devm de-initialization api aren't necessary called
in modules driver.
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
Change-Id: I20f063d1cf30d15087fbf36f57b2d07fe1eff200
1) remove fiq_debugger, exist on rk3399-linux.dtsi
2) update the related vpu node
3) update edp node
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I64f563bd75eb91d252681e6075b52d1715c7b3d4
1.optimize duplicate code
2.modify enable_clk and disable_clk
3.use RK_CRYPTO_PRIORITY instead of magic number 300
Change-Id: I416036c5739dc916e318e1cb3233a44fd0428717
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
1. mpp_free_task is called in several places.
2. The user space wait fails and free session immediately,
while, the ISR thread is still working, then mpp_dma_release
will meet session null.
Call trace:
__ll_sc___cmpxchg_case_acq_8+0x4/0x20
mpp_dma_release+0x1c/0x50
mpp_task_finalize+0x80/0xc8
vepu_free_task+0x14/0x30
mpp_free_task+0x44/0xc0
mpp_taskqueue_pop_running+0xf8/0x100
mpp_task_finish+0x84/0x160
vepu_isr+0x54/0xe0
mpp_dev_isr_sched+0x48/0x98
Change-Id: I315a01d700791fa50dfed67175c77e5d733fe30d
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Fix system crash issue when spi dev has no correct pinctrl handle.
Fixes: 87dbea63d5 ("spi: rockchip: set higher io driver when sclk higher than 24MHz")
Change-Id: I603fe8f74681b576fe7fcd404a386ec2b2c03da4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This patch add the rockchip canfd to the device tree bindings
documentation.
Change-Id: Ief6ffeeda87e28e8b70a706c92eba526e0db0686
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Since wireless-wlan node uses gpio as:
WIFI,host_wake_irq = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
It should allow to disable the node.
Change-Id: I27cc8acbb84025ae5f8e76e4c3e7aee36907729e
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
1. init util_avg of new task to half the util of big core.
2. treat task wait time as busy time.
3. do not put task to the cpu whose max util can not fit the task.
4. boost cpufreq when a task is wakeup.
if prefer powersave, we can disable this optimization by command:
echo 0 > /proc/sys/kernel/sched_performance_bias
Change-Id: I937d1cc2295645a1d044e0735ef575b6507bb752
Signed-off-by: Liang Chen <cl@rock-chips.com>
boost cpufreq for a task if current capacity is not fit for the task.
Change-Id: I85cfeaeb6d8fcface8f6534bb95b5baf3bfc839f
Signed-off-by: Liang Chen <cl@rock-chips.com>
This patch avoids frequent prepare/unprepare the panel, and keep
the current state until the panel is disabled.
Change-Id: I0148ab85779df6ef447796d2f07eb46315813d56
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
The analogix_dp_transfer() will return -EBUSY if num_transferred is zero.
But sometimes we will send a bare address packet to start the transaction,
like drm_dp_i2c_xfer() show:
......
/* Send a bare address packet to start the transaction.
* Zero sized messages specify an address only (bare
* address) transaction.
*/
msg.buffer = NULL;
msg.size = 0;
err = drm_dp_i2c_do_msg(aux, &msg);
......
In this case, the msg->size is zero, so the num_transferred will be zero too.
We can't return -EBUSY here, let's we return num_transferred if num_transferred
equals msg->size.
BUG=chrome-os-partner:57501
TEST="gooftool probe --comps display_panel"
Change-Id: Ie09f26b2c31e2406d21233afd8677337de5e77f2
Signed-off-by: zain wang <wzz@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9569045/)
Reviewed-on: https://chromium-review.googlesource.com/414674
Commit-Ready: Caesar Wang <wxt@rock-chips.com>
Tested-by: 征增 王 <wzz@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
This patch add uevent to notify the application layer when it should
playback or capture and setting the accuration sample rate.
The event consists of three parts, namely USB_STATE, STREAM_DIRECTION
and STREAM_STATE. For example:
g_audio_work: sent uac uevent USB_STATE=SET_INTERFACE STREAM_DIRECTION=IN STREAM_STATE=OFF
g_audio_work: sent uac uevent USB_STATE=SET_INTERFACE STREAM_DIRECTION=OUT STREAM_STATE=ON
g_audio_work: sent uac uevent USB_STATE=SET_SAMPLE_RATE STREAM_DIRECTION=OUT SAMPLE_RATE=44100
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ia01572d92d0c3ae40b19e772571282b8806da9e5
Implement support for multiple sampling rates in the USB Audio gadgets.
A list of sampling rates can be specified via configfs. All enabled
sampling rates are sent to the USB host on request. When the host
selects a sampling rate the internal active rate is updated. The
currently configured rates are exposed through amixer controls. Also on
pcm open from userspace the requested rated is checked against the
currently configured rate of the host.
Link: https://lore.kernel.org/patchwork/patch/805286/
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I43dc28462062c9aa179c2b9c8e7e50c307137874
This replaces the dedicated headers for uac1 and uac2 functions with a
shared header for both of them. Apart from unifying the struct names,
further duplicated code for configfs setup is moved out of the function
files into the shared header.
Link: https://lore.kernel.org/patchwork/patch/805285/
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ie866bd02f174dc91168fe0bc49b571a77d849a42
RV1126 EVB USB gadget maybe used as UVC function which
needs to resize txfifo to improve isoc ep throughput,
so this patch adds "snps,tx-fifo-resize" property to
enable txfifo resize.
Change-Id: I00447fb252a093acb24525b12479f67662d9dfe3
Signed-off-by: William Wu <william.wu@rock-chips.com>
The dwc3 driver sets the mult to 6 and alloc 0x307 * 8 Bytes
for each isoc ep txfifo. It aims to improve isoc ep throughput,
but it's wasteful.
This patch sets the mult to dep->endpoint.mult * 2 for each isoc
ep, it's enough to improve isoc ep throughput, and it can avoid
exceeding the total size of txfifo if multiple isoc eps are used
at the same time.
Change-Id: I01d77d19b85e5f5930ff94ef40714129afe10b54
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch reset the dwc3 controller at the beginning of
probe. Without this patch, it may fail in enumeration phase
if the dwc3 has been initialized and used before kernel.
Typically, we use usb to download image and boot directly
on RV1126 board, it will fail to connect to host with the
following error log:
[2.029506] read descriptors
[2.029597] read strings
[3.038749] dwc3 ffd00000.dwc3: unexpected direction for Data Phase
[3.077445] android_work: did not send uevent (0 0 (null))
[3.282586] vendor storage:20190527 ret = -1
[3.335505] usb0: HOST MAC 16:ba:52:5a:90:28
[3.335566] usb0: MAC 6a:73:d9:da:da:ce
[3.335597] configfs-gadget gadget: uvc_function_bind
[5.052086] dwc3 ffd00000.dwc3: unexpected direction for Data Phase
[5.052431] dwc3 ffd00000.dwc3: unexpected direction for Data Phase
Change-Id: I7eede4685a26cff5fc9460233291757edf18e430
Signed-off-by: William Wu <william.wu@rock-chips.com>
1. before this, the DMC driver use drm_device_get_by_name() to get drm
connector info, now we use rockchip_drm_get_sub_dev_type() to instead of
it.
2. export rockchip drm sub dev functions.
Change-Id: Ief6546d933fbb49e46e6e8d2a99464eb5951e069
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Let configuration start and count be performed at the
same time as much as possible, which can reduce the
interval between the start signal and the data signal,
and can also reduce a start irq.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I529300a083dcd264cc5f25a2069b88601cade83e
The refactoring done as part of adding the core support for handling
waiting for slave transfer dropped a conditional which meant that we
started waiting for completion of all transfers, not just those that the
controller asked for. This caused hangs and massive delays on platforms
that don't need the core delay. Re-add the delay to fix this.
Fixes: 810923f3bf (spi: Deal with slaves that return from transfer_one() unfinished)
Change-Id: I8fe4c6d42bc7c64d9c9b6803d154ec169752283f
Reported-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit d57e79601b)
Some drivers, such as spi-pxa2xx return from the transfer_one callback
immediately, idicating that the transfer will be finished asynchronously.
Normally, spi_transfer_one_message() synchronously waits for the
transfer to finish with wait_for_completion_timeout(). For slaves, we
don't want the transaction to time out as it can complete in a long time
in future. Use wait_for_completion_interruptible() instead.
Change-Id: I166415911f30fc821fca73b0250f6350b835e8c0
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 810923f3bf)
The SPI configuration state includes an SPI_NO_CS flag that disables
all CS line manipulation, for applications that want to manage their
own chip selects. However, this flag is ignored by the GPIO CS code
in the SPI framework.
Correct this omission with a trivial patch.
Change-Id: I75e69b1eb5068357d9abfe8236cfbd2188c626f1
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 25972d0c33)