Commit Graph

613283 Commits

Author SHA1 Message Date
Finley Xiao
6598bfd2a5 arm64: dts: rockchip: rk3308: Modify pvtm voltage selector map table
Change-Id: I8a10087a758ab1c905d5d6395ddc45ebda53814d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-10-15 10:32:03 +08:00
Jianqun Xu
9d63b7363d arm64: dts: rockchip: remove io-domain/pmu-io-domain for rk1808
RK1808 SoCs support Auto-selection feature, which descript by
PMU_GRF_IO_VSEL1.

Change-Id: I43a240306d95b686b9801d2fe2a2a6f141ec2834
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-10-15 10:29:37 +08:00
Huibin Hong
d652b183b3 arm64: dts: rockchip: disable uart and spi dma for rk1808
There is only one dmac of rk1808, but more than 30 peripheral
may use dma, so disable uart and spi dma as default. Enable it
by property below:
dma-names = "tx", "rx";

Change-Id: I67347c1459a1a11efa00b08cf21273175b6028a0
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-10-15 10:26:41 +08:00
Hu Kejun
83bf424780 media: i2c: add g_frame_interval function
Change-Id: Iae23985499357d9e544bd94ed779ca4742e49c42
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-10-15 09:39:14 +08:00
Bian Jin chen
1481e8ff9f arm64: dts: rockchip: rk3326-863-lp3-v10-avb: compatible with emmc and nand.
Android init will access "/proc/device-tree/firmware/android/boot_devices",
    then create symlinks for fstab:
dev/block/by-name/partition -> dev/block/type/${boot_devices}/by-name/partition

Change-Id: I1573686ea53a5226995b4d65a85636fcdd848dfa
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2018-10-12 19:16:49 +08:00
David Wu
56850f2349 pinctrl: rockchip: Add spi1/spi2 route select function for rk1808
Change-Id: I127972134329f4877b8bd456b489c1ae7827eafe
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-10-12 19:07:33 +08:00
David Wu
0d9f037d82 picntrl: rockchip: fix pull register offset for rk1808
Change-Id: Ie7f6c1129e831fed1fad5751039a99e98a493f9e
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-10-12 19:06:12 +08:00
Shixiang Zheng
9995649b15 arm64: dts: rockchip: enable rga device node for rk1808-evb-v10
Change-Id: I466e7b1a7ac7944fa2b63e850c48eadee279f6f1
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2018-10-12 19:02:09 +08:00
Shixiang Zheng
d1df8bb20e arm64: dts: rockchip: add rga node for rk1808
Change-Id: I526781fc6716276ad0500e8d7615361f77dc031a
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2018-10-12 19:01:41 +08:00
Ziyuan Xu
e919ced3e4 arm64: rk1808_linux_defconfig: disable CONFIG_PHY_ROCKCHIP_EMMC
The rockchip-emmc-phy driver is used for rk3399, so disable it
for rk1808.

Change-Id: I1642ff07b8749a1487b5515f86dfb1161151409d
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-12 11:54:51 +08:00
Ziyuan Xu
4ef2449889 clk: rockchip: fix wrong mmc phase shift for rk3328
mmc sample shift is 0 for rk3328 refer to user manaul.
So it's broken if we enable mmc tuning for rk3328.

Change-Id: I863204b94be29842294597b1a1e10b3d7840e8d8
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-12 11:26:49 +08:00
Sandy Huang
ad4dadaa24 drm/rockchip: csi tx: enable irq for debug
Change-Id: I406abc16268a70ef4e69dbbf434deef103f32149
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-10-12 11:26:33 +08:00
Jianqun Xu
fb4f9d860b pinctrl: rockchip: fix rk1808_mux_route_data
Fix rk1808_mux_route_data, support:
i2c2m0_sda
i2c2m1_sda
uart1_rxm0
uart1_rxm1
uart2_rxm0
uart2_rxm1
uart2_rxm2

Tested on RK1808-evb.

Change-Id: Iea221a5cab8a63e336e183d30f3faaffb3a14873
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-10-12 11:06:38 +08:00
Tao Huang
5b5a08939a arm64: rk1808_linux_defconfig: disable unused ethernet driver
Change-Id: I7c0f1605c1082b940301ac7aca4e77b6dc00e553
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-12 10:20:31 +08:00
Liang Chen
1b18665d28 arm64: dts: rockchip: rk1808: Add pvtm node
Change-Id: Ifba22d49d08cea1897a963b4ab1bc43791e78032
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-12 09:46:22 +08:00
Liang Chen
212bbd910c dt-bindings: soc: rockchip: add pvtm for rk1808 SoCs
Change-Id: I89c153f98d027e6e0b5d9b1816c70f3ec2c66f6d
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-11 21:31:28 +08:00
Liang Chen
cae46ca822 soc: rockchip: pvtm: Add support for RK1808 SoCs
This adds the necessary data for handling pvtm on the rk1808.

Change-Id: Ic283bd854f43a8b46722d28008856005bec3582b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-11 21:23:38 +08:00
Liang Chen
0c08c32cae dt-bindings: soc: rockchip: add coregrf compatible string for rk1808
Change-Id: I55687ca089a43e9b3d8f293717747866e33e77cc
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-11 21:22:04 +08:00
Sandy Huang
927d98bf4f drm/rockchip: rk1808 vop: update vop raw max input and output
rk1808 vop raw max input and output resolution is 5120x2880.

Change-Id: Idf6bca98b03c913878ae950e55722b5204958990
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-10-11 20:57:25 +08:00
Sandy Huang
670d74a8a5 drm/rockchip: csi tx: define mipi csi tx raw format
Change-Id: Ib3e1202d91a46db88616edfe70be4ba46eb5a721
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-10-11 20:57:05 +08:00
Liang Chen
bb19e4692c arm64: dts: rockchip: rk1808: Add watchdog node
Change-Id: I1986d09ab35c5c0b7cb5ec77a1a5b767325ca03b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-11 20:49:39 +08:00
Shixiang Zheng
0fb4dd2ca8 video/rockchip: rga2 && rga add debug nod and some auto check case and combine rga version
add rga debug node rga1: d/rga_debug/rga rga2: d/rga2_debug/rga2
auto check case :align check,scale check,memory check.
combine rga version from kernel 3.1 and 4.4 into one version by macro definition.

Change-Id: I97f7d9c670f81ae13768029126f7dbd6976c79f1
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2018-10-11 20:40:00 +08:00
David Wu
93bdae5de9 arm64: configs: Enable ethernet for rk1808_linux_defconfig
Change-Id: Icf1ac7b0584598fd2885112837711a9057360d0b
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-10-11 20:38:11 +08:00
David Wu
c9b578b5cc arm64: dts: rockchip: Add gmac support for rk1808-evb
Change-Id: Iba573b78dfe46d7278d6a425da56dd2d35114e32
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-10-11 20:37:47 +08:00
David Wu
865e382104 arm64: dts: rockchip: Change the gmac tx drive strength to 8ma for rk1808
Change-Id: I094517b037b8c814923e65613f7830ee7fd7b2bd
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-10-11 20:37:31 +08:00
Cai YiWei
a4bb4f5d2c media: rockchip: isp1: fix cplanes address calculation error
for multiple cplane:
cplane 0 addr: Y addr + Y size
cplane 1 addr: cplane 0 addr + cplane 0 size
and cplane size refer to xysubs

Change-Id: I50dbb0175f04452c62dd327f73ede1ca4a2d2ad7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-10-11 18:42:42 +08:00
Ziyuan Xu
10dbf59d3f iio: light: vl6180: add something initialization from vendor
Change-Id: I77ca2c836c998be5158e222909834bda8bb24245
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-11 18:36:09 +08:00
Ziyuan Xu
b2950611bb arm64: configs: rk1808_linux: enable CONFIG_SND_SOC_RK817
Change-Id: I23c5619e8d9b1b4366eb11ffb262f7b73e50c7e8
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-11 18:27:25 +08:00
Ziyuan Xu
faa5c25228 arm64: configs: rk1808_linux: update form savedefconfig
Change-Id: Ie7ff945938fdad3a4ba1b565eb899afd224e36fa
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-11 18:27:25 +08:00
Wyon Bi
b9c21ec37c drm/rockchip: lvds: check PLL lock state before enable tx
Change-Id: I299d93f89ec52d3778bc2b18cb9105f9910dd5fc
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 16:18:38 +08:00
Tao Huang
f125bf6b07 soc: rockchip: remove default y for CPU_RK3308
Change-Id: I79330a302596e6c1a433a2b6db0e4d141975fa59
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 15:12:13 +08:00
Tao Huang
3bd8e047d3 soc: rockchip: remove default y for CPU_RV110X
Change-Id: Ib423c7c60502c566da1e5c36fb6712f508c8b9b5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 15:07:25 +08:00
Tao Huang
b47bc74541 soc: rockchip: remove default y for CPU_RK1808
Change-Id: I637197b927a243e9403719ccdcad426e61f0db34
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 15:06:48 +08:00
Tao Huang
29f42eb299 ARM: rk3308_linux_aarch32_debug_defconfig: enable CRYPTO_LZ4
Keep support lz4 compression for zram

Fixes: 30a850bbf1 ("UPSTREAM: zram: delete custom lzo/lz4")
Change-Id: I0f2bd3404b2532ead9340ee6bf4ad66fc0309ba2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 14:36:45 +08:00
Tao Huang
5e2493f821 ARM: rk3308_linux_aarch32_defconfig: enable CRYPTO_LZ4
Keep support lz4 compression for zram

Fixes: 30a850bbf1 ("UPSTREAM: zram: delete custom lzo/lz4")
Change-Id: I79170f53ab92d17586af9226e4472e20f6894ee5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 14:36:45 +08:00
Wyon Bi
b0c9700602 drm/bridge: analogix_dp: remove dead codes
Change-Id: I8ec07028d911d48756fd5ce59ca4fd6e544230b5
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 14:13:47 +08:00
Wyon Bi
289059c61b drm/bridge: analogix_dp: rework hpd gpio detection
Change-Id: I0d62201095ab82f5ed0ddcfd53abaef6089a2e9d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 14:13:07 +08:00
Tao Huang
828b971fb0 soc: rockchip: remove default y for CPU_RK3366
Change-Id: Idfca39cc6261c951b87a50366334e6cda2aafa63
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 14:08:53 +08:00
Wyon Bi
357b22cca8 drm/bridge: analogix_dp: Fix AUX CH not work properly when disabled the rockchip logo
Fixes: 44f714e435 (drm/analogix: dp: remove some function which cause loader logo flash)
Change-Id: Ia4d999ce4287e75fd23c4920e1b4e07e7004f4aa
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 12:13:59 +08:00
Wyon Bi
e82ecb98b4 drm/bridge: analogix_dp: Fix unbalanced phy_power_on
Change-Id: I25b6967f651e2eab9a10029f4b241b8ed8d50b59
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 12:13:45 +08:00
Wyon Bi
77ec03b5af drm/rockchip: edp: Fix unbalanced power status
Change-Id: I85f2c9b051a0933a13a709ad8eb27bc2c4a2b990
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 12:13:14 +08:00
Lin Huang
0ab00aeb46 UPSTREAM: drm/bridge: analogix_dp: Move enable video into config_video()
We need to enable video before analogix_dp_is_video_stream_on(), so
we can get the right video stream status.

We needed to increase the delay in the timeout loop because there is
random "Timeout of video streamclk ok" message happen when debug edp
panel, this time do not define in the spec.

Cc: 征增 王 <wzz@rock-chips.com>
Cc: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-2-enric.balletbo@collabora.com

Change-Id: I46ed11886a0e82a7d61bdb968ff1ea357a662d0a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 93cba9dab1)
2018-10-11 12:11:58 +08:00
Sylwester Nawrocki
836ec984e2 UPSTREAM: drm/bridge: analogix: Remove unreachable code from analogic_dp_core.c
This patch removes an unreachable code found by the SVACE static
analysis:

UNREACHABLE_CODE: This statement in the source code might be unreachable
during program execution.
[unreachable] unreachable at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:787
retval != 0 is always false because at this program point the variable retval
is always equal to 0 at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:786

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171212112037.13107-1-s.nawrocki@samsung.com

Change-Id: Ia96459ce8bdd5062f7c51921837462c84586d0cf
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit c4712f27be)
2018-10-11 12:11:58 +08:00
Wyon Bi
cdda59cd03 Revert "drm: bridge: analogix: Avoid timeout warnings in analogix_dp_config_video()"
This reverts commit dd25e35e08.

Change-Id: Id3f886bdfeddf26626087c67cafe263c01ce372d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 12:11:58 +08:00
Marek Szyprowski
2bbddaf948 BACKPORT: drm/bridge: analogix_dp: Postpone enabling runtime power management
Enabling runtime power management early in analogix_dp_bind() causes following
kernel NULL pointer dereference:

Unable to handle kernel NULL pointer dereference at virtual address 000007d8
pgd = 28ffa2e4
[000007d8] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 6 PID: 69 Comm: kworker/6:1 Not tainted 4.16.0-rc1-00062-ge25751974ba8 #3622
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
Workqueue: events deferred_probe_work_func
PC is at analogix_dp_resume+0x8/0xc0
LR is at pm_generic_runtime_resume+0x2c/0x38
pc : [<c0531b98>]    lr : [<c0543fec>] psr: a0000113
sp : ee13fbd8  ip : 0000001a  fp : 00000001
r10: ee0eb080  r9 : c0552bd8  r8 : c0fb1d98
r7 : eebb1010  r6 : eeae9808  r5 : 00000000  r4 : d4850415
r3 : ee0ed010  r2 : b2d05e00  r1 : 00000000  r0 : 00000000
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM Segment none
Control: 10c5387d  Table: 2000406a  DAC: 00000051
Process kworker/6:1 (pid: 69, stack limit = 0x913205b4)
Stack: (0xee13fbd8 to 0xee140000)
...
[<c0531b98>] (analogix_dp_resume) from [<c0543fec>] (pm_generic_runtime_resume+0x2c/0x38)
[<c0543fec>] (pm_generic_runtime_resume) from [<c054ffb4>] (__genpd_runtime_resume+0x2c/0x8c)
[<c054ffb4>] (__genpd_runtime_resume) from [<c0552d24>] (genpd_runtime_resume+0x14c/0x258)
[<c0552d24>] (genpd_runtime_resume) from [<c0547798>] (__rpm_callback+0x134/0x214)
[<c0547798>] (__rpm_callback) from [<c0547898>] (rpm_callback+0x20/0x80)
[<c0547898>] (rpm_callback) from [<c0546ff4>] (rpm_resume+0x3a0/0x734)
[<c0546ff4>] (rpm_resume) from [<c05475ec>] (__pm_runtime_resume+0x64/0x9c)
[<c05475ec>] (__pm_runtime_resume) from [<c053b95c>] (__device_attach+0x8c/0x134)
[<c053b95c>] (__device_attach) from [<c053ad08>] (bus_probe_device+0x88/0x90)
[<c053ad08>] (bus_probe_device) from [<c05390d0>] (device_add+0x3a8/0x580)
[<c05390d0>] (device_add) from [<c06764c4>] (i2c_register_adapter+0xd4/0x3ec)
[<c06764c4>] (i2c_register_adapter) from [<c05321c8>] (analogix_dp_bind+0x2a0/0x410)
[<c05321c8>] (analogix_dp_bind) from [<c0528e90>] (exynos_dp_bind+0x9c/0x12c)
[<c0528e90>] (exynos_dp_bind) from [<c0535bc4>] (component_bind_all+0xfc/0x258)
[<c0535bc4>] (component_bind_all) from [<c0522ee8>] (exynos_drm_bind+0x15c/0x28c)
[<c0522ee8>] (exynos_drm_bind) from [<c0536378>] (try_to_bring_up_master+0x1b8/0x29c)
[<c0536378>] (try_to_bring_up_master) from [<c05364fc>] (component_add+0xa0/0x170)
[<c05364fc>] (component_add) from [<c0528fe4>] (exynos_dp_probe+0x64/0xb8)
[<c0528fe4>] (exynos_dp_probe) from [<c053debc>] (platform_drv_probe+0x50/0xb0)
[<c053debc>] (platform_drv_probe) from [<c053bd18>] (driver_probe_device+0x2b8/0x4a0)
[<c053bd18>] (driver_probe_device) from [<c0539e4c>] (bus_for_each_drv+0x44/0x8c)
[<c0539e4c>] (bus_for_each_drv) from [<c053b970>] (__device_attach+0xa0/0x134)
[<c053b970>] (__device_attach) from [<c053ad08>] (bus_probe_device+0x88/0x90)
[<c053ad08>] (bus_probe_device) from [<c053b258>] (deferred_probe_work_func+0x3c/0x168)
[<c053b258>] (deferred_probe_work_func) from [<c014352c>] (process_one_work+0x1d0/0x7bc)
[<c014352c>] (process_one_work) from [<c0143b84>] (worker_thread+0x34/0x4dc)
[<c0143b84>] (worker_thread) from [<c014a30c>] (kthread+0x128/0x164)
[<c014a30c>] (kthread) from [<c01010b4>] (ret_from_fork+0x14/0x20)
Exception stack(0xee13ffb0 to 0xee13fff8)
ffa0:                                     00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e2800e37 eafee601 e92d4070 e1a05000 (e59067d8)
---[ end trace bf6046013df7cab2 ]---

