All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michel Thierry <michel.thierry@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/selftests: Add a GuC doorbells selftest
Date: Wed, 25 Oct 2017 16:12:59 -0700	[thread overview]
Message-ID: <671cfd18-56e1-bc11-4b61-702216b505b1@intel.com> (raw)
In-Reply-To: <3d33473a-1cf7-0c24-646a-c137294b84b2@intel.com>

On 25/10/17 14:19, Michel Thierry wrote:
> On 25/10/17 14:08, Chris Wilson wrote:
>> Quoting Michel Thierry (2017-10-25 21:53:44)
>>> Try to create multiple clients (one of each kind) and exercise the
>>> doorbell alloc/dealloc code.
>>>
>>> Since our usage mode require very few clients/doorbells, this code has
>>> been exercised very lightly and it's good to have a simple test for it.
>>>
>>> As reference, this test already helped identify the bug fixed by
>>> commit 7f1ea2ac3017 ("drm/i915/guc: Fix doorbell id selection").
>>>
>>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>> Cc: Michal Winiarski <michal.winiarski@intel.com>
>>> ---
>>> +/* create a client of each type and their doorbells */
>>> +static int igt_guc_doorbells(void *arg)
>>> +{
>>> +       struct drm_i915_private *dev_priv = arg;
>>> +       struct intel_guc *guc;
>>> +       struct i915_guc_client *clients[GUC_CLIENT_PRIORITY_NUM];
>>
>> Don't you actually want to test up to GUC_NUM_DOORBELLS? (-reserved?)
>> And check failure when full?
>>
>> I'm thinking an idr for the clients, that will give you an universal
>> -EEXISTS test as well for a repeated id, as well as an easy structure to
>> cleanup.
>>

cc-ing people that may be interested,

There is already an idr for the clients, guc->stage_ids, but its max 
range is GUC_MAX_STAGE_DESCRIPTORS, not GUC_NUM_DOORBELLS (this is 
because other drivers support the idea of 'leasing doorbells' and you 
could have more clients than doorbells).

But we don't support that, and right now any client after 
GUC_NUM_DOORBELLS would be allocated but then get a -ENOSPC while 
creating/reserving its doorbell.

I could change the limit of guc->stage_ids idr and reject earlier, any 
comments?

-Michel

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-10-25 23:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 20:53 [PATCH] drm/i915/selftests: Add a GuC doorbells selftest Michel Thierry
2017-10-25 21:08 ` Chris Wilson
2017-10-25 21:19   ` Michel Thierry
2017-10-25 23:12     ` Michel Thierry [this message]
2017-10-25 21:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-10-26 18:51 ` [PATCH v2] " Michel Thierry
2017-10-26 18:54   ` Michel Thierry
2017-10-26 19:42     ` Chris Wilson
2017-11-10 19:04   ` [PATCH v3] " Michel Thierry
2017-10-26 19:03 ` ✗ Fi.CI.BAT: failure for drm/i915/selftests: Add a GuC doorbells selftest (rev2) Patchwork
2017-11-10 19:39 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Add a GuC doorbells selftest (rev3) Patchwork
2017-11-10 21:00 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=671cfd18-56e1-bc11-4b61-702216b505b1@intel.com \
    --to=michel.thierry@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.