Commit Graph

847749 Commits

Author SHA1 Message Date
Cai YiWei
87184fa353 media: rockchip: isp: rkisp1 rename to rkisp
Change-Id: I7fc332d314a19e09f4e2e8a81ee18fb61b41ee16
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-01-02 13:01:59 +08:00
Sylwester Nawrocki
f851cf76f7 UPSTREAM: clk: Add devm_clk_bulk_get_optional() function
Add managed version of the clk_bulk_get_optional() helper function.

Change-Id: I5071157cbe305a4c512a4fff095e11abd3bb7150
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
[sboyd@kernel.org: Mark __devm_clk_bulk_get() static]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
(cherry picked from commit 9bd5ef0bd8)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-12-31 15:41:35 +08:00
Phil Edworthy
6bb407d3fc UPSTREAM: clk: Add (devm_)clk_get_optional() functions
This adds clk_get_optional() and devm_clk_get_optional() functions to get
optional clocks.

They behave the same as (devm_)clk_get() except where there is no clock
producer. In this case, instead of returning -ENOENT, the function
returns NULL. This makes error checking simpler and allows
clk_prepare_enable, etc to be called on the returned reference
without additional checks.

Change-Id: I3d4fa031f94c313f836712d8c3d8177c9eb3f06a
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Russell King <linux@armlinux.org.uk>
[sboyd@kernel.org: Document in devres.txt]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
(cherry picked from commit 60b8f0ddf1)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-12-31 15:41:32 +08:00
Dong Aisheng
836f0eb819 UPSTREAM: clk: add managed version of clk_bulk_get_all
This patch introduces the managed version of clk_bulk_get_all.

Change-Id: If39d1c0c9ef5f68d7433cf9f966894b3669a626c
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
(cherry picked from commit f08c2e2865)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-12-31 15:41:28 +08:00
Bjorn Andersson
40e14357fa UPSTREAM: clk: Make clk_bulk_get_all() return a valid "id"
The adreno driver expects the "id" field of the returned clk_bulk_data
to be filled in with strings from the clock-names property.

But due to the use of kmalloc_array() in of_clk_bulk_get_all() it
receives a list of bogus pointers instead.

Zero-initialize the "id" field and attempt to populate with strings from
the clock-names property to resolve both these issues.

Change-Id: I6d32388f8cd61b02b99f3c5a4aebb866958415eb
Fixes: 616e45df7c ("clk: add new APIs to operate on all available clocks")
Fixes: 8e3e791d20 ("drm/msm: Use generic bulk clock function")
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Cc: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lkml.kernel.org/r/20190913024029.2640-1-bjorn.andersson@linaro.org
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
(cherry picked from commit 7f81c24265)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-12-31 15:41:25 +08:00
Sylwester Nawrocki
895be97f13 UPSTREAM: clk: Add clk_bulk_get_optional() function
clk_bulk_get_optional() allows to get a group of clocks where one
or more is optional.  For a not available clock, e.g. not specifed
in the clock consumer node in DT, its respective struct clk pointer
will be NULL.  This allows for operating on a group of returned
clocks (struct clk_bulk_data array) with existing clk_bulk* APIs.

Change-Id: Ia706f1a64515e1c4c6fcbba992da7cee4ed8fe9c
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
(cherry picked from commit 2f25528e4e)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-12-31 15:41:22 +08:00
Dong Aisheng
0391bd5cfa UPSTREAM: clk: add new APIs to operate on all available clocks
This patch introduces of_clk_bulk_get_all and clk_bulk_x_all APIs
to users who just want to handle all available clocks from device tree
without need to know the detailed clock information likes clock numbers
and names. This is useful in writing some generic drivers to handle clock
part.

Change-Id: I5838d4a3ca806ef487a4d8a7d5bab60018e219a2
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
(cherry picked from commit 616e45df7c)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-12-31 15:41:17 +08:00
Dong Aisheng
634b160924 UPSTREAM: clk: bulk: add of_clk_bulk_get()
'clock-names' property is optional in DT, so of_clk_bulk_get() is
introduced here to handle this for DT users without 'clock-names'
specified. Later clk_bulk_get_all() will be implemented on top of
it and this API will be kept private until someone proves they need
it because they don't have a struct device pointer.

