[Intel-gfx] [PATCH 12/15] drm/i915/guc: Rename client->cookie to match use

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Nov 28 11:37:28 UTC 2016


On 25/11/2016 09:30, Chris Wilson wrote:
> The client->cookie is a shadow of the doorbell->cookie value, so rename
> it to indicate its association with the doorbell, like the doorbell id
> and offset.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c        | 2 +-
>  drivers/gpu/drm/i915/i915_guc_submission.c | 6 +++---
>  drivers/gpu/drm/i915/intel_guc.h           | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 7676e88ae5f2..fe62a9da4dd1 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2414,7 +2414,7 @@ static void i915_guc_client_info(struct seq_file *m,
>  	seq_printf(m, "\tPriority %d, GuC ctx index: %u, PD offset 0x%x\n",
>  		client->priority, client->ctx_index, client->proc_desc_offset);
>  	seq_printf(m, "\tDoorbell id %d, offset: 0x%x, cookie 0x%x\n",
> -		client->doorbell_id, client->doorbell_offset, client->cookie);
> +		client->doorbell_id, client->doorbell_offset, client->doorbell_cookie);
>  	seq_printf(m, "\tWQ size %d, offset: 0x%x, tail %d\n",
>  		client->wq_size, client->wq_offset, client->wq_tail);
>
> diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
> index 4462112725ef..81aa5d4265c0 100644
> --- a/drivers/gpu/drm/i915/i915_guc_submission.c
> +++ b/drivers/gpu/drm/i915/i915_guc_submission.c
> @@ -567,11 +567,11 @@ static int guc_ring_doorbell(struct i915_guc_client *gc)
>
>  	/* current cookie */
>  	db_cmp.db_status = GUC_DOORBELL_ENABLED;
> -	db_cmp.cookie = gc->cookie;
> +	db_cmp.cookie = gc->doorbell_cookie;
>
>  	/* cookie to be updated */
>  	db_exc.db_status = GUC_DOORBELL_ENABLED;
> -	db_exc.cookie = gc->cookie + 1;
> +	db_exc.cookie = gc->doorbell_cookie + 1;
>  	if (db_exc.cookie == 0)
>  		db_exc.cookie = 1;
>
> @@ -586,7 +586,7 @@ static int guc_ring_doorbell(struct i915_guc_client *gc)
>  		/* if the exchange was successfully executed */
>  		if (db_ret.value_qw == db_cmp.value_qw) {
>  			/* db was successfully rung */
> -			gc->cookie = db_exc.cookie;
> +			gc->doorbell_cookie = db_exc.cookie;
>  			ret = 0;
>  			break;
>  		}
> diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
> index 02337a81abc2..731e8a2f2644 100644
> --- a/drivers/gpu/drm/i915/intel_guc.h
> +++ b/drivers/gpu/drm/i915/intel_guc.h
> @@ -74,7 +74,7 @@ struct i915_guc_client {
>  	uint32_t proc_desc_offset;
>
>  	uint32_t doorbell_offset;
> -	uint32_t cookie;
> +	uint32_t doorbell_cookie;
>  	uint16_t doorbell_id;
>  	uint16_t padding[3];		/* Maintain alignment		*/
>
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list