* [PATCH 1/2] drm/amdgpu: always cancel uvd idel handler in uvd suspend
@ 2017-12-15 7:32 Jim Qu
[not found] ` <1513323175-9063-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Jim Qu @ 2017-12-15 7:32 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Jim Qu
Change-Id: I62720a2df92005c8838f2e6a505f7d4840903ebb
Signed-off-by: Jim Qu <Jim.Qu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index 916e516..89d59fd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -297,6 +297,8 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
if (adev->uvd.vcpu_bo == NULL)
return 0;
+ cancel_delayed_work_sync(&adev->uvd.idle_work);
+
for (i = 0; i < adev->uvd.max_handles; ++i)
if (atomic_read(&adev->uvd.handles[i]))
break;
@@ -304,8 +306,6 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
if (i == AMDGPU_MAX_UVD_HANDLES)
return 0;
- cancel_delayed_work_sync(&adev->uvd.idle_work);
-
size = amdgpu_bo_size(adev->uvd.vcpu_bo);
ptr = adev->uvd.cpu_addr;
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <1513323175-9063-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>]
* [PATCH 2/2] drm/amdgpu: restore uvd fence seq in uvd resume [not found] ` <1513323175-9063-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org> @ 2017-12-15 7:32 ` Jim Qu [not found] ` <1513323175-9063-2-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org> 2017-12-15 9:23 ` [PATCH 1/2] drm/amdgpu: always cancel uvd idel handler in uvd suspend Christian König 1 sibling, 1 reply; 4+ messages in thread From: Jim Qu @ 2017-12-15 7:32 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Jim Qu otherwise, uvd block will be never powered up in ring begin_use() callback. uvd ring test will be fail in resume in rumtime pm. Change-Id: Ic623e789cc682ea07af228898f9aaf22511bbe20 Signed-off-by: Jim Qu <Jim.Qu@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index 89d59fd..e444847 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -346,6 +346,8 @@ int amdgpu_uvd_resume(struct amdgpu_device *adev) ptr += le32_to_cpu(hdr->ucode_size_bytes); } memset_io(ptr, 0, size); + /* to restore uvd fence seq */ + amdgpu_fence_driver_force_completion(&adev->uvd.ring); } return 0; -- 1.9.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1513323175-9063-2-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>]
* 答复: [PATCH 2/2] drm/amdgpu: restore uvd fence seq in uvd resume [not found] ` <1513323175-9063-2-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org> @ 2017-12-15 7:37 ` Qu, Jim 0 siblings, 0 replies; 4+ messages in thread From: Qu, Jim @ 2017-12-15 7:37 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Hi Christian, I also checked move uvd fence memory into GTT bo as same as other IPs', but it has ib test fail on Bonaire. so the patch uses amdgpu_fence_driver_force_completion() to update fence seq as you suggestion. Please review. Thanks JimQu ________________________________________ 发件人: Jim Qu <Jim.Qu@amd.com> 发送时间: 2017年12月15日 15:32 收件人: amd-gfx@lists.freedesktop.org 抄送: Qu, Jim 主题: [PATCH 2/2] drm/amdgpu: restore uvd fence seq in uvd resume otherwise, uvd block will be never powered up in ring begin_use() callback. uvd ring test will be fail in resume in rumtime pm. Change-Id: Ic623e789cc682ea07af228898f9aaf22511bbe20 Signed-off-by: Jim Qu <Jim.Qu@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index 89d59fd..e444847 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -346,6 +346,8 @@ int amdgpu_uvd_resume(struct amdgpu_device *adev) ptr += le32_to_cpu(hdr->ucode_size_bytes); } memset_io(ptr, 0, size); + /* to restore uvd fence seq */ + amdgpu_fence_driver_force_completion(&adev->uvd.ring); } return 0; -- 1.9.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] drm/amdgpu: always cancel uvd idel handler in uvd suspend [not found] ` <1513323175-9063-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org> 2017-12-15 7:32 ` [PATCH 2/2] drm/amdgpu: restore uvd fence seq in uvd resume Jim Qu @ 2017-12-15 9:23 ` Christian König 1 sibling, 0 replies; 4+ messages in thread From: Christian König @ 2017-12-15 9:23 UTC (permalink / raw) To: Jim Qu, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW Am 15.12.2017 um 08:32 schrieb Jim Qu: > Change-Id: I62720a2df92005c8838f2e6a505f7d4840903ebb > Signed-off-by: Jim Qu <Jim.Qu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> for both. > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c > index 916e516..89d59fd 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c > @@ -297,6 +297,8 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev) > if (adev->uvd.vcpu_bo == NULL) > return 0; > > + cancel_delayed_work_sync(&adev->uvd.idle_work); > + > for (i = 0; i < adev->uvd.max_handles; ++i) > if (atomic_read(&adev->uvd.handles[i])) > break; > @@ -304,8 +306,6 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev) > if (i == AMDGPU_MAX_UVD_HANDLES) > return 0; > > - cancel_delayed_work_sync(&adev->uvd.idle_work); > - > size = amdgpu_bo_size(adev->uvd.vcpu_bo); > ptr = adev->uvd.cpu_addr; > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-15 9:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-15 7:32 [PATCH 1/2] drm/amdgpu: always cancel uvd idel handler in uvd suspend Jim Qu
[not found] ` <1513323175-9063-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
2017-12-15 7:32 ` [PATCH 2/2] drm/amdgpu: restore uvd fence seq in uvd resume Jim Qu
[not found] ` <1513323175-9063-2-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
2017-12-15 7:37 ` 答复: " Qu, Jim
2017-12-15 9:23 ` [PATCH 1/2] drm/amdgpu: always cancel uvd idel handler in uvd suspend Christian König
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox