drm/amdgpu: disable gpu-sched load balance for uvd
Subsystems (2)
PATCH 1/1 drm/amdgpu: disable gpu-sched load balance for uvd
UVD dependent jobs should run on the same udv instance. This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +3 -1
@@ -114,7 +114,9 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; -if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC ) { +if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || + hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched; num_scheds =1 ;
--
2.28.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 31.08.20 um 12:45 schrieb Nirmoy Das:
Quoted 6 lines
UVD dependent jobs should run on the same udv instance. This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
Signed-off-by Nirmoy Das <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +3
-2@@ -114,7 +114,9 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; -if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC ) { +if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || + hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched; num_scheds =1 ; --
Quoted 2 lines
2.28.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 5 lines · Nirmoy Das
UVD dependent jobs should run on the same udv instance. This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
typos: udv -> uvd
With that fixed:
Does VCE need a similar fix? What about UVD_ENC?
Alex
Quoted 24 lines
Signed-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +3
-2@@ -114,7 +114,9 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; -if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC ) { +if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || + hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched; num_scheds =1 ; --2.28.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Alex,
Quoted 10 lines · Alex Deucher
Quoted 4 lines · Nirmoy Das
UVD dependent jobs should run on the same udv instance. This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
typos: udv -> uvd
With that fixed:Reviewed-by Alex Deucher <[email protected]>Does VCE need a similar fix? What about
UVD_ENC?
I am not sure, can you please confirm this.
Nirmoy
Quoted 27 lines
Alex
Quoted 23 lines
Signed-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +3
-2@@ -114,7 +114,9 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; -if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC ) { +if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || + hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched; num_scheds =1 ; --2.28.0
Quoted 4 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cnirmoy.das%40amd.com%7C6a3e9061d2f043783ea408d84db8a04e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637344802648079859&sdata=C7lkg97j7F6Kq1Vz7L79TbEDvfQm8QS3PUhdHfQ3Rcs%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 9 lines · Nirmoy
Hi Alex,
Quoted 5 lines · Alex Deucher
Quoted 4 lines · Nirmoy Das
UVD dependent jobs should run on the same udv instance. This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
Quoted 8 lines
Quoted 5 lines
typos: udv -> uvd
With that fixed:Reviewed-by Alex Deucher <[email protected]>Does VCE need a similar fix? What about
UVD_ENC?I am not sure, can you please confirm this.
@Leo Liu can you confirm?
Alex
Quoted 33 lines
Nirmoy
Quoted 27 lines
Alex
Quoted 23 lines
Signed-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +3
-2@@ -114,7 +114,9 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; -if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC ) { +if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || + hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched; num_scheds =1 ; --2.28.0
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cnirmoy.das%40amd.com%7C6a3e9061d2f043783ea408d84db8a04e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637344802648079859&sdata=C7lkg97j7F6Kq1Vz7L79TbEDvfQm8QS3PUhdHfQ3Rcs%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 9 lines · Alex Deucher
Quoted 8 lines · Nirmoy
Hi Alex,
Quoted 5 lines · Alex Deucher
Quoted 4 lines · Nirmoy Das
UVD dependent jobs should run on the same udv instance. This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
typos: udv -> uvd
With that fixed:Reviewed-by Alex Deucher <[email protected]>Does VCE need a similar fix? What about
UVD_ENC?I am not sure, can you please confirm this.
@Leo Liu can you confirm?
Vega20 have 2 UVDs and 1 VCE, so UVD_ENC(AMDGPU_HW_IP_UVD_ENC) should need the same fix.
Regards,
Leo
Quoted 34 lines
Alex
Quoted 31 lines
Nirmoy
Quoted 26 lines
Alex
Quoted 23 lines
Signed-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +3
-2@@ -114,7 +114,9 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; -if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC ) { +if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || + hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched; num_scheds =1 ; --2.28.0
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cleo.liu%40amd.com%7Caaf07c8faa4d46f0b35f08d84dd4e875%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637344924116323889&sdata=kvny71irAythb60XTzLHokUD7ZifHAKkTND8zSNs3T0%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 16 lines · Leo Liu
Quoted 13 lines · Alex Deucher
Quoted 12 lines · Nirmoy
Hi Alex,
Quoted 9 lines · Alex Deucher
Quoted 4 lines · Nirmoy Das
UVD dependent jobs should run on the same udv instance. This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
typos: udv -> uvd
With that fixed:Reviewed-by Alex Deucher <[email protected]>
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Does VCE need a similar fix? What about
UVD_ENC?I am not sure, can you please confirm this.
@Leo Liu can you confirm?
Vega20 have 2 UVDs and 1 VCE, so
UVD_ENC(AMDGPU_HW_IP_UVD_ENC)should need the same fix.
What about other chips? Didn't CZ and tonga have two VCE instances? I guess any engine with hw contexts needs this.
Alex
Quoted 41 lines
Regards,
Leo
Quoted 34 lines
Alex
Quoted 31 lines
Nirmoy
Quoted 26 lines
Alex
Quoted 23 lines
Signed-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +3
-2@@ -114,7 +114,9 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; -if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC ) { +if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || + hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched; num_scheds =1 ; --2.28.0
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cleo.liu%40amd.com%7Caaf07c8faa4d46f0b35f08d84dd4e875%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637344924116323889&sdata=kvny71irAythb60XTzLHokUD7ZifHAKkTND8zSNs3T0%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 16 lines · Alex Deucher
Quoted 15 lines · Leo Liu
Quoted 13 lines · Alex Deucher
Quoted 12 lines · Nirmoy
Hi Alex,
Quoted 9 lines · Alex Deucher
Quoted 4 lines · Nirmoy Das
UVD dependent jobs should run on the same udv instance. This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
typos: udv -> uvd
With that fixed:Reviewed-by Alex Deucher <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
Does VCE need a similar fix? What about
UVD_ENC?I am not sure, can you please confirm this.
@Leo Liu can you confirm?
Vega20 have 2 UVDs and 1 VCE, so
UVD_ENC(AMDGPU_HW_IP_UVD_ENC)should need the same fix.What about other chips? Didn't CZ and tonga have two VCE instances? I guess any engine with hw contexts needs this.
Vega20 2 UVDs are identical and separated, exposed separated own set of rings to driver, and have their own scheduler.
For CZ and Tonga, it got 2 VCE instances internally, and just expose one set of rings to driver. i.e the instances will receive the IB thru the same ring, and different IB structures will decide that one instance or two instances will be used.
Regards,
Leo
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Dear Nirmoy,
Am 31.08.20 um 12:45 schrieb Nirmoy Das:
Quoted 1 line
UVD dependent jobs should run on the same udv instance.
Why? Datasheet? Performance reasons? What happens if they do not run on the UVD instance? Are there bug reports?
It’d be great if you extended the commit message.
Quoted 14 lines
This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
Signed-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, · line 122
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +3
-1@@ -114,7 +114,9 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; -if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC ) { +if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || + hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched; num_scheds =1 ;
Kind regards,
Paul
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 7 lines · Paul Menzel
Dear Nirmoy,
Am 31.08.20 um 12:45 schrieb Nirmoy Das:
Quoted 1 line
UVD dependent jobs should run on the same udv instance.
Why? Datasheet? Performance reasons? What happens if they do not run on the UVD instance? Are there bug reports?
Sorry about that, I should've elaborated more. I will take care of that in my next patch.
Nirmoy
Quoted 33 lines
It’d be great if you extended the commit message.
Quoted 24 lines
This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance.
Signed-off-by Nirmoy Das <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +3
-1@@ -114,7 +114,9 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; - if (hw_ip == AMDGPU_HW_IP_VCN_ENC || hw_ip == AMDGPU_HW_IP_VCN_DEC) { + if (hw_ip == AMDGPU_HW_IP_VCN_ENC || + hw_ip == AMDGPU_HW_IP_VCN_DEC || + hw_ip == AMDGPU_HW_IP_UVD) { sched = drm_sched_pick_best(scheds, num_scheds);Quoted 2 lines
scheds = &sched;
num_scheds= 1;Kind regards,
Quoted 1 line
Paul
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx