summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/selftest_mocs.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2021-07-08 10:48:07 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2021-07-08 19:43:35 +0200
commit74e4b90988b25d7bb60cf072b0f1b1afc1af27d5 (patch)
treefbd576394de9b572990f46f0a59decb8e94a2982 /drivers/gpu/drm/i915/gt/selftest_mocs.c
parentfe4751c3d513ff4f5422dbf55a966abafe39255e (diff)
downloadlinux-74e4b90988b25d7bb60cf072b0f1b1afc1af27d5.tar.gz
drm/i915: Stop storing the ring size in the ring pointer (v3)
Previously, we were storing the ring size in the ring pointer before it was actually allocated. We would then guard setting the ring size on checking for CONTEXT_ALLOC_BIT. This is error-prone at best and really only saves us a few bytes on something that already burns at least 4K. Instead, this patch adds a new ring_size field and makes everything use that. v2 (Daniel Vetter): - Replace 512 * SZ_4K with SZ_2M v2 (Jason Ekstrand): - Rebase on top of page migration code Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210708154835.528166-3-jason@jlekstrand.net
Diffstat (limited to 'drivers/gpu/drm/i915/gt/selftest_mocs.c')
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_mocs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/selftest_mocs.c b/drivers/gpu/drm/i915/gt/selftest_mocs.c
index b9bb0e6e97f7..8763bbeca0f7 100644
--- a/drivers/gpu/drm/i915/gt/selftest_mocs.c
+++ b/drivers/gpu/drm/i915/gt/selftest_mocs.c
@@ -28,7 +28,7 @@ static struct intel_context *mocs_context_create(struct intel_engine_cs *engine)
return ce;
/* We build large requests to read the registers from the ring */
- ce->ring = __intel_context_ring_size(SZ_16K);
+ ce->ring_size = SZ_16K;
return ce;
}