This oops happens, because analogix_dp_bind() calls drm_dp_aux_register()
which registers i2c adapter. I2C core tries to runtime get i2c host
device during registration. This ends in analogix_dp_resume(), but dp
context is NULL there. dp context is set in exynos_dp_bind() after
executing analogix_dp_bind(). Fix this issue by postponing enabling runtime
power management after drm_dp_aux_register().

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180305085741.18896-3-m.szyprowski@samsung.com

Change-Id: I728633e4f827614c95e0cf20b1cbf48e96ec4577
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit f25c835815)
2018-10-11 12:11:58 +08:00
Marek Szyprowski
c1212cdf9f BACKPORT: drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback
get_modes() callback might be called asynchronously from the DRM core and
it is not synchronized with bridge_enable(), which sets proper runtime PM
state of the main DP device. Fix this by calling pm_runtime_get_sync()
before calling drm_get_edid(), which in turn calls drm_dp_i2c_xfer() and
analogix_dp_transfer() to ensure that main DP device is runtime active
when doing any access to its registers.

This fixes the following kernel issue on Samsung Exynos5250 Snow board:
Unhandled fault: imprecise external abort (0x406) at 0x00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: : 406 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 62 Comm: kworker/0:2 Not tainted 4.13.0-rc2-00364-g4a97a3da420b #3357
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
Workqueue: events output_poll_execute
task: edc14800 task.stack: edcb2000
PC is at analogix_dp_transfer+0x15c/0x2fc
LR is at analogix_dp_transfer+0x134/0x2fc
pc : [<c0468538>]    lr : [<c0468510>]    psr: 60000013
sp : edcb3be8  ip : 0000002a  fp : 00000001
r10: 00000000  r9 : edcb3cd8  r8 : edcb3c40
r7 : 00000000  r6 : edd3b380  r5 : edd3b010  r4 : 00000064
r3 : 00000000  r2 : f0ad3000  r1 : edcb3c40  r0 : edd3b010
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c5387d  Table: 4000406a  DAC: 00000051
Process kworker/0:2 (pid: 62, stack limit = 0xedcb2210)
Stack: (0xedcb3be8 to 0xedcb4000)
[<c0468538>] (analogix_dp_transfer) from [<c0424ba4>] (drm_dp_i2c_do_msg+0x8c/0x2b4)
[<c0424ba4>] (drm_dp_i2c_do_msg) from [<c0424e64>] (drm_dp_i2c_xfer+0x98/0x214)
[<c0424e64>] (drm_dp_i2c_xfer) from [<c057b2d8>] (__i2c_transfer+0x140/0x29c)
[<c057b2d8>] (__i2c_transfer) from [<c057b4a4>] (i2c_transfer+0x70/0xe4)
[<c057b4a4>] (i2c_transfer) from [<c0441de4>] (drm_do_probe_ddc_edid+0xb4/0x114)
[<c0441de4>] (drm_do_probe_ddc_edid) from [<c0441e5c>] (drm_probe_ddc+0x18/0x28)
[<c0441e5c>] (drm_probe_ddc) from [<c0445728>] (drm_get_edid+0x124/0x2d4)
[<c0445728>] (drm_get_edid) from [<c0465ea0>] (analogix_dp_get_modes+0x90/0x114)
[<c0465ea0>] (analogix_dp_get_modes) from [<c0425e8c>] (drm_helper_probe_single_connector_modes+0x198/0x68c)
[<c0425e8c>] (drm_helper_probe_single_connector_modes) from [<c04325d4>] (drm_setup_crtcs+0x1b4/0xd18)
[<c04325d4>] (drm_setup_crtcs) from [<c04344a8>] (drm_fb_helper_hotplug_event+0x94/0xd0)
[<c04344a8>] (drm_fb_helper_hotplug_event) from [<c0425a50>] (drm_kms_helper_hotplug_event+0x24/0x28)
[<c0425a50>] (drm_kms_helper_hotplug_event) from [<c04263ec>] (output_poll_execute+0x6c/0x174)
[<c04263ec>] (output_poll_execute) from [<c0136f18>] (process_one_work+0x188/0x3fc)
[<c0136f18>] (process_one_work) from [<c01371f4>] (worker_thread+0x30/0x4b8)
[<c01371f4>] (worker_thread) from [<c013daf8>] (kthread+0x128/0x164)
[<c013daf8>] (kthread) from [<c0108510>] (ret_from_fork+0x14/0x24)
Code: 0a000002 ea000009 e2544001 0a00004a (e59537c8)
---[ end trace cddc7919c79f7878 ]---

