drm/amdgpu: Fix warning in dma_fence_is_later on resume from S3.
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix warning in dma_fence_is_later on resume from S3.
Problem:amdgpu_ttm_set_buffer_funcs_status destroys adev->mman.entity on suspend without releasing adev->mman.bdev.man[TTM_PL_VRAM].move fence so on resume the new drm_sched_entity.fence_context causes the warning against the old fence context which is different.
Fix:
When destroying sched_entity in amdgpu_ttm_set_buffer_funcs_status release man->move fence and set the pointer to NULL.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2 -0
@@ -1927,6 +1927,8 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable) }else {drm_sched_entity_destroy (adev->mman.entity.sched, &adev->mman.entity); +dma_fence_put (man->move); + man->move =NULL ; }/* this just adjusts TTM size idea, which sets lpfn to the correct value */
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1532101641-24755-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 20.07.2018 um 17:47 schrieb Andrey Grodzovsky:
Quoted 11 lines
Problem:
amdgpu_ttm_set_buffer_funcs_statusdestroysadev->mman.entityon suspend without releasing adev->mman.bdev.man[TTM_PL_VRAM].move fence so on resume the new drm_sched_entity.fence_context causes the warning against the old fence context which is different.Fix:
When destroyingsched_entityinamdgpu_ttm_set_buffer_funcs_statusreleaseman->movefence and set the pointer to NULL.Signed-off-by Andrey Grodzovsky <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable) · line 1934
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2
-0@@ -1927,6 +1927,8 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable) }else {drm_sched_entity_destroy (adev->mman.entity.sched, &adev->mman.entity); +dma_fence_put (man->move); + man->move =NULL ; }/* this just adjusts TTM size idea, which sets lpfn to the correct value */
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Zhang, Jerry (Junwei)
Acked-by Junwei ZhangQuoted 11 lines · Andrey Grodzovsky
Problem:
amdgpu_ttm_set_buffer_funcs_statusdestroysadev->mman.entityon suspend without releasing adev->mman.bdev.man[TTM_PL_VRAM].move fence so on resume the new drm_sched_entity.fence_context causes the warning against the old fence context which is different.Fix:
When destroyingsched_entityinamdgpu_ttm_set_buffer_funcs_statusreleaseman->movefence and set the pointer to NULL.Signed-off-by Andrey Grodzovsky <[email protected]>
Quoted 10 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable) · line 1934
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2
-0@@ -1927,6 +1927,8 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable) }else {drm_sched_entity_destroy (adev->mman.entity.sched, &adev->mman.entity); +dma_fence_put (man->move); + man->move =NULL ; }/* this just adjusts TTM size idea, which sets lpfn to the correct value */
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx