* [PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd"
@ 2020-09-01 19:49 Nirmoy Das
2020-09-01 19:49 ` [PATCH 2/2] drm/amdgpu: disable gpu-sched load balance for uvd Nirmoy Das
2020-09-02 6:55 ` [PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd" Christian König
0 siblings, 2 replies; 4+ messages in thread
From: Nirmoy Das @ 2020-09-01 19:49 UTC (permalink / raw)
To: amd-gfx
Cc: Tianci.Yin, pmenzel+amd-gfx, Nirmoy Das, alexander.deucher,
Leo.Liu, christian.koenig
This reverts commit e0300ed8820d19fe108006cf1b69fa26f0b4e3fc.
We should also disable load balance for AMDGPU_HW_IP_UVD_ENC jobs.
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 7cd398d25498..59032c26fc82 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -114,9 +114,7 @@ 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 ||
- hw_ip == AMDGPU_HW_IP_UVD) {
+ if (hw_ip == AMDGPU_HW_IP_VCN_ENC || hw_ip == AMDGPU_HW_IP_VCN_DEC) {
sched = drm_sched_pick_best(scheds, num_scheds);
scheds = &sched;
num_scheds = 1;
--
2.28.0
_______________________________________________
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
* [PATCH 2/2] drm/amdgpu: disable gpu-sched load balance for uvd
2020-09-01 19:49 [PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd" Nirmoy Das
@ 2020-09-01 19:49 ` Nirmoy Das
2020-09-02 6:55 ` [PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd" Christian König
1 sibling, 0 replies; 4+ messages in thread
From: Nirmoy Das @ 2020-09-01 19:49 UTC (permalink / raw)
To: amd-gfx
Cc: Tianci.Yin, pmenzel+amd-gfx, Nirmoy Das, alexander.deucher,
Leo.Liu, christian.koenig
On hardware with multiple uvd instances, dependent uvd
jobs may get scheduled to different uvd instances. Because
uvd jobs retain hw context, dependent jobs should always
run on the same uvd instance. This patch disables gpu scheduler's
load balancer for a context that binds jobs from same the
context to a uvd instance.
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 59032c26fc82..fc392dfd1789 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -114,7 +114,10 @@ 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_UVD ||
+ hw_ip == AMDGPU_HW_IP_UVD_ENC ||
+ hw_ip == AMDGPU_HW_IP_VCN_ENC ||
+ hw_ip == AMDGPU_HW_IP_VCN_DEC) {
sched = drm_sched_pick_best(scheds, num_scheds);
scheds = &sched;
num_scheds = 1;
--
2.28.0
_______________________________________________
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] Revert "drm/amdgpu: disable gpu-sched load balance for uvd"
2020-09-01 19:49 [PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd" Nirmoy Das
2020-09-01 19:49 ` [PATCH 2/2] drm/amdgpu: disable gpu-sched load balance for uvd Nirmoy Das
@ 2020-09-02 6:55 ` Christian König
2020-09-02 9:42 ` Nirmoy
1 sibling, 1 reply; 4+ messages in thread
From: Christian König @ 2020-09-02 6:55 UTC (permalink / raw)
To: Nirmoy Das, amd-gfx
Cc: alexander.deucher, pmenzel+amd-gfx, Tianci.Yin, Leo.Liu
Am 01.09.20 um 21:49 schrieb Nirmoy Das:
> This reverts commit e0300ed8820d19fe108006cf1b69fa26f0b4e3fc.
>
> We should also disable load balance for AMDGPU_HW_IP_UVD_ENC jobs.
Well revert and re-apply is usually not the best option. Just provide a
delta patch and Alex might decide to squash it into the original one
during upstreaming.
Christian.
>
> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> index 7cd398d25498..59032c26fc82 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> @@ -114,9 +114,7 @@ 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 ||
> - hw_ip == AMDGPU_HW_IP_UVD) {
> + if (hw_ip == AMDGPU_HW_IP_VCN_ENC || hw_ip == AMDGPU_HW_IP_VCN_DEC) {
> sched = drm_sched_pick_best(scheds, num_scheds);
> scheds = &sched;
> num_scheds = 1;
_______________________________________________
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
* Re: [PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd"
2020-09-02 6:55 ` [PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd" Christian König
@ 2020-09-02 9:42 ` Nirmoy
0 siblings, 0 replies; 4+ messages in thread
From: Nirmoy @ 2020-09-02 9:42 UTC (permalink / raw)
To: Christian König, Nirmoy Das, amd-gfx
Cc: alexander.deucher, pmenzel+amd-gfx, Tianci.Yin, Leo.Liu
On 9/2/20 8:55 AM, Christian König wrote:
> Am 01.09.20 um 21:49 schrieb Nirmoy Das:
>> This reverts commit e0300ed8820d19fe108006cf1b69fa26f0b4e3fc.
>>
>> We should also disable load balance for AMDGPU_HW_IP_UVD_ENC jobs.
>
> Well revert and re-apply is usually not the best option. Just provide
> a delta patch and Alex might decide to squash it into the original one
> during upstreaming.
I wasn't sure how to handle that. Thanks, I will send a delta patch.
Regards,
Nirmoy
>
> Christian.
>
>>
>> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> index 7cd398d25498..59032c26fc82 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> @@ -114,9 +114,7 @@ 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 ||
>> - hw_ip == AMDGPU_HW_IP_UVD) {
>> + if (hw_ip == AMDGPU_HW_IP_VCN_ENC || hw_ip ==
>> AMDGPU_HW_IP_VCN_DEC) {
>> sched = drm_sched_pick_best(scheds, num_scheds);
>> scheds = &sched;
>> num_scheds = 1;
>
_______________________________________________
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:[~2020-09-02 9:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-01 19:49 [PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd" Nirmoy Das
2020-09-01 19:49 ` [PATCH 2/2] drm/amdgpu: disable gpu-sched load balance for uvd Nirmoy Das
2020-09-02 6:55 ` [PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd" Christian König
2020-09-02 9:42 ` Nirmoy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox