diff options
author | Rob Clark <robdclark@chromium.org> | 2023-03-08 18:53:04 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2023-03-29 01:46:15 +0300 |
commit | b5a24e13c8c8b2c98d114b16da40712b80d5cfc1 (patch) | |
tree | 7e3473e387f22c6c9c322792647836331e3e3d59 /drivers/gpu/drm/msm/msm_gem.c | |
parent | f8b8487c0756ead2e3584550e5a4d4ce4a1e520f (diff) | |
download | linux-b5a24e13c8c8b2c98d114b16da40712b80d5cfc1.tar.xz |
drm/msm: Add wait-boost support
Add a way for various userspace waits to signal urgency.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/525817/
Link: https://lore.kernel.org/r/20230308155322.344664-14-robdclark@gmail.com
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 9008f967637a..db6c4e281d75 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -895,6 +895,11 @@ int msm_gem_cpu_prep(struct drm_gem_object *obj, uint32_t op, ktime_t *timeout) op & MSM_PREP_NOSYNC ? 0 : timeout_to_jiffies(timeout); long ret; + if (op & MSM_PREP_BOOST) { + dma_resv_set_deadline(obj->resv, dma_resv_usage_rw(write), + ktime_get()); + } + ret = dma_resv_wait_timeout(obj->resv, dma_resv_usage_rw(write), true, remain); if (ret == 0) |