* [PATCH] drm/panthor: Record devfreq busy as soon as a job is started
@ 2024-07-03 15:56 Steven Price
2024-07-03 15:58 ` Boris Brezillon
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Steven Price @ 2024-07-03 15:56 UTC (permalink / raw)
To: Boris Brezillon, Liviu Dudau
Cc: dri-devel, linux-kernel, Adrián Larumbe, Steven Price
If a queue is already assigned to the hardware, then a newly submitted
job can start straight away without waiting for the tick. However in
this case the devfreq infrastructure isn't notified that the GPU is
busy. By the time the tick happens the job might well have finished and
no time will be accounted for the GPU being busy.
Fix this by recording the GPU as busy directly in queue_run_job() in the
case where there is a CSG assigned and therefore we just ring the
doorbell.
Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
Signed-off-by: Steven Price <steven.price@arm.com>
---
drivers/gpu/drm/panthor/panthor_sched.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
index 951ff7e63ea8..e7afaa1ad8dc 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.c
+++ b/drivers/gpu/drm/panthor/panthor_sched.c
@@ -2942,6 +2942,7 @@ queue_run_job(struct drm_sched_job *sched_job)
pm_runtime_get(ptdev->base.dev);
sched->pm.has_ref = true;
}
+ panthor_devfreq_record_busy(sched->ptdev);
}
/* Update the last fence. */
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panthor: Record devfreq busy as soon as a job is started
2024-07-03 15:56 [PATCH] drm/panthor: Record devfreq busy as soon as a job is started Steven Price
@ 2024-07-03 15:58 ` Boris Brezillon
2024-07-03 16:14 ` Liviu Dudau
2024-07-04 8:35 ` Steven Price
2 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2024-07-03 15:58 UTC (permalink / raw)
To: Steven Price; +Cc: Liviu Dudau, dri-devel, linux-kernel, Adrián Larumbe
On Wed, 3 Jul 2024 16:56:46 +0100
Steven Price <steven.price@arm.com> wrote:
> If a queue is already assigned to the hardware, then a newly submitted
> job can start straight away without waiting for the tick. However in
> this case the devfreq infrastructure isn't notified that the GPU is
> busy. By the time the tick happens the job might well have finished and
> no time will be accounted for the GPU being busy.
>
> Fix this by recording the GPU as busy directly in queue_run_job() in the
> case where there is a CSG assigned and therefore we just ring the
> doorbell.
>
> Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
> Signed-off-by: Steven Price <steven.price@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
> drivers/gpu/drm/panthor/panthor_sched.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index 951ff7e63ea8..e7afaa1ad8dc 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -2942,6 +2942,7 @@ queue_run_job(struct drm_sched_job *sched_job)
> pm_runtime_get(ptdev->base.dev);
> sched->pm.has_ref = true;
> }
> + panthor_devfreq_record_busy(sched->ptdev);
> }
>
> /* Update the last fence. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panthor: Record devfreq busy as soon as a job is started
2024-07-03 15:56 [PATCH] drm/panthor: Record devfreq busy as soon as a job is started Steven Price
2024-07-03 15:58 ` Boris Brezillon
@ 2024-07-03 16:14 ` Liviu Dudau
2024-07-04 8:35 ` Steven Price
2 siblings, 0 replies; 4+ messages in thread
From: Liviu Dudau @ 2024-07-03 16:14 UTC (permalink / raw)
To: Steven Price
Cc: Boris Brezillon, dri-devel, linux-kernel, Adrián Larumbe
On Wed, Jul 03, 2024 at 04:56:46PM +0100, Steven Price wrote:
> If a queue is already assigned to the hardware, then a newly submitted
> job can start straight away without waiting for the tick. However in
> this case the devfreq infrastructure isn't notified that the GPU is
> busy. By the time the tick happens the job might well have finished and
> no time will be accounted for the GPU being busy.
>
> Fix this by recording the GPU as busy directly in queue_run_job() in the
> case where there is a CSG assigned and therefore we just ring the
> doorbell.
>
> Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
> Signed-off-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
> ---
> drivers/gpu/drm/panthor/panthor_sched.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index 951ff7e63ea8..e7afaa1ad8dc 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -2942,6 +2942,7 @@ queue_run_job(struct drm_sched_job *sched_job)
> pm_runtime_get(ptdev->base.dev);
> sched->pm.has_ref = true;
> }
> + panthor_devfreq_record_busy(sched->ptdev);
> }
>
> /* Update the last fence. */
> --
> 2.39.2
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panthor: Record devfreq busy as soon as a job is started
2024-07-03 15:56 [PATCH] drm/panthor: Record devfreq busy as soon as a job is started Steven Price
2024-07-03 15:58 ` Boris Brezillon
2024-07-03 16:14 ` Liviu Dudau
@ 2024-07-04 8:35 ` Steven Price
2 siblings, 0 replies; 4+ messages in thread
From: Steven Price @ 2024-07-04 8:35 UTC (permalink / raw)
To: Boris Brezillon, Liviu Dudau; +Cc: dri-devel, linux-kernel, Adrián Larumbe
On 03/07/2024 16:56, Steven Price wrote:
> If a queue is already assigned to the hardware, then a newly submitted
> job can start straight away without waiting for the tick. However in
> this case the devfreq infrastructure isn't notified that the GPU is
> busy. By the time the tick happens the job might well have finished and
> no time will be accounted for the GPU being busy.
>
> Fix this by recording the GPU as busy directly in queue_run_job() in the
> case where there is a CSG assigned and therefore we just ring the
> doorbell.
>
> Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
> Signed-off-by: Steven Price <steven.price@arm.com>
> ---
> drivers/gpu/drm/panthor/panthor_sched.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index 951ff7e63ea8..e7afaa1ad8dc 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -2942,6 +2942,7 @@ queue_run_job(struct drm_sched_job *sched_job)
> pm_runtime_get(ptdev->base.dev);
> sched->pm.has_ref = true;
> }
> + panthor_devfreq_record_busy(sched->ptdev);
> }
>
> /* Update the last fence. */
Pushed to drm-misc-next
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-04 8:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 15:56 [PATCH] drm/panthor: Record devfreq busy as soon as a job is started Steven Price
2024-07-03 15:58 ` Boris Brezillon
2024-07-03 16:14 ` Liviu Dudau
2024-07-04 8:35 ` Steven Price
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox