Commit 24827cd0 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Chris Wilson

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: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: default avatarMichel Thierry <michel.thierry@intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180326194829.58836-8-michal.wajdeczko@intel.com
parent 1d407096
...@@ -351,14 +351,23 @@ static int ctb_write(struct intel_guc_ct_buffer *ctb, ...@@ -351,14 +351,23 @@ static int ctb_write(struct intel_guc_ct_buffer *ctb,
return 0; 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 * @fence: response fence
* @status: placeholder for status * @status: placeholder for status
* return: 0 response received (status is valid) *
* -ETIMEDOUT no response within hardcoded timeout * Guc will update CT buffer descriptor with new fence and status
* -EPROTO no response, ct buffer was in error * 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, static int wait_for_ctb_desc_update(struct guc_ct_buffer_desc *desc,
u32 fence, u32 fence,
u32 *status) u32 *status)
{ {
...@@ -414,7 +423,7 @@ static int ctch_send(struct intel_guc *guc, ...@@ -414,7 +423,7 @@ static int ctch_send(struct intel_guc *guc,
intel_guc_notify(guc); intel_guc_notify(guc);
err = wait_for_response(desc, fence, status); err = wait_for_ctb_desc_update(desc, fence, status);
if (unlikely(err)) if (unlikely(err))
return err; return err;
if (!INTEL_GUC_MSG_IS_RESPONSE_SUCCESS(*status)) if (!INTEL_GUC_MSG_IS_RESPONSE_SUCCESS(*status))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment