From: Daniel Vetter <daniel@ffwll.ch>
To: Deepak <deepak.s@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 01/15] drm/i915: Add ctx getparam ioctl parameter to retrieve ctx unique id
Date: Wed, 27 Jul 2016 12:19:00 +0200 [thread overview]
Message-ID: <20160727101900.GD31475@phenom.ffwll.local> (raw)
In-Reply-To: <57987C6E.3070503@linux.intel.com>
On Wed, Jul 27, 2016 at 02:48:38PM +0530, Deepak wrote:
>
>
>
> On 06/02/2016 10:48 AM, sourab.gupta@intel.com wrote:
> > From: Sourab Gupta <sourab.gupta@intel.com>
> >
> > This patch adds a new ctx getparam ioctl parameter, which can be used to
> > retrieve ctx unique id by userspace.
> >
> > This can be used by userspace to map the i915 perf samples with their
> > particular ctx's, since those would be having ctx unique id's.
> > Otherwise the userspace has no way of maintaining this association,
> > since it has the knowledge of only per-drm file specific ctx handles.
> >
> > Signed-off-by: Sourab Gupta <sourab.gupta@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_gem_context.c | 3 +++
> > include/uapi/drm/i915_drm.h | 1 +
> > 2 files changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> > index e974451..09f5178 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_context.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> > @@ -1001,6 +1001,9 @@ int i915_gem_context_getparam_ioctl(struct drm_device *dev, void *data,
> > else
> > args->value = to_i915(dev)->ggtt.base.total;
> > break;
> > + case I915_CONTEXT_PARAM_HW_ID:
> > + args->value = ctx->hw_id;
> > + break;
> > default:
> > ret = -EINVAL;
> > break;
> > diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> > index 4a1bcfd8..0badc16 100644
> > --- a/include/uapi/drm/i915_drm.h
> > +++ b/include/uapi/drm/i915_drm.h
> > @@ -1171,6 +1171,7 @@ struct drm_i915_gem_context_param {
> > #define I915_CONTEXT_PARAM_BAN_PERIOD 0x1
> > #define I915_CONTEXT_PARAM_NO_ZEROMAP 0x2
> > #define I915_CONTEXT_PARAM_GTT_SIZE 0x3
> > +#define I915_CONTEXT_PARAM_HW_ID 0x4
> > __u64 value;
> > };
> Patch looks good to me
>
> Reviewed-by: Deepak S <deepak.s@linux.intel.com>
ctx->hw_id gets recycled without any involvement from userspace. How
exactly is this supposed to work?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-07-27 10:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 5:18 [PATCH 00/15] Framework to collect command stream gpu metrics using i915 perf sourab.gupta
2016-06-02 5:18 ` [PATCH 01/15] drm/i915: Add ctx getparam ioctl parameter to retrieve ctx unique id sourab.gupta
2016-07-27 9:18 ` Deepak
2016-07-27 10:19 ` Daniel Vetter [this message]
2016-07-27 10:50 ` Chris Wilson
2016-07-28 9:37 ` Daniel Vetter
2016-06-02 5:18 ` [PATCH 02/15] drm/i915: Expose OA sample source to userspace sourab.gupta
2016-06-02 5:18 ` [PATCH 03/15] drm/i915: Framework for capturing command stream based OA reports sourab.gupta
2016-06-02 6:00 ` Martin Peres
2016-06-02 6:28 ` sourab gupta
2016-06-02 5:18 ` [PATCH 04/15] drm/i915: flush periodic samples, in case of no pending CS sample requests sourab.gupta
2016-06-02 5:18 ` [PATCH 05/15] drm/i915: Handle the overflow condition for command stream buf sourab.gupta
2016-06-02 5:18 ` [PATCH 06/15] drm/i915: Populate ctx ID for periodic OA reports sourab.gupta
2016-06-02 5:18 ` [PATCH 07/15] drm/i915: Add support for having pid output with OA report sourab.gupta
2016-06-02 5:18 ` [PATCH 08/15] drm/i915: Add support for emitting execbuffer tags through OA counter reports sourab.gupta
2016-06-02 5:18 ` [PATCH 09/15] drm/i915: Extend i915 perf framework for collecting timestamps on all gpu engines sourab.gupta
2016-06-02 5:18 ` [PATCH 10/15] drm/i915: Extract raw GPU timestamps from OA reports to forward in perf samples sourab.gupta
2016-06-02 5:18 ` [PATCH 11/15] drm/i915: Support opening multiple concurrent perf streams sourab.gupta
2016-06-02 5:18 ` [PATCH 12/15] time: Expose current clocksource in use by timekeeping framework sourab.gupta
2016-06-02 5:18 ` [PATCH 13/15] time: export clocks_calc_mult_shift sourab.gupta
2016-06-02 5:18 ` [PATCH 14/15] drm/i915: Mechanism to forward clock monotonic raw time in perf samples sourab.gupta
2016-06-02 5:18 ` [PATCH 15/15] drm/i915: Support for capturing MMIO register values sourab.gupta
2016-06-03 12:08 ` ✗ Ro.CI.BAT: failure for Framework to collect command stream gpu metrics using i915 perf (rev2) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2016-11-04 9:30 [PATCH 00/15] Framework to collect command stream gpu metrics using i915 perf sourab.gupta
2016-11-04 9:30 ` [PATCH 01/15] drm/i915: Add ctx getparam ioctl parameter to retrieve ctx unique id sourab.gupta
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=20160727101900.GD31475@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=deepak.s@linux.intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox