We enable the Wired Ethernet, analog audio output, HDMI
output, USB ports, SDMMC and video devices.
Change-Id: I184ebc8bd8f2317b1e435939e18bdc014ea487a9
Signed-off-by: Hans Yang <yhx@rock-chips.com>
Signed-off-by: ayaka <ayaka@soulik.info>
Interrupts with the IRQF_FORCE_RESUME flag set have also the
IRQF_NO_SUSPEND flag set. They are not disabled in the suspend path, but
must be forcefully resumed. That's used by XEN to keep IPIs enabled beyond
the suspension of device irqs. Force resume works by pretending that the
interrupt was disabled and then calling __irq_enable().
Incrementing the disabled depth counter was enough to do that, but with the
recent changes which use state flags to avoid unnecessary hardware access,
this is not longer sufficient. If the state flags are not set, then the
hardware callbacks are not invoked and the interrupt line stays disabled in
"hardware".
Set the disabled and masked state when pretending that an interrupt got
disabled by suspend.
Fixes: bf22ff45be ("genirq: Avoid unnecessary low level irq function calls")
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: xen-devel@lists.xenproject.org
Cc: boris.ostrovsky@oracle.com
Link: http://lkml.kernel.org/r/20170717174703.4603-2-jgross@suse.com
(cherry picked from commit a696712c3d)
Conflicts:
kernel/irq/internals.h
[due to missing upstream patch: b354286eff irq: Privatize irq_common_data::state_use_accessors]
Change-Id: I94d230ff1a7ccac1234432384685b5ef9d116b0a
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Shared interrupts do not go well with disabling auto enable:
1) The sharing interrupt might request it while it's still disabled and
then wait for interrupts forever.
2) The interrupt might have been requested by the driver sharing the line
before IRQ_NOAUTOEN has been set. So the driver which expects that
disabled state after calling request_irq() will not get what it wants.
Even worse, when it calls enable_irq() later, it will trigger the
unbalanced enable_irq() warning.
Reported-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: dianders@chromium.org
Cc: jeffy <jeffy.chen@rock-chips.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: tfiga@chromium.org
Link: http://lkml.kernel.org/r/20170531100212.210682135@linutronix.de
(cherry picked from commit 04c848d398)
Change-Id: I89711656f22e15697c76a4dcb9c60c8b0c8052d2
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
If an interrupt is marked NOAUTOEN then request_irq() installs the action,
but does not enable the interrupt via startup_irq(). The interrupt is
enabled via enable_irq() later from the driver. enable_irq() calls
irq_enable().
That means that for interrupts which have a irq_startup() callback this
callback is never invoked. Neither is irq_domain_activate_irq() invoked for
such interrupts.
If an interrupt depends on irq_startup() or irq_domain_activate_irq() then
the enable via irq_enable() is not enough.
Add a status flag IRQD_IRQ_STARTED_UP and use this to select the proper
mechanism in enable_irq(). Use the flag also to avoid pointless calls into
the low level functions.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: dianders@chromium.org
Cc: jeffy <jeffy.chen@rock-chips.com>
Cc: Brian Norris <briannorris@chromium.org>
Cc: tfiga@chromium.org
Link: http://lkml.kernel.org/r/20170531100212.130986205@linutronix.de
(cherry picked from commit 201d7f47f3)
Conflicts:
include/linux/irq.h
[due to missing upstream patches:
08d85f3 irqdomain: Avoid activating interrupts more than once
1a3d28a UPSTREAM: genirq: Introduce IRQD_AFFINITY_MANAGED flag
6297714 UPSTREAM: irq: Privatize irq_common_data::state_use_accessors]
Change-Id: Ie8d492c694171fa81e3df61e8561bec160ad37bb
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
enable CONFIG_ROCKCHIP_MPP_SERVICE and CONFIG_ROCKCHIP_MPP_DEVICE
of rockchip_defconfig for encoder.
Change-Id: I30069af7af82f6731f322c4b93e3a7c6009e8434
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
1.when release buffer should call vpu_iommu_clear function.
2.before call vpu_iommu_clear that we should call
vpu_drm_unmap_iommu&vpu_drm_free if there is through
vpu_drm_alloc to allocate buffer.
Change-Id: I01e7fac88c6da40e8cb4ee2199dd38283323783b
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
The test results indicate that larger transfers improve
mtp read/write speeds. The Tx/Rx request transfer length
is now 16K bytes. Increase the Tx/Rx transfer length from
16K to 64K to get good throughputs.
For USB DWC3 controller, you can try to increase the
Tx/Rx transfer length from 16K to 1MB to get better
throughputs.
Change-Id: If5ac41685acdc9b9d2db7f7f79e183e3dff7b558
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch backport from https://android.googlesource.com/kernel/msm
android-msm-wahoo-4.4-oreo-mr1
commit 79dc83a8cb933b8f0d746169961347a54c530ef1
This change captures time taken by each vfs_read() and vfs_write() call
made from USB MTP gadget driver where data size is equal to USB request
buffer size. It provides debugfs entry to get this information for 100
such call and resetting the same.
How-To use:
To get stats:
cat /sys/kernel/debug/usb_mtp/status
To reset stats:
echo 0 > /sys/kernel/debug/usb_mtp/status
Change-Id: Iade04950d1dce936fc1f88387da5e4fa74cd30df
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This patch backport from https://android.googlesource.com/kernel/msm
android-msm-wahoo-4.4-oreo-mr1
commit 1f6b38f5293cfd619adcfac152e6d32ba6b40023
The Tx request transfer length is 16K bytes by default. The test
results indicate that larger transfers improve read speeds. Add
provision for specifying Tx transfer length at runtime.
echo 1048576 > /sys/module/usb_f_mtp/parameters/mtp_tx_req_len
The above command can be used to set Tx transfer length to 1MB. If
the memory allocation is failed, fallback to the default length.
Also add provision for specifying no. of Tx requests at runtime.
echo 8 > /sys/module/usb_f_mtp/parameters/mtp_tx_reqs
Change-Id: I9aa2210e145310ba79e79d353688a46c877ecb6b
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch backport from https://android.googlesource.com/kernel/msm
android-msm-wahoo-4.4-oreo-mr1
commit 1bb8887af8b525e68d9c9e7c828836a3d17ab0b3
The Rx request transfer length is 16K bytes by default. The test
results indicate that larger transfers improve write speeds. Add
provision for specifying Rx transfer length at runtime.
echo 1048576 > /sys/module/usb_f_mtp/parameters/mtp_rx_req_len
The above command can be used to set Rx transfer length to 1MB. If
the memory allocation is failed, fallback to the default length.
Change-Id: If5a7d4a167ec4a9e080fcd10caa95884d765a3b6
Signed-off-by: William Wu <william.wu@rock-chips.com>
It looks like should add gpio base in the gpiolib instead of
each gpio or pinctrl driver, and base defined in the gpio.h.
If the definition of base is 0, then it is the same as the
original, now the definition of base is 1000.
The dynamic assignment of a range of valid GPIOs should be
also from the defined base.
Change-Id: I636bc71a5ba078fd5e1bc9a476cdcf942aa8010a
Signed-off-by: David Wu <david.wu@rock-chips.com>
if not add HDMI_SWITCH node, h_5V will be disabled when resume
Change-Id: I06349a4e1f8c6caabaaa93f95db92ae514957d48
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Some nodes are always used for android, so we move them to android.dtsi.
Change-Id: Ifc5ef68dd00f14a0faec4a24998feef6dc592d5e
Signed-off-by: Liang Chen <cl@rock-chips.com>
Per listen(fd, backlog) rules, there is really no point accepting a SYN,
sending a SYNACK, and dropping the following ACK packet if accept queue
is full, because application is not draining accept queue fast enough.
This behavior is fooling TCP clients that believe they established a
flow, while there is nothing at server side. They might then send about
10 MSS (if using IW10) that will be dropped anyway while server is under
stress.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5ea8ea2cb7)
Backport for pass Android CTS CtsLibcoreTestCases:
libcore.javax.net.ServerSocketFactoryTest#testCreateServerSocketWithPortNoBacklog
Refer the comments on libcore/luni/src/test/java/libcore/javax/net/ServerSocketFactoryTest.java
// This test may fail on kernel versions between 4.4 and 4.9, due to a kernel implementation
// detail change. Backporting the following kernel change will fix the behavior.
// http://b/31960002
// https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5ea8ea2cb7f1d0db15762c9b0bb9e7330425a071
public void testCreateServerSocketWithPortNoBacklog() throws IOException {
ServerSocket serverSocket = ServerSocketFactory.getDefault().createServerSocket(0, 1);
testSocket(serverSocket, 1);
}
Change-Id: I9bb3531480f4942447d8d4eded110aa31bc7c031
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
RK618 provides a complete set of display interface to support
very flexible applications as follows:
- 2 RGB display input interface with double data rate
- 1 LVDS display output interface with double channels
- 1 MIPI display output interface with 4 data lanes
- 1 HDMI display output interface
- 1 RGB display output interface shared with LVDS
- 1 RGB display output interface shared with RGB display input interface
VIF is used to LCDC SDR/DDR timing reconstruction.
SCALER is a synchronous parallel RGB frame converter for different
resolution. It is used to realize dual display function from
one display source. It can be used like VIF for LCDC SDR timing
reconstruction only.
DITHER is used for converting 24bit RGB888 to 18bit RGB666 with FRC
dither down.
Change-Id: I5b25e64c283bd84f85d7d7686bee6d940df44910
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
RK618 is a partner chip for Rockchip mobile application processor.
RK618 includes two RGB display input interface with double data rate.
With the internal MUX function, it can output 1080P HDMI signal to
TV and output RGB/LVDS/MIPI signal to TFT panel. In this case, RK618
can support dual panel (TV and TFT) display.
RK618 includes a audio codec, which with two I2S/PCM interface, two
differential microphone input and audio processing function.
Change-Id: Id18c251cbe1613de98e84c2b022826f85b3dd82b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
The dsp_stx and dsp_sty of plane should use crtc_ variables
in adjusted_mode, which is the actual mode we give to hw.
Change-Id: I83199c80604e076f0b91559bff18e1da3783523f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
enable CX20810, ROTARY_ENCODER and led configs for echo.
Change-Id: Ie12a2a45bcfd21c8d65e8603d9b7163f0b56067b
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
User space function driver could always provide descriptors for all
speeds irrespective of USB speed supported with USB gadget. If USB
gadget is not high/super speed capable, f_fs driver doesn't parse
HS or SS descriptors which results into OS descriptors processing
fail due to checking against wrong offset within received descriptor
buffer. Fix this issue by always processing HS and SS descriptors
without checking USB gadget speed.
Change-Id: I3b2ad8a4447c06a4302f0ef2c6759cb3f0c09cbd
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://android.googlesource.com/kernel/msm android-msm-wahoo-4.4-oreo-dr1
commit 362a9cd1380e16a963c20d453ae14ee3611f3f21)
If c->cdev->use_os_string flag is not set,
don't need to invoke ffs_do_os_descs() in _ffs_func_bind.
So uninitialized ext_compat_id pointer won't be accessed by
__ffs_func_bind_do_os_desc to cause kernel panic.
Change-Id: I7b04774e7bc69ce77e4cffc463d6335bb4bd64e8
Signed-off-by: Jim Lin <jilin@nvidia.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 c6010c8b4d)