All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 2/7] drm/i915/perf: allow for CS OA configs to be created lazily
Date: Tue, 04 Jun 2019 14:29:57 +0100	[thread overview]
Message-ID: <155965499788.21578.11320604396048642590@skylake-alporthouse-com> (raw)
In-Reply-To: <20190604131140.12647-3-lionel.g.landwerlin@intel.com>

Quoting Lionel Landwerlin (2019-06-04 14:11:35)
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index 2e33a9b4eae7..e0071e44de3d 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -366,9 +366,16 @@ struct perf_open_properties {
>         int oa_period_exponent;
>  };
>  
> -static void free_oa_config(struct drm_i915_private *dev_priv,
> -                          struct i915_oa_config *oa_config)
> +static void put_oa_config(struct i915_oa_config *oa_config)
>  {
> +       if (!atomic_dec_and_test(&oa_config->ref_count))

Might as well use struct kref? At the very least, refcount_t.

> +               return;
> +

> +       if (oa_config->obj) {
lockdep_assert_held(&dev_priv->perf.metrics_lock);

It's not apparent that the lock is held for the list_del.

> +               list_del(&oa_config->vma_link);
> +               i915_gem_object_put(oa_config->obj);
> +       }
> +
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-06-04 13:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 13:11 [PATCH v3 0/7] drm/i915: Vulkan performance query support Lionel Landwerlin
2019-06-04 13:11 ` [PATCH v3 1/7] drm/i915/perf: introduce a versioning of the i915-perf uapi Lionel Landwerlin
2019-06-04 13:11 ` [PATCH v3 2/7] drm/i915/perf: allow for CS OA configs to be created lazily Lionel Landwerlin
2019-06-04 13:29   ` Chris Wilson [this message]
2019-06-04 13:11 ` [PATCH v3 3/7] drm/i915: introduce a mechanism to extend execbuf2 Lionel Landwerlin
2019-06-04 13:32   ` Chris Wilson
2019-06-04 13:11 ` [PATCH v3 4/7] drm/i915: add syncobj timeline support Lionel Landwerlin
2019-06-04 13:11 ` [PATCH v3 5/7] drm/i915: add a new perf configuration execbuf parameter Lionel Landwerlin
2019-06-04 13:40   ` Chris Wilson
2019-06-04 13:51     ` Lionel Landwerlin
2019-06-04 13:11 ` [PATCH v3 6/7] drm/i915/perf: allow holding preemption on filtered ctx Lionel Landwerlin
2019-06-04 13:45   ` Chris Wilson
2019-06-04 13:11 ` [PATCH v3 7/7] drm/i915: add support for perf configuration queries Lionel Landwerlin
2019-06-04 16:09 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Vulkan performance query support (rev3) Patchwork
2019-06-04 16:14 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-06-04 16:30 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-05 12:11 ` ✓ 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=155965499788.21578.11320604396048642590@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lionel.g.landwerlin@intel.com \
    /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.