Re: [Intel-gfx] [PATCH 03/12] drm/i915: Framework for capturing command stream based OA reports and ctx id info.

2017-08-01 Thread sourab gupta
On Wed, Aug 2, 2017 at 2:28 AM, Lionel Landwerlin < lionel.g.landwer...@intel.com> wrote: > On 01/08/17 19:05, sourab gupta wrote: > > > > On Tue, Aug 1, 2017 at 2:59 PM, Kamble, Sagar A > wrote: > >> >> >> -Original Message- >> From: La

Re: [Intel-gfx] [PATCH 0/8] Collect command stream based OA reports using i915 perf

2017-03-16 Thread sourab gupta
On Thu, 2017-03-16 at 05:59 -0700, Robert Bragg wrote: > On Thu, Mar 16, 2017 at 6:14 AM, wrote: > > From: Sourab Gupta > > > > This series adds framework for collection of OA reports associated with the > > render command stream, which are collected ar

Re: [Intel-gfx] [PATCH 3/8] drm/i915: Framework for capturing command stream based OA reports

2017-03-16 Thread sourab gupta
On Thu, 2017-03-16 at 03:09 -0700, Chris Wilson wrote: > On Thu, Mar 16, 2017 at 03:22:03PM +0530, sourab gupta wrote: > > On Thu, 2017-03-16 at 02:03 -0700, Chris Wilson wrote: > > > On Thu, Mar 16, 2017 at 02:24:55PM +0530, sourab gupta wrote: > > > > On Thu, 20

Re: [Intel-gfx] [PATCH 3/8] drm/i915: Framework for capturing command stream based OA reports

2017-03-16 Thread sourab gupta
On Thu, 2017-03-16 at 02:03 -0700, Chris Wilson wrote: > On Thu, Mar 16, 2017 at 02:24:55PM +0530, sourab gupta wrote: > > On Thu, 2017-03-16 at 01:10 -0700, Chris Wilson wrote: > > > On Thu, Mar 16, 2017 at 11:44:10AM +0530, sourab.gu...@intel.com wrote: > > > &

Re: [Intel-gfx] [PATCH 3/8] drm/i915: Framework for capturing command stream based OA reports

2017-03-16 Thread sourab gupta
On Thu, 2017-03-16 at 01:31 -0700, Chris Wilson wrote: > On Thu, Mar 16, 2017 at 11:44:10AM +0530, sourab.gu...@intel.com wrote: > > +static void i915_perf_command_stream_hook_oa(struct i915_perf_stream > > *stream, > > + struct drm_i915_gem_request *request) > >

Re: [Intel-gfx] [PATCH 3/8] drm/i915: Framework for capturing command stream based OA reports

