* [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
@ 2019-03-12 16:57 Andrey Grodzovsky
[not found] ` <1552409822-17230-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Andrey Grodzovsky @ 2019-03-12 16:57 UTC (permalink / raw)
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
tomeu-XCtybt49RKsYaV1qd6yewg, eric-WhKQ6XTQaPysTnJN9+BGXg
Cc: Andrey Grodzovsky
Also stop calling drm_sched_increase_karma multiple times.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
---
drivers/gpu/drm/v3d/v3d_sched.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c
index 4704b2d..ce7c737b 100644
--- a/drivers/gpu/drm/v3d/v3d_sched.c
+++ b/drivers/gpu/drm/v3d/v3d_sched.c
@@ -231,20 +231,17 @@ v3d_gpu_reset_for_timeout(struct v3d_dev *v3d, struct drm_sched_job *sched_job)
mutex_lock(&v3d->reset_lock);
/* block scheduler */
- for (q = 0; q < V3D_MAX_QUEUES; q++) {
- struct drm_gpu_scheduler *sched = &v3d->queue[q].sched;
-
- drm_sched_stop(sched);
+ for (q = 0; q < V3D_MAX_QUEUES; q++)
+ drm_sched_stop(&v3d->queue[q].sched);
- if(sched_job)
- drm_sched_increase_karma(sched_job);
- }
+ if(sched_job)
+ drm_sched_increase_karma(sched_job);
/* get the GPU back into the init state */
v3d_reset(v3d);
for (q = 0; q < V3D_MAX_QUEUES; q++)
- drm_sched_resubmit_jobs(sched_job->sched);
+ drm_sched_resubmit_jobs(&v3d->queue[q].sched);
/* Unblock schedulers and restart their jobs. */
for (q = 0; q < V3D_MAX_QUEUES; q++) {
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
[not found] ` <1552409822-17230-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-12 17:33 ` Eric Anholt
[not found] ` <87imworo9v.fsf-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
2019-03-13 8:25 ` Christian König
1 sibling, 1 reply; 8+ messages in thread
From: Eric Anholt @ 2019-03-12 17:33 UTC (permalink / raw)
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
tomeu-XCtybt49RKsYaV1qd6yewg
Cc: Andrey Grodzovsky
[-- Attachment #1.1: Type: text/plain, Size: 270 bytes --]
Andrey Grodzovsky <andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org> writes:
> Also stop calling drm_sched_increase_karma multiple times.
Each v3d->queue[q].sched was initialized with a separate
drm_sched_init(). I wouldn't have thought they were all the "same
sched".
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
[not found] ` <87imworo9v.fsf-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
@ 2019-03-12 17:48 ` Grodzovsky, Andrey
[not found] ` <CY4PR12MB1446C0DAFA3349227DEB9B0AEA490-rpdhrqHFk070Y0OdeIqGUgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Grodzovsky, Andrey @ 2019-03-12 17:48 UTC (permalink / raw)
To: Eric Anholt, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
tomeu-XCtybt49RKsYaV1qd6yewg
They are not the same, but the guilty job belongs to only one {entity, scheduler} pair and so we mark as guilty only for that particular entity in the context of that scheduler only once.
Andrey
________________________________________
From: Eric Anholt <eric@anholt.net>
Sent: 12 March 2019 13:33:16
To: Grodzovsky, Andrey; dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; tomeu@tomeuvizoso.net
Cc: Grodzovsky, Andrey
Subject: Re: [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
Andrey Grodzovsky <andrey.grodzovsky@amd.com> writes:
> Also stop calling drm_sched_increase_karma multiple times.
Each v3d->queue[q].sched was initialized with a separate
drm_sched_init(). I wouldn't have thought they were all the "same
sched".
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
[not found] ` <1552409822-17230-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2019-03-12 17:33 ` Eric Anholt
@ 2019-03-13 8:25 ` Christian König
1 sibling, 0 replies; 8+ messages in thread
From: Christian König @ 2019-03-13 8:25 UTC (permalink / raw)
To: Andrey Grodzovsky, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
tomeu-XCtybt49RKsYaV1qd6yewg, eric-WhKQ6XTQaPysTnJN9+BGXg
Am 12.03.19 um 17:57 schrieb Andrey Grodzovsky:
> Also stop calling drm_sched_increase_karma multiple times.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/v3d/v3d_sched.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c
> index 4704b2d..ce7c737b 100644
> --- a/drivers/gpu/drm/v3d/v3d_sched.c
> +++ b/drivers/gpu/drm/v3d/v3d_sched.c
> @@ -231,20 +231,17 @@ v3d_gpu_reset_for_timeout(struct v3d_dev *v3d, struct drm_sched_job *sched_job)
> mutex_lock(&v3d->reset_lock);
>
> /* block scheduler */
> - for (q = 0; q < V3D_MAX_QUEUES; q++) {
> - struct drm_gpu_scheduler *sched = &v3d->queue[q].sched;
> -
> - drm_sched_stop(sched);
> + for (q = 0; q < V3D_MAX_QUEUES; q++)
> + drm_sched_stop(&v3d->queue[q].sched);
>
> - if(sched_job)
> - drm_sched_increase_karma(sched_job);
> - }
> + if(sched_job)
> + drm_sched_increase_karma(sched_job);
>
> /* get the GPU back into the init state */
> v3d_reset(v3d);
>
> for (q = 0; q < V3D_MAX_QUEUES; q++)
> - drm_sched_resubmit_jobs(sched_job->sched);
> + drm_sched_resubmit_jobs(&v3d->queue[q].sched);
>
> /* Unblock schedulers and restart their jobs. */
> for (q = 0; q < V3D_MAX_QUEUES; q++) {
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
[not found] ` <CY4PR12MB1446C0DAFA3349227DEB9B0AEA490-rpdhrqHFk070Y0OdeIqGUgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2019-03-13 16:13 ` Eric Anholt
[not found] ` <87lg1ioipw.fsf-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Eric Anholt @ 2019-03-13 16:13 UTC (permalink / raw)
To: Grodzovsky, Andrey, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org, tomeu@tomeuvizoso.net
[-- Attachment #1.1: Type: text/plain, Size: 335 bytes --]
"Grodzovsky, Andrey" <Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org> writes:
> They are not the same, but the guilty job belongs to only one {entity,
> scheduler} pair and so we mark as guilty only for that particular
> entity in the context of that scheduler only once.
I get it now, sorry. I'll merge this through drm-misc-next.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
[not found] ` <87lg1ioipw.fsf-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
@ 2019-03-13 16:36 ` Grodzovsky, Andrey
[not found] ` <fc067a25-260f-d056-f22c-10d9aac7a612-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Grodzovsky, Andrey @ 2019-03-13 16:36 UTC (permalink / raw)
To: Eric Anholt, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
tomeu-XCtybt49RKsYaV1qd6yewg
On 3/13/19 12:13 PM, Eric Anholt wrote:
> "Grodzovsky, Andrey" <Andrey.Grodzovsky@amd.com> writes:
>
>> They are not the same, but the guilty job belongs to only one {entity,
>> scheduler} pair and so we mark as guilty only for that particular
>> entity in the context of that scheduler only once.
> I get it now, sorry. I'll merge this through drm-misc-next.
np, i actually pushed it into our internal branch already so you can do
that or wait for our next pull request.
Andrey
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
[not found] ` <fc067a25-260f-d056-f22c-10d9aac7a612-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-13 17:53 ` Eric Anholt
2019-03-13 18:49 ` Grodzovsky, Andrey
0 siblings, 1 reply; 8+ messages in thread
From: Eric Anholt @ 2019-03-13 17:53 UTC (permalink / raw)
To: Grodzovsky, Andrey, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org, tomeu@tomeuvizoso.net
[-- Attachment #1.1: Type: text/plain, Size: 760 bytes --]
"Grodzovsky, Andrey" <Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org> writes:
> On 3/13/19 12:13 PM, Eric Anholt wrote:
>> "Grodzovsky, Andrey" <Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org> writes:
>>
>>> They are not the same, but the guilty job belongs to only one {entity,
>>> scheduler} pair and so we mark as guilty only for that particular
>>> entity in the context of that scheduler only once.
>> I get it now, sorry. I'll merge this through drm-misc-next.
>
> np, i actually pushed it into our internal branch already so you can do
> that or wait for our next pull request.
I also fixed the whitespace in the moved code and added the missing
Fixes: line, so I'd like to get it merged through the proper tree for
maintaining v3d.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
2019-03-13 17:53 ` Eric Anholt
@ 2019-03-13 18:49 ` Grodzovsky, Andrey
0 siblings, 0 replies; 8+ messages in thread
From: Grodzovsky, Andrey @ 2019-03-13 18:49 UTC (permalink / raw)
To: Eric Anholt, dri-devel, amd-gfx, tomeu
np
Andrey
On 3/13/19 1:53 PM, Eric Anholt wrote:
> "Grodzovsky, Andrey" <Andrey.Grodzovsky@amd.com> writes:
>
>> On 3/13/19 12:13 PM, Eric Anholt wrote:
>>> "Grodzovsky, Andrey" <Andrey.Grodzovsky@amd.com> writes:
>>>
>>>> They are not the same, but the guilty job belongs to only one {entity,
>>>> scheduler} pair and so we mark as guilty only for that particular
>>>> entity in the context of that scheduler only once.
>>> I get it now, sorry. I'll merge this through drm-misc-next.
>> np, i actually pushed it into our internal branch already so you can do
>> that or wait for our next pull request.
> I also fixed the whitespace in the moved code and added the missing
> Fixes: line, so I'd like to get it merged through the proper tree for
> maintaining v3d.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-03-13 18:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 16:57 [PATCH] drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched Andrey Grodzovsky
[not found] ` <1552409822-17230-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2019-03-12 17:33 ` Eric Anholt
[not found] ` <87imworo9v.fsf-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
2019-03-12 17:48 ` Grodzovsky, Andrey
[not found] ` <CY4PR12MB1446C0DAFA3349227DEB9B0AEA490-rpdhrqHFk070Y0OdeIqGUgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-03-13 16:13 ` Eric Anholt
[not found] ` <87lg1ioipw.fsf-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
2019-03-13 16:36 ` Grodzovsky, Andrey
[not found] ` <fc067a25-260f-d056-f22c-10d9aac7a612-5C7GfCeVMHo@public.gmane.org>
2019-03-13 17:53 ` Eric Anholt
2019-03-13 18:49 ` Grodzovsky, Andrey
2019-03-13 8:25 ` 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;
as well as URLs for NNTP newsgroup(s).