Commit Graph

605580 Commits

Author SHA1 Message Date
Algea Cao
1d5f47929f UPSTREAM: [media] cec: add MEDIA_CEC_RC config option
Add an explicit config option to select whether the CEC remote control
messages are to be passed on to the RC subsystem or not.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 5f2c467c54)

Change-Id: I4cb7e4618b4ee1504a6bdcb18821e3d5fe1358b3
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
2fc08ce2e5 UPSTREAM: [media] cec.h: merge cec-edid.h into cec.h
Drop the separate cec-edid.h header and merge it into cec.h.

There was really no need to have a separate header for this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit ee7e987133)

Change-Id: Idf14df419f4663f24bcbb2de3603498651a469d4
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
d9b22827d2 UPSTREAM: [media] cec: Kconfig cleanup
The Kconfig options for the CEC subsystem were a bit messy. In
addition there were two cec sources (cec-edid.c and cec-notifier.c)
that were outside of the media/cec directory, which was weird.

Move those sources to media/cec as well.

The cec-edid and cec-notifier functionality is now part of the cec
module and these are no longer separate modules.

Also remove the MEDIA_CEC_EDID config option and include it with the
main CEC config option (which defined CEC_EDID anyway).

Added static inlines to cec-edid.h for dummy functions when CEC_CORE
isn't defined.

CEC drivers should now depend on CEC_CORE.

CEC drivers that need the cec-notifier functionality must explicitly
select CEC_NOTIFIER.

The s5p-cec and stih-cec drivers depended on VIDEO_DEV instead of
CEC_CORE, fix that as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 56a263aaa0)

Change-Id: I3c83c4d1aea534c2e8163422c73c8bc276f20f8f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
f43408f55b UPSTREAM: [media] media: add CEC notifier support
Add support for CEC notifiers, which is used to convey CEC physical address
information from video drivers to their CEC counterpart driver(s).

Based on an earlier version from Russell King:

https://patchwork.kernel.org/patch/9277043/

The cec_notifier is a reference counted object containing the CEC physical address
state of a video device.

When a new notifier is registered the current state will be reported to
that notifier at registration time.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 6917a7b774)

Change-Id: I048f69ccbf5c1de2f856a6820653d8bfc8455e11
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
a64f77345e UPSTREAM: [media] cec: fix confusing CEC_CAP_RC and
IS_REACHABLE(CONFIG_RC_CORE) code

It is a bit confusing how CEC_CAP_RC and IS_REACHABLE(CONFIG_RC_CORE)
interact. By stripping CEC_CAP_RC at the beginning rather than after #else
it should be a bit clearer what is going on.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit ee044f5be1)

Change-Id: I3d8e0a6bff707608c74464f770dc883aaeaea081
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
0b94cbd6eb UPSTREAM: [media] cec: Fix runtime BUG when (CONFIG_RC_CORE && !CEC_CAP_RC)
Currently when the RC Core is enabled (reachable) core code located
in cec_register_adapter() attempts to populate the RC structure with
a pointer to the 'parent' passed in by the caller.

Unfortunately if the caller did not specify RC capability when calling
cec_allocate_adapter(), then there will be no RC structure to populate.

This causes a "NULL pointer dereference" error.

Fixes: f51e80804f ("[media] cec: pass parent device in register(), not allocate()")

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: <stable@vger.kernel.org>      # for v4.10 and up
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 43c0c03961)

Change-Id: I8c8b267a8868e248cf673e168a9cdc4391f5b172
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
023a89d7eb UPSTREAM: [media] cec: integrate CEC notifier support
Support the CEC notifier framework, simplifying drivers that
depend on this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit e3a93adcc4)

Change-Id: I0e12ec8a9a0f98c6ff0b322dedaca7d37c557810
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
878dd7ae1d UPSTREAM: [media] cec: don't Feature Abort msgs from Unregistered
Feature Abort shouldn't be sent in reply to messages from Unregistered,
since that would make it a broadcast message.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit a8e97e531a)

Change-Id: Id02046545b95d6e08745aa1093cadac4212745b9
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
1e96ffb46b UPSTREAM: [media] cec: log reason for returning -EINVAL
When validating the struct cec_s_log_addrs input a debug message is printed
for all except two of the 'return -EINVAL' paths.

Also log the reason for the missing two paths.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

Change-Id: I0f8017675671b20005b2a4a723e4e80b428aa39e
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
7f088f28b9 UPSTREAM: [media] cec: improve cec_transmit_msg_fh logging
Several error paths didn't log why an error was returned. Add this.

Also handle the corner case of "adapter is unconfigured AND the message
is from Unregistered to TV AND reply is non-zero" separately and return
EINVAL in that case, since it really is an invalid value and not an
unconfigured CEC device.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 25c2107896)

Change-Id: Ief000a37ccab5cc2936abd9d10dd14871737fc47
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
8439ac7324 UPSTREAM: [media] cec: use __func__ in log messages
The hardcoded function name is actually wrong. Use __func__ inste

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 5a137df1d6)

Change-Id: Ic214ebc4f821e409df327c4d7f611404ab9861a0
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
056d85e5ab UPSTREAM: [media] cec: return -EPERM when no LAs are configured
The CEC_TRANSMIT ioctl now returns -EPERM if an attempt is made to
transmit a message for an unconfigured adapter (i.e. userspace
never called CEC_ADAP_S_LOG_ADDRS).

This differentiates this case from when LAs are configured, but no
physical address is set. In that case -ENONET is returned.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 059d1460ca)

Change-Id: I84a80862ee751da109d617cc264aed6e92911432
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
7dcba3622c UPSTREAM: [media] cec: allow specific messages even when unconfigured
The CEC specifications explicitly allows you to send poll messages and
Image/Text View On messages to a TV, even when unconfigured (i.e. there is
no hotplug signal detected). Some TVs will pull the HPD low when switching
to another input, or when going into standby, but CEC should still be
allowed to wake up such a display.

Add support for sending messages with initiator 0xf (Unregistered) and
destination 0 (TV) when no physical address is present.

This also required another change: the CEC adapter has to stay enabled as
long as 1) the CEC device is configured or 2) at least one filehandle is open
for the CEC device.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 533a3f7bc7)

Change-Id: Icf95c1aa5f48ea7989792b88cd1e47373fda2b08
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:38:53 +08:00
Algea Cao
837ec24cb1 UPSTREAM: [media] cec: improve flushing queue
When the adapter is unloaded or unconfigured, then all transmits and
pending waits should be flushed.

Move this code into its own function and improve the code that cancels
delayed work to avoid having to unlock adap->lock.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit b39f93efc6)

Change-Id: Idc609583c55cba910b215ac3fe127583510ee08c
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:34:53 +08:00
Zheng Yang
064184ce17 drm/rockchip: dw-hdmi: fix 3328/3228 phy bus width
If HDMI output corlor mode is YCbCr422, the tmds clock is same
to YCbCr444 8bit, phy bus width should be set to 8.

Change-Id: I6e844e676a6315ae0cb88b0bd8456f0e27fa5e0c
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-27 16:34:05 +08:00
Jung Zhao
709d83e7f2 video: rockchip: vpu: fix set power idle failed
when vpu reset, sometimes will failed when set power domain
idle

Change-Id: I38185cce616adb41e698b0c95793934abbd51f62
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-12-27 15:47:31 +08:00
Jung Zhao
d52672c955 video: rockchip: vpu: add iova remap when page fault
fix bugs:
1. 3328 play H.264 and H.265 will crash

Change-Id: I6f7b85b957a3838c5e14e12e48bcf8668a28bd22
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-12-27 15:47:08 +08:00
Jung Zhao
e2c56b719b video: rockchip: vpu: transplant power ops from kernel 3.10
Change-Id: I7aa29819ab33d5ce676751fe74edec947d5cc895
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-12-27 15:45:52 +08:00
Jung Zhao
b359b5f287 video: rockchip: vpu: add alloc function
Change-Id: I61a3f556bf1aee5bac92b10eb4a9b7a2c6367178
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-12-27 15:45:29 +08:00
Zhaoyifeng
fa6d15fc93 drivers: rk_nand: add ftl code for Thumb instruction set
Add ftl code for kernel which compiled with thumb instruction set.

Change-Id: I1213b7332612978d836b7ac34d019a586d087ec6
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2017-12-27 11:32:00 +08:00
Weiguo Hu
5a2a3e0b1a arm64: dts: rockchip: rk3368-r88: add ext_gmac clock
Change-Id: I3eb9ac9abe361762d3d789192c400c3c7abb7f6d
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
2017-12-27 11:29:28 +08:00
Rocky Hao
e422847701 PM / devfreq: rockchip_dmc: add thermal control support
add rockchip_dmc as a cooling device in thermal control

Change-Id: Iefb046a104eb2205f2ef17dd80bb31fd75b42c90
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-12-26 19:46:01 +08:00
Finley Xiao
a993bfaf1a arm64: dts: rk3328: Add rkvdec_opp_table
Change-Id: I096e337f1c62f7ed18e760ea2ea93860199bfbc6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-12-26 19:10:49 +08:00
Jung Zhao
6ab0a1be93 arm64: dts: rockchip: rk3328: modify rkvdec compatible
Change-Id: Icdaeb0d05e546c34e43a000aaa8a51f5e2e6a9fe
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-12-26 18:32:26 +08:00
Xinhuang Li
0ca3fd7dab ASoC: codecs: rk3328: add capture support
Change-Id: I275c50d9ba1faf15d8276c0415ac7a7aaff98b92
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-12-26 18:25:58 +08:00
ayaka
e475de8d63 arm64: dts: rockchip: add rk3328-rock64 support
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>
2017-12-26 16:02:47 +08:00
xuhuicong
4f379e1892 drm/rockchip: inno_hdmi: add rk3128 hdmi support
Change-Id: I929880020f4a72e61d21b7af4d73a98da337b10b
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2017-12-26 15:37:38 +08:00
Thomas Meyer
9064923799 UPSTREAM: drm/rockchip: Cocci spatch "vma_pages"
Use vma_pages function on vma object instead of explicit computation.
Found by coccinelle spatch "api/vma_pages.cocci"

Change-Id: Ib6158ac90566f57a23127283d9462306817599b8
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1505946334393-988165015-7-diffsplit-thomas@m3y3r.de
(cherry picked from commit f2a44dd023)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-12-26 14:59:05 +08:00
Juergen Gross
e41d630c8c UPSTREAM: genirq/PM: Properly pretend disabled state when force resuming interrupts
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>
2017-12-26 11:12:46 +08:00
Jeffy Chen
ff9c8bc3f8 UPSTREAM: genirq: Avoid unnecessary low level irq function calls
Check irq state in enable/disable/unmask/mask_irq to avoid unnecessary
low level irq function calls.

This has two advantages:
    - Conditionals are faster than hardware access

    - Solves issues with the underlying refcounting of the pinctrl
      infrastructure

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: tfiga@chromium.org
Cc: briannorris@chromium.org
Cc: dianders@chromium.org
Link: http://lkml.kernel.org/r/1498476814-12563-2-git-send-email-jeffy.chen@rock-chips.com
(cherry picked from commit bf22ff45be)

Change-Id: Ie70a49de0b177e48b44e725432ff7199d40adf47
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2017-12-26 11:12:46 +08:00
Jeffy Chen
52e28f129e UPSTREAM: genirq: Set irq masked state when initializing irq_desc
The irq default state is set to disabled when allocating irq desc, but the
masked state flag is not set. This is inconsistent vs. the state tracking
logic which is used to prevent unnecessary calls to hardware level irq chip
functions.

Set the masked state flag as well.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: tfiga@chromium.org
Cc: briannorris@chromium.org
Cc: dianders@chromium.org
Link: http://lkml.kernel.org/r/1498476814-12563-1-git-send-email-jeffy.chen@rock-chips.com

(cherry picked from commit d829b8fb24)

