diff mbox series

[03/15] drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle

Message ID 20200510165538.19720-4-peron.clem@gmail.com (mailing list archive)
State New, archived
Headers show
Series Add regulator devfreq support to Panfrost | expand

Commit Message

Clément Péron May 10, 2020, 4:55 p.m. UTC
This use devfreq variable that will be lock with spinlock in future
patches. We should either introduce a function to access this one
but as devfreq is optional let's just remove it.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 drivers/gpu/drm/panfrost/panfrost_job.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Steven Price May 28, 2020, 1:22 p.m. UTC | #1
On 10/05/2020 17:55, Clément Péron wrote:
> This use devfreq variable that will be lock with spinlock in future
> patches. We should either introduce a function to access this one
> but as devfreq is optional let's just remove it.
> 
> Signed-off-by: Clément Péron <peron.clem@gmail.com>

As far as I can tell this should be safe. As you note this wouldn't work 
without devfreq anyway.

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
>   drivers/gpu/drm/panfrost/panfrost_job.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
> index 7914b1570841..63e32a9f2749 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_job.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_job.c
> @@ -581,10 +581,6 @@ int panfrost_job_is_idle(struct panfrost_device *pfdev)
>   	struct panfrost_job_slot *js = pfdev->js;
>   	int i;
>   
> -	/* Check whether the hardware is idle */
> -	if (atomic_read(&pfdev->devfreq.busy_count))
> -		return false;
> -
>   	for (i = 0; i < NUM_JOB_SLOTS; i++) {
>   		/* If there are any jobs in the HW queue, we're not idle */
>   		if (atomic_read(&js->queue[i].sched.hw_rq_count))
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
index 7914b1570841..63e32a9f2749 100644
--- a/drivers/gpu/drm/panfrost/panfrost_job.c
+++ b/drivers/gpu/drm/panfrost/panfrost_job.c
@@ -581,10 +581,6 @@  int panfrost_job_is_idle(struct panfrost_device *pfdev)
 	struct panfrost_job_slot *js = pfdev->js;
 	int i;
 
-	/* Check whether the hardware is idle */
-	if (atomic_read(&pfdev->devfreq.busy_count))
-		return false;
-
 	for (i = 0; i < NUM_JOB_SLOTS; i++) {
 		/* If there are any jobs in the HW queue, we're not idle */
 		if (atomic_read(&js->queue[i].sched.hw_rq_count))