Change-Id: I2f34ce58a0bc6d70305121dea308f4f34ce0fc2f
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Russell King <linux@arm.linux.org.uk>
Reported-by: Shawn Guo <shawnguo@kernel.org>
Tested-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
(cherry picked from commit cfdc0411cf)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-12-31 15:40:54 +08:00
Caesar Wang
6133c61641 ARM: dts: rockchip: fixes the pwm-cells of pwm3 on rk3288 SoCs
Since the rk3288 used the v2 in pwm-rockchip.c that supported the pwm's
polarity.

So the pwm-cells should be 3.

Change-Id: I68c70bdeefd03ce11559abbd597c5b466a20a8c1
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-12-31 15:16:53 +08:00
Liang Chen
74cde84a4b cpufreq: dt-platdev: Add rk3399pro project into blacklist
Change-Id: I71a99c5fd5bc545024281f4a4ff931e5922d2274
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-12-31 11:59:46 +08:00
William Wu
97251146d2 usb: dwc3: remove rockchip specific glue layer
This patch drops the rockchip specific glue layer which
was used for RK3399 and RK1808. Because the DWC3 Core
has supported the drd perfectly, so we just used the
generic glue layer for most of Rockchip SoCs integrated
DWC3 controller except RK3328/RK3228H.

Change-Id: Ie88f3c06bd8fec5bb7137581519c3a2cbc40e040
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-12-30 20:14:58 +08:00
Jianing Ren
e992095cb8 arm64: dts: rockchip: disable regulator of usbnet for rk3399-evb-ind
RK3399 EVB-IND Android10 SDK does not need usbnet, so we should close the
regulator of usbnet. However, regulator-always-off is not a correct
property of dts which can lead to xhci die and PM suspend fail.

Change-Id: I8e0ceafd8ee92d78724f423aecb769591716c017
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-12-30 17:50:13 +08:00
Jianing Ren
c9b15ba1eb usb: dwc3: core: prevent re-enumeration in host mode
To prevent re-enumeration, we should let PD of dwc3 always on and avoid
reset of dwc3.

However, if we run phy_power_on for u3phy without reset of dwc3, the
operation will failed with error code -110. Therefore, we add another
phy_power_on operation for u3phy when current_dr_mode is host mode.

Change-Id: I92f31de170c7d3d1d8da1d196103763b0cade05b
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-12-30 17:50:13 +08:00
Jianing Ren
966da4dbac arm64: dts: rockchip: move resets to the subnode of dwc3 for rk3399
The dwc3 reset operation has been moved to the dwc3/core.c, so we apply
this patch to make the reset operation effective.

Change-Id: I0eb8fb7b4cd1c167fa4c69b177b4a8b6dfe26ef8
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-12-30 17:50:13 +08:00
Jianing Ren
bb4c791a42 usb: dwc3: core: add pm runtime for drd mode
In kernel 4.4, we use the extcon notification function in dwc3-rockchip.c
to perform the drd mode switch. Kernel 4.19 implements the same
functionality in drd.c and writes the extcon notification function in
core.c. We use the upstream code implementation process and add runtime
suspend and resume.

Change-Id: I934559f77d2d6b0d3e7a7c09b829d679e7b3dc27
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-12-30 17:50:04 +08:00
Wu Liangqing
0041c9c328 arm64: dts: rockchip: rk3399-evb-ind: update lpddr4 dvfs config
Change-Id: I2dd040fdb78facf0384007a8651e85919f799c63
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-12-30 08:51:44 +08:00
Liang Chen
e8d786bfa7 cpufreq: interactive: fix bug: do not set pcpu->policy to NULL
Speedchange_task will access pcpu->policy randomly, and the policy
will never be free, so just keep pcpu->policy will be ok even the
governor is stopped.

Fixes: a4524d29de ("cpufreq: interactive: fix race between input event and governor exit")
Change-Id: Icac24a866c6f1aa57fe147396729b02c80798f2e
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-12-26 21:35:21 +08:00
Ding Wei
268a2edd22 video: rockchip: mpp: rename mpp_dma_session *session
Cause the name of struct mpp_dma_session *session and
the name of struct mpp_session *session, have the same pointer
name, and will be easily mistaken.

Change-Id: I0c50bd1834bcb7c0a59ab6e6fc4bc1136f8a42b7
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-12-25 16:51:26 +08:00
Shawn Lin
10d79711b6 ARM: rockchip_defconfig: enable IOSCHED_BFQ
+CONFIG_IOSCHED_BFQ=y
+CONFIG_BFQ_GROUP_IOSCHED=y

For better app launch time when MTP background copy.
		adobe            aiqiyi        facebook
