linux/drivers/gpu/drm/bridge
Marek Szyprowski f0a8b49c03 drm/bridge: analogix dp: Fix runtime PM state on driver bind
Analogix_dp_bind() can be called from component framework, which doesn't
guarantee proper runtime PM state of the device during bind operation,
so ensure that device is runtime active before doing any register access.
This ensures that the power domain, to which DP module belongs, is turned
on. While at it, also fix the unbalanced call to phy_power_on() in
analogix_dp_bind() function.

This patch solves the following kernel oops 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: 75 Comm: kworker/0:2 Not tainted 4.9.0 #1046
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
Workqueue: events deferred_probe_work_func
task: ee272300 task.stack: ee312000
PC is at analogix_dp_enable_sw_function+0x18/0x2c
LR is at analogix_dp_init_dp+0x2c/0x50
...
[<c03fcb38>] (analogix_dp_enable_sw_function) from [<c03fa9c4>] (analogix_dp_init_dp+0x2c/0x50)
[<c03fa9c4>] (analogix_dp_init_dp) from [<c03fab6c>] (analogix_dp_bind+0x184/0x42c)
[<c03fab6c>] (analogix_dp_bind) from [<c03fdb84>] (component_bind_all+0xf0/0x218)
[<c03fdb84>] (component_bind_all) from [<c03ed64c>] (exynos_drm_load+0x134/0x200)
[<c03ed64c>] (exynos_drm_load) from [<c03d5058>] (drm_dev_register+0xa0/0xd0)
[<c03d5058>] (drm_dev_register) from [<c03d66b8>] (drm_platform_init+0x58/0xb0)
[<c03d66b8>] (drm_platform_init) from [<c03fe0c4>] (try_to_bring_up_master+0x14c/0x188)
[<c03fe0c4>] (try_to_bring_up_master) from [<c03fe188>] (component_add+0x88/0x138)
[<c03fe188>] (component_add) from [<c0403a38>] (platform_drv_probe+0x50/0xb0)
[<c0403a38>] (platform_drv_probe) from [<c0402470>] (driver_probe_device+0x1f0/0x2a8)
[<c0402470>] (driver_probe_device) from [<c0400a54>] (bus_for_each_drv+0x44/0x8c)
[<c0400a54>] (bus_for_each_drv) from [<c04021f8>] (__device_attach+0x9c/0x100)
[<c04021f8>] (__device_attach) from [<c04018e8>] (bus_probe_device+0x84/0x8c)
[<c04018e8>] (bus_probe_device) from [<c0401d1c>] (deferred_probe_work_func+0x60/0x8c)
[<c0401d1c>] (deferred_probe_work_func) from [<c012fc14>] (process_one_work+0x120/0x318)
[<c012fc14>] (process_one_work) from [<c012fe34>] (process_scheduled_works+0x28/0x38)
[<c012fe34>] (process_scheduled_works) from [<c0130048>] (worker_thread+0x204/0x4ac)
[<c0130048>] (worker_thread) from [<c01352c4>] (kthread+0xd8/0xf4)
[<c01352c4>] (kthread) from [<c0107978>] (ret_from_fork+0x14/0x3c)
Code: e59035f0 e5935018 f57ff04f e3c55001 (f57ff04e)
---[ end trace 3d1d0d87796de344 ]---

Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1483091866-1088-1-git-send-email-m.szyprowski@samsung.com
2017-01-09 13:30:37 +05:30
..
adv7511 drm/bridge: adv7511: Enable the audio data and clock pads on adv7533 2016-11-29 09:48:54 +05:30
analogix drm/bridge: analogix dp: Fix runtime PM state on driver bind 2017-01-09 13:30:37 +05:30
analogix-anx78xx.c drm/bridge: Call drm_connector_cleanup directly 2016-10-05 15:20:36 +02:00
analogix-anx78xx.h drm/bridge: Add Analogix anx78xx support 2016-05-12 11:32:14 +02:00
dumb-vga-dac.c drm/bridge: dumb-vga-dac: Support a VDD regulator supply 2016-11-17 13:51:45 +05:30
dw-hdmi-ahb-audio.c drm/bridge: dw-hdmi: Delete unnecessary assignment for the field "owner" 2016-08-23 11:34:26 -04:00
dw-hdmi-audio.h drm: bridge: add DesignWare HDMI I2S audio support 2016-11-24 14:27:15 +05:30
dw-hdmi-i2s-audio.c drm: bridge: add DesignWare HDMI I2S audio support 2016-11-24 14:27:15 +05:30
dw-hdmi.c drm: bridge: add DesignWare HDMI I2S audio support 2016-11-24 14:27:15 +05:30
dw-hdmi.h drm: bridge: add DesignWare HDMI I2S audio support 2016-11-24 14:27:15 +05:30
Kconfig tilcdc changes for v4.10 2016-12-01 09:26:55 +10:00
Makefile tilcdc changes for v4.10 2016-12-01 09:26:55 +10:00
nxp-ptn3460.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
parade-ps8622.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
sii902x.c drm/bridge: Add sii902x driver 2016-06-20 15:55:49 +02:00
sil-sii8620.c drm/bridge: fix platform_no_drv_owner.cocci warnings 2016-10-27 11:35:23 +05:30
sil-sii8620.h drm/bridge: add Silicon Image SiI8620 driver 2016-10-26 11:19:12 +05:30
tc358767.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
ti-tfp410.c drm/bridge: Add ti-tfp410 DVI transmitter driver 2016-11-30 14:17:14 +02:00