Commit Graph

598906 Commits

Author SHA1 Message Date
Philipp Zabel
bbf5af445f FROMLIST: ASoC: hdmi-codec: Use HDMI notifications to add jack support
Use HDMI connection / disconnection notifications to update an ALSA
jack object. Also make a copy of the ELD block after every change.

Conflicts:
	sound/soc/codecs/Kconfig
	sound/soc/codecs/hdmi-codec.c

(am from https://patchwork.kernel.org/patch/8887251/)
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Change-Id: I5f4a931c3b91c2b230ce5a61b60f191628d93105
2016-12-20 20:04:25 +08:00
Philipp Zabel
0e3070da06 FROMLIST: video: rmk's HDMI notification prototype
This is Russell's HDMI notification prototype [1], currently waiting
for the HDMI CEC situation to resolve.

The use case for the notifications on MediaTek MT8173 is to let the
(dis)connection notifications control an ALSA jack object.

No Signed-off-by since this is not my code, and still up for discussion.

[1] https://patchwork.kernel.org/patch/8351501/

(am from https://patchwork.kernel.org/patch/8887261/)

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Change-Id: I87daa156de6cfa7ff8db9df9d8ecc8c42d76798f
2016-12-20 20:02:17 +08:00
Guenter Roeck
57b7a3e301 FROMLIST: drm/rockchip: cdn-dp: Do not run worker while suspended
If the driver is in suspended mode, the dp block may be disabled, and
chip registers may not be accessible. Yet, the worker may be triggered
in this situation by an extcon event. If that happens, the following crash
will be seen.

cdn-dp fec00000.dp: [drm:cdn_dp_pd_event_work] *ERROR* Enable dp failed -19
cdn-dp fec00000.dp: [drm:cdn_dp_pd_event_work] Connected, not enabled. Enabling cdn
Bad mode in Error handler detected, code 0xbf000002 -- SError
CPU: 1 PID: 10357 Comm: kworker/1:2 Not tainted 4.4.21-05903-ge0514ea #1
Hardware name: Google Kevin (DT)
Workqueue: events cdn_dp_pd_event_work
task: ffffffc0cda67080 ti: ffffffc0b9b80000 task.ti: ffffffc0b9b80000
PC is at cdn_dp_clock_reset+0x30/0xa8
LR is at cdn_dp_enable+0x1e0/0x69c
...
Call trace:
[<ffffffc0005a7e24>] cdn_dp_pd_event_work+0x58/0x3f4
[<ffffffc0002397f0>] process_one_work+0x240/0x424
[<ffffffc00023a28c>] worker_thread+0x2fc/0x424
[<ffffffc00023f5fc>] kthread+0x10c/0x114
[<ffffffc000203dd0>] ret_from_fork+0x10/0x40

Problem is two-fold: The worker should not run while suspended, and the
suspend function should not call cdn_dp_disable() while the worker is
running.

Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
(am from https://patchwork.kernel.org/patch/9442149)
Change-Id: Ic01c6f793281a47c36a90c1be34a5e479ebabb3e
2016-12-20 19:58:04 +08:00
Guenter Roeck
d53b218c10 FROMLIST: drm/rockchip: cdn-dp: Load firmware if no monitor connected
If no monitor is connected, suspend/resume cycles result in firmware
load errors because the driver attempts to load the firmware while
the system is in suspend state. This results in a kernel warning and
traceback.

Loading the firmware during boot fixes the problem. Note that we can not
just call schedule_work conditionally in cdn_dp_pd_event() if the insertion
status changed. The problem would still be seen if a monitor is connected
for the first time during suspend.

(am from https://patchwork.kernel.org/patch/9442145)
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I86eb7c41624be1a8f5952ba7709e623a70941b8c
2016-12-20 19:54:27 +08:00
Chris Zhong
152af2e38e drm/rockchip: cdn-dp: fix some error
This commit is for fixing some error, according to the comments from
CL:5442
1. correct the use of rate
2. remove the phy switch from DP driver, it is controlled in PHY driver
3. add some const keyword
4. clear int_mask to 0
5. modify spelling errors

Change-Id: I239a9e7183593b85485abb6d288d6cb1558c65f7
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-12-20 19:52:11 +08:00
Chris Zhong
cb22a964b4 FROMLIST: drm/rockchip: cdn-dp: add cdn DP support for rk3399
Add support for cdn DP controller which is embedded in the rk3399
SoCs. The DP is compliant with DisplayPort Specification,
Version 1.3, This IP is compatible with the rockchip type-c PHY IP.
There is a uCPU in DP controller, it need a firmware to work,
please put the firmware file to /lib/firmware/rockchip/dptx.bin. The
uCPU in charge of aux communication and link training, the host use
mailbox to communicate with the ucpu.
The dclk pin_pol of vop must not be invert for DP.

Change-Id: I64aee564f782db9943a92ca07cb20e2111d7921f
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
[seanpaul fixed up some races between the worker and modeset]
[seanpaul squashed ~15 commits from chromium.org gerrit]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
[groeck fixed compilation errors when building as module]
Signed-off-by: Guenter Roeck <groeck@chromium.org>
(am from https://patchwork.kernel.org/patch/9442143)
2016-12-20 19:51:13 +08:00
wjh
003406c483 video: rockchip: dp: modify get edid method and modify get dpcd retry times.
Change-Id: I69c7b91b78707b40126f2366f28ff6256eabe4fb
Signed-off-by: wjh <wjh@rock-chips.com>
2016-12-20 19:24:44 +08:00
Jacob Chen
2cddd0a496 video: vcodec: fix warning when enable ion in arm32
Change-Id: Ia409365aa780badbaa64539ebc3d5679dda49a7a
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-20 09:39:37 +08:00
Jacob Chen
d246952ee6 arm: dts: rockchip: add allocator type inside vpu & hevc for rk3288-linux
Change-Id: I6e9a72fb287f963be78c4dc6f375fa12991394f2
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-20 09:33:09 +08:00
Jacob Chen
dc7f31e35a ARM: configs: enable vcodec driver for rockchip linux
Change-Id: I5533054d9fdde1d7700f127ce4b6248d709f7588
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-20 09:32:04 +08:00
Jacob Chen
e05687e0a6 arm: dts: rockchip: switch to vpu-service in rk3288 linux boards
We decide to back to old vcodec driver until getting a better v4l2 solution

Change-Id: Iec3f5b3aba86866a0b0fc7aab5b6c2b28bc268d9
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-20 09:30:39 +08:00
Jacob Chen
e36ab3b4fa arm: dts: enable rga for rk3288 linux boards
we will use rga to speed xserver and wayland.

Change-Id: Ic975b1bbeb6afd8a3a15ba41afc1d8ff10c6d3b4
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-20 09:29:35 +08:00
Jacob Chen
307055c6b3 arm: dts: rk3288: add drm rga node
Change-Id: I3c88a695922d3e2245d6b406860db97de9d47244
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-20 09:29:00 +08:00
Jacob Chen
fbdfcdcefd arm: dts: correct rk3288-evb gmac node
remove repetition

Change-Id: I1140ce9cbf259eb827b7e2aa03a2e263e81735ea
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-19 18:52:15 +08:00
Shawn Lin
f6e71099d9 arm64: dts: rockchip: add mmc dt-bindings for rk3328 and evb board
Add dt-bindings for sdio/sdmmc(+ext)/emmc controllers

Change-Id: I1c52b803110c499c58c2c27a1c7488a98b0ca870
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-12-19 18:41:21 +08:00
Sean Paul
2083812848 UPSTREAM: drm: Introduce DRM_DEV_* log messages
This patch consolidates all the various log functions/macros into
one uber function, drm_log. It also introduces some new DRM_DEV_*
variants that print the device name to delineate multiple devices
of the same type.

Change-Id: Ic213cce1d775cc7b820473ee5263458a001f9558
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1471303084-3757-1-git-send-email-seanpaul@chromium.org
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit c4e68a5832021cf8c2f9a2f3419452470ca60bd8)
2016-12-19 18:06:20 +08:00
Lyude
df8f1d7529 UPSTREAM: drm: Add ratelimited versions of the DRM_DEBUG* macros
There's a couple of places where this would be useful for drivers (such
as reporting DP aux transaction timeouts).

Change-Id: I027648bacec5e23890f6743207d66858f91c05df
Signed-off-by: Lyude <cpaul@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1470443443-27252-7-git-send-email-cpaul@redhat.com
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 27528c667a210845b35a1f49c810dba469bced52)
2016-12-19 18:04:51 +08:00
Shunqing Chen
eb75fab10b ARM64: dts: rk3399: add bq25700 support for tve1205g
Change-Id: I74119a51d2557e86f3c579645db2b2b8dc71989c
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-19 17:16:30 +08:00
Shengfei xu
fb0b971526 arm64: rockchip_defconfig: enable bq25700
Change-Id: I96edac95110516c6f6747128fd50251cb3e37e7b
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2016-12-19 17:14:51 +08:00
Frank Wang
e4ec9fa3ca usb: ehci/ohci-platform: assigned hcd phy phandle at platform probe
In ehci/ohci-platform, phy_power_on() gets called twice at probe time,
one is at pdata->power_on(); another is in usb_add_hcd(). However,
phy_power_off() is only invoked one time when ehci/ohci-platform goes
to PM suspend. As a result, the phy power count become inconsistent.

This adds assigned phy phandle to hcd-phy at ehci/ohci-platform probe
time to prevent hcd invoking generic phy methods again when phy-cells
is 0 in DT.

Change-Id: I2f0cca622d31a46dea0b805b83b676cc78e4d67c
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-12-19 16:53:42 +08:00
Finley Xiao
0d71879a76 cpufreq: dt: fix the warning when use opp_v1
Change-Id: I02c7a3cc68536b707baaa8a61f21ac4961184dda
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-19 15:59:29 +08:00
Huang, Tao
d5aac6eae7 arm64: dts: rockchip: fix gic node name for rk3328
The unit-address should be ff811000.

Change-Id: Id363731458bf2210ca5d92d679c00bbfdd3f9de4
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-19 15:20:35 +08:00
Shawn Lin
df153a860a ARM64: dts: rockchip: add max-link-speed for rk3399
Per the errata of TRM, rk3399 won't support gen2 from
now on, so let's set max-link-speed to 1 in order not
to doing training for gen2.

Change-Id: I3fd455dc2427f2c67dc2dce8e8fabc4b521a49dd
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-12-19 15:04:45 +08:00
William Wu
a586e51a45 usb: gadget: composite: fix double freeing of freed memory
The following message can be observed on rk3399 nougat board
when switch MTP/charge mode with KASan backported :

=============================================================================
BUG kmalloc-192 (Not tainted): Object already free
-----------------------------------------------------------------------------

Disabling lock debugging due to kernel taint
INFO: Allocated in dwc3_gadget_ep_alloc_request+0x2c/0xf4 age=977 cpu=4 pid=1
alloc_debug_processing+0x128/0x17c
___slab_alloc.constprop.56+0x520/0x604
__slab_alloc.isra.53.constprop.55+0x24/0x34
kmem_cache_alloc_trace+0xa4/0x210
dwc3_gadget_ep_alloc_request+0x2c/0xf4
__ffs_func_bind_do_descs+0x15c/0x1b0
ffs_do_descs+0x50/0x180
ffs_func_bind+0x3e4/0x634
usb_add_function+0x78/0xe8
configfs_composite_bind+0x240/0x2d8
udc_bind_to_driver+0x38/0xcc
usb_udc_attach_driver+0x80/0xa8
gadget_dev_desc_UDC_store+0xa0/0xe4
configfs_write_file+0xfc/0x14c
__vfs_write+0x38/0xfc
vfs_write+0xac/0x174
INFO: Freed in dwc3_gadget_ep_free_request+0x84/0xbc age=4 cpu=4 pid=1
free_debug_processing+0x29c/0x36c
__slab_free+0x60/0x388
kfree+0x210/0x27c
dwc3_gadget_ep_free_request+0x84/0xbc
ffs_func_unbind+0x88/0xe4
purge_configs_funcs+0xa8/0x100
configfs_composite_unbind+0x34/0x5c
usb_gadget_remove_driver+0x74/0xa0
usb_gadget_unregister_driver+0x60/0xa4
unregister_gadget+0x24/0x48
gadget_dev_desc_UDC_store+0x7c/0xe4
configfs_write_file+0xfc/0x14c
__vfs_write+0x38/0xfc
vfs_write+0xac/0x174
SyS_write+0x54/0xa4
el0_svc_naked+0x24/0x28
Hardware name: Rockchip RK3399 Evaluation Board v3 edp (Android) (DT)
Call trace:
[<ffffff9008088490>] dump_backtrace+0x0/0x1c8
[<ffffff900808866c>] show_stack+0x14/0x1c
[<ffffff900835cbe4>] dump_stack+0x8c/0xac
[<ffffff900819f840>] print_trailer+0x188/0x198
[<ffffff900819f9bc>] object_err+0x3c/0x4c
[<ffffff90081a1fb8>] free_debug_processing+0x27c/0x36c
[<ffffff90081a2108>] __slab_free+0x60/0x388
[<ffffff90081a2c88>] kfree+0x210/0x27c
[<ffffff9008645a58>] composite_dev_cleanup+0x74/0xfc
[<ffffff900864789c>] configfs_composite_bind+0x2b8/0x2d8
[<ffffff900864953c>] udc_bind_to_driver+0x38/0xcc
[<ffffff9008649650>] usb_udc_attach_driver+0x80/0xa8
[<ffffff900864835c>] gadget_dev_desc_UDC_store+0xa0/0xe4
[<ffffff9008218144>] configfs_write_file+0xfc/0x14c
[<ffffff90081ac958>] __vfs_write+0x38/0xfc
[<ffffff90081ad290>] vfs_write+0xac/0x174
[<ffffff90081adc4c>] SyS_write+0x54/0xa4
[<ffffff90080826f0>] el0_svc_naked+0x24/0x28

This patch sets the usb_request pointer to NULL after the
free the usb_request buf. And the composite_dev_cleanup()
will check if the usb_request pointer is NULL before do
kfree and avoid double freeing freed menory.

Change-Id: I69df57553cb14d046b8b8206becd342a5e5fb7ba
Signed-off-by: William Wu <wulf@rock-chips.com>
2016-12-19 14:39:06 +08:00
Shengfei xu
49bf9467ca power_supply: Add support for TI BQ25700 charger chip
Change-Id: I362b5bb06455c2ddb9583bb5882ee349438ba799
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2016-12-19 14:17:08 +08:00