summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_lrc.c
diff options
context:
space:
mode:
authorDave Gordon <david.s.gordon@intel.com>2016-01-05 12:21:33 +0000
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-01-05 16:14:33 +0100
commitc5d46ee20675379105bfd1ce422fe50169106e62 (patch)
tree81cdd110257b1cd1b52de2a734afc23632cf1fd5 /drivers/gpu/drm/i915/intel_lrc.c
parent28c72840a787559851aa8d70a18bb5ac41b73b53 (diff)
downloadop-kernel-dev-c5d46ee20675379105bfd1ce422fe50169106e62.zip
op-kernel-dev-c5d46ee20675379105bfd1ce422fe50169106e62.tar.gz
drm/i915: add kerneldoc for intel_lr_context_size()
This function was recently renamed & exposed, so now it gets documented Signed-off-by: Dave Gordon <david.s.gordon@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1451996493-16079-1-git-send-email-david.s.gordon@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 808515c..8096c6a 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -2399,6 +2399,20 @@ void intel_lr_context_free(struct intel_context *ctx)
}
}
+/**
+ * intel_lr_context_size() - return the size of the context for an engine
+ * @ring: which engine to find the context size for
+ *
+ * Each engine may require a different amount of space for a context image,
+ * so when allocating (or copying) an image, this function can be used to
+ * find the right size for the specific engine.
+ *
+ * Return: size (in bytes) of an engine-specific context image
+ *
+ * Note: this size includes the HWSP, which is part of the context image
+ * in LRC mode, but does not include the "shared data page" used with
+ * GuC submission. The caller should account for this if using the GuC.
+ */
uint32_t intel_lr_context_size(struct intel_engine_cs *ring)
{
int ret = 0;
OpenPOWER on IntegriCloud