From: "Leo (Sunpeng) Li" <sunpeng...@amd.com>

Because of the following patch:

Leo (Sunpeng) Li    Move copy_construct from state_alloc to atomic_check

We do not allocate the DC state within dm_atomic_state_alloc anymore.

Since this function is a part of the S3 resume code path, we should not
release the state when refreshing it within amdgpu_dm_display_resume.
Just create it, as it has already been freed.

Signed-off-by: Leo (Sunpeng) Li <sunpeng...@amd.com>
Reviewed-by: Roman Li <roman...@amd.com>
Reviewed-by: Harry Wentland <harry.wentl...@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 8910a820fbf5..a6424eb1c1a5 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -691,8 +691,6 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)
         * disabled. Refresh cached state to match actual current state before
         * restoring it.
         */
-       WARN_ON(kref_read(&cached_state->context->refcount) > 1);
-       dc_release_state(cached_state->context);
 
        cached_state->context = dc_create_state();
        ASSERT(cached_state->context);
-- 
2.14.1

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

Reply via email to