diff options
author | Rob Clark <robdclark@chromium.org> | 2021-11-09 10:11:02 -0800 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2021-11-28 09:50:33 -0800 |
commit | 1d054c9b8457b56a651109fac21f56f46ccd46b2 (patch) | |
tree | b0b4f60771fd017eb4f3fda1a17beffe96e08328 /drivers/gpu/drm/msm/msm_gpu.h | |
parent | d8c00a81f11fefc25e27cd5b0bfc0092b02d722d (diff) | |
download | lwn-1d054c9b8457b56a651109fac21f56f46ccd46b2.tar.gz lwn-1d054c9b8457b56a651109fac21f56f46ccd46b2.zip |
drm/msm: Drop priv->lastctx
cur_ctx_seqno already does the same thing, but handles the edge cases
where a refcnt'd context can live after lastclose. So let's not have
two ways to do the same thing.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Akhil P Oommen <akhilpo@codeaurora.org>
Link: https://lore.kernel.org/r/20211109181117.591148-3-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h index 48ea2de911f1..f33f2c6aab47 100644 --- a/drivers/gpu/drm/msm/msm_gpu.h +++ b/drivers/gpu/drm/msm/msm_gpu.h @@ -144,6 +144,17 @@ struct msm_gpu { struct msm_ringbuffer *rb[MSM_GPU_MAX_RINGS]; int nr_rings; + /** + * cur_ctx_seqno: + * + * The ctx->seqno value of the last context to submit rendering, + * and the one with current pgtables installed (for generations + * that support per-context pgtables). Tracked by seqno rather + * than pointer value to avoid dangling pointers, and cases where + * a ctx can be freed and a new one created with the same address. + */ + int cur_ctx_seqno; + /* * List of GEM active objects on this gpu. Protected by * msm_drm_private::mm_lock |