All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Bragg <robert@sixbynine.org>
To: intel-gfx@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Sourab Gupta <sourab.gupta@intel.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH v4 00/11] Enable i915 perf stream for Haswell OA unit
Date: Thu, 18 Aug 2016 23:42:30 +0100	[thread overview]
Message-ID: <20160818224241.2315-1-robert@sixbynine.org> (raw)

I've updated the stream->ops->read() interface to avoid the struct
i915_perf_read_state so it's hopefully a bit clearer to see the state being
passed around:

    int (*read)(struct i915_perf_stream *stream,
                char __user *buf,
                size_t count,
                size_t *offset);

The inout offset is the buf offset (aka bytes read) which are still tracked
separate from any error state until we get back to the common code that handles
the final check for whether the error should be squashed if any data was
successfully copied. This avoids some duplication and more fiddly error paths
in the ->read implementations.

The initialization code is now spit into an i915_perf_init() called in
i915_driver_init_early() and an i915_perf_register() called in
i915_driver_register() once we're visible to userspace, after sysfs has been
initialized.

- Robert

Robert Bragg (11):
  drm/i915: Add i915 perf infrastructure
  drm/i915: rename OACONTROL GEN7_OACONTROL
  drm/i915: return EACCES for check_cmd() failures
  drm/i915: don't whitelist oacontrol in cmd parser
  drm/i915: Add 'render basic' Haswell OA unit config
  drm/i915: Enable i915 perf stream for Haswell OA unit
  drm/i915: advertise available metrics via sysfs
  drm/i915: Add dev.i915.perf_event_paranoid sysctl option
  drm/i915: add oa_event_min_timer_exponent sysctl
  drm/i915: Add more Haswell OA metric sets
  drm/i915: Add a kerneldoc summary for i915_perf.c

 drivers/gpu/drm/i915/Makefile           |    4 +
 drivers/gpu/drm/i915/i915_cmd_parser.c  |   40 +-
 drivers/gpu/drm/i915/i915_drv.c         |    9 +
 drivers/gpu/drm/i915/i915_drv.h         |  160 +++
 drivers/gpu/drm/i915/i915_gem_context.c |   22 +-
 drivers/gpu/drm/i915/i915_oa_hsw.c      |  659 ++++++++++++
 drivers/gpu/drm/i915/i915_oa_hsw.h      |   38 +
 drivers/gpu/drm/i915/i915_perf.c        | 1668 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_reg.h         |  340 ++++++-
 drivers/gpu/drm/i915/intel_ringbuffer.c |    7 +-
 include/uapi/drm/i915_drm.h             |  133 +++
 11 files changed, 3038 insertions(+), 42 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_oa_hsw.c
 create mode 100644 drivers/gpu/drm/i915/i915_oa_hsw.h
 create mode 100644 drivers/gpu/drm/i915/i915_perf.c

-- 
2.9.2

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

             reply	other threads:[~2016-08-18 22:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18 22:42 Robert Bragg [this message]
2016-08-18 22:42 ` [PATCH v4 01/11] drm/i915: Add i915 perf infrastructure Robert Bragg
2016-08-18 22:42 ` [PATCH v4 02/11] drm/i915: rename OACONTROL GEN7_OACONTROL Robert Bragg
2016-08-18 22:42 ` [PATCH v4 03/11] drm/i915: return EACCES for check_cmd() failures Robert Bragg
2016-08-18 22:42 ` [PATCH v4 04/11] drm/i915: don't whitelist oacontrol in cmd parser Robert Bragg
2016-08-18 22:42 ` [PATCH v4 05/11] drm/i915: Add 'render basic' Haswell OA unit config Robert Bragg
2016-08-18 22:42 ` [PATCH v4 06/11] drm/i915: Enable i915 perf stream for Haswell OA unit Robert Bragg
2016-08-18 22:42 ` [PATCH v4 07/11] drm/i915: advertise available metrics via sysfs Robert Bragg
2016-08-19 10:19   ` Chris Wilson
2016-08-19 14:04     ` [PATCH v5 " Robert Bragg
2016-08-18 22:42 ` [PATCH v4 08/11] drm/i915: Add dev.i915.perf_event_paranoid sysctl option Robert Bragg
2016-08-18 22:42 ` [PATCH v4 09/11] drm/i915: add oa_event_min_timer_exponent sysctl Robert Bragg
2016-08-18 22:42 ` [PATCH v4 10/11] drm/i915: Add more Haswell OA metric sets Robert Bragg
2016-08-18 22:42 ` [PATCH v4 11/11] drm/i915: Add a kerneldoc summary for i915_perf.c Robert Bragg
2016-08-19  5:58 ` ✗ Ro.CI.BAT: failure for Enable i915 perf stream for Haswell OA unit Patchwork
2016-08-19 14:10 ` ✗ Ro.CI.BAT: failure for Enable i915 perf stream for Haswell OA unit (rev2) 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=20160818224241.2315-1-robert@sixbynine.org \
    --to=robert@sixbynine.org \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sourab.gupta@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.