[Intel-gfx] [PATCH v14 03/12] drm/i915/perf: drop list of streams

2019-09-05 Thread Lionel Landwerlin
-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 6 -- drivers/gpu/drm/i915/i915_perf.c | 16 +--- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index db7480831e52..75607450ba00 100644

[Intel-gfx] [PATCH v14 07/12] drm/i915/perf: implement active wait for noa configurations

2019-09-05 Thread Lionel Landwerlin
to i915_perf_stream (Lionel) v6: Add missing struct declarations in i915_perf.h Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson (v4) --- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 24 ++ drivers/gpu/drm/i915/gt/intel_gt_types.h | 5 + drivers/gpu/drm/i915/i915_debugfs.c

[Intel-gfx] [PATCH v14 08/12] drm/i915: add wait flags to i915_active_request_retire

2019-09-05 Thread Lionel Landwerlin
An upcoming change needs not to be interrupted. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_active.c | 4 +++- drivers/gpu/drm/i915/i915_active.h | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm

[Intel-gfx] [PATCH v14 00/12] drm/i915: Vulkan performance query support

2019-09-05 Thread Lionel Landwerlin
, Lionel Landwerlin (12): drm/i915: introduce a mechanism to extend execbuf2 drm/i915: add syncobj timeline support drm/i915/perf: drop list of streams drm/i915/perf: store the associated engine of a stream drm/i915/perf: introduce a versioning of the i915-perf uapi drm/i915/perf: allow

[Intel-gfx] [PATCH v14 06/12] drm/i915/perf: allow for CS OA configs to be created lazily

2019-09-05 Thread Lionel Landwerlin
(Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson (v4) --- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 19 +- drivers/gpu/drm/i915/i915_perf.c | 270 --- drivers/gpu/drm/i915/i915_perf.h

[Intel-gfx] [PATCH v14 01/12] drm/i915: introduce a mechanism to extend execbuf2

2019-09-05 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) v3: Rename I915_EXEC_EXT -> I915_EXEC_USE_EXTENSIONS (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson

[Intel-gfx] [PATCH v14 05/12] drm/i915/perf: introduce a versioning of the i915-perf uapi

2019-09-05 Thread Lionel Landwerlin
Reporting this version will help application figure out what level of the support the running kernel provides. v2: Add i915_perf_ioctl_version() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_getparam.c | 4 drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v11 01/10] drm/syncobj: add sideband payload

2019-09-04 Thread Lionel Landwerlin
----- From: Lionel Landwerlin Sent: Wednesday, August 28, 2019 10:33 PM To: intel-gfx@lists.freedesktop.org Cc: Lionel Landwerlin ; Zhou, David(ChunMing) ; Koenig, Christian ; Jason Ekstrand Subject: [PATCH v11 01/10] drm/syncobj: add sideband payload The Vulkan timeline semaphores allow

[Intel-gfx] [PATCH v13 11/11] drm/i915: add support for perf configuration queries

2019-09-02 Thread Lionel Landwerlin
to userspace (Chris) v6: Drop lock when copying config list to userspace (Chris) Fix deadlock when calling i915_perf_get_oa_config() under perf.metrics_lock (Lionel) Add i915_oa_config_get() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v13 07/11] drm/i915/perf: implement active wait for noa configurations

2019-09-02 Thread Lionel Landwerlin
to i915_perf_stream (Lionel) v6: Add missing struct declarations in i915_perf.h Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson (v4) --- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 24 ++ drivers/gpu/drm/i915/gt/intel_gt_types.h | 5 + drivers/gpu/drm/i915/i915_debugfs.c

[Intel-gfx] [PATCH v13 04/11] drm/i915/perf: store the associated engine of a stream

2019-09-02 Thread Lionel Landwerlin
We'll use this information later to verify that a client trying to reconfigure the stream does so on the right engine. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 5 + drivers/gpu/drm/i915/i915_perf.c | 7 +++ 2 files changed, 12 insertions(+) diff --git

[Intel-gfx] [PATCH v13 05/11] drm/i915/perf: introduce a versioning of the i915-perf uapi

2019-09-02 Thread Lionel Landwerlin
Reporting this version will help application figure out what level of the support the running kernel provides. v2: Add i915_perf_ioctl_version() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_getparam.c | 4 drivers/gpu/drm/i915

[Intel-gfx] [PATCH v13 03/11] drm/i915/perf: drop list of streams

2019-09-02 Thread Lionel Landwerlin
-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 6 -- drivers/gpu/drm/i915/i915_perf.c | 16 +--- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index db7480831e52..75607450ba00 100644

[Intel-gfx] [PATCH v13 09/11] drm/i915: add a new perf configuration execbuf parameter

2019-09-02 Thread Lionel Landwerlin
) v8: Remove active request from engine (Lionel) v9: Move fetching OA configuration pass engine pinning (Lionel) Lock VMA before moving to active (Chris) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 146 +- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v13 06/11] drm/i915/perf: allow for CS OA configs to be created lazily

2019-09-02 Thread Lionel Landwerlin
(Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson (v4) --- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 19 +- drivers/gpu/drm/i915/i915_perf.c | 270 --- drivers/gpu/drm/i915/i915_perf.h

[Intel-gfx] [PATCH v13 08/11] drm/i915/perf: execute OA configuration from command stream

2019-09-02 Thread Lionel Landwerlin
v4: Create i915 request in emit_oa_config() to avoid deadlocks (Lionel) v5: Move locking to the stream (Lionel) v6: Move active reconfiguration request into i915_perf_stream (Lionel) v7: Pin VMA outside request creation (Chris) Lock VMA before move to active (Chris) Signed-off-by: Lionel

[Intel-gfx] [PATCH v13 10/11] drm/i915/perf: allow holding preemption on filtered ctx

2019-09-02 Thread Lionel Landwerlin
priorities to avoid preemption rather than the HW mechanism v4: Just modify the port priority reporting function Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 8 + drivers/gpu/drm/i915/i915_drv.h | 8 + drivers/gpu

[Intel-gfx] [PATCH v13 02/11] drm/i915: add syncobj timeline support

2019-09-02 Thread Lionel Landwerlin
://lists.freedesktop.org/archives/dri-devel/2019-August/229287.html drop the ordering check from v8 (Lionel) v10: Set first extension enum item to 1 (Jason) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 307 ++ drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [PATCH v13 01/11] drm/i915: introduce a mechanism to extend execbuf2

2019-09-02 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) v3: Rename I915_EXEC_EXT -> I915_EXEC_USE_EXTENSIONS (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson

[Intel-gfx] [PATCH v13 00/11] drm/i915: Vulkan performance query support

2019-09-02 Thread Lionel Landwerlin
Hi all, Some missing locks of the VMA that Chris spotted in the review. This also simplifies a bit the execbuf code, again as recommended by Chris. Cheers, Lionel Landwerlin (11): drm/i915: introduce a mechanism to extend execbuf2 drm/i915: add syncobj timeline support drm/i915/perf: drop

Re: [Intel-gfx] [PATCH v12 08/11] drm/i915/perf: execute OA configuration from command stream

2019-09-02 Thread Lionel Landwerlin
On 30/08/2019 18:48, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-30 15:47:23) err_unpin: - __i915_vma_unpin(vma); + mutex_lock(>drm.struct_mutex); + i915_vma_unpin_and_release(, 0); + mutex_unlock(>drm.struct_mutex); Strangely unpin_and_release() d

Re: [Intel-gfx] [PATCH v12 08/11] drm/i915/perf: execute OA configuration from command stream

2019-08-30 Thread Lionel Landwerlin
On 30/08/2019 18:48, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-30 15:47:23) err_unpin: - __i915_vma_unpin(vma); + mutex_lock(>drm.struct_mutex); + i915_vma_unpin_and_release(, 0); + mutex_unlock(>drm.struct_mutex); Strangely unpin_and_release() d

Re: [Intel-gfx] [PATCH v12 09/11] drm/i915: add a new perf configuration execbuf parameter

2019-08-30 Thread Lionel Landwerlin
On 30/08/2019 18:32, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-30 15:47:24) +static int +get_execbuf_oa_config(struct i915_execbuffer *eb) +{ + int err = 0; + + eb->perf_file = NULL; + eb->oa_config = NULL; + eb->oa_vma = NULL; + eb->

[Intel-gfx] [PATCH v12 09/11] drm/i915: add a new perf configuration execbuf parameter

2019-08-30 Thread Lionel Landwerlin
) v8: Remove active request from engine (Lionel) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 151 +- drivers/gpu/drm/i915/i915_getparam.c | 4 + include/uapi/drm/i915_drm.h | 39 + 3 files changed, 193

[Intel-gfx] [PATCH v12 02/11] drm/i915: add syncobj timeline support

2019-08-30 Thread Lionel Landwerlin
://lists.freedesktop.org/archives/dri-devel/2019-August/229287.html drop the ordering check from v8 (Lionel) v10: Set first extension enum item to 1 (Jason) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 307 ++ drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [PATCH v12 06/11] drm/i915/perf: allow for CS OA configs to be created lazily