mq-deadline     12s299ms        1m12s382ms     2m31s691ms
bfq             1s389ms         3s492ms	       1s933ms

Change-Id: I449ba410efe09cfaef2598c853fe1c7b6e53dbf4
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-12-25 11:14:16 +08:00
Shawn Lin
3321594c8b arm64: rockchip_defconfig: enable IOSCHED_BFQ
+CONFIG_IOSCHED_BFQ=y
+CONFIG_BFQ_GROUP_IOSCHED=y

For better app launch time when MTP background copy.
                   adobe            aiqiyi        facebook
mq-deadline     12s299ms        1m12s382ms      2m31s691ms
bfq              1s389ms           3s492ms         1s933ms

Change-Id: I9dc269d6c677ffbfb5579925dce8ca2073c26979
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-12-25 10:49:10 +08:00
Jianqun Xu
17e3f1a210 arm64: dts: rockchip: fix rk3399-evb compile error
Fixes: a25827902c ("arm64: dts: rockchip: remove adc-keys from rk3399-android.dtsi")
Change-Id: I8af0e9c747a7dff18005287141da2213dcfe2ebf
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-12-25 08:49:08 +08:00
Wyon Bi
bb34dd00f4 drm/panel: simple: support positive/negative driven supply
Change-Id: I0f100f4f6fef67996edbcaa5d24d02ba38c38124
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-12-24 08:29:42 +08:00
Wyon Bi
a406dddaf9 arm64: rockchip_defconfig: enable CONFIG_REGULATOR_TPS65132
Enable TPS65132 regulator driver to support dual output power
supply used in LCD panels for RK3399 M series tablet board.

Change-Id: I8f1c03cc8c99423216da79efdaed23d96ab4c0c2
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-12-24 08:29:14 +08:00
Wyon Bi
39f9a56d0c regulator: tps65132: Set the enable GPIO direction to output
Change-Id: Iceb67b1ec77531cda2929c0e9b6791a5baef3f4c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-12-23 19:51:58 +08:00
Guido Günther
6254a0ce21 UPSTREAM: regulator: tps65132: Stop parsing DT when gpio is not found
In case of a missing (optional) gpio don't fall through up to
"ti,active-discharge-time-us" due to
devm_fwnode_get_index_gpiod_from_child() returning NULL (since
gpiod_get_from_of_node() returned NULL) but rather indicate success as
intended.

This makes the driver probe correctly when e.g. only the enable gpio is
given.

Change-Id: Ic01e5b2ab058d9b34b4ffabb22d494a608847b3d
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Link: https://lore.kernel.org/r/363bd50cc7c60daa57d614a341d1fd649f05194c.1567625660.git.agx@sigxcpu.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from a957446706)
2019-12-23 18:56:11 +08:00
Axel Lin
3733856da7 UPSTREAM: regulator: tps65132: Constify tps65132_regulator_ops and tps_regs_desc
The tps65132_regulator_ops and tps_regs_desc never need to be modified,
make them const so compiler can put them to .rodata.

Change-Id: I2731779813a11b589410d0020165c44fbb1b1778
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from 4e105e3b4b)
2019-12-23 18:56:11 +08:00
Axel Lin
f2bc10d3be UPSTREAM: regulator: tps65132: Remove unneeded fields from struct tps65132_regulator
These fields are not really need, remove them.

Change-Id: I537bb71e1b1444071021f8e0bd35c8735dba36f0
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from 2e62e03333)
2019-12-23 18:56:11 +08:00
Wu Liangqing
15d2e5fd95 arm64: dts: rockchip: rk3399-evb-ind: Fix adc_key
Change-Id: Ife97b39cc7aa357763cca1dd7a5a530e489ffb84
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-12-23 18:39:34 +08:00
Ding Wei
3186ac2fbc video: rockchip: mpp: add control commands to process fd
1. command to reset all fd in session, used when user space info change
2. command to translate fd into iova
3. command for release fd

Change-Id: I8b9faf1d549901517563b14aaec5c178fdfc4037
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-12-23 15:07:39 +08:00
Sandy Huang
88f1e061ff drm/rockchip: vop: add dual channel swap config from dts
some pcb layout dual mipi/lvds channel maybe mistake. we can set
rockchip,dual-channel-swap = <1> to swap the dual channel at dts
file.

Change-Id: I940e1cd6ed006d07d9ba2e629c15472402a0d8e2
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-12-23 15:00:41 +08:00
Sandy Huang
f060f3b7db dt-bindings: display: rockchip: add add dual channel swap config from dts
Change-Id: I6327d90bfdfdf4c3352bdd2124aabfe962dcd268
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-12-23 15:00:32 +08:00
Wu Liangqing
5d65957e62 ARM: dts: rockchip: set gpu Frequency conversion threshold for rk312x
upthreshold = <40>
downdifferential = <10>

Change-Id: I02acc9ee840cbad4ed8b3f17f47719008eec8469
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-12-23 14:54:51 +08:00
Wu Liangqing
6bb00eb414 arm64: dts: rockchip: set gpu Frequency conversion threshold for px30
upthreshold = <40>
downdifferential = <10>

Change-Id: I855202385a8ee856793a2e3622e2099e6351c56f
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-12-23 14:54:11 +08:00
Liang Chen
4bd29509fe cpufreq: interactive: fix bug: release enable_sem when exit input event
Forget release enable_sem when porting patch.

Fixes: a4524d29de ("cpufreq: interactive: fix race between input event and governor exit")
Change-Id: Icb07b2a7a8ccc48dfd7bd2bc3cc5cbbf28d3c631
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-12-23 14:51:28 +08:00
Zhen Chen
ffd7b5d081 arm64: dts: rk3399: set gpu frequency conversion threshold
upthreshold = <40>
downdifferential = <10>

Change-Id: I492b973ef7401699dbeeecde8df6d66650155f14
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-12-23 11:02:57 +08:00
Kieran Bingham
056f232e72 UPSTREAM: media: uvcvideo: Move decode processing to process context
Newer high definition cameras, and cameras with multiple lenses such as
the range of stereo-vision cameras now available have ever increasing
data rates.

The inclusion of a variable length packet header in URB packets mean
that we must memcpy the frame data out to our destination 'manually'.
This can result in data rates of up to 2 gigabits per second being
processed.

To improve efficiency, and maximise throughput, handle the URB decode
processing through a work queue to move it from interrupt context, and
allow multiple processors to work on URBs in parallel.

Change-Id: I825a107e706a964525dcabba4faa9434f499fd96
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit b012186ace)
2019-12-23 10:16:25 +08:00
Kieran Bingham
e58f39f37d UPSTREAM: media: uvcvideo: Abstract streaming object lifetime
The streaming object is a key part of handling the UVC device. Although
not critical, we are currently missing a call to destroy the mutex on
clean up paths, and we are due to extend the objects complexity in the
near future.

Facilitate easy management of a stream object by creating a pair of
functions to handle creating and destroying the allocation. The new
uvc_stream_delete() function also performs the missing mutex_destroy()
operation.

Previously a failed streaming object allocation would cause
uvc_parse_streaming() to return -EINVAL, which is inappropriate. If the
constructor failes, we will instead return -ENOMEM.

While we're here, fix the trivial spelling error in the function banner
of uvc_delete().

Change-Id: I695d511a6e20b908f5f49da5cdd0833ee3641b92
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit ece41454c6)
2019-12-23 10:15:56 +08:00
Kieran Bingham
b17c9d8251 UPSTREAM: media: uvcvideo: queue: Support asynchronous buffer handling
The buffer queue interface currently operates sequentially, processing
buffers after they have fully completed.

In preparation for supporting parallel tasks operating on the buffers,
we will need to support buffers being processed on multiple CPUs.

Adapt the uvc_queue_next_buffer() such that a reference count tracks the
active use of the buffer, returning the buffer to the VB2 stack at
completion.

Change-Id: Ia42cca9bed7852175202017b042590d844e8c6b0
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 01e90464e4)
2019-12-23 10:15:56 +08:00
Kieran Bingham
1c76016449 UPSTREAM: media: uvcvideo: queue: Simplify spin-lock usage
Both uvc_start_streaming(), and uvc_stop_streaming() are called from
userspace context, with interrupts enabled. As such, they do not need to
save the IRQ state, and can use spin_lock_irq() and spin_unlock_irq()
respectively.

Change-Id: I1cde5a8d9a8890cc2b671d1e32d3b6b4b0eac635
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit c50c9c1e65)
2019-12-23 10:15:56 +08:00
Kieran Bingham
29a2dbd904 UPSTREAM: media: uvcvideo: Protect queue internals with helper
The URB completion operation obtains the current buffer by reading
directly into the queue internal interface.

Protect this queue abstraction by providing a helper
uvc_queue_get_current_buffer() which can be used by both the decode
task, and the uvc_queue_next_buffer() functions.

Change-Id: Ic5401fe9afec00b87bb075f99addae8591de6890
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit e829b262a6)
2019-12-23 10:15:56 +08:00
Kieran Bingham
86d65ab616 UPSTREAM: media: uvcvideo: Convert decode functions to use new context structure
The URB completion handlers currently reference the stream context.

Now that each URB has its own context structure, convert the decode (and
one encode) functions to utilise this context for URB management.

Change-Id: Ib56b25ca4ec049c5eb75ffceda9c2d8a0c1a96cf
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit c6d664fe8a)
2019-12-23 10:15:56 +08:00
Kieran Bingham
eb4572cb39 UPSTREAM: media: uvcvideo: Refactor URB descriptors
We currently store three separate arrays for each URB reference we hold.

Objectify the data needed to track URBs into a single uvc_urb structure,
allowing better object management and tracking of the URB.

All accesses to the data pointers through stream, are converted to use a
uvc_urb pointer for consistency.

Change-Id: I03320cff8ec5cb268b62610b9852b32505f136aa
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 811496c967)
2019-12-23 10:15:56 +08:00
Laurent Pinchart
79774882a3 UPSTREAM: media: uvcvideo: Store device information pointer in struct uvc_device
The device information structure is currently copied field by field in
the uvc_device structure. As we only have two fields at the moment this
isn't much of an issue, but it prevents easy addition of new info
fields.

Fix this by storing the uvc_device_info pointer in the uvc_device
structure. As a result the uvc_device meta_format field can be removed.
The quirks field, however, needs to stay as it can be modified through a
module parameter.

As not all device have an information structure, we declare a global
"NULL" info instance that is used as a fallback when the driver_info is
empty.

Change-Id: I648490fb775891687b6eededafd270dafe50641f
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 3a03284dd4)
2019-12-23 10:15:56 +08:00
Wu Liangqing
3bb31a0e11 ARM: dts: rockchip: rk3126-m88: enabled nandc for emmc and nand compatibility
Change-Id: Ifd5356aaffa00da2ba94897ee66cb0d7e8175994
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-12-20 08:40:48 +08:00
Liang Chen
a4524d29de cpufreq: interactive: fix race between input event and governor exit
The input event callback does not check the governor_enabled state on
affected CPUS, which will cause kernel panic because the governor_data
will be NULL when governor exit.

Change-Id: Ic2e5cdaefa519701b23203bb77804ce850a5d349
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-12-19 18:45:22 +08:00
Tao Huang
8497bd742e ARM: rockchip_defconfig: disable CONFIG_I2C_HID
No android board use hid-over-i2c.
before:
   text         data        bss     dec             hex filename
12536545	4902620	2158240	19597405	12b085d	vmlinux
after:
   text            data     bss     dec             hex filename
12530111	4902420	2158240	19590771	12aee73	vmlinux

Save about 6K.

Change-Id: Idc64bafe267d614041faf7ac0355fffabba8fc36
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-12-19 14:21:01 +08:00
Tao Huang
0afbe9828f ARM: rockchip_defconfig: disable Special HID support
before:
   text            data     bss     dec             hex filename
12756996	5025528	2158624	19941148	130471c	vmlinux
after:
   text            data     bss     dec             hex filename
12536545	4902620	2158240	19597405	12b085d	vmlinux

Save about 336K.

Change-Id: Ie50e85bd2673fa6ec355e79627ee0ccb166921b7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-12-19 14:20:56 +08:00
Tao Huang
af8c182bbe ARM: rockchip_defconfig: disable some USB_STORAGE drivers
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-CONFIG_USB_STORAGE_ONETOUCH=y
-CONFIG_USB_STORAGE_KARMA=y
-CONFIG_USB_STORAGE_CYPRESS_ATACB=y

Save about 51K.

Change-Id: I97a7da23a8112b735bc38136c7853a5fcd13138c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-12-19 14:19:47 +08:00
Tao Huang
392ef9216d ARM: rockchip_defconfig: disable USB_PRINTER
Save about 7K.

Change-Id: I05ceb64bbb8bc0b1e87b79f8067fd5e93cc2ea28
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-12-19 14:19:39 +08:00
Tao Huang
d55814ef80 ARM: rockchip_defconfig: disable CONFIG_USB_TRANCEVIBRATOR
Useless feature.

Change-Id: I5201b450172f2e9561c07cf9dc9697a805575275
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-12-19 14:19:34 +08:00