aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_lrc.c
diff options
context:
space:
mode:
authorGravatar Chris Wilson <chris@chris-wilson.co.uk> 2016-10-28 13:58:31 +0100
committerGravatar Chris Wilson <chris@chris-wilson.co.uk> 2016-10-28 20:53:44 +0100
commit4e50f082ac51c95046a8315612ce1d9acb2b3d63 (patch)
tree8db893a7dc556b77776eaa723ed60a6f475a5190 /drivers/gpu/drm/i915/intel_lrc.c
parentdrm/i915: Introduce an internal allocator for disposable private objects (diff)
downloadlinux-4e50f082ac51c95046a8315612ce1d9acb2b3d63.tar.gz
linux-4e50f082ac51c95046a8315612ce1d9acb2b3d63.tar.bz2
linux-4e50f082ac51c95046a8315612ce1d9acb2b3d63.zip
drm/i915: Reuse the active golden render state batch
The golden render state is constant, but we recreate the batch setting it up for every new context. If we keep that batch in a volatile cache we can safely reuse it whenever we need to initialise a new context. We mark the pages as purgeable and use the shrinker to recover pages from the batch whenever we face memory pressues, recreating that batch afresh on the next new context. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtien@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20161028125858.23563-8-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index bc86585b9fbb..1c1bd30e8b2d 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1637,7 +1637,7 @@ static int gen8_init_rcs_context(struct drm_i915_gem_request *req)
if (ret)
DRM_ERROR("MOCS failed to program: expect performance issues.\n");
- return i915_gem_render_state_init(req);
+ return i915_gem_render_state_emit(req);
}
/**