2017-03-16 Thread sourab gupta
On Thu, 2017-03-16 at 01:10 -0700, Chris Wilson wrote: > On Thu, Mar 16, 2017 at 11:44:10AM +0530, sourab.gu...@intel.com wrote: > > @@ -3593,6 +3670,7 @@ void i915_oa_init_reg_state(struct intel_engine_cs > > *engine, > > void i915_oa_update_reg_state(struct intel_engine_cs *engine, > >

Re: [Intel-gfx] [PATCH 1/6] drm/i915: Extend i915 perf framework for collecting timestamps on all gpu engines

2017-03-16 Thread sourab gupta
On Thu, 2017-03-16 at 00:49 -0700, Chris Wilson wrote: > On Thu, Mar 16, 2017 at 11:50:06AM +0530, sourab.gu...@intel.com wrote: > > From: Sourab Gupta > > > > This patch extends the i915 perf framework to handle the perf sample > > collection for any given gpu engine

[Intel-gfx] [PATCH 5/6] drm/i915: Mechanism to forward clock monotonic raw time in perf samples

2017-03-15 Thread sourab . gupta
From: Sourab Gupta Currently, we have the ability to only forward the GPU timestamps in the samples (which are generated via OA reports or PIPE_CONTROL commands inserted in the ring). This limits the ability to correlate these samples with the system events. If we scale the GPU timestamps

[Intel-gfx] [PATCH 6/6] drm/i915: Support for capturing MMIO register values

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This patch adds support for capturing MMIO register values through i915 perf interface. The userspace can request upto 8 MMIO register values to be dumped. The addresses of these registers can be passed through the corresponding property 'value' field while opening

[Intel-gfx] [PATCH 4/6] time: Expose current clocksource in use by timekeeping framework

2017-03-15 Thread sourab . gupta
From: Sourab Gupta For the drivers to be able to use the cross timestamp framework, they need the information of current clocksource being used by the kernel timekeeping. This is needed since the callback given by driver into the get_device_system_crosststamp(), in order to synchronously read

[Intel-gfx] [PATCH 3/6] drm/i915: Support opening multiple concurrent perf streams

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This patch adds support for opening multiple concurrent perf streams for different gpu engines, while having the restriction to open only a single stream open for a particular gpu engine. This enables userspace client to open multiple streams, one per engine, at any time to

[Intel-gfx] [PATCH 2/6] drm/i915: Extract raw GPU timestamps from OA reports to forward in perf samples

2017-03-15 Thread sourab . gupta
From: Sourab Gupta The OA reports contain the least significant 32 bits of the gpu timestamp. This patch enables retrieval of the timestamp field from OA reports, to forward as 64 bit raw gpu timestamps in the perf samples. Signed-off-by: Sourab Gupta --- drivers/gpu/drm/i915/i915_drv.h | 1

[Intel-gfx] [PATCH 1/6] drm/i915: Extend i915 perf framework for collecting timestamps on all gpu engines

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This patch extends the i915 perf framework to handle the perf sample collection for any given gpu engine. Particularly, the support for collecting timestamp sample type is added, which can be requested for any engine. With this, for RCS, timestamps and OA reports can be

[Intel-gfx] [PATCH 0/6] Collect command stream based GPU metrics for all engines using i915 perf

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This series adds framework for collection of gpu performance metrics associated with the command stream of a particular engine. These metrics include OA reports for render stream and timestamps, mmio metrics, etc. for other gpu engine streams. These metrics are are collected

[Intel-gfx] [PATCH 6/8] drm/i915: Populate ctx ID for periodic OA reports

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This adds support for populating the ctx id for the periodic OA reports when requested through the corresponding property. For Gen8, the OA reports itself have the ctx ID and it is the one programmed into HW while submitting workloads. Thus it's retrieved from reports i

[Intel-gfx] [PATCH 3/8] drm/i915: Framework for capturing command stream based OA reports

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This patch introduces a framework to capture OA counter reports associated with Render command stream. We can then associate the reports captured through this mechanism with their corresponding context id's. This can be further extended to associate any other met

[Intel-gfx] [PATCH 5/8] drm/i915: Inform userspace about command stream OA buf overflow

2017-03-15 Thread sourab . gupta
From: Sourab Gupta Considering how we don't currently give userspace control over the OA buffer size and always configure a large 16MB buffer, then a buffer overflow does anyway likely indicate that something has gone quite badly wrong. Here we set a status flag to detect overflow and i

[Intel-gfx] [PATCH 2/8] drm/i915: Expose OA sample source to userspace

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This patch exposes a new sample source field to userspace. This field can be populated to specify the origin of the OA report. Currently, the OA samples are being generated only periodically, and hence there's only source flag enum definition right now, but there are

[Intel-gfx] [PATCH 4/8] drm/i915: flush periodic samples, in case of no pending CS sample requests

2017-03-15 Thread sourab . gupta
From: Sourab Gupta When there are no pending CS OA samples, flush the periodic OA samples collected so far. We can safely forward the periodic OA samples in the case we have no pending CS samples, but we can't do so in the case we have pending CS samples, since we don't know what th

[Intel-gfx] [PATCH 7/8] drm/i915: Add support for having pid output with OA report

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This patch introduces flags and adds support for having pid output with the OA reports generated through the RCS commands. When the stream is opened with pid sample type, the pid information is also captured through the command stream samples and forwarded along with the OA

[Intel-gfx] [PATCH 8/8] drm/i915: Add support for emitting execbuffer tags through OA counter reports

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This patch enables userspace to specify tags (per workload), provided via execbuffer ioctl, which could be added to OA reports, to help associate reports with the corresponding workloads. There may be multiple stages within a single context, from a userspace perspective. An

[Intel-gfx] [PATCH 1/8] drm/i915: Add ctx getparam ioctl parameter to retrieve ctx unique id

2017-03-15 Thread sourab . gupta
From: Sourab Gupta 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 OA reports received in the i915 perf samples with their associated ctx's (The OA reports have the hw ctx ID inform

[Intel-gfx] [PATCH 0/8] Collect command stream based OA reports using i915 perf

2017-03-15 Thread sourab . gupta
From: Sourab Gupta This series adds framework for collection of OA reports associated with the render command stream, which are collected around batchbuffer boundaries. Refloating the series rebased on Robert's latest patch set for 'Enabling OA unit for Gen 8 and 9 in i915 perf'

Re: [Intel-gfx] [RFC 0/4] Introduce drmfs pseudo filesystem for drm subsystem

2017-02-09 Thread sourab gupta
rm subsystem component. > > > > The patch series is being floated as RFC to gather feedback on the idea and > > infrastructure proposed here and it's suitability to address the specific > > problem statement/use case. > > > > v2: fix the bat failures caused due to miss

Re: [Intel-gfx] [RFC 0/4] Introduce drmfs pseudo filesystem for drm subsystem

2017-02-09 Thread sourab gupta
or states, memory stats, etc. can be move to this filesystem, if the > >> idea introduced here is acceptable per se. The filesystem introduced is > >> being used to house the data generated by i915 driver in this patch series, > >> but will hopefully be generic eno

Re: [Intel-gfx] [RFC 0/4] Introduce drmfs pseudo filesystem for drm subsystem

2016-12-14 Thread sourab gupta
On Mon, 2016-12-12 at 07:33 -0800, Alex Deucher wrote: > On Mon, Dec 12, 2016 at 1:14 AM, sourab gupta wrote: > > On Mon, 2016-12-05 at 03:06 -0800, Dhingra, Swati wrote: > >> From: Swati Dhingra > >> > >> Currently, we don't have a stable ABI which can

Re: [Intel-gfx] [RFC 0/4] Introduce drmfs pseudo filesystem for drm subsystem

2016-12-11 Thread sourab gupta
fic > problem statement/use case. > > TODO: Create documentation. Will do so in next version. > > v2: fix the bat failures caused due to missing config check > > v3: Changes made: > - Move the location of drmfs from fs/ to drivers/gpu/drm/ (Chris) > - Moving

Re: [Intel-gfx] [RFC 1/3] fs: Introduce drmfs pseudo filesystem interfaces

2016-12-02 Thread sourab gupta
commit message here and > probably in the Kconfig help text as well. > > > Matt > We've intended for drmfs to be ABI as Chris mentioned here: https://lists.freedesktop.org/archives/intel-gfx/2016-December/113245.html The intent is for drmfs to be a stable ABI for the fi

Re: [Intel-gfx] [RFC 2/3] drm: Register drmfs filesystem from drm init

2016-12-02 Thread sourab gupta
case of i915 driver, the top directory is created at > > '/sys/kernel/drm/i915'. > > > > Signed-off-by: Sourab Gupta > > Signed-off-by: Swati Dhingra > > --- > > drivers/gpu/drm/drm_drv.c | 22 ++ > > include/drm/drm_drv.

Re: [Intel-gfx] [RFC 1/3] fs: Introduce drmfs pseudo filesystem interfaces

2016-12-02 Thread sourab gupta
onstraints, there is a need for a new pseudo filesytem, customizable to DRM > > specific requirements and catering to the needs to DRM subsystem components > > > > Signed-off-by: Sourab Gupta > > Signed-off-by: Swati Dhingra > > I thought review feedback was to put

Re: [Intel-gfx] [RFC 2/3] drm: Register drmfs filesystem from drm init

2016-12-01 Thread sourab gupta
On Thu, 2016-12-01 at 00:15 -0800, Chris Wilson wrote: > On Thu, Dec 01, 2016 at 12:32:32PM +0530, swati.dhin...@intel.com wrote: > > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > > index 84fcfcb..ead360bd 100644 > > --- a/drivers/gpu/drm/drm_drv.c > > +++ b/drivers/gpu/drm/d

Re: [Intel-gfx] [RFC 1/3] fs: Introduce drmfs pseudo filesystem interfaces

2016-12-01 Thread sourab gupta
On Thu, 2016-12-01 at 00:11 -0800, Chris Wilson wrote: > On Thu, Dec 01, 2016 at 12:32:31PM +0530, swati.dhin...@intel.com wrote: > > diff --git a/fs/Kconfig b/fs/Kconfig > > index 4bd03a2..7d0ac20 100644 > > --- a/fs/Kconfig > > +++ b/fs/Kconfig > > @@ -200,6 +200,15 @@ config HUGETLBFS > > confi

Re: [Intel-gfx] [RFC 1/3] fs: Introduce drmfs pseudo filesystem interfaces

2016-12-01 Thread sourab gupta
On Thu, 2016-12-01 at 00:07 -0800, Chris Wilson wrote: > On Thu, Dec 01, 2016 at 12:32:31PM +0530, swati.dhin...@intel.com wrote: > > +int drmfs_init(void) > > +{ > > + int retval; > > + > > + retval = sysfs_create_mount_point(kernel_kobj, "drm"); > > + if (retval) > > + return -EIN

Re: [Intel-gfx] [PATCH v9 06/11] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-11-15 Thread sourab gupta
ructure fits quite well for these usecases. With Chris' comments addressed, the patch can have my r-b. Reviewed-by: Sourab Gupta ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v9 09/11] drm/i915: add dev.i915.oa_max_sample_rate sysctl

2016-11-08 Thread sourab gupta
On Tue, 2016-11-08 at 03:47 -0800, Robert Bragg wrote: > > > On Tue, Nov 8, 2016 at 6:19 AM, sourab gupta > wrote: > On Mon, 2016-11-07 at 11:49 -0800, Robert Bragg wrote: > > The maximum OA sampling frequency is now configurable via a > >

Re: [Intel-gfx] [PATCH v9 11/11] drm/i915: Add a kerneldoc summary for i915_perf.c

2016-11-07 Thread sourab gupta
> Signed-off-by: Robert Bragg > Reviewed-by: Matthew Auld > --- Good summary of early challenges faced while adapting core perf. Reviewed-by: Sourab Gupta ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v9 09/11] drm/i915: add dev.i915.oa_max_sample_rate sysctl

2016-11-07 Thread sourab gupta
On Mon, 2016-11-07 at 11:49 -0800, Robert Bragg wrote: > The maximum OA sampling frequency is now configurable via a > dev.i915.oa_max_sample_rate sysctl parameter. > > Following the precedent set by perf's similar > kernel.perf_event_max_sample_rate the default maximum rate is 10Hz > > Signe

Re: [Intel-gfx] [PATCH v9 05/11] drm/i915: Add 'render basic' Haswell OA unit config

2016-11-07 Thread sourab gupta
.com/rib/gputop > > gputop-data/oa-*.xml > > scripts/i915-perf-kernelgen.py > > $ make -C gputop-data -f Makefile.xml SYSFS=0 WHITELIST=RenderBasic > > Signed-off-by: Robert Bragg > Reviewed-by: Matthew Auld > --- Looks good. Reviewed-by: Sourab Gupta

Re: [Intel-gfx] [PATCH 05/15] drm/i915: Handle the overflow condition for command stream buf

2016-11-07 Thread sourab gupta
On Mon, 2016-11-07 at 03:10 -0800, Matthew Auld wrote: > On 4 November 2016 at 09:30, wrote: > > From: Sourab Gupta > > > > Add a compile time option for detecting the overflow condition of command > > stream buffer, and not overwriting the old entries in such a c

[Intel-gfx] [PATCH v2 14/15] drm/i915: Mechanism to forward clock monotonic raw time in perf samples

2016-11-07 Thread sourab . gupta
From: Sourab Gupta Currently, we have the ability to only forward the GPU timestamps in the samples (which are generated via OA reports or PIPE_CONTROL commands inserted in the ring). This limits the ability to correlate these samples with the system events. If we scale the GPU timestamps

[Intel-gfx] [PATCH v2 08/15] drm/i915: Add support for emitting execbuffer tags through OA counter reports

2016-11-07 Thread sourab . gupta
From: Sourab Gupta This patch enables userspace to specify tags (per workload), provided via execbuffer ioctl, which could be added to OA reports, to help associate reports with the corresponding workloads. There may be multiple stages within a single context, from a userspace perspective. An

[Intel-gfx] [PATCH v2 06/15] drm/i915: Populate ctx ID for periodic OA reports

2016-11-07 Thread sourab . gupta
From: Sourab Gupta This adds support for populating the ctx id for the periodic OA reports when requested through the corresponding property. For Gen8, the OA reports itself have the ctx ID and it is the one programmed into HW while submitting workloads. Thus it's retrieved from reports i

Re: [Intel-gfx] [PATCH v8 02/12] drm/i915: Add i915 perf infrastructure

2016-11-07 Thread sourab gupta
On Fri, 2016-11-04 at 06:19 -0700, Robert Bragg wrote: > > > On Fri, Nov 4, 2016 at 8:59 AM, sourab gupta > wrote: > On Thu, 2016-10-27 at 19:14 -0700, Robert Bragg wrote: > > Adds base i915 perf infrastructure for Gen performance > metrics. >

[Intel-gfx] [PATCH 10/15] drm/i915: Extract raw GPU timestamps from OA reports to forward in perf samples

2016-11-04 Thread sourab . gupta
From: Sourab Gupta The OA reports contain the least significant 32 bits of the gpu timestamp. This patch enables retrieval of the timestamp field from OA reports, to forward as 64 bit raw gpu timestamps in the perf samples. Signed-off-by: Sourab Gupta --- drivers/gpu/drm/i915/i915_drv.h | 1

[Intel-gfx] [PATCH 11/15] drm/i915: Support opening multiple concurrent perf streams

2016-11-04 Thread sourab . gupta
From: Sourab Gupta This patch adds support for opening multiple concurrent perf streams for different gpu engines, while having the restriction to open only a single stream open for a particular gpu engine. This enables userspace client to open multiple streams, one per engine, at any time to

[Intel-gfx] [PATCH 12/15] time: Expose current clocksource in use by timekeeping framework

2016-11-04 Thread sourab . gupta
From: Sourab Gupta For the drivers to be able to use the cross timestamp framework, they need the information of current clocksource being used by the kernel timekeeping. This is needed since the callback given by driver into the get_device_system_crosststamp(), in order to synchronously read

[Intel-gfx] [PATCH 14/15] drm/i915: Mechanism to forward clock monotonic raw time in perf samples

2016-11-04 Thread sourab . gupta
From: Sourab Gupta Currently, we have the ability to only forward the GPU timestamps in the samples (which are generated via OA reports or PIPE_CONTROL commands inserted in the ring). This limits the ability to correlate these samples with the system events. If we scale the GPU timestamps

[Intel-gfx] [PATCH 00/15] Framework to collect command stream gpu metrics using i915 perf

2016-11-04 Thread sourab . gupta
From: Sourab Gupta Refloating the series rebased on Robert's latest patchset. Since Robert's patches are being reviewed and this patch series extends his framework to enable multiple concurrent streams to capture command stream based metrics, it would be good to keep this work in p

[Intel-gfx] [PATCH 07/15] drm/i915: Add support for having pid output with OA report

2016-11-04 Thread sourab . gupta
From: Sourab Gupta This patch introduces flags and adds support for having pid output with the OA reports generated through the RCS commands. When the stream is opened with pid sample type, the pid information is also captured through the command stream samples and forwarded along with the OA

[Intel-gfx] [PATCH 15/15] drm/i915: Support for capturing MMIO register values

2016-11-04 Thread sourab . gupta
From: Sourab Gupta This patch adds support for capturing MMIO register values through i915 perf interface. The userspace can request upto 8 MMIO register values to be dumped. The addresses of these registers can be passed through the corresponding property 'value' field while opening

[Intel-gfx] [PATCH 05/15] drm/i915: Handle the overflow condition for command stream buf

2016-11-04 Thread sourab . gupta
From: Sourab Gupta Add a compile time option for detecting the overflow condition of command stream buffer, and not overwriting the old entries in such a case. Also, set a status flag to forward the overflow condition to userspace if overflow is detected. Signed-off-by: Sourab Gupta

[Intel-gfx] [PATCH 13/15] time: export clocks_calc_mult_shift

2016-11-04 Thread sourab . gupta
From: Sourab Gupta Exporting clocks_calc_mult_shift is helpful for drivers to calculate the mult/shift values for their clocks, given their frequency. This is particularly useful when such drivers may want to associate timecounter/cyclecounter abstraction for their clock sources, in order to use

[Intel-gfx] [PATCH 02/15] drm/i915: Expose OA sample source to userspace

2016-11-04 Thread sourab . gupta
From: Sourab Gupta This patch exposes a new sample source field to userspace. This field can be populated to specify the origin of the OA report. For e.g. for internally triggerred reports (non MI_RPC reports), the RPT_ID field has bitfields for specifying the origin such as timer, or render ctx

[Intel-gfx] [PATCH 04/15] drm/i915: flush periodic samples, in case of no pending CS sample requests

2016-11-04 Thread sourab . gupta
From: Sourab Gupta When there are no pending CS OA samples, flush the periodic OA samples collected so far. We can safely forward the periodic OA samples in the case we have no pending CS samples, but we can't do so in the case we have pending CS samples, since we don't know what th

[Intel-gfx] [PATCH 01/15] drm/i915: Add ctx getparam ioctl parameter to retrieve ctx unique id

2016-11-04 Thread sourab . gupta
From: Sourab Gupta 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 usersp

[Intel-gfx] [PATCH 06/15] drm/i915: Populate ctx ID for periodic OA reports

2016-11-04 Thread sourab . gupta
From: Sourab Gupta This adds support for populating the ctx id for the periodic OA reports when requested through the corresponding property. For Gen8, the OA reports itself have the ctx ID and it is the one programmed into HW while submitting workloads. Thus it's retrieved from reports i

[Intel-gfx] [PATCH 09/15] drm/i915: Extend i915 perf framework for collecting timestamps on all gpu engines

2016-11-04 Thread sourab . gupta
From: Sourab Gupta This patch extends the i915 perf framework to handle the perf sample collection for any given gpu engine. Particularly, the support for collecting timestamp sample type is added, which can be requested for any engine. With this, for RCS, timestamps and OA reports can be

[Intel-gfx] [PATCH 08/15] drm/i915: Add support for emitting execbuffer tags through OA counter reports

2016-11-04 Thread sourab . gupta
From: Sourab Gupta This patch enables userspace to specify tags (per workload), provided via execbuffer ioctl, which could be added to OA reports, to help associate reports with the corresponding workloads. There may be multiple stages within a single context, from a userspace perspective. An

[Intel-gfx] [PATCH 03/15] drm/i915: Framework for capturing command stream based OA reports

2016-11-04 Thread sourab . gupta
From: Sourab Gupta This patch introduces a framework to enable OA counter reports associated with Render command stream. We can then associate the reports captured through this mechanism with their corresponding context id's. This can be further extended to associate any other met

Re: [Intel-gfx] [PATCH v8 05/12] drm/i915: don't whitelist oacontrol in cmd parser

2016-11-04 Thread sourab gupta
gt; Signed-off-by: Robert Bragg > Reviewed-by: Matthew Auld Seems reasonable. Reviewed-by: Sourab Gupta ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v8 09/12] drm/i915: Add dev.i915.perf_stream_paranoid sysctl option

2016-11-04 Thread sourab gupta
dev_priv->perf.oa.n_builtin_sets = > i915_oa_n_builtin_metric_sets_hsw; > > + dev_priv->perf.sysctl_header = register_sysctl_table(dev_root); > + > dev_priv->perf.initialized = true; > } > > @@ -1492,6 +1538,8 @@ void i915_perf_fini(

Re: [Intel-gfx] [PATCH v8 08/12] drm/i915: advertise available metrics via sysfs

2016-11-04 Thread sourab gupta
ata/oa-*.xml > > scripts/i915-perf-kernelgen.py > > $ make -C gputop-data -f Makefile.xml SYSFS=1 WHITELIST=RenderBasic > > Signed-off-by: Robert Bragg > Reviewed-by: Matthew Auld Looks good to me. Reviewed-by: Sourab Gupta ___

Re: [Intel-gfx] [PATCH v8 02/12] drm/i915: Add i915 perf infrastructure

2016-11-04 Thread sourab gupta
On Thu, 2016-10-27 at 19:14 -0700, Robert Bragg wrote: > Adds base i915 perf infrastructure for Gen performance metrics. > > This adds a DRM_IOCTL_I915_PERF_OPEN ioctl that takes an array of uint64 > properties to configure a stream of metrics and returns a new fd usable > with standard VFS system

Re: [Intel-gfx] [PATCH v8 04/12] drm/i915: return EACCES for check_cmd() failures

2016-11-03 Thread sourab gupta
ey attempt an OACONTROL write. > > This bumps the command parser version from 7 to 8, as the change is > visible to userspace. > > Signed-off-by: Robert Bragg > Reviewed-by: Matthew Auld Well, looks reasonable to me. Reviewed-by: Sourab Gupta _

Re: [Intel-gfx] [PATCH v8 03/12] drm/i915: rename OACONTROL GEN7_OACONTROL

2016-11-01 Thread sourab gupta
On Thu, 2016-10-27 at 19:14 -0700, Robert Bragg wrote: > OACONTROL changes quite a bit for gen8, with some bits split out into a > per-context OACTXCONTROL register. Rename now before adding more gen7 OA > registers > > Signed-off-by: Robert Bragg > Reviewed-by: Matthew Auld R

Re: [Intel-gfx] [PATCH v8 10/12] drm/i915: add oa_event_min_timer_exponent sysctl

2016-11-01 Thread sourab gupta
On Thu, 2016-10-27 at 19:14 -0700, Robert Bragg wrote: > The minimal sampling period is now configurable via a > dev.i915.oa_min_timer_exponent sysctl parameter. > > Following the precedent set by perf, the default is the minimum that > won't (on its own) exceed the default kernel.perf_event_max_s

Re: [Intel-gfx] [PATCH 03/15] drm/i915: Framework for capturing command stream based OA reports

2016-06-01 Thread sourab gupta
On Thu, 2016-06-02 at 11:30 +0530, Martin Peres wrote: > On 02/06/16 08:18, sourab.gu...@intel.com wrote: > > From: Sourab Gupta > > > > This patch introduces a framework to enable OA counter reports associated > > with Render command stream. We can then associate the r

[Intel-gfx] [PATCH 05/15] drm/i915: Handle the overflow condition for command stream buf

2016-06-01 Thread sourab . gupta
From: Sourab Gupta Add a compile time option for detecting the overflow condition of command stream buffer, and not overwriting the old entries in such a case. Also, set a status flag to forward the overflow condition to userspace if overflow is detected. Signed-off-by: Sourab Gupta

[Intel-gfx] [PATCH 00/15] Framework to collect command stream gpu metrics using i915 perf

2016-06-01 Thread sourab . gupta
From: Sourab Gupta This series adds framework for collection of gpu performance metrics associated with the command stream of a particular engine. These metrics include OA reports, timestamps, mmio metrics, etc. These metrics are are collected around batchbuffer boundaries. This work utilizes

[Intel-gfx] [PATCH 02/15] drm/i915: Expose OA sample source to userspace

2016-06-01 Thread sourab . gupta
From: Sourab Gupta This patch exposes a new sample source field to userspace. This field can be populated to specify the origin of the OA report. For e.g. for internally triggerred reports (non MI_RPC reports), the RPT_ID field has bitfields for specifying the origin such as timer, or render ctx

[Intel-gfx] [PATCH 11/15] drm/i915: Support opening multiple concurrent perf streams

2016-06-01 Thread sourab . gupta
From: Sourab Gupta This patch adds support for opening multiple concurrent perf streams for different gpu engines, while having the restriction to open only a single stream open for a particular gpu engine. This enables userspace client to open multiple streams, one per engine, at any time to

[Intel-gfx] [PATCH 08/15] drm/i915: Add support for emitting execbuffer tags through OA counter reports

2016-06-01 Thread sourab . gupta
From: Sourab Gupta This patch enables userspace to specify tags (per workload), provided via execbuffer ioctl, which could be added to OA reports, to help associate reports with the corresponding workloads. There may be multiple stages within a single context, from a userspace perspective. An

[Intel-gfx] [PATCH 14/15] drm/i915: Mechanism to forward clock monotonic raw time in perf samples

2016-06-01 Thread sourab . gupta
From: Sourab Gupta Currently, we have the ability to only forward the GPU timestamps in the samples (which are generated via OA reports or PIPE_CONTROL commands inserted in the ring). This limits the ability to correlate these samples with the system events. If we scale the GPU timestamps

[Intel-gfx] [PATCH 10/15] drm/i915: Extract raw GPU timestamps from OA reports to forward in perf samples

2016-06-01 Thread sourab . gupta
From: Sourab Gupta The OA reports contain the least significant 32 bits of the gpu timestamp. This patch enables retrieval of the timestamp field from OA reports, to forward as 64 bit raw gpu timestamps in the perf samples. Signed-off-by: Sourab Gupta --- drivers/gpu/drm/i915/i915_drv.h | 1

[Intel-gfx] [PATCH 15/15] drm/i915: Support for capturing MMIO register values

2016-06-01 Thread sourab . gupta
From: Sourab Gupta This patch adds support for capturing MMIO register values through i915 perf interface. The userspace can request upto 8 MMIO register values to be dumped. The addresses of these registers can be passed through the corresponding property 'value' field while opening

[Intel-gfx] [PATCH 12/15] time: Expose current clocksource in use by timekeeping framework

2016-06-01 Thread sourab . gupta
From: Sourab Gupta For the drivers to be able to use the cross timestamp framework, they need the information of current clocksource being used by the kernel timekeeping. This is needed since the callback given by driver into the get_device_system_crosststamp(), in order to synchronously read

[Intel-gfx] [PATCH 13/15] time: export clocks_calc_mult_shift

2016-06-01 Thread sourab . gupta
From: Sourab Gupta Exporting clocks_calc_mult_shift is helpful for drivers to calculate the mult/shift values for their clocks, given their frequency. This is particularly useful when such drivers may want to associate timecounter/cyclecounter abstraction for their clock sources, in order to use

[Intel-gfx] [PATCH 03/15] drm/i915: Framework for capturing command stream based OA reports

2016-06-01 Thread sourab . gupta
From: Sourab Gupta This patch introduces a framework to enable OA counter reports associated with Render command stream. We can then associate the reports captured through this mechanism with their corresponding context id's. This can be further extended to associate any other met

[Intel-gfx] [PATCH 04/15] drm/i915: flush periodic samples, in case of no pending CS sample requests

2016-06-01 Thread sourab . gupta
From: Sourab Gupta When there are no pending CS OA samples, flush the periodic OA samples collected so far. We can safely forward the periodic OA samples in the case we have no pending CS samples, but we can't do so in the case we have pending CS samples, since we don't know what th

[Intel-gfx] [PATCH 06/15] drm/i915: Populate ctx ID for periodic OA reports

2016-06-01 Thread sourab . gupta
From: Sourab Gupta This adds support for populating the ctx id for the periodic OA reports when requested through the corresponding property. For Gen8, the OA reports itself have the ctx ID and it is the one programmed into HW while submitting workloads. Thus it's retrieved from reports i

[Intel-gfx] [PATCH 01/15] drm/i915: Add ctx getparam ioctl parameter to retrieve ctx unique id

2016-06-01 Thread sourab . gupta
From: Sourab Gupta 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 usersp

[Intel-gfx] [PATCH 09/15] drm/i915: Extend i915 perf framework for collecting timestamps on all gpu engines

2016-06-01 Thread sourab . gupta
From: Sourab Gupta This patch extends the i915 perf framework to handle the perf sample collection for any given gpu engine. Particularly, the support for collecting timestamp sample type is added, which can be requested for any engine. With this, for RCS, timestamps and OA reports can be

[Intel-gfx] [PATCH 07/15] drm/i915: Add support for having pid output with OA report

2016-06-01 Thread sourab . gupta
From: Sourab Gupta This patch introduces flags and adds support for having pid output with the OA reports generated through the RCS commands. When the stream is opened with pid sample type, the pid information is also captured through the command stream samples and forwarded along with the OA

Re: [Intel-gfx] [PATCH 15/16] drm/i915: Mechanism to forward clock monotonic time in perf samples

2016-05-08 Thread sourab gupta
On Sat, 2016-04-23 at 01:19 +0530, Chris Wilson wrote: > On Fri, Apr 22, 2016 at 05:04:04PM +0530, sourab.gu...@intel.com wrote: > > +static u64 get_current_gpu_ts(struct drm_i915_private *dev_priv) > > +{ > > + return ((u64)I915_READ(GT_TIMESTAMP_COUNT_UDW) << 32) | > > + I915_READ(GT

[Intel-gfx] [PATCH 16/16] drm/i915: Support for capturing MMIO register values

2016-04-22 Thread sourab . gupta
From: Sourab Gupta This patch adds support for capturing MMIO register values through i915 perf interface. The userspace can request upto 8 MMIO register values to be dumped. The addresses of these registers can be passed through the corresponding property 'value' field while opening

[Intel-gfx] [PATCH 08/16] drm/i915: Handle the overflow condition for command stream buf

2016-04-22 Thread sourab . gupta
From: Sourab Gupta Add a compile time option for detecting the overflow condition of command stream buffer, and not overwriting the old entries in such a case. Also, set a status flag to forward the overflow condition to userspace if overflow is detected. Signed-off-by: Sourab Gupta

[Intel-gfx] [PATCH 13/16] drm/i915: Extract raw GPU timestamps from OA reports to forward in perf samples

2016-04-22 Thread sourab . gupta
From: Sourab Gupta The OA reports contain the least significant 32 bits of the gpu timestamp. This patch enables retrieval of the timestamp field from OA reports, to forward as 64 bit raw gpu timestamps in the perf samples. Signed-off-by: Sourab Gupta --- drivers/gpu/drm/i915/i915_drv.h | 1

[Intel-gfx] [PATCH 15/16] drm/i915: Mechanism to forward clock monotonic time in perf samples

2016-04-22 Thread sourab . gupta
From: Sourab Gupta Currently, we have the ability to only forward the GPU timestamps in the samples (which are generated via OA reports or PIPE_CONTROL commands inserted in the ring). This limits the ability to correlate these samples with the system events. If we scale the GPU timestamps

[Intel-gfx] [PATCH 09/16] drm/i915: Populate ctx ID for periodic OA reports

2016-04-22 Thread sourab . gupta
From: Sourab Gupta This adds support for populating the ctx id for the periodic OA reports when requested through the corresponding property. For Gen8, the OA reports itself have the ctx ID and it is the one programmed into HW while submitting workloads. Thus it's retrieved from reports i

[Intel-gfx] [PATCH 12/16] drm/i915: Extend i915 perf framework for collecting timestamps on all gpu engines

2016-04-22 Thread sourab . gupta
From: Sourab Gupta This patch extends the i915 perf framework to handle the perf sample collection for any given gpu engine. Particularly, the support for collecting timestamp sample type is added, which can be requested for any engine. With this, for RCS, timestamps and OA reports can be

[Intel-gfx] [PATCH 07/16] drm/i915: flush periodic samples, in case of no pending CS sample requests

2016-04-22 Thread sourab . gupta
From: Sourab Gupta When there are no pending CS OA samples, flush the periodic OA samples collected so far. We can safely forward the periodic OA samples in the case we have no pending CS samples, but we can't do so in the case we have pending CS samples, since we don't know what th

[Intel-gfx] [PATCH 11/16] drm/i915: Add support for emitting execbuffer tags through OA counter reports

2016-04-22 Thread sourab . gupta
From: Sourab Gupta This patch enables userspace to specify tags (per workload), provided via execbuffer ioctl, which could be added to OA reports, to help associate reports with the corresponding workloads. There may be multiple stages within a single context, from a userspace perspective. An

[Intel-gfx] [PATCH 06/16] drm/i915: Framework for capturing command stream based OA reports

2016-04-22 Thread sourab . gupta
From: Sourab Gupta This patch introduces a framework to enable OA counter reports associated with Render command stream. We can then associate the reports captured through this mechanism with their corresponding context id's. This can be further extended to associate any other met

[Intel-gfx] [PATCH 10/16] drm/i915: Add support for having pid output with OA report

2016-04-22 Thread sourab . gupta
From: Sourab Gupta This patch introduces flags and adds support for having pid output with the OA reports generated through the RCS commands. When the stream is opened with pid sample type, the pid information is also captured through the command stream samples and forwarded along with the OA

[Intel-gfx] [PATCH 14/16] drm/i915: Support opening multiple concurrent perf streams

2016-04-22 Thread sourab . gupta
From: Sourab Gupta This patch adds support for opening multiple concurrent perf streams for different gpu engines, while having the restriction to open only a single stream open for a particular gpu engine. This enables userspace client to open multiple streams, one per engine, at any time to

[Intel-gfx] [PATCH 00/16] Framework to collect command stream gpu metrics using i915 perf

2016-04-22 Thread sourab . gupta
From: Sourab Gupta This series adds framework for collection of gpu performance metrics associated with the command stream of a particular engine. These metrics include OA reports, timestamps, mmio metrics, etc. These metrics are are collected around batchbuffer boundaries. This work utilizes

[Intel-gfx] [PATCH 05/16] drm/i915: Expose OA sample source to userspace

2016-04-22 Thread sourab . gupta
From: Sourab Gupta This patch exposes a new sample source field to userspace. This field can be populated to specify the origin of the OA report. For e.g. for internally triggerred reports (non MI_RPC reports), the RPT_ID field has bitfields for specifying the origin such as timer, or render ctx

[Intel-gfx] [PATCH 01/16] drm/i915: Introduce global id for contexts

2016-04-22 Thread sourab . gupta
From: Sourab Gupta The current context user handles are specific to drm file instance. There are some usecases, which may require a global id for the contexts. For e.g. a system level GPU profiler tool may lean upon the global context ids to associate the performance snapshots with individual

[Intel-gfx] [PATCH 02/16] drm/i915: Constrain intel_context::global_id to 20 bits

2016-04-22 Thread sourab . gupta
From: Robert Bragg This will allow the ID to be given to the HW as the unique context identifier that's written, for example, to the context status buffer on preemption and included in reports written by the OA unit. Cc: Sourab Gupta Signed-off-by: Robert Bragg --- drivers/gpu/drm

[Intel-gfx] [PATCH 03/16] drm/i915: return ctx->global_id from intel_execlists_ctx_id()

2016-04-22 Thread sourab . gupta
D and we want to be able to accurately filter reports for a specific context, ideally without the added complexity of tracking context re-pinning while the OA buffer may contain reports with older IDs. Cc: Sourab Gupta Signed-off-by: Robert Bragg --- drivers/gpu/drm/i915/i915_debugfs.c

  1   2   3   >