From: Corbin McElhanney <corbin.mcelhan...@amd.com>

Change-Id: I7bd6ec8b171178bab8e3a29b7fc4e6d17120e9aa
Signed-off-by: Corbin McElhanney <corbin.mcelhan...@amd.com>
Reviewed-by: Tony Cheng <tony.ch...@amd.com>
Acked-by: Harry Wentland <harry.wentl...@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index f305780c36ce..b69a726717d9 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1714,8 +1714,11 @@ void dc_update_planes_and_stream(struct dc *dc,
        }
 
        if (core_dc->current_context != context) {
-               dc_release_validate_context(core_dc->current_context);
+               struct validate_context *old = core_dc->current_context;
+
                core_dc->current_context = context;
+               dc_release_validate_context(old);
+
        }
        return;
 
-- 
2.11.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to