diff mbox

drm/i915: add kerneldoc for intel_lr_context_size()

Message ID 1451996493-16079-1-git-send-email-david.s.gordon@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dave Gordon Jan. 5, 2016, 12:21 p.m. UTC
This function was recently renamed & exposed, so now it gets documented

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Daniel Vetter Jan. 5, 2016, 1:57 p.m. UTC | #1
On Tue, Jan 05, 2016 at 12:21:33PM +0000, Dave Gordon wrote:
> This function was recently renamed & exposed, so now it gets documented
> 
> Signed-off-by: Dave Gordon <david.s.gordon@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 8da67b3..3662d14 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -2386,6 +2386,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;
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 8da67b3..3662d14 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -2386,6 +2386,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;