summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_guc_ct.c
diff options
context:
space:
mode:
authorMichal Wajdeczko2018-03-26 21:48:24 +0200
committerChris Wilson2018-03-28 21:35:15 +0200
commit24827cd0dd86a3158abc90ee64dcaf18aa843970 (patch)
tree2d5f77d3f8ffce7103afc3586fa4d0b6a20b328e /drivers/gpu/drm/i915/intel_guc_ct.c
parentdrm/i915/guc: Prepare to handle messages from CT RECV buffer (diff)
downloadkernel-qcow2-linux-24827cd0dd86a3158abc90ee64dcaf18aa843970.tar.gz
kernel-qcow2-linux-24827cd0dd86a3158abc90ee64dcaf18aa843970.tar.xz
kernel-qcow2-linux-24827cd0dd86a3158abc90ee64dcaf18aa843970.zip
drm/i915/guc: Use better name for helper wait function
In next patch we will introduce another way of waiting for the response that will use RECV buffer. To avoid misleading names, rename old wait function to reflect the fact that it is based on descriptor update. v2: fix comment style (Michal) v3: use more specific name (Michel) Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20180326194829.58836-8-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc_ct.c')
-rw-r--r--drivers/gpu/drm/i915/intel_guc_ct.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc_ct.c b/drivers/gpu/drm/i915/intel_guc_ct.c
index 14f55de342e7..2d805a2fd1f0 100644
--- a/drivers/gpu/drm/i915/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/intel_guc_ct.c
@@ -351,16 +351,25 @@ static int ctb_write(struct intel_guc_ct_buffer *ctb,
return 0;
}
-/* Wait for the response from the GuC.
+/**
+ * wait_for_ctb_desc_update - Wait for the CT buffer descriptor update.
+ * @desc: buffer descriptor
* @fence: response fence
* @status: placeholder for status
- * return: 0 response received (status is valid)
- * -ETIMEDOUT no response within hardcoded timeout
- * -EPROTO no response, ct buffer was in error
+ *
+ * Guc will update CT buffer descriptor with new fence and status
+ * after processing the command identified by the fence. Wait for
+ * specified fence and then read from the descriptor status of the
+ * command.
+ *
+ * Return:
+ * * 0 response received (status is valid)
+ * * -ETIMEDOUT no response within hardcoded timeout
+ * * -EPROTO no response, CT buffer is in error
*/
-static int wait_for_response(struct guc_ct_buffer_desc *desc,
- u32 fence,
- u32 *status)
+static int wait_for_ctb_desc_update(struct guc_ct_buffer_desc *desc,
+ u32 fence,
+ u32 *status)
{
int err;
@@ -414,7 +423,7 @@ static int ctch_send(struct intel_guc *guc,
intel_guc_notify(guc);
- err = wait_for_response(desc, fence, status);
+ err = wait_for_ctb_desc_update(desc, fence, status);
if (unlikely(err))
return err;
if (!INTEL_GUC_MSG_IS_RESPONSE_SUCCESS(*status))