2019-08-30 Thread Lionel Landwerlin
(Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson (v4) --- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 19 +- drivers/gpu/drm/i915/i915_perf.c | 270 --- drivers/gpu/drm/i915/i915_perf.h

[Intel-gfx] [PATCH v12 04/11] drm/i915/perf: store the associated engine of a stream

2019-08-30 Thread Lionel Landwerlin
We'll use this information later to verify that a client trying to reconfigure the stream does so on the right engine. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 5 + drivers/gpu/drm/i915/i915_perf.c | 7 +++ 2 files changed, 12 insertions(+) diff --git

[Intel-gfx] [PATCH v12 11/11] drm/i915: add support for perf configuration queries

2019-08-30 Thread Lionel Landwerlin
to userspace (Chris) v6: Drop lock when copying config list to userspace (Chris) Fix deadlock when calling i915_perf_get_oa_config() under perf.metrics_lock (Lionel) Add i915_oa_config_get() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v12 03/11] drm/i915/perf: drop list of streams

2019-08-30 Thread Lionel Landwerlin
-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 6 -- drivers/gpu/drm/i915/i915_perf.c | 16 +--- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index db7480831e52..75607450ba00 100644

[Intel-gfx] [PATCH v12 10/11] drm/i915/perf: allow holding preemption on filtered ctx

2019-08-30 Thread Lionel Landwerlin
priorities to avoid preemption rather than the HW mechanism v4: Just modify the port priority reporting function Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 8 + drivers/gpu/drm/i915/i915_drv.h | 8 + drivers/gpu

[Intel-gfx] [PATCH v12 01/11] drm/i915: introduce a mechanism to extend execbuf2

2019-08-30 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) v3: Rename I915_EXEC_EXT -> I915_EXEC_USE_EXTENSIONS (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson

[Intel-gfx] [PATCH v12 00/11] drm/i915: Vulkan performance query support

2019-08-30 Thread Lionel Landwerlin
Hi all, This moves locking a bit, hopefully in the right direction so that it helps dropping the use of struct_mutex. Cheers, Lionel Landwerlin (11): drm/i915: introduce a mechanism to extend execbuf2 drm/i915: add syncobj timeline support drm/i915/perf: drop list of streams drm/i915

[Intel-gfx] [PATCH v12 05/11] drm/i915/perf: introduce a versioning of the i915-perf uapi

2019-08-30 Thread Lionel Landwerlin
Reporting this version will help application figure out what level of the support the running kernel provides. v2: Add i915_perf_ioctl_version() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_getparam.c | 4 drivers/gpu/drm/i915

[Intel-gfx] [PATCH v12 07/11] drm/i915/perf: implement active wait for noa configurations

2019-08-30 Thread Lionel Landwerlin
to i915_perf_stream (Lionel) v6: Add missing struct declarations in i915_perf.h Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson (v4) --- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 24 ++ drivers/gpu/drm/i915/gt/intel_gt_types.h | 5 + drivers/gpu/drm/i915/i915_debugfs.c

[Intel-gfx] [PATCH v12 08/11] drm/i915/perf: execute OA configuration from command stream

2019-08-30 Thread Lionel Landwerlin
v4: Create i915 request in emit_oa_config() to avoid deadlocks (Lionel) v5: Move locking to the stream (Lionel) v6: Move active reconfiguration request into i915_perf_stream (Lionel) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 13 ++- drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH] drm/i915/perf: Assert locking for i915_init_oa_perf_state()

2019-08-30 Thread Lionel Landwerlin
ialise updates to the OA config itself. Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Thanks, that's helpful to remember why it works :) Reviewed-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_pe

Re: [Intel-gfx] [PATCH v5 0/2] drm/i915: timeline semaphore support

2019-08-29 Thread Lionel Landwerlin
FYI, apart from a couple of pre-existing issues, the Mesa series that makes use of this i915 change is reviewed : https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1525 Cheers, -Lionel On 22/08/2019 15:12, Lionel Landwerlin wrote: Hi, Just fiddling with enums to avoid default 0

Re: [Intel-gfx] [PATCH v11 09/10] drm/i915/perf: execute OA configuration from command stream

2019-08-29 Thread Lionel Landwerlin
On 29/08/2019 09:45, Lionel Landwerlin wrote: On 28/08/2019 22:41, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-28 15:33:26) +   rq = i915_request_create(i915->engine[RCS0]->kernel_context); +   if (IS_ERR(rq)) +   return PTR_ERR(rq); + +

Re: [Intel-gfx] [PATCH v11 09/10] drm/i915/perf: execute OA configuration from command stream

2019-08-29 Thread Lionel Landwerlin
On 28/08/2019 22:41, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-28 15:33:26) + rq = i915_request_create(i915->engine[RCS0]->kernel_context); + if (IS_ERR(rq)) + return PTR_ERR(rq); + + err = i915_active_request_set(>engine[RCS0]->la

Re: [Intel-gfx] [PATCH v11 06/10] drm/i915/perf: implement active wait for noa configurations

2019-08-29 Thread Lionel Landwerlin
tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Lionel-Landwerlin/drm-i915-Vulkan-performance-query-support/20190829-020841 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-defconfig (attached as .config) compiler

Re: [Intel-gfx] [PATCH v11 01/10] drm/syncobj: add sideband payload

2019-08-29 Thread Lionel Landwerlin
I included this patch into it. -Lionel -David -Original Message----- From: Lionel Landwerlin Sent: Wednesday, August 28, 2019 10:33 PM To: intel-gfx@lists.freedesktop.org Cc: Lionel Landwerlin ; Zhou, David(ChunMing) ; Koenig, Christian ; Jason Ekstrand Subject: [PATCH v11 01/10] drm/sy

Re: [Intel-gfx] [PATCH] drm/i915: fix broadwell EU computation

2019-08-28 Thread Lionel Landwerlin
On 29/08/2019 00:02, Rodrigo Vivi wrote: From: Lionel Landwerlin commit 6a67a20366f894c172734f28c5646bdbe48a46e3 upstream. subslice_mask is an array indexed by slice, not subslice. Signed-off-by: Lionel Landwerlin Fixes: 8cc7669355136f ("drm/i915: store all subslice masks") Bugzi

[Intel-gfx] [PATCH v11 02/10] drm/i915: introduce a mechanism to extend execbuf2

2019-08-28 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) v3: Rename I915_EXEC_EXT -> I915_EXEC_USE_EXTENSIONS (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson

[Intel-gfx] [PATCH v11 09/10] drm/i915/perf: execute OA configuration from command stream

2019-08-28 Thread Lionel Landwerlin
v4: Create i915 request in emit_oa_config() to avoid deadlocks (Lionel) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 12 +++ drivers/gpu/drm/i915/i915_perf.c | 146 +++ 2 files changed, 104 insertions(+), 54 deletions(-) diff --git

[Intel-gfx] [PATCH v11 10/10] drm/i915: add support for perf configuration queries

2019-08-28 Thread Lionel Landwerlin
to userspace (Chris) v6: Drop lock when copying config list to userspace (Chris) Fix deadlock when calling i915_perf_get_oa_config() under perf.metrics_lock (Lionel) Add i915_oa_config_get() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v11 07/10] drm/i915: add a new perf configuration execbuf parameter

2019-08-28 Thread Lionel Landwerlin
) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 133 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 4 + drivers/gpu/drm/i915/gt/intel_engine_types.h | 9 ++ drivers/gpu/drm/i915/gt/intel_lrc.c | 4 +- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v11 03/10] drm/i915: add syncobj timeline support

2019-08-28 Thread Lionel Landwerlin
://lists.freedesktop.org/archives/dri-devel/2019-August/229287.html drop the ordering check from v8 (Lionel) v10: Set first extension enum item to 1 (Jason) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 307 ++ drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [PATCH v11 05/10] drm/i915/perf: allow for CS OA configs to be created lazily

2019-08-28 Thread Lionel Landwerlin
mapping of OA config (Chris) v3: Properly deal with the perf_metric lock (Chris/Lionel) v4: Fix oa config unref/put when not found (Lionel) v5: Allocate BOs for configurations on the stream instead of globally (Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson (v4) --- drivers

[Intel-gfx] [PATCH v11 06/10] drm/i915/perf: implement active wait for noa configurations

2019-08-28 Thread Lionel Landwerlin
to i915_perf_stream (Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson (v4) --- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 24 ++ drivers/gpu/drm/i915/gt/intel_gt_types.h | 5 + drivers/gpu/drm/i915/i915_debugfs.c | 31 +++ drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH v11 08/10] drm/i915/perf: allow holding preemption on filtered ctx

2019-08-28 Thread Lionel Landwerlin
priorities to avoid preemption rather than the HW mechanism v4: Just modify the port priority reporting function Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 8 + drivers/gpu/drm/i915/i915_drv.h | 8 + drivers/gpu

[Intel-gfx] [PATCH v11 04/10] drm/i915/perf: introduce a versioning of the i915-perf uapi

2019-08-28 Thread Lionel Landwerlin
Reporting this version will help application figure out what level of the support the running kernel provides. v2: Add i915_perf_ioctl_version() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_getparam.c | 4 drivers/gpu/drm/i915

[Intel-gfx] [PATCH v11 00/10] drm/i915: Vulkan performance query support

2019-08-28 Thread Lionel Landwerlin
, this also includes 3 patches (the first 3) from the timeline semaphore work. You can safely ignore them, they're getting reviewed on a different series. It's just unfortunate they interact because of uAPI changes. Cheers, Lionel Landwerlin (10): drm/syncobj: add sideband payload drm/i915: introduce

[Intel-gfx] [PATCH v11 01/10] drm/syncobj: add sideband payload

2019-08-28 Thread Lionel Landwerlin
of blattant mistakes Store payload atomically (Chris) v6: Only touch atomic value once (Jason) Signed-off-by: Lionel Landwerlin Reviewed-by: David Zhou (v5) Cc: Christian Koenig Cc: Jason Ekstrand Cc: David(ChunMing) Zhou --- drivers/gpu/drm/drm_internal.h | 2 ++ drivers/gpu/drm

Re: [Intel-gfx] [PATCH v3 18/23] drm/i915/tgl/perf: use the same oa ctx_id format as icl

2019-08-23 Thread Lionel Landwerlin
On 23/08/2019 10:20, Lucas De Marchi wrote: From: Michel Thierry Compared to Icelake, Tigerlake's MAX_CONTEXT_HW_ID is smaller by one, but since we just use the upper 32 bits of the lrc_desc, it's guaranteed OA will use the correct one. Cc: Lionel Landwerlin Signed-off-by: Michel Thierry

Re: [Intel-gfx] [PATCH 33/39] drm/i915/perf: add a parameter to control the size of OA buffer

2019-08-23 Thread Lionel Landwerlin
On 22/08/2019 12:43, Joonas Lahtinen wrote: Quoting Lucas De Marchi (2019-08-16 11:04:57) From: Lionel Landwerlin The way our hardware is designed doesn't seem to let us use the MI_RECORD_PERF_COUNT command without setting up a circular buffer. In the case where the user didn't request OA

[Intel-gfx] [PATCH v5 2/2] drm/i915: add syncobj timeline support

2019-08-23 Thread Lionel Landwerlin
://lists.freedesktop.org/archives/dri-devel/2019-August/229287.html drop the ordering check from v8 (Lionel) v10: Set first extension enum item to 1 (Jason) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 307 ++ drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [PATCH v5 1/2] drm/i915: introduce a mechanism to extend execbuf2

2019-08-23 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) v3: Rename I915_EXEC_EXT -> I915_EXEC_USE_EXTENSIONS (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson

[Intel-gfx] [PATCH v5 0/2] drm/i915: timeline semaphore support

2019-08-23 Thread Lionel Landwerlin
Hi, Just fiddling with enums to avoid default 0 values as recommended by Jason. Cheers, Lionel Landwerlin (2): drm/i915: introduce a mechanism to extend execbuf2 drm/i915: add syncobj timeline support .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 346 +++--- drivers/gpu/drm

[Intel-gfx] [PATCH v5 1/2] drm/i915: introduce a mechanism to extend execbuf2

2019-08-23 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) v3: Rename I915_EXEC_EXT -> I915_EXEC_USE_EXTENSIONS (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson

[Intel-gfx] [PATCH v5 0/2] drm/i915: timeline semaphore support

2019-08-23 Thread Lionel Landwerlin
Hi, Just fiddling with enums to avoid default 0 values as recommended by Jason. Cheers, Lionel Landwerlin (2): drm/i915: introduce a mechanism to extend execbuf2 drm/i915: add syncobj timeline support .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 346 +++--- drivers/gpu/drm

[Intel-gfx] [PATCH v5 2/2] drm/i915: add syncobj timeline support

2019-08-23 Thread Lionel Landwerlin
://lists.freedesktop.org/archives/dri-devel/2019-August/229287.html drop the ordering check from v8 (Lionel) v10: Set first extension enum item to 1 (Jason) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 307 ++ drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [PATCH v5 2/2] drm/i915: add syncobj timeline support

2019-08-23 Thread Lionel Landwerlin
://lists.freedesktop.org/archives/dri-devel/2019-August/229287.html drop the ordering check from v8 (Lionel) v10: Set first extension enum item to 1 (Jason) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 307 ++ drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [PATCH v5 1/2] drm/i915: introduce a mechanism to extend execbuf2

2019-08-23 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) v3: Rename I915_EXEC_EXT -> I915_EXEC_USE_EXTENSIONS (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson

[Intel-gfx] [PATCH v5 0/2] drm/i915: timeline semaphore support

2019-08-23 Thread Lionel Landwerlin
Hi, Just fiddling with enums to avoid default 0 values as recommended by Jason. Cheers, Lionel Landwerlin (2): drm/i915: introduce a mechanism to extend execbuf2 drm/i915: add syncobj timeline support .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 346 +++--- drivers/gpu/drm

[Intel-gfx] [PATCH v4 1/2] drm/i915: introduce a mechanism to extend execbuf2

2019-08-21 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) v3: Rename I915_EXEC_EXT -> I915_EXEC_USE_EXTENSIONS (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson

[Intel-gfx] [PATCH v4 2/2] drm/i915: add syncobj timeline support

2019-08-21 Thread Lionel Landwerlin
://lists.freedesktop.org/archives/dri-devel/2019-August/229287.html drop the ordering check from v8 (Lionel) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 307 ++ drivers/gpu/drm/i915/i915_drv.c | 3 +- drivers/gpu/drm/i915/i915_getparam.c

[Intel-gfx] [PATCH v4 0/2] drm/i915: timeline semaphore support

2019-08-21 Thread Lionel Landwerlin
Hi all, Just a rebase and a change added then reversed that puts us right back to v3. Cheers, Lionel Landwerlin (2): drm/i915: introduce a mechanism to extend execbuf2 drm/i915: add syncobj timeline support .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 346 +++--- drivers

Re: [Intel-gfx] [PATCH v2 33/40] drm/i915/tgl/perf: use the same oa ctx_id format as icl

2019-08-21 Thread Lionel Landwerlin
On 17/08/2019 11:38, Lucas De Marchi wrote: From: Michel Thierry Compared to Icelake, Tigerlake's MAX_CONTEXT_HW_ID is smaller by one, but since we just use the upper 32 bits of the lrc_desc, it's guaranteed OA will use the correct one. Cc: Lionel Landwerlin Signed-off-by: Michel Thierry

Re: [Intel-gfx] [PATCH 33/39] drm/i915/perf: add a parameter to control the size of OA buffer

2019-08-21 Thread Lionel Landwerlin
, Lucas De Marchi wrote: From: Lionel Landwerlin The way our hardware is designed doesn't seem to let us use the MI_RECORD_PERF_COUNT command without setting up a circular buffer. In the case where the user didn't request OA reports to be available through the i915 perf stream, we can set the OA

Re: [Intel-gfx] [PATCH v3 2/2] drm/i915: add syncobj timeline support

2019-08-11 Thread Lionel Landwerlin
On 01/08/2019 17:16, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-01 15:29:34) On 31/07/2019 23:03, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-07-31 15:07:33) -static struct drm_syncobj ** -get_fence_array(struct drm_i915_gem_execbuffer2 *args, - struct

Re: [Intel-gfx] [PATCH v3 2/2] drm/i915: add syncobj timeline support

2019-08-01 Thread Lionel Landwerlin
On 01/08/2019 18:16, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-01 15:29:34) On 31/07/2019 23:03, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-07-31 15:07:33) ... I think I have convinced myself that with the split between wait before, signal after combined with the rule

Re: [Intel-gfx] [PATCH v3 2/2] drm/i915: add syncobj timeline support

2019-08-01 Thread Lionel Landwerlin
On 31/07/2019 23:03, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-07-31 15:07:33) -static struct drm_syncobj ** -get_fence_array(struct drm_i915_gem_execbuffer2 *args, - struct drm_file *file) +static struct i915_eb_fences * +get_timeline_fence_array(struct i915_execbuffer

Re: [Intel-gfx] [PATCH v3 2/2] drm/i915: add syncobj timeline support

2019-08-01 Thread Lionel Landwerlin
On 01/08/2019 12:22, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-01 10:01:44) On 01/08/2019 11:08, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-01 08:43:24) On 31/07/2019 23:03, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-07-31 15:07:33) I think I have convinced

Re: [Intel-gfx] [PATCH v3 2/2] drm/i915: add syncobj timeline support

2019-08-01 Thread Lionel Landwerlin
On 01/08/2019 11:08, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-08-01 08:43:24) On 31/07/2019 23:03, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-07-31 15:07:33) I think I have convinced myself that with the split between wait before, signal after combined with the rule

Re: [Intel-gfx] [PATCH v3 2/2] drm/i915: add syncobj timeline support

2019-08-01 Thread Lionel Landwerlin
On 31/07/2019 23:03, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-07-31 15:07:33) -static struct drm_syncobj ** -get_fence_array(struct drm_i915_gem_execbuffer2 *args, - struct drm_file *file) +static struct i915_eb_fences * +get_timeline_fence_array(struct i915_execbuffer

[Intel-gfx] [PATCH v3 1/2] drm/i915: introduce a mechanism to extend execbuf2

2019-07-31 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson (v1) --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 38

[Intel-gfx] [PATCH v3 2/2] drm/i915: add syncobj timeline support

2019-07-31 Thread Lionel Landwerlin
BIT_ULL (Chris) v6: Fix issue with already signaled timeline points, dma_fence_chain_find_seqno() setting fence to NULL (Chris) v7: Report ENOENT with invalid syncobj handle (Lionel) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 297

[Intel-gfx] [PATCH v3 0/2] drm/i915: timeline semaphore support

2019-07-31 Thread Lionel Landwerlin
://gitlab.freedesktop.org/mesa/mesa/merge_requests/1525 IGT tests are available in the vulkan perf query series : https://patchwork.freedesktop.org/series/64220/ Cheers, Lionel Landwerlin (2): drm/i915: introduce a mechanism to extend execbuf2 drm/i915: add syncobj timeline support .../gpu/drm/i915/gem

Re: [Intel-gfx] [PATCH 1/5] drm/i915/userptr: Beware recursive lock_page()

2019-07-26 Thread Lionel Landwerlin
On 17/07/2019 21:09, Tvrtko Ursulin wrote: On 17/07/2019 15:06, Chris Wilson wrote: Quoting Tvrtko Ursulin (2019-07-17 14:46:15) On 17/07/2019 14:35, Chris Wilson wrote: Quoting Tvrtko Ursulin (2019-07-17 14:23:55) On 17/07/2019 14:17, Chris Wilson wrote: Quoting Tvrtko Ursulin

Re: [Intel-gfx] [PATCH v2] drm/i915/perf: Initialise err to 0 before looping over ce->engines

2019-07-26 Thread Lionel Landwerlin
igure contexts on the fly") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Reviewed-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 61 ++-- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/i915/i91

Re: [Intel-gfx] [PATCH 1/2] drm/i915/perf: Initialise err to 0 before looping over ce->engines

2019-07-26 Thread Lionel Landwerlin
gem_engine(ce, i915_gem_context_lock_engines(ctx), it) { Could almost reduce the scope of variable. Regardless : Reviewed-by: Lionel Landwerlin Thanks, -Lionel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedeskto

[Intel-gfx] [PATCH v10 7/9] drm/i915/perf: allow holding preemption on filtered ctx

2019-07-25 Thread Lionel Landwerlin
priorities to avoid preemption rather than the HW mechanism v4: Just modify the port priority reporting function Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 8 + drivers/gpu/drm/i915/i915_drv.h | 8 + drivers/gpu

[Intel-gfx] [PATCH v10 9/9] drm/i915: add support for perf configuration queries

2019-07-25 Thread Lionel Landwerlin
to userspace (Chris) v6: Drop lock when copying config list to userspace (Chris) Fix deadlock when calling i915_perf_get_oa_config() under perf.metrics_lock (Lionel) Add i915_oa_config_get() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v10 8/9] drm/i915/perf: execute OA configuration from command stream

2019-07-25 Thread Lionel Landwerlin
v4: Create i915 request in emit_oa_config() to avoid deadlocks (Lionel) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 7 ++ drivers/gpu/drm/i915/i915_perf.c | 204 +++ 2 files changed, 134 insertions(+), 77 deletions(-) diff --git

[Intel-gfx] [PATCH v10 6/9] drm/i915: add a new perf configuration execbuf parameter

2019-07-25 Thread Lionel Landwerlin
) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 133 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 3 + drivers/gpu/drm/i915/gt/intel_engine_types.h | 9 ++ drivers/gpu/drm/i915/gt/intel_lrc.c | 1 + drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH v10 4/9] drm/i915: introduce a mechanism to extend execbuf2

2019-07-25 Thread Lionel Landwerlin
We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 32 ++- include/uapi/drm/i915_drm.h

[Intel-gfx] [PATCH v10 1/9] drm/i915/perf: introduce a versioning of the i915-perf uapi

2019-07-25 Thread Lionel Landwerlin
Reporting this version will help application figure out what level of the support the running kernel provides. v2: Add i915_perf_ioctl_version() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH v10 5/9] drm/i915: add syncobj timeline support

2019-07-25 Thread Lionel Landwerlin
BIT_ULL (Chris) v6: Fix issue with already signaled timeline points, dma_fence_chain_find_seqno() setting fence to NULL (Chris) v7: Report ENOENT with invalid syncobj handle (Lionel) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 297

[Intel-gfx] [PATCH v10 0/9] drm/i915: Vulkan performance query support

2019-07-25 Thread Lionel Landwerlin
Hi all, Just posted some tests : https://patchwork.freedesktop.org/series/64220/ And shockingly it found a few bugs. This series is also rebased on top of Chris' on the fly OA reconfiguration of contexts. Cheers, Lionel Landwerlin (9): drm/i915/perf: introduce a versioning of the i915-perf

[Intel-gfx] [PATCH v10 3/9] drm/i915/perf: implement active wait for noa configurations

