[Intel-gfx] [PATCH 13/15] drm/i915/guc: Initialise doorbell cookie to matching value

Chris Wilson chris at chris-wilson.co.uk
Mon Nov 28 12:18:51 UTC 2016


On Mon, Nov 28, 2016 at 12:09:38PM +0000, Tvrtko Ursulin wrote:
> 
> On 25/11/2016 09:30, Chris Wilson wrote:
> >Set the initial value of the doorbell cookie from the client.
> >
> >Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> >---
> > drivers/gpu/drm/i915/i915_guc_submission.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
> >index 81aa5d4265c0..800dc5bb732f 100644
> >--- a/drivers/gpu/drm/i915/i915_guc_submission.c
> >+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
> >@@ -247,8 +247,8 @@ static int guc_update_doorbell_id(struct intel_guc *guc,
> >
> > 	/* Activate the new doorbell */
> > 	__set_bit(new_id, doorbell_bitmap);
> >-	doorbell->cookie = 0;
> > 	doorbell->db_status = GUC_DOORBELL_ENABLED;
> >+	doorbell->cookie = client->doorbell_cookie;
> > 	return host2guc_allocate_doorbell(guc, client);
> > }
> >
> >
> 
> I assume this is to enable the following patch where the cookie
> starts being preserved?

Exactly. At present, the value is zero, but when we start carrying the
client over across a reset, the client's cookie persists and so we
either want to reset the client of set the cookie to match the client. I
choose the later as I think that is more consistent with how we ring the
doorbell (by setting the expected value form the client and comparing
against the current doorbell in the fw).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list