Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1617940
| From | Your Name <you@example.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 04/12] drm: bridge: analogix: Destroy connector & encoder when unbinding |
| Date | 2017-04-06 14:30 +0200 |
| Message-ID | <tteI3-8tl-41@gated-at.bofh.it> (permalink) |
| References | <tteI2-8tl-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Jeffy Chen <jeffy.chen@rock-chips.com>
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>
Signed-off-by: Your Name <you@example.com>
---
Changes in v4:
Address Andrzej Hajda <a.hajda@samsung.com>'s comments.
Changes in v3: None
Changes in v2: None
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index d05ade4..4c758ed 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1439,6 +1439,8 @@ void analogix_dp_unbind(struct device *dev, struct device *master,
struct analogix_dp_device *dp = dev_get_drvdata(dev);
analogix_dp_bridge_disable(dp->bridge);
+ dp->connector.funcs->destroy(&dp->connector);
+ dp->encoder->funcs->destroy(dp->encoder);
if (dp->plat_data->panel) {
if (drm_panel_unprepare(dp->plat_data->panel))
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 00/12] drm: rockchip: Fix rockchip drm unbind crash error Your Name <you@example.com> - 2017-04-06 14:30 +0200 [PATCH v4 12/12] drm/drm_ioctl.c: Break ioctl when drm device not registered Your Name <you@example.com> - 2017-04-06 14:30 +0200 [PATCH v4 01/12] drm: bridge: analogix: Detach panel when unbinding analogix dp Your Name <you@example.com> - 2017-04-06 14:30 +0200 [PATCH v4 04/12] drm: bridge: analogix: Destroy connector & encoder when unbinding Your Name <you@example.com> - 2017-04-06 14:30 +0200 [PATCH v4 06/12] drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding Your Name <you@example.com> - 2017-04-06 14:30 +0200 [PATCH v4 05/12] drm/rockchip: cdn-dp: Don't try to release firmware when not loaded Your Name <you@example.com> - 2017-04-06 14:30 +0200 [PATCH v4 02/12] drm: bridge: analogix: Unregister dp aux when unbinding Your Name <you@example.com> - 2017-04-06 14:30 +0200 [PATCH v4 10/12] drm/rockchip: Reoder drm bind/unbind sequence Your Name <you@example.com> - 2017-04-06 14:30 +0200
csiph-web