diff options
author | Rob Clark <robdclark@chromium.org> | 2022-03-11 02:46:06 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2022-03-24 18:32:25 +0300 |
commit | 7242795d520d3fb48e005e3c96ba54bb59639d6e (patch) | |
tree | 0620d8774de9e5640d1b9bc7e6d7137a71ba1769 /drivers/gpu/drm/msm/adreno | |
parent | 7e4167c9e021afb01fb69abae8642d781c8907b6 (diff) | |
download | linux-7242795d520d3fb48e005e3c96ba54bb59639d6e.tar.xz |
drm/msm/gpu: Remove mutex from wait_event condition
The mutex wasn't really protecting anything before. Before the previous
patch we could still be racing with the scheduler's kthread, as that is
not necessarily frozen yet. Now that we've parked the sched threads,
the only race is with jobs retiring, and that is harmless, ie.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20220310234611.424743-4-robdclark@gmail.com
Diffstat (limited to 'drivers/gpu/drm/msm/adreno')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/adreno_device.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 0440a98988fc..661dfa7681fb 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -607,15 +607,6 @@ static int adreno_runtime_resume(struct device *dev) return gpu->funcs->pm_resume(gpu); } -static int active_submits(struct msm_gpu *gpu) -{ - int active_submits; - mutex_lock(&gpu->active_lock); - active_submits = gpu->active_submits; - mutex_unlock(&gpu->active_lock); - return active_submits; -} - static int adreno_runtime_suspend(struct device *dev) { struct msm_gpu *gpu = dev_to_gpu(dev); @@ -669,7 +660,7 @@ static int adreno_system_suspend(struct device *dev) suspend_scheduler(gpu); remaining = wait_event_timeout(gpu->retire_event, - active_submits(gpu) == 0, + gpu->active_submits == 0, msecs_to_jiffies(1000)); if (remaining == 0) { dev_err(dev, "Timeout waiting for GPU to suspend\n"); |