2019-07-25 Thread Lionel Landwerlin
be over the required amount of time (according to HW architects). v2: Don't forget to save/restore registers used for the wait (Chris) v3: Name used CS_GPR registers (Chris) Fix compile issue due to rebase (Lionel) v4: Fix save/restore helpers (Umesh) Signed-off-by: Lionel Landwerlin

[Intel-gfx] [PATCH v10 2/9] drm/i915/perf: allow for CS OA configs to be created lazily

2019-07-25 Thread Lionel Landwerlin
mapping of OA config (Chris) v3: Properly deal with the perf_metric lock (Chris/Lionel) v4: Fix oa config unref/put when not found (Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + drivers/gpu/drm/i915/i915_drv.h

Re: [Intel-gfx] [PATCH] drm/i915: Unshare the idle-barrier from other kernel requests

2019-07-25 Thread Lionel Landwerlin
or take we may issue multiple idle barriers across multiple engines). Reported-by: Lionel Landwerlin Fixes: ce476c80b8bf ("drm/i915: Keep contexts pinned until after the next kernel context switch") Fixes: a9877da2d629 ("drm/i915/oa: Reconfigure contexts on the fly") Signed-off-

Re: [Intel-gfx] [PATCH v9 5/9] drm/i915: add syncobj timeline support

2019-07-22 Thread Lionel Landwerlin
On 11/07/2019 12:46, Lionel Landwerlin wrote: + + syncobj = drm_syncobj_find(eb->file, user_fence.handle); + if (!syncobj) { + DRM_DEBUG("Invalid syncobj handle provided\n"); + err = -EINVAL; +

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Flush all user surfaces prior to first use

2019-07-19 Thread Lionel Landwerlin
On 18/07/2019 17:54, Chris Wilson wrote: Since userspace has the ability to bypass the CPU cache from within its unprivileged command stream, we have to flush the CPU cache to memory in order to overwrite the previous contents on creation. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc:

Re: [Intel-gfx] [PATCH v6 07/11] drm/i915: add syncobj timeline support

2019-07-16 Thread Lionel Landwerlin
On 15/07/2019 14:30, Koenig, Christian wrote: Hi Lionel, sorry for the delayed response, I'm just back from vacation. Am 03.07.19 um 11:17 schrieb Lionel Landwerlin: On 03/07/2019 11:56, Chris Wilson wrote: Quoting Lionel Landwerlin (2019-07-01 12:34:33) +   syncobj

Re: [Intel-gfx] [PATCH v2 2/3] drm/i915: Implement read-only support in whitelist selftest

2019-07-15 Thread Lionel Landwerlin
On 12/07/2019 19:23, John Harrison wrote: On 7/12/2019 01:53, Tvrtko Ursulin wrote: On 12/07/2019 08:07, john.c.harri...@intel.com wrote: From: John Harrison Newer hardware supports extra feature in the whitelist registers. This patch updates the selftest to test that entries marked as read

[Intel-gfx] [PATCH v9 9/9] drm/i915: add support for perf configuration queries

2019-07-11 Thread Lionel Landwerlin
to userspace (Chris) v6: Drop lock when copying config list to userspace (Chris) Fix deadlock when calling i915_perf_get_oa_config() under perf.metrics_lock (Lionel) Add i915_oa_config_get() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v9 1/9] drm/i915/perf: introduce a versioning of the i915-perf uapi

2019-07-11 Thread Lionel Landwerlin
Reporting this version will help application figure out what level of the support the running kernel provides. v2: Add i915_perf_ioctl_version() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH v9 6/9] drm/i915: add a new perf configuration execbuf parameter

2019-07-11 Thread Lionel Landwerlin
) Signed-off-by: Lionel Landwerlin --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 126 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 + drivers/gpu/drm/i915/gt/intel_engine_types.h | 9 ++ drivers/gpu/drm/i915/gt/intel_lrc.c | 1 + drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH v9 0/9] drm/i915: Vulkan performance query support

2019-07-11 Thread Lionel Landwerlin
Hi, A few changes : - Don't call copy_to_user under lock in i915_query - Fix save/restore helper for noa wait Many thanks to the reviewers! Cheers, Lionel Landwerlin (9): drm/i915/perf: introduce a versioning of the i915-perf uapi drm/i915/perf: allow for CS OA configs

<    1   2   3   4   5   6   7   8   9   10   >