mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
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)
This commit is contained in:
@@ -1315,6 +1315,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))
|
||||
|
||||
Reference in New Issue
Block a user