In bind the psr handler gets registered first before the core
analogix_dp_bind() gets called. So it should be the other way
around in unbind, first unbind the analogix_dp and then
unregister the psr.

Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Signed-off-by: Thierry Escande <thierry.esca...@collabora.com>
Signed-off-by: Heiko Stuebner <he...@sntech.de>
---
 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c 
b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index 37250ab63bd7..eb88c52336a7 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -370,8 +377,8 @@ static void rockchip_dp_unbind(struct device *dev, struct 
device *master,
 {
        struct rockchip_dp_device *dp = dev_get_drvdata(dev);
 
-       rockchip_drm_psr_unregister(&dp->encoder);
        analogix_dp_unbind(dp->adp);
+       rockchip_drm_psr_unregister(&dp->encoder);
        dp->encoder.funcs->destroy(&dp->encoder);
 }
 
-- 
2.15.1


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to