Commit Graph

602022 Commits

Author SHA1 Message Date
chenzhen
1a1325fa26 MALI: utgard: upgrade DDK to r7p0-00rel1
Change-Id: If789dea2b6a9c11dc82c6f91d4bdd10761e2f7d1
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-06-20 16:03:23 +08:00
Meng Dongyang
c29029bc49 phy: rockchip-inno-usb2: disable id irq in pm suspend
The otg id voltage is provided from usb2 phy power. On some
rockchip platforms (e.g. rk3399), the usb2 phy power will be
turned off when enter pm suspend, this will trigger id fall
interrupt. But current code enable the ID interrupt consistently,
it may result in the mistake of ID changing operation even if
the state of ID pin is not changed. So disable ID irq when
suspend and enable when resume.

Change-Id: Icac35f13861fd639e4b422b31182a68add73836d
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-06-20 15:23:54 +08:00
WeiYong Bi
04f5926137 drm/rockchip: hdmi: Add support for rk3228
RK3228 uses the Synopsys DWC HDMI TX controller and the INNO HDMI PHY to
enabling the integration of a complete HDMI Transmmiter interface.

Change-Id: I90f997968fb2de4165a31216c8aee8213089eab5
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-06-20 10:33:38 +08:00
WeiYong Bi
0d259e4b8f arm: rockchip_defconfig: enable CONFIG_PHY_ROCKCHIP_INNO_HDMI_PHY
Change-Id: If93eea5cfdf28042b75da0710287ad6c768338d2
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-06-20 10:33:37 +08:00
WeiYong Bi
85a9ea514c phy: rockchip-inno-hdmi-phy: Add Inno HDMI PHY support
INNO HDMI 2.0 TX PHY is compliant with HDMI 2.0 specification
and optimized up to 3.72Gbps per TMDS link High-Definition
applications with supporting 3D Display and up to 4Kx2K@60/50Hz
UHD resolution at 10-bit YCbCr 4:2:0 video input mode.

Change-Id: I1f8b2e5c656378188dca8e02df6d52bad2919da8
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-06-20 10:33:37 +08:00
xuhuicong
18c2d85760 drm: bridge: dw-hdmi: fix panic when misc_deregister()
Change-Id: I6ab7eb4e8a756e5ae62b181e36b9bff4f6dc7ebf
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2017-06-20 10:20:09 +08:00
Zheng Yang
afa94c5ea0 drm/rockchip: hdmi: Use Synopsys HDMI TX Controller YUV420 bus format
Change-Id: Ib787054dc1b6d81090a6aa94c3dabce91219e335
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-06-20 10:13:30 +08:00
Zheng Yang
476613c658 drm/rockchip: vop: support Synopsys HDMI TX Controller YUV420 bus_format
MEDIA_BUS_FMT_UYYVYY8_0_5X24 and MEDIA_BUS_FMT_UYYVYY10_0_5X30 are
bus_format of YUV420 data between Rockchip vop and Synopsys HDMI
TX Controller.

Change-Id: Id06e7cc7703e9b12e1a7f64cdbacc5e8a98b2b45
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-06-20 10:13:26 +08:00
Zheng Yang
13ca991025 drm: bridge: dw-hdmi: add more check for HDCP function
On RK3328, dw-hdmi HDCP driver is loaded slower than dw-hdmi.
hdmi->hdcp->hdcp_start is NULL when dw-hdmi call the hdcp_start,
cause following system crash:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = ffffff8009292000
[00000000] *pgd=000000007e1fe003, *pud=000000007e1fe003, *pmd=0000000000000000
Internal error: Oops: 86000005 [#1] SMP
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.70 #418
Hardware name: Rockchip RK3328 EVB (DT)
task: ffffffc0003a0000 ti: ffffffc0003a8000 task.ti: ffffffc0003a8000
PC is at 0x0
LR is at dw_hdmi_update_power+0xef4/0x1004
pc : [<0000000000000000>] lr : [<ffffff800849e778>] pstate: 60000045
sp : ffffffc0003ab3b0
x29: ffffffc0003ab3b0 x28: 000000000000410b
x27: 0000000000000000 x26: 0000000000000000
x25: ffffffc07770d028 x24: 000000000000410b
x23: 0000000000000000 x22: 0000000000000001
x21: 0000000000000002 x20: ffffff8008c02000
x19: ffffff8008c02d90 x18: 0000000062475a46
x17: 0000000000000000 x16: 000000000000000e
x15: 0000000000000007 x14: 0ffffffffffffffd
x13: 0000000000000018 x12: 0101010101010101
x11: 7f7f7f7f7f7fff7f x10: fefefefeff01f305
x9 : ff7fff7f7f7f7f7f x8 : ffffff80091db5df
x7 : 0000000000000000 x6 : 0000000000000004
x5 : 0000000000000015 x4 : 0000000000140b82
x3 : 000000000106b1af x2 : 0000000000000001
x1 : 0000000000000000 x0 : ffffffc076e25e00

Change-Id: I0fccf9d8e06f7acdb56d8e5360acf0df026fee10
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-06-20 09:23:45 +08:00
Neil Armstrong
c1b9659a8c UPSTREAM: drm: bridge: dw-hdmi: fix input format/encoding from plat_data
The plat_data->input_bus_format and plat_data->input_bus_encoding
are unsigned long and are always >=0, but the value 0 was still
considered as RGB888 for input_bus_format and default color space
for input_bus_encoding in the reworked code.

This patch changes the if statement check for a non-zero value to
either use the default input bus_format and/or bus_encoding for a zero
value and the provided bus_format and/or bus_encoding for a
non zero value.

Thanks to Dan Carpenter for his bug report at [1].

Tested on Amlogic P230 (with CSC enabled for YUV444 to RGB) and Rockchip
RK3288 ACT8846 EVB Board (no CSC involved, direct RGB passthrough).

[1] http://lkml.kernel.org/r/20170406052120.GA26578@mwanda

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: def23aa7e9 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
[narmstrong@baylibre.com: reworded commit message and added Fixes tag]
Link: http://patchwork.freedesktop.org/patch/msgid/1491471244-24989-1-git-send-email-narmstrong@baylibre.com

Change-Id: I1b6c08e3fe468c01fcd721fe4b4d6ec95c73528b
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit e20c29aa72)
2017-06-19 18:25:22 +08:00
Neil Armstrong
bcad7aa4e4 UPSTREAM: drm: bridge: dw-hdmi: Switch to V4L bus format and encodings
Switch code to use the newly introduced V4L bus formats IDs instead of custom
defines. Also use the V4L encoding defines.

Some display pipelines can only provide non-RBG input pixels to the HDMI TX
Controller, this patch takes the pixel format from the plat_data if provided.

Change-Id: I2b70ed0f3cab8c6873bb407977738677375b24b0
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit def23aa7e9)
2017-06-19 18:25:22 +08:00
Neil Armstrong
c9e9762da7 UPSTREAM: media: uapi: Add RGB and YUV bus formats for Synopsys HDMI TX Controller
In order to describe the RGB and YUV bus formats used to feed the
Synopsys DesignWare HDMI TX Controller, add missing formats to the
list of Bus Formats.

Documentation for these formats is added in a separate patch.

Change-Id: Ic2cab2bbe6caed5e5b6e86c60a58f26046d259be
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491230558-10804-3-git-send-email-narmstrong@baylibre.com
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit d0353118fd)
2017-06-19 18:25:22 +08:00
Mark Yao
2eabaca27c drm/rockchip: vop: initital crtc pll status
If the crtc pll status is not init, always cause mode_changed
at first dclk source generate, that would cause logo flush
fixup(10a90aa drm/rockchip: support setting specail pll for hdmi)