Reported-by: Misha Komarovskiy <zombah@gmail.com>
CC: stable@vger.kernel.org # v4.10+
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171121074936.22520-1-m.szyprowski@samsung.com

Change-Id: I9f2ba9175dd0b733ddd47f601d6bd4207e831eb9
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 510353a637)
2018-10-11 12:11:58 +08:00
Jeffy Chen
cada5e5f49 UPSTREAM: drm: bridge: analogix: Destroy connector & encoder when unbinding
Normally we do this in drm_mode_config_cleanup. But:
1/ analogix dp's connector is allocated in bind, and freed after unbind.
So we need to destroy it in unbind to avoid further access.
2/ the drm bridge is attached in bind, and detached in encoder cleanup.
So we need to destroy encoder in unbind.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-5-git-send-email-jeffy.chen@rock-chips.com

Change-Id: I0941dd1b02e0d55775f3d6d888c7591f1f478e4d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 37e0487788)
2018-10-11 12:11:58 +08:00
Jeffy Chen
49ae4e4a2d UPSTREAM: drm: bridge: analogix: Disable clock when unbinding
The clock is enabled when binding analogix dp.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-4-git-send-email-jeffy.chen@rock-chips.com

Change-Id: I6b62b38646499d2e66f02e4547dec4b8acad04f4
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit ede2fdf677)
2018-10-11 12:11:58 +08:00
Jeffy Chen
0442dd8d15 UPSTREAM: drm: bridge: analogix: Unregister dp aux when unbinding
The dp aux is registered when binding analogix dp.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-3-git-send-email-jeffy.chen@rock-chips.com

Change-Id: I0f70fb0e1e9ad3e430f93980cfcdebb1afda8070
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 7b017a5816)
2018-10-11 12:11:58 +08:00
Jeffy Chen
97a243d365 UPSTREAM: drm: bridge: analogix: Detach panel when unbinding analogix dp
The panel is attached when binding analogix dp.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-2-git-send-email-jeffy.chen@rock-chips.com

Change-Id: I51cae59226b9b93a496f4b705b5cb3a51e85cbc9
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 18aea7db84)
2018-10-11 12:11:58 +08:00