* [PATCH 1/2] drm/amdgpu: Take uvd encode rings into account in idle work
@ 2018-05-17 18:03 Alex Deucher
[not found] ` <20180517180354.14541-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2018-05-17 18:03 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Take the encode rings into account in the idle work handler.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index be2917c6698e..fd46c0916770 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -1146,10 +1146,13 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
{
struct amdgpu_device *adev =
container_of(work, struct amdgpu_device, uvd.inst->idle_work.work);
- unsigned fences = 0, i;
+ unsigned fences = 0, i, j;
for (i = 0; i < adev->uvd.num_uvd_inst; ++i) {
fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring);
+ for (j = 0; j < adev->uvd.num_uvd_inst; ++j) {
+ fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring_enc[j]);
+ }
}
if (fences == 0) {
--
2.13.6
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] drm/amdgpu: Take vcn encode rings into account in idle work
[not found] ` <20180517180354.14541-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-17 18:03 ` Alex Deucher
[not found] ` <20180517180354.14541-2-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2018-05-17 18:03 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Take the encode rings into account in the idle work handler.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index e5d234cf804f..60468385e6b4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -205,6 +205,11 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
struct amdgpu_device *adev =
container_of(work, struct amdgpu_device, vcn.idle_work.work);
unsigned fences = amdgpu_fence_count_emitted(&adev->vcn.ring_dec);
+ unsigned i;
+
+ for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
+ fences += amdgpu_fence_count_emitted(&adev->vcn.ring_enc[i]);
+ }
if (fences == 0) {
if (adev->pm.dpm_enabled) {
--
2.13.6
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: Take vcn encode rings into account in idle work
[not found] ` <20180517180354.14541-2-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-18 9:58 ` Christian König
0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2018-05-18 9:58 UTC (permalink / raw)
To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Am 17.05.2018 um 20:03 schrieb Alex Deucher:
> Take the encode rings into account in the idle work handler.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index e5d234cf804f..60468385e6b4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -205,6 +205,11 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
> struct amdgpu_device *adev =
> container_of(work, struct amdgpu_device, vcn.idle_work.work);
> unsigned fences = amdgpu_fence_count_emitted(&adev->vcn.ring_dec);
> + unsigned i;
> +
> + for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
> + fences += amdgpu_fence_count_emitted(&adev->vcn.ring_enc[i]);
> + }
"{" and "}" should be dropped here if I'm not completely mistaken.
But either way Reviewed-by: Christian König <christian.koenig@amd.com>
for the whole series.
Christian.
>
> if (fences == 0) {
> if (adev->pm.dpm_enabled) {
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-18 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-17 18:03 [PATCH 1/2] drm/amdgpu: Take uvd encode rings into account in idle work Alex Deucher
[not found] ` <20180517180354.14541-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-05-17 18:03 ` [PATCH 2/2] drm/amdgpu: Take vcn " Alex Deucher
[not found] ` <20180517180354.14541-2-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-05-18 9:58 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.