Change-Id: I0ee20fd098654ff89f268be82b50d2d5b605e9d5
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-19 17:40:13 +08:00
Zhaoyifeng
2033289abf drivers: rk_nand: update ftl to support slc nand and micron L04A
1. support 128MB and 256MB slc nand flash
2. support micron L04A 3D mlc nand flash
3. fix 3036 read sn fail issue

Change-Id: If08b3f8bd37c9d9c161b733f6127b137a8bfdd4f
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2017-06-19 16:06:58 +08:00
Huang, Tao
1763310f33 soc: rockchip: Add dummy rockchip_pm_register_notify_to_dmc
build fix for CONFIG_ROCKCHIP_PM_DOMAINS=n

Change-Id: Iffa0bfa3ab7fc78360341f188f645d2579edde2e
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-06-19 14:02:45 +08:00
xcq
f920ebcc80 camera: rockchip: camsys driver v0.0x22.1
gpio0_D is unavailable on rk3288 with current pinctrl driver.

Change-Id: I7d38ebd3b00ac0df31861406f758bdd9e57f9903
Signed-off-by: xcq <shawn.xu@rock-chips.com>
2017-06-19 09:41:13 +08:00
David Wu
795363beff Revert "pinctrl: rockchip: Add rk3288 GPIO0_D0 ~ GPIO0_D7 pins support"
This reverts commit 1d9964a989.

Double confirmation, GPIO0_D0 ~ GPIO0_D7 pins are not connected to pad,
this is a wrong commit, revert this commit.

Change-Id: Iebec11ee47a68fe51ec90361fd412d05df832998
Signed-off-by: David Wu <david.wu@rock-chips.com>
2017-06-16 16:53:06 +08:00
Shunqing Chen
be11109547 power_supply: add cw2015 battery support
Change-Id: I36d65b9765a3303169f0ff60025d9ae722ceb1a9
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2017-06-16 16:22:54 +08:00
xuhuicong
1f58bcd52f drm: bridge: dw-hdmi: add hdcp1.4 support
First, write hdcp key by "ProvisioningTool" if you want to
enable hdcp function, or else will auth fail.

To check whether the hdcp is enable or not
  #cat /sys/class/misc/hdmi_hdcp1x/enable
  0:hdcp is disabled
  1:hdcp is enabled, hdmi screen will be pink if it is failed;
  2:hdcp is enabled, hdmi screen will be normal if it is failed;

Enable or disable hdcp function
  #echo 0 > /sys/class/misc/hdmi_hdcp1x/enable
  #echo 1 > /sys/class/misc/hdmi_hdcp1x/enable
  #echo 2 > /sys/class/misc/hdmi_hdcp1x/enable

Get the status of hdcp
  #cat /sys/class/misc/hdmi_hdcp1x/status
  The result will be one of the follow list:
    hdcp disable;
    hdcp_auth_start
    hdcp_auth_success;
    hdcp_auth_fail;
    unknown status.

Change-Id: Iac6c7d6a1196ce9cf2869d7916bbe6c8941ec13b
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2017-06-16 14:41:15 +08:00
Elaine Zhang
428fab17d9 clk: rockchip: rk3228: add SCLK_SDIO_SRC clk id
This patch exports sdio src clock for dts reference.

Change-Id: I3e83cce4da3d82af4b18df43ecd51c504d308c02
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-06-16 14:14:29 +08:00
Mark Yao
3635bb84e6 drm/rockchip: gem: don't limit to 32bit mapping when not support LPAE
Change-Id: I3d2b41cfb0be3122ccb291802feb950017acdf44
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-16 09:36:03 +08:00
Zheng Yang
6d29956712 drm/rockchip: hdmi: correct 3328 hdmi phy power up timing
According to spec, TMDS driver should power up between PLL
power up and PLL lock.

There is an mistake of pdata en register, the real register
is reg2 bit0, not reg1 bit0.

Change-Id: I9d2b707cbcfd70b63f4a1a277a85f21b62643d2e
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-06-15 16:13:52 +08:00
Mark Yao
fec2638631 drm/rockchip: logo: restore display if show logo failed
Change-Id: I554eaff439b6cd13770fb81ec5c9df6693e17f29
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-15 14:30:05 +08:00
Huibin Hong
13dbe2cccd dmaengine: pl330: _loop_cyclic supports unaligned size
Change-Id: If724fb0c414edc13bba94def8da78c28a4cec69a
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-06-14 15:16:27 +08:00
Mark Yao
344aecd419 drm/rockchip: vop: correct clk_set_parent return value check
Change-Id: I3da501169739759426c83a3b7e6e255c717e226c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-14 09:33:33 +08:00
Mark Yao
28c41da269 drm/rockchip: vop: get rid of max_output.height check
Actually vop hardware has no output height limit, so no
need limit display with max_output.height

Change-Id: Ide70cb28af9a23c1a12c068168b13aac37041b28
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-14 09:33:21 +08:00
Zheng Yang
79300b3d8b ARM64: dts: rk3328-evb: set hdmi ddc clock rate to 50KHz
Change-Id: I59bc54a17d697e742a3753baba692f3541f742e4
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-06-14 09:32:56 +08:00
Zorro Liu
7943fd79ea driver: mpu: to support mpu6881/mpu6880
Change-Id: I731788cd35d27d2aab946ccb22f744aad85f7be3
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-06-14 09:29:49 +08:00
Zorro Liu
03078e9fda ARM64: dts: rk3368-p9: set sleep mode config RKPM_SLP_ARMOFF
Change-Id: I65b87a37f029e316cf048bf7da790d51a046cca2
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-06-13 15:02:25 +08:00
Zorro Liu
4b173392a9 ARM64: dts: rockchip: enable rockchip_suspend node of rk3368-p9 and rk3368-sheep board
Change-Id: Iff11ec889c372f279cf638ff2f3f2b72824abd4c
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-06-13 09:42:57 +08:00
Mark Yao
3be9021fbf arm64: dts: rockchip: enable dp for rk3399 evb rev3 board
Change-Id: I91043fd5caa8a639844658cc0410372785b1c43d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-13 09:42:14 +08:00
Mark Yao
0cad3bf680 arm64: dts: rockchip: rk3399: add dclk pll sources
Change-Id: I0e29d67d5e3738b18a7407a049d216f8dcebb8e8
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-13 09:22:47 +08:00
Mark Yao
8d15b6afd8 Documentation: dt-bindings: rockchip: introduce dclk_source
Change-Id: Iee4d40ede334f418fd4edb51319b5e03f25467c0
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-13 09:22:32 +08:00
Mark Yao
4ac76ab5fc Documentation: dt-bindings: rockchip: introduce display plls
Change-Id: Ifa7129bc5dd625c7f78040b0d506930be24c5aa0
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-13 09:21:06 +08:00
Mark Yao
10a90aa97e drm/rockchip: support setting specail pll for hdmi
In order to get lower jitter clock for hdmi tmds, Hardware
design that: direct get tmds clock from vpll, bypass vop.

This design can make hdmi good works, but also limit hdmi's
clock source, the vop which hdmi use need also assign to vpll,
and use same clock rate, it's hardware limitation.

This patch add a mechanism to select dclk's parent pll, then
can allocate correct pll for hdmi.

Change-Id: I9e3b4b6d3756c409782df0605706be4203d69a32
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Suggested-by: Heiko Stuebner <heiko@sntech.de>
2017-06-13 09:20:59 +08:00
Zorro Liu
c9ead04887 driver: sensor: ak09911: to match hal code, compatible with ak8963
Change-Id: Ia5768a4466512063948c48c2139356522a4557ac
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-06-12 18:56:03 +08:00
Huibin Hong
5f638786e6 dmaengine: pl330: redefine the cyclic transfer
dmaengine_prep_dma_cyclic, to use buf_addr with size buf_len,
generate an interrupt every period_len. But DMA must restart
every period_len, it may be blocked. If i2s use it, it may
cause sound break. Infiniteloop is helpful to solve this
issue. In infiniteloop mode, when DMA transfers all buf_len
data, it goes back to the start of buf_addr and continue to
transfer endless.