Change-Id: I3db59a2afcb00a50019d14a29ff60f62644f96ec
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2017-12-26 11:12:46 +08:00
Thomas Gleixner
409596462a UPSTREAM: genirq: Warn when IRQ_NOAUTOEN is used with shared interrupts
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>
2017-12-26 11:12:46 +08:00
Thomas Gleixner
255ba9587f UPSTREAM: genirq: Handle NOAUTOEN interrupt setup proper
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>
2017-12-26 11:12:46 +08:00
Rimon Xu
abb8938259 arm64: dts: rockchip: modify secure memory address for rk3399-android
Change-Id: Id0d7bf64748ccd104d36c3c2f7045e57d54d8ffd
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2017-12-22 17:46:02 +08:00
Rimon Xu
e938aa387f arm64: rockchip_defconfig: select mpp device and service
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>
2017-12-22 17:35:45 +08:00
Xinhuang Li
8486a3deec driver: video: rockchip: fix the memory leak of the encoder
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>
2017-12-22 17:33:36 +08:00
Xinhuang Li
aefc44dabb arm64: dts: rk3328-evb-android: enable iep and iep_mmu
Change-Id: Icf8b743d8b9f2b8d0a78c65e768b51e292ca69c3
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-12-22 17:32:30 +08:00
Xinhuang Li
c3b1417ef4 arm64: dts: rockchip: rk3328: add iep and iep_mmu node
Change-Id: I503c8e1e24240b20bc47a3e14591a27a756b950e
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-12-22 17:32:30 +08:00
William Wu
8bc55ddcea ANDROID: usb: gadget: f_mtp: increase default Tx/Rx buf size to 64K
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>
2017-12-22 17:27:40 +08:00
William Wu
3957ac7db1 ANDROID: usb: gadget: f_mtp: capture time taken with vfs_write/read
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>
2017-12-22 17:25:43 +08:00
William Wu
c69da395b4 ANDROID: usb: gadget: f_mtp: add module parameters for Tx transfer length
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>
2017-12-22 17:21:42 +08:00
William Wu
8f30a31be3 ANDROID: usb: gadget: f_mtp: add module parameter for Rx transfer length
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>
2017-12-22 17:20:55 +08:00
XiaoDong Huang
e9fbb2f883 firmware: rockchip_sip: add sip_smc_vpu_reset
Change-Id: Ib3e1a8b957bc164b8c4cca821d8ea89ee2e1ac9d
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2017-12-22 16:58:14 +08:00
David Wu
545abf2ec4 gpio: rockchip: Make the gpio base added at gpiolib
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>
2017-12-22 16:08:01 +08:00
Zhang Yunlong
18cb8e2d64 camera: rockchip: cif: modify sensor register setting
1.mirror gc2145.
2.fix gc2145&gc0329 frame rates.

Change-Id: If4b0c8f11f30a3ae82bb530df7a5964a612542f5
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2017-12-22 12:09:43 +08:00
Wyon Bi
7563c28f83 arm64: dts: rockchip: rk3366: Add rockchip,grf property to mipi-dphy node
Change-Id: If986025b4e097d2d79a136cabe2ff62dd51ad39f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-12-22 09:36:03 +08:00
Wyon Bi
33b6b46c7e ARM: dts: rockchip: rk312x: Add rockchip,grf property to mipi-dphy node
Change-Id: Ia1c5ca2cbd38735b3ade3522b3d10ee49bf7d3ee
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-12-22 09:35:53 +08:00
Zhang Yunlong
9d9ed22a0c arm: dts: rockchip: rk3126-m708-cif-sensor: change gc2145 orientation
Change-Id: If31ece66cfc0c1d6bb49bd9f28ca46bf390b8375
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2017-12-22 09:35:01 +08:00
Shunqing Chen
d285744e02 arm64: dts: rockchip: rk3368-p9: add HDMI_SWITCH regulator
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>
2017-12-21 11:26:12 +08:00
Liang Chen
98e61fb89c arm64: dts: rockchip: rk3328-evb-android: move some common nodes to dtsi
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>
2017-12-21 11:02:15 +08:00