Change-Id: Ibbc92c416d0a9dd58633e7991176c86300c3da98
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-06-12 11:01:10 +08:00
William Wu
01e1edeadc arm64: dts: rockchip: config dr_mode as otg for usb on rk3328-evb
Because we have supported to force otg mode for rk3328 in the commit
2b9b897141f1 ("phy: rockchip-inno-usb2: support to force otg mode"),
so let's config dr_mode as otg for usb otg port, and then user can
use otg peripheral mode and host mode as needed.

Change-Id: I6f55fb2aad1b8c49498af829475a8b59215251e5
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-06-12 10:57:03 +08:00
William Wu
1c4fdac604 arm: dts: rk322x-android: add otg vbus gpio for usb2 phy0
This patch adds otg vbus gpio for usb2 phy0, and then we
can control otg vbus for otg host mode.

Change-Id: I685060270f9cb0963931a84035cad7286d99a469
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-06-12 10:56:48 +08:00
William Wu
432166cbd5 phy: rockchip-inno-usb2: support to force otg mode
This patch creates an usb2 phy attribute group and
provides an attribute "otg_mode" for otg port to
force otg mode independently of the voltage of otg
id pin.

In order to implement the force mode function, we can
select otg plug indicator output (AKA iddig) from GRF,
and set GRF USB otg plug indicator to "0" or "1" to
control iddig status.

We only support rk322x/rk3328 to force otg mode for
the time being.

And we need to disable usb auto suspend function if
we want to force otg mode. Add 'usbcore.autosuspend=-1'
in cmdline to disable usb auto suspend.

Usage:
[1] Force host mode
    echo host > /sys/devices/platform/<u2phy dev name>/mode

[2] Force peripheral mode
    echo peripheral > /sys/devices/platform/<u2phy dev name>/mode

[3] Force otg mode
    echo otg > /sys/devices/platform/<u2phy dev name>/mode

Legacy Usage:
[1] Force host mode
    echo 1 > /sys/devices/platform/<u2phy dev name>/mode

[2] Force peripheral mode
    echo 2 > /sys/devices/platform/<u2phy dev name>/mode

[3] Force otg mode
    echo 0 > /sys/devices/platform/<u2phy dev name>/mode

Change-Id: I875b60b0390e3bd9af34b740cba8f5d53e1df752
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-06-12 10:56:37 +08:00
WeiYong Bi
d0c7b9b0a7 dt-bindings: display: screen-timing: add physical size for h546dlb01
Change-Id: I51ba6c2bdacddbc16dbf79df1f36ef6f09340989
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-06-09 15:45:11 +08:00
William Wu
39ba832e83 phy: rockchip-inno-usb2: fix possibe deadlock
The commit 611ec35fa1 ("phy: rockchip-inno-usb2: fix some
race conditions") use mutex lock to protect charger detect
work, but it will cause the following possible deadlock.

[ INFO: possible circular locking dependency detected ]
4.4.66 #563 Not tainted
-------------------------------------------------------
kworker/3:1/145 is trying to acquire lock:
(&rport->mutex){+.+...}, at: [<ffffff80083f286c>] rockchip_chg_detect_work+0x6c/0x3d0

but task is already holding lock:
((&(&rport->chg_work)->work)){+.+...}, at: [<ffffff80080be6e4>] process_one_work+0x1c4/0x6ac

which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:

-> #1 ((&(&rport->chg_work)->work)){+.+...}:
[<ffffff80080fda40>] __lock_acquire+0x15c0/0x195c
[<ffffff80080fe5e8>] lock_acquire+0x190/0x250
[<ffffff80080bf534>] flush_work+0x4c/0x274
[<ffffff80080bf944>] __cancel_work_timer+0x130/0x1c0
[<ffffff80080bf9fc>] cancel_delayed_work_sync+0x10/0x18
[<ffffff80083f17a8>] rockchip_usb2phy_exit+0x54/0x6c
[<ffffff80083f07ac>] phy_exit+0x64/0xb4
[<ffffff8008772810>] dwc3_core_exit+0x44/0x98
[<ffffff80087728b0>] dwc3_suspend_common+0x4c/0x5c
[<ffffff8008772a68>] dwc3_runtime_suspend+0x38/0x5c
[<ffffff8008571784>] pm_generic_runtime_suspend+0x28/0x38
[<ffffff8008573464>] __rpm_callback+0x40/0x74
[<ffffff80085734f4>] rpm_callback+0x5c/0x80
[<ffffff8008573bc4>] rpm_suspend+0x31c/0x688
[<ffffff80085751ec>] __pm_runtime_suspend+0x58/0xa4
[<ffffff800877efc0>] dwc3_rockchip_probe+0x3f8/0x574
[<ffffff800856bcd0>] platform_drv_probe+0x58/0xa4
[<ffffff8008569bb0>] driver_probe_device+0x118/0x2b0
[<ffffff8008569e9c>] __device_attach_driver+0x88/0x98
[<ffffff8008567f4c>] bus_for_each_drv+0x7c/0xac
[<ffffff80085699e4>] __device_attach+0xa8/0x128
[<ffffff800856a00c>] device_initial_probe+0x10/0x18
[<ffffff8008569000>] bus_probe_device+0x2c/0x90
[<ffffff800856948c>] deferred_probe_work_func+0x78/0xa8
[<ffffff80080be858>] process_one_work+0x338/0x6ac
[<ffffff80080bfd54>] worker_thread+0x300/0x428
[<ffffff80080c5758>] kthread+0x104/0x10c
[<ffffff8008083080>] ret_from_fork+0x10/0x50

-> #0 (&rport->mutex){+.+...}:
[<ffffff80080faacc>] print_circular_bug+0x64/0x2c4
[<ffffff80080fd70c>] __lock_acquire+0x128c/0x195c
[<ffffff80080fe5e8>] lock_acquire+0x190/0x250
[<ffffff8008c67ac0>] mutex_lock_nested+0x80/0x3d0
[<ffffff80083f286c>] rockchip_chg_detect_work+0x6c/0x3d0
[<ffffff80080be858>] process_one_work+0x338/0x6ac
[<ffffff80080bfd54>] worker_thread+0x300/0x428
[<ffffff80080c5758>] kthread+0x104/0x10c
[<ffffff8008083080>] ret_from_fork+0x10/0x50

other info that might help us debug this:

Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock((&(&rport->chg_work)->work));
                                lock(&rport->mutex);
                                lock((&(&rport->chg_work)->work));
   lock(&rport->mutex);

  *** DEADLOCK ***

2 locks held by kworker/3:1/145:

stack backtrace:
CPU: 3 PID: 145 Comm: kworker/3:1 Not tainted 4.4.66 #563
Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
Workqueue: events rockchip_chg_detect_work
Call trace:
[<ffffff800808a814>] dump_backtrace+0x0/0x1c8
[<ffffff800808a9f0>] show_stack+0x14/0x1c
[<ffffff80083c1fa0>] dump_stack+0xb0/0xec
[<ffffff80080fad10>] print_circular_bug+0x2a8/0x2c4
[<ffffff80080fd70c>] __lock_acquire+0x128c/0x195c
[<ffffff80080fe5e8>] lock_acquire+0x190/0x250
[<ffffff8008c67ac0>] mutex_lock_nested+0x80/0x3d0
[<ffffff80083f286c>] rockchip_chg_detect_work+0x6c/0x3d0
[<ffffff80080be858>] process_one_work+0x338/0x6ac
[<ffffff80080bfd54>] worker_thread+0x300/0x428
[<ffffff80080c5758>] kthread+0x104/0x10c
[<ffffff8008083080>] ret_from_fork+0x10/0x50

Change-Id: I4289afb05d334bf79000090f9071cf428817a583
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-06-08 10:47:10 +08:00
Hans Yang
3d61b6578e arm64: rockchip_linux_defconfig: enable MPP_SERVICE
Change-Id: I12cb15a44e31f768bac960e3a5e6b9371d221ed3
Signed-off-by: Hans Yang <yhx@rock-chips.com>
2017-06-07 20:48:48 +08:00
Mark Yao
333b831b9e drm/rockchip: limit gem buffer to 32bit mapping
Change-Id: I64537668aa10a2e26bdd19ac79bc417aa6c4a437
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-07 14:15:16 +08:00
Mark Yao
7330eff972 drm: support loader protect for panel
Change-Id: Ie9330e3380a4925a4b7603e7206f1e0d186d2156
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-06-07 14:13:35 +08:00
Jung Zhao
8079a0e4f9 ARM64: dts: rk3328-evb: enable vepu & h265e default
Change-Id: I94685dbeea3ceffa106593ff597f50404f58f34a
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-06-07 12:06:03 +08:00
Jung Zhao
18661920f9 ARM64: dts: rk3328: add vepu & h265e dts node
Change-Id: I2990ac7e43d4b2d2efbf5e9cf3abe124e8767648
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-06-07 12:05:39 +08:00
Jung Zhao
fbf80c017b driver: video: rockchip: add new driver of vpu
this driver only support h264e & h265e. if you want to
enable the driver, you must modify the menuconfig and
turn on MPP_SERVICE & MPP_DEVICE.

Change-Id: I7f1c6e473eaf7aedb4fa86791412b5fbcb2c531d
Signed-off-by: buluess.li <buluess.li@rock-chips.com>
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-06-07 12:05:34 +08:00
Huang, Tao
ad2fc3b29a Merge tag 'lsk-v4.4-17.05-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 17.05 v4.4-android

* tag 'lsk-v4.4-17.05-android': (266 commits)
  BACKPORT: mm/slab: clean up DEBUG_PAGEALLOC processing code
  Linux 4.4.70
  UPSTREAM: arm64: hibernate: Support DEBUG_PAGEALLOC
  BACKPORT: arm64: vmlinux.ld: Add mmuoff data sections and move mmuoff text into idmap
  BACKPORT: arm64: Create sections.h
  ANDROID: uid_sys_stats: defer io stats calulation for dead tasks
  ANDROID: AVB: Fix linter errors.
  ANDROID: AVB: Fix invalidate_vbmeta_submit().
  drivers: char: mem: Check for address space wraparound with mmap()
  nfsd: encoders mustn't use unitialized values in error cases
  drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2
  PCI: Freeze PME scan before suspending devices
  PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
  tracing/kprobes: Enforce kprobes teardown after testing
  osf_wait4(): fix infoleak
  genirq: Fix chained interrupt data ordering
  uwb: fix device quirk on big-endian hosts
  metag/uaccess: Check access_ok in strncpy_from_user
  metag/uaccess: Fix access_ok()
  iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings
  ...
2017-06-07 10:03:03 +08:00
Huang, Tao
d7f4e179e3 Revert "UPSTREAM: pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"
This reverts commit a8b4e18cf1.

Which will cause such error:

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:620
in_atomic(): 1, irqs_disabled(): 128, pid: 141, name: irq/95-fusb302
1 lock held by irq/95-fusb302/141:
 #0:  (&(&chip->irq_lock)->rlock){......}, at: [<ffffff800859e3a0>] fusb_irq_disable+0x20/0x68
irq event stamp: 52
hardirqs last  enabled at (51): [<ffffff80080bcc30>] queue_work_on+0x68/0x80
hardirqs last disabled at (52): [<ffffff8008c6f41c>] _raw_spin_lock_irqsave+0x20/0x60
softirqs last  enabled at (0): [<ffffff800809e9ec>] copy_process.isra.54+0x390/0x1728
softirqs last disabled at (0): [<          (null)>]           (null)
Preemption disabled at:[<ffffff800859e3a0>] fusb_irq_disable+0x20/0x68

CPU: 5 PID: 141 Comm: irq/95-fusb302 Not tainted 4.4.70 #30
Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
Call trace:
[<ffffff800808a82c>] dump_backtrace+0x0/0x1c4
[<ffffff800808aa04>] show_stack+0x14/0x1c
[<ffffff80083c3b90>] dump_stack+0xa8/0xe0
[<ffffff80080cf560>] ___might_sleep+0x214/0x224
[<ffffff80080cf5e4>] __might_sleep+0x74/0x84
[<ffffff8008c6c1ac>] mutex_lock_nested+0x48/0x3cc
[<ffffff80083fe2b0>] rockchip_irq_bus_lock+0x28/0x34
[<ffffff800810b680>] __irq_get_desc_lock+0x68/0x88
[<ffffff800810d558>] __disable_irq_nosync+0x28/0x70
[<ffffff800810d5ac>] disable_irq_nosync+0xc/0x14
[<ffffff800859e3b4>] fusb_irq_disable+0x34/0x68
[<ffffff800859e410>] cc_interrupt_handler+0x28/0x38
[<ffffff800810cd48>] irq_thread_fn+0x28/0x68
[<ffffff800810cf80>] irq_thread+0x130/0x234
[<ffffff80080c58e8>] kthread+0x104/0x10c
[<ffffff8008083080>] ret_from_fork+0x10/0x50

or

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:620
in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0
INFO: lockdep is turned off.
irq event stamp: 111558
hardirqs last  enabled at (111557): [<ffffff8008116cdc>] rcu_idle_exit+0x70/0x80
hardirqs last disabled at (111558): [<ffffff80080f1078>] cpu_startup_entry+0xc0/0x42c
softirqs last  enabled at (111554): [<ffffff80080a6794>] _local_bh_enable+0x3c/0x44
softirqs last disabled at (111553): [<ffffff80080a7000>] irq_enter+0x28/0x64
Preemption disabled at:[<ffffff80080f1308>] cpu_startup_entry+0x350/0x42c

CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.70 #30
Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
Call trace:
[<ffffff800808a82c>] dump_backtrace+0x0/0x1c4
[<ffffff800808aa04>] show_stack+0x14/0x1c
[<ffffff80083c3b90>] dump_stack+0xa8/0xe0
[<ffffff80080cf560>] ___might_sleep+0x214/0x224
[<ffffff80080cf5e4>] __might_sleep+0x74/0x84
[<ffffff8008c6c1ac>] mutex_lock_nested+0x48/0x3cc
[<ffffff80083fe2b0>] rockchip_irq_bus_lock+0x28/0x34
[<ffffff800810b680>] __irq_get_desc_lock+0x68/0x88
[<ffffff800810d558>] __disable_irq_nosync+0x28/0x70
[<ffffff800810d5ac>] disable_irq_nosync+0xc/0x14
[<ffffff8008621f20>] bcmsdh_oob_intr_set+0x4c/0x6c
[<ffffff8008621f5c>] wlan_oob_irq+0x1c/0x38
[<ffffff800810bd28>] handle_irq_event_percpu+0x150/0x3e8
[<ffffff800810c004>] handle_irq_event+0x44/0x74
[<ffffff800810f53c>] handle_level_irq+0xe4/0x11c
[<ffffff800810b228>] generic_handle_irq+0x1c/0x2c
[<ffffff80083fe068>] rockchip_irq_demux+0xe0/0x188
[<ffffff800810b228>] generic_handle_irq+0x1c/0x2c
[<ffffff800810b5b0>] __handle_domain_irq+0xb0/0xec
[<ffffff8008080f70>] gic_handle_irq+0xbc/0x154

Change-Id: I7cfbeaf7df17fc4e923e89917199b7f1c773455a
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-06-06 20:52:45 +08:00