[Intel-gfx] [PATCH i-g-t v4 06/12] tests/perf: rework oa-exponent test

2017-08-29 Thread Lionel Landwerlin
amount of clock cycles per timestamp deltas v2: Drop some unused variables (Matthew) Signed-off-by: Lionel Landwerlin --- tests/perf.c | 733 --- 1 file changed, 599 insertions(+), 134 deletions(-) diff --git a/tests/perf.c b/tests

[Intel-gfx] [PATCH 0/3] drm/i915: add perf support for Coffeelake

2017-08-29 Thread Lionel Landwerlin
Hi all, This series adds support for perf on Coffeelake GT2. This requires some changes in order to identify GT2s chipsets. It seems the scheme that was used before in device IDs isn't there anymore. Cheers, Lionel Landwerlin (3): drm/i915: add GT number to intel_device_info drm

[Intel-gfx] [PATCH 1/3] drm/i915: add GT number to intel_device_info

2017-08-29 Thread Lionel Landwerlin
Up to Coffeelake we could deduce this GT number from the device ID. This doesn't seem to be the case anymore. This change reorders pciids per GT and adds a gt field to intel_device_info. We set this field on the following platforms : - HSW/BDW/SKL/KBL/CFL/CNL Signed-off-by: Lionel Landw

[Intel-gfx] [PATCH 2/3] drm/i915: rework IS_*_GT* macros

2017-08-29 Thread Lionel Landwerlin
We can now make use of the intel_device_info.gt field. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 3d417537bd59

[Intel-gfx] [PATCH 3/3] drm/i915/perf: add support for Coffeelake GT2

2017-08-29 Thread Lionel Landwerlin
Add the test configuration & timestamp frequency for Coffeelake GT2. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_oa_cflgt2.c | 109 ++ drivers

Re: [Intel-gfx] [PATCH 1/3] drm/i915: add GT number to intel_device_info

2017-08-29 Thread Lionel Landwerlin
On 29/08/17 18:01, Chris Wilson wrote: Quoting Lionel Landwerlin (2017-08-29 17:52:49) Up to Coffeelake we could deduce this GT number from the device ID. This doesn't seem to be the case anymore. This change reorders pciids per GT and adds a gt field to intel_device_info. We set this fie

[Intel-gfx] [PATCH v2 1/3] drm/i915: add GT number to intel_device_info

2017-08-29 Thread Lionel Landwerlin
VB (Chris) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 193 +++- include/drm/i915_pciids.h | 138 3 files changed, 231 insertions(+), 101 deletions(-) dif

[Intel-gfx] [PATCH v2 3/3] drm/i915/perf: add support for Coffeelake GT2

2017-08-29 Thread Lionel Landwerlin
Add the test configuration & timestamp frequency for Coffeelake GT2. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_oa_cflgt2.c | 109 ++ drivers

[Intel-gfx] [PATCH v2 2/3] drm/i915: rework IS_*_GT* macros

2017-08-29 Thread Lionel Landwerlin
We can now make use of the intel_device_info.gt field. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index

[Intel-gfx] [PATCH v2 0/3] drm/i915: add perf support for Coffeelake

2017-08-29 Thread Lionel Landwerlin
Upon Chris' comment, fill the intel_device_info.gt field for SNB & IVB as well. Cheers, Lionel Landwerlin (3): drm/i915: add GT number to intel_device_info drm/i915: rework IS_*_GT* macros drm/i915/perf: add support for Coffeelake GT2 drivers/gpu/drm/i915/Makefile

[Intel-gfx] [PATCH v3 0/3] drm/i915: add perf support for Coffeelake

2017-08-29 Thread Lionel Landwerlin
Didn't compile the whole kernel and missed some errors :( Lionel Landwerlin (3): drm/i915: add GT number to intel_device_info drm/i915: rework IS_*_GT* macros drm/i915/perf: add support for Coffeelake GT2 drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_

[Intel-gfx] [PATCH v3 2/3] drm/i915: rework IS_*_GT* macros

2017-08-29 Thread Lionel Landwerlin
We can now make use of the intel_device_info.gt field. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index

[Intel-gfx] [PATCH v3 1/3] drm/i915: add GT number to intel_device_info

2017-08-29 Thread Lionel Landwerlin
VB (Chris) v3: Fix compilation error in early-quirks (Lionel) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 193 +++- include/drm/i915_pciids.h | 152 +++ 3 file

[Intel-gfx] [PATCH v3 3/3] drm/i915/perf: add support for Coffeelake GT2

2017-08-29 Thread Lionel Landwerlin
Add the test configuration & timestamp frequency for Coffeelake GT2. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_oa_cflgt2.c | 109 ++ drivers

Re: [Intel-gfx] [PATCH i-g-t 1/1] igt/dapc: Test Driver Assisted Performance Capture (DAPC)

2017-08-30 Thread Lionel Landwerlin
On 30/08/17 10:39, Daniel Vetter wrote: Also dapc is not a good testcase name, needs some proper prefixing. Reminds me perf.c should probably be renamed too. What would be an appropriate name? intel_perf.c? ___ Intel-gfx mailing list Intel-gfx@lists.

Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: add GT number to intel_device_info

2017-08-30 Thread Lionel Landwerlin
On 30/08/17 14:41, Ville Syrjälä wrote: On Tue, Aug 29, 2017 at 09:42:02PM +0100, Lionel Landwerlin wrote: Up to Coffeelake we could deduce this GT number from the device ID. This doesn't seem to be the case anymore. This change reorders pciids per GT and adds a gt field to intel_device

[Intel-gfx] [PATCH v4 1/3] drm/i915: add GT number to intel_device_info

2017-08-30 Thread Lionel Landwerlin
VB (Chris) v3: Fix compilation error in early-quirks (Lionel) v4: Fix inconsistency between FEATURE/PLATFORM macros (Ville) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 193 +++- in

[Intel-gfx] [PATCH v4 0/3] drm/i915: add perf support for Coffeelake

2017-08-30 Thread Lionel Landwerlin
Inconsistencies noticed by Ville in patch 1. Cheers, Lionel Landwerlin (3): drm/i915: add GT number to intel_device_info drm/i915: rework IS_*_GT* macros drm/i915/perf: add support for Coffeelake GT2 drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH v4 2/3] drm/i915: rework IS_*_GT* macros

2017-08-30 Thread Lionel Landwerlin
We can now make use of the intel_device_info.gt field. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index

[Intel-gfx] [PATCH v4 3/3] drm/i915/perf: add support for Coffeelake GT2

2017-08-30 Thread Lionel Landwerlin
Add the test configuration & timestamp frequency for Coffeelake GT2. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_oa_cflgt2.c | 109 ++ drivers

[Intel-gfx] [PATCH v5 3/4] drm/i915: rework IS_*_GT* macros

2017-08-30 Thread Lionel Landwerlin
We can now make use of the intel_device_info.gt field. Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v5 2/4] drm/i915: mark all device info struct with __initdata

2017-08-30 Thread Lionel Landwerlin
As recommended by Chris. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_pci.c | 94 - 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index f56aa8e3890b

[Intel-gfx] [PATCH v5 1/4] drm/i915: add GT number to intel_device_info

2017-08-30 Thread Lionel Landwerlin
mp; After : $ modinfo drivers/gpu/drm/i915/i915.ko | grep ^alias | wc -l 209 v2: Add SNB & IVB (Chris) v3: Fix compilation error in early-quirks (Lionel) v4: Fix inconsistency between FEATURE/PLATFORM macros (Ville) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson --- drivers/gpu/drm/i9

[Intel-gfx] [PATCH v5 0/4] drm/i915: add perf support for Coffeelake

2017-08-30 Thread Lionel Landwerlin
Hi, Adding one commit to mark device info structs with __initdata. Cheers, Lionel Landwerlin (4): drm/i915: add GT number to intel_device_info drm/i915: mark all device info struct with __initdata drm/i915: rework IS_*_GT* macros drm/i915/perf: add support for Coffeelake GT2 drivers

[Intel-gfx] [PATCH v5 4/4] drm/i915/perf: add support for Coffeelake GT2

2017-08-30 Thread Lionel Landwerlin
Add the test configuration & timestamp frequency for Coffeelake GT2. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_oa_cflgt2.c | 109 ++ drivers

[Intel-gfx] [RFC PATCH 2/4] drm/i915: extract per-ctx/indirect bb programming

2017-08-30 Thread Lionel Landwerlin
Let's put this in its own function to reuse it later. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_lrc.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_

[Intel-gfx] [RFC PATCH 4/4] drm/i915: reprogram NOA muxes on context switch when using perf

2017-08-30 Thread Lionel Landwerlin
If some of the contexts submitting workloads to the GPU have been configured to shutdown slices/subslices, we might loose the NOA configurations written in the NOA muxes. We need to reprogram then at context switch. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 2

[Intel-gfx] [RFC PATCH 0/4] drm/i915: implement NOA mux reprogramming at ctx-switch

2017-08-30 Thread Lionel Landwerlin
ents! Cheers, Lionel Landwerlin (4): drm/i915: use same define size for wa_bb pin/allocation drm/i915: extract per-ctx/indirect bb programming drm/i915: pass wa_ctx as argument drm/i915: reprogram NOA muxes on context switch when using perf drivers/gpu/drm/i915/i915_drv.h | 2 + drivers

[Intel-gfx] [RFC PATCH 3/4] drm/i915: pass wa_ctx as argument

2017-08-30 Thread Lionel Landwerlin
Rather than accessing it from the engine structure. This will be used for reprogramming later. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_lrc.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu

[Intel-gfx] [RFC PATCH 1/4] drm/i915: use same define size for wa_bb pin/allocation

2017-08-30 Thread Lionel Landwerlin
If we have CTX_WA_BB_OBJ_SIZE we should use it everywhere we want to refer to the workaround batchbuffer object rather than using PAGE_SIZE. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm

Re: [Intel-gfx] [RFC PATCH 0/4] drm/i915: implement NOA mux reprogramming at ctx-switch

2017-08-30 Thread Lionel Landwerlin
ommit/b2ea9b16ef1377f808be4d4c60f5f23596517f49 You can pull the branch with those changes here : https://github.com/djdeath/linux/commits/wip/djdeath/oa-next-slice-control Cheers, - Lionel On 30/08/17 19:20, Lionel Landwerlin wrote: Hi all, This little series implements NOA muxes reprogramming on context switch throug

Re: [Intel-gfx] [RFC PATCH 4/4] drm/i915: reprogram NOA muxes on context switch when using perf

2017-08-30 Thread Lionel Landwerlin
On 30/08/17 20:15, Chris Wilson wrote: Quoting Lionel Landwerlin (2017-08-30 19:20:06) If some of the contexts submitting workloads to the GPU have been configured to shutdown slices/subslices, we might loose the NOA configurations written in the NOA muxes. We need to reprogram then at context

[Intel-gfx] [PATCH i-g-t v5 08/11] tests/perf: make buffer-fill more reliable

2017-08-31 Thread Lionel Landwerlin
Filling rate of the buffer must discard context switch reports as they do not depend upon the periodicity, instead they're a factor on the amount of different applications concurrently running on the system. Signed-off-by: Lionel Landwerlin Tested-by: Matthew Auld Reviewed-by: Matthew

[Intel-gfx] [PATCH i-g-t v5 07/11] tests/perf: make enable-disable more reliable

2017-08-31 Thread Lionel Landwerlin
Estimation of the amount of reports can only refer to periodic ones, as context switch reports completely depend on what happens on the system. Also generate some load to prevent clock frequency changes to impact our measurement. Signed-off-by: Lionel Landwerlin --- tests/perf.c | 96

[Intel-gfx] [PATCH i-g-t v5 03/11] tests/perf: update max buffer size for reading reports

2017-08-31 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- tests/perf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 8644e252..bd139bde 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -1298,9 +1298,7 @@ read_2_oa_reports(int format_id, /* Note

[Intel-gfx] [PATCH i-g-t v5 01/11] tests/perf: make stream_fd a global variable

2017-08-31 Thread Lionel Landwerlin
When debugging unstable tests on new platforms we currently we don't cleanup everything well in between different tests. Since only a single OA stream fd can be opened at a time, having the stream_fd as a global variable helps us cleanup the state between tests. Signed-off-by: Lionel Landw

[Intel-gfx] [PATCH i-g-t v5 04/11] tests/perf: rc6: try to guess when rc6 is disabled

2017-08-31 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- tests/perf.c | 13 + 1 file changed, 13 insertions(+) diff --git a/tests/perf.c b/tests/perf.c index bd139bde..5fe0a332 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -3463,6 +3463,17 @@ gen8_test_single_ctx_render_target_writes_a_counter(void

[Intel-gfx] [PATCH i-g-t v5 11/11] tests/perf: add support for Coffeelake

2017-08-31 Thread Lionel Landwerlin
Using the same timestamp frequency as Skylake/Kabylake. Signed-off-by: Lionel Landwerlin --- tests/perf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/perf.c b/tests/perf.c index 070dee97..a4d3f663 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -1145,6 +1145,9 @@ init_sys_info

[Intel-gfx] [PATCH i-g-t v5 10/11] tests/perf: prevent power management to kick in when necessary

2017-08-31 Thread Lionel Landwerlin
ing - polling - buffer-fill - oa-exponents Many thanks to Chris Wilson for suggesting this! Signed-off-by: Lionel Landwerlin --- tests/perf.c | 64 ++-- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/tests/perf.c b/tes

[Intel-gfx] [PATCH i-g-t v5 06/11] tests/perf: rework oa-exponent test

2017-08-31 Thread Lionel Landwerlin
amount of clock cycles per timestamp deltas v2: Drop some unused variables (Matthew) Signed-off-by: Lionel Landwerlin --- tests/perf.c | 733 --- 1 file changed, 599 insertions(+), 134 deletions(-) diff --git a/tests/perf.c b/tests

[Intel-gfx] [PATCH i-g-t v5 02/11] tests/perf: add per context filtering test for gen8+

2017-08-31 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin --- tests/perf.c | 777 --- 1 file changed, 745 insertions(+), 32 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index f89a235e..8644e252 100644

[Intel-gfx] [PATCH i-g-t v5 00/11] Improve robustness of the i915 perf tests

2017-08-31 Thread Lionel Landwerlin
Hi, I pushed the couple of patches that I could and that had a Rb by Matthew (Kabylake/Geminilake support). Here is pretty much the same series as v4 only adding Coffeelake support. Cheers, Lionel Landwerlin (10): tests/perf: make stream_fd a global variable tests/perf: update max buffer

[Intel-gfx] [PATCH i-g-t v5 09/11] tests/perf: estimate number of blocking/polling based on time spent

2017-08-31 Thread Lionel Landwerlin
ased on time spent after the fact. Signed-off-by: Lionel Landwerlin --- tests/perf.c | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 24df7c2a..6c062d20 100644 --- a/tests/perf.c +++ b/tests/pe

[Intel-gfx] [PATCH i-g-t v5 05/11] tests/perf: remove frequency related changes

2017-08-31 Thread Lionel Landwerlin
Experience shows that most of the issues we face with periodicity of the reports produced by the OA unit are related to power management, not frequency. Signed-off-by: Lionel Landwerlin --- tests/perf.c | 141 --- 1 file changed, 9

[Intel-gfx] [PATCH v2 0/4] drm/i915: implement NOA mux reprogramming at ctx-switch

2017-08-31 Thread Lionel Landwerlin
Some pertinent changes suggested by Chris. The most important one being using the indirect-ctx batchbuffer. Cheers, Lionel Landwerlin (4): drm/i915: don't specify pinned size for wa_bb pin/allocation drm/i915: extract per-ctx/indirect bb programming drm/i915: pass wa_ctx as argument

[Intel-gfx] [PATCH v2 1/4] drm/i915: don't specify pinned size for wa_bb pin/allocation

2017-08-31 Thread Lionel Landwerlin
We can rely on the i915_vma_pin() to use vma->size instead. v2: Actually set the pin size to 0 to vma->size is used implicitly (Chris) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/g

[Intel-gfx] [PATCH v2 3/4] drm/i915: pass wa_ctx as argument

2017-08-31 Thread Lionel Landwerlin
Rather than accessing it from the engine structure. This will be used for reprogramming later. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_lrc.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu

[Intel-gfx] [PATCH v2 2/4] drm/i915: extract per-ctx/indirect bb programming

2017-08-31 Thread Lionel Landwerlin
Let's put this in its own function to reuse it later. v2: Pull in condition in the extracted function (Chris) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_lrc.c | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff --

[Intel-gfx] [PATCH v2 4/4] drm/i915: reprogram NOA muxes on context switch when using perf

2017-08-31 Thread Lionel Landwerlin
reusing i915_oa_get_perctx_bb_size() (Chris) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_perf.c | 130 --- drivers/gpu/drm/i915/intel_lrc.c | 61 +- drivers/gpu/drm/i915/intel_lrc.h

Re: [Intel-gfx] [PATCH 2/2] drm/i915/perf: Remove __user from u64 in drm_i915_perf_oa_config

2017-09-01 Thread Lionel Landwerlin
Sure : Reviewed-by: Lionel Landwerlin On 01/09/17 15:57, Chris Wilson wrote: Sparse complains that these integers from which we form void __user *, and so we don't need the annotation itself inside the uABI. Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Matthew Auld --- in

[Intel-gfx] [RFC PATCH 2/4] drm/i915: Program RPCS for Broadwell

2017-09-01 Thread Lionel Landwerlin
want to opt out of the "always-enabled" setting. Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_lrc.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gp

[Intel-gfx] [RFC PATCH 4/4] drm/i915: Expose RPCS (SSEU) configuration to userspace

2017-09-01 Thread Lionel Landwerlin
supported. v2: Fix offset of CTX_R_PWR_CLK_STATE in intel_lr_context_set_sseu() (Lionel) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100899 Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin Cc: Dmitry Rogozhkin CC: Tvrtko Ursulin CC: Zhipeng Gong CC: Joonas Lahtinen --- drivers/gpu/drm

[Intel-gfx] [RFC PATCH 3/4] drm/i915: Record the sseu configuration per-context & engine

2017-09-01 Thread Lionel Landwerlin
per context & engine (Chris) Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 19 --- drivers/gpu/drm/i915/i915_gem_context.c | 6 ++ drivers/gpu/drm/i915/i915_gem_context.h | 21 + drivers/gpu

[Intel-gfx] [RFC PATCH 0/4] drm/i915: enable userspace to program slice/subslice programming

2017-09-01 Thread Lionel Landwerlin
Hi all, This is a respin of a series from Chris. Actually got around testing it a bit. The main reason for this feature is to allow media workloads to tweak the number of slices powered on. It seems to have significant performance gains. Cheers, Chris Wilson (4): drm/i915: Record both min/max

[Intel-gfx] [RFC PATCH 1/4] drm/i915: Record both min/max eu_per_subslice in sseu_dev_info

2017-09-01 Thread Lionel Landwerlin
; currently we just set it to a single value, but the flexibility may be beneficial in future. Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_debugfs.c | 36 +++- drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH i-g-t] tests: add slice power programming test

2017-09-01 Thread Lionel Landwerlin
Verifies that the kernel programs slices correctly by reading the value of PWR_CLK_STATE register. Signed-off-by: Lionel Landwerlin --- tests/Makefile.sources | 1 + tests/ctx_rpcs.c | 235 + 2 files changed, 236 insertions(+) create mode

Re: [Intel-gfx] [PATCH v5 4/4] drm/i915/perf: add support for Coffeelake GT2

2017-09-04 Thread Lionel Landwerlin
On 04/09/17 10:25, Matthew Auld wrote: On 30 August 2017 at 17:12, Lionel Landwerlin wrote: Add the test configuration & timestamp frequency for Coffeelake GT2. Signed-off-by: Lionel Landwerlin Do we not want to also disable the clock-ratio-change reports? Also can we not get away with

Re: [Intel-gfx] [PATCH v3 6/7] drm/i915/perf: per-gen timebase for checking sample freq

2017-04-05 Thread Lionel Landwerlin
Hey Rob, Thanks for sending this, it looks good to me. I think we also need to update the oa_sample_rate_hard_limit & i915_oa_max_sample_rate variables. This patch is : Reviewed-by: Lionel Landwerlin On 05/04/17 17:23, Robert Bragg wrote: An oa_exponent_to_ns() utility and per

Re: [Intel-gfx] [PATCH v3 6/7] drm/i915/perf: per-gen timebase for checking sample freq

2017-04-05 Thread Lionel Landwerlin
_PROP_OA_EXPONENT validation done in read_properties_unlocked() to not assume we have a 12.5KHz timebase as we did for Haswell. Signed-off-by: Robert Bragg Cc: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_perf.c | 21 +++-- 2 files changed, 16

Re: [Intel-gfx] [PATCH v3 4/7] drm/i915/perf: Add OA unit support for Gen 8+

2017-04-06 Thread Lionel Landwerlin
* +* We don't rely solely on the reason field to identify context +* switches since it's not-uncommon for periodic samples to +* identify a switch before any 'context switch' report. +*/ + if (!de

Re: [Intel-gfx] [PATCH] drm/doc: Interlink color manager docs better

2017-04-13 Thread Lionel Landwerlin
I have a tiny suggestion down there. Regardless this is : Reviewed-by: Lionel Landwerlin On 12/04/17 08:20, Daniel Vetter wrote: Motivated by a request from Eric. Cc: Eric Anholt Cc: Lionel Landwerlin Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_atomic_helper.c | 3

[Intel-gfx] [PATCH v5 15/15] drm/i915/perf: remove perf.hook_lock

2017-04-24 Thread Lionel Landwerlin
en7 oacontrol state used to be updated as part of a context pin hook. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Acked-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_perf.c | 32 ++-- 2 files changed,

[Intel-gfx] [PATCH v5 04/15] drm/i915/perf: no head/tail ref in gen7_oa_read

2017-04-24 Thread Lionel Landwerlin
From: Robert Bragg This avoids redundantly passing an (inout) head and tail pointer to gen7_append_oa_reports() from gen7_oa_read which doesn't need to reference either itself. Moving the head/tail reads and writes into gen7_append_oa_reports should have no functional effect except to avoid some

[Intel-gfx] [PATCH v5 07/15] drm/i915/perf: better pipeline aged/aging tail updates

2017-04-24 Thread Lionel Landwerlin
From: Robert Bragg This updates the tail pointer race workaround handling to updating the 'aged' pointer before looking to start aging a new one. There's the possibility that there is already new data available and so we can immediately start aging a new pointer without having to first wait for a

[Intel-gfx] [PATCH v5 10/15] drm/i915: expose _SUBSLICE_MASK GETPARM

2017-04-24 Thread Lionel Landwerlin
. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Acked-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.c | 5 + include/uapi/drm/i915_drm.h | 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index

[Intel-gfx] [PATCH v5 06/15] drm/i915/perf: improve invalid OA format debug message

2017-04-24 Thread Lionel Landwerlin
From: Robert Bragg A minor improvement to debugging output Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_perf.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c i

[Intel-gfx] [PATCH v5 14/15] drm/i915/perf: per-gen timebase for checking sample freq

2017-04-24 Thread Lionel Landwerlin
uency of 19.2MHz for BXT (Ville) Initialize oa_sample_rate_hard_limit per-gen too (Lionel) Signed-off-by: Robert Bragg Cc: Lionel Landwerlin Cc: Ville Syrjälä Reviewed-by: Matthew Auld Acked-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_perf.c

[Intel-gfx] [PATCH v5 08/15] drm/i915/perf: rate limit spurious oa report notice

2017-04-24 Thread Lionel Landwerlin
From: Robert Bragg This change is pre-emptively aiming to avoid a potential cause of kernel logging noise in case some condition were to result in us seeing invalid OA reports. The workaround for the OA unit's tail pointer race condition is what avoids the primary known cause of invalid reports

[Intel-gfx] [PATCH v5 09/15] drm/i915: expose _SLICE_MASK GETPARM

2017-04-24 Thread Lionel Landwerlin
-off-by: Robert Bragg Reviewed-by: Matthew Auld Acked-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.c | 5 + include/uapi/drm/i915_drm.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index cc7393e65e99

[Intel-gfx] [PATCH v5 03/15] drm/i915/perf: avoid read back of head register

2017-04-24 Thread Lionel Landwerlin
From: Robert Bragg There's no need for the driver to keep reading back the head pointer from hardware since the hardware doesn't update it automatically. This way we can treat any invalid head pointer value as a software/driver bug instead of spurious hardware behaviour. This change is also a sm

[Intel-gfx] [PATCH v5 12/15] drm/i915/perf: Add OA unit support for Gen 8+

2017-04-24 Thread Lionel Landwerlin
he context image we just updated (Lionel) Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld \o/ --- drivers/gpu/drm/i915/i915_drv.h | 45 +- drivers/gpu/drm/i915/i915_gem_context.h | 1 + drivers/gpu/drm/i915/i915_perf.c

[Intel-gfx] [PATCH v5 02/15] drm/i915/perf: avoid poll, read, EAGAIN busy loops

2017-04-24 Thread Lionel Landwerlin
From: Robert Bragg If the function for checking whether there is OA buffer data available (during a poll or blocking read) has false positives then we want to avoid a situation where the subsequent read() returns EAGAIN (after a more accurate check) followed by a poll() immediately reporting the

[Intel-gfx] [PATCH 00/15] Enable OA unit for Gen 8 and 9 in i915 perf

2017-04-24 Thread Lionel Landwerlin
Hi, Taking over from Rob for this v5. This series only has the following changes from v4 : - patch 9 & 10 : updated number for GETPARAM after rebase - patch 12 : drain the GPU before reconfiguring the OA unit to work around a race condition where the CPU & GPU update the context image at

[Intel-gfx] [PATCH v5 05/15] drm/i915/perf: improve tail race workaround

2017-04-24 Thread Lionel Landwerlin
From: Robert Bragg There's a HW race condition between OA unit tail pointer register updates and writes to memory whereby the tail pointer can sometimes get ahead of what's been written out to the OA buffer so far (in terms of what's visible to the CPU). Although this can be observed explicitly

[Intel-gfx] [PATCH v5 01/15] drm/i915/perf: fix gen7_append_oa_reports comment

2017-04-24 Thread Lionel Landwerlin
From: Robert Bragg If I'm going to complain about a back-to-front convention then the least I can do is not muddle the comment up too. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[Intel-gfx] [PATCH v5 11/15] drm/i915/perf: Add 'render basic' Gen8+ OA unit configs

2017-04-24 Thread Lionel Landwerlin
> gputop-data/oa-*.xml > scripts/i915-perf-kernelgen.py $ make -C gputop-data -f Makefile.xml WHITELIST=RenderBasic v2: add newlines to debug messages + fix comment (Matthew Auld) Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Acked-by: Lionel Landwerlin --- drivers/gpu/drm/i915/Ma

[Intel-gfx] [PATCH v6 12/15] drm/i915/perf: Add OA unit support for Gen 8+

2017-04-24 Thread Lionel Landwerlin
he context image we just updated (Lionel) v6: In addition to drain, switch to kernel context & update all context in place (Chris) Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld \o/ --- drivers/gpu/drm/i915/i915_drv.h | 45 +- drivers/gpu/drm/i9

Re: [Intel-gfx] [PATCH v6 12/15] drm/i915/perf: Add OA unit support for Gen 8+

2017-04-25 Thread Lionel Landwerlin
Hey Matt, This commit had your reviewed-by on v4, are you still okay with it? Thanks! - Lionel On 24/04/17 11:49, Lionel Landwerlin wrote: From: Robert Bragg Enables access to OA unit metrics for BDW, CHV, SKL and BXT which all share (more-or-less) the same OA unit design. Of particular

Re: [Intel-gfx] [PATCH v6 12/15] drm/i915/perf: Add OA unit support for Gen 8+

2017-04-25 Thread Lionel Landwerlin
On 25/04/17 09:42, Matthew Auld wrote: On 24 April 2017 at 19:49, Lionel Landwerlin wrote: From: Robert Bragg Enables access to OA unit metrics for BDW, CHV, SKL and BXT which all share (more-or-less) the same OA unit design. Of particular note in comparison to Haswell: some OA unit HW

[Intel-gfx] [PATCH v7 12/15] drm/i915/perf: Add OA unit support for Gen 8+

2017-04-25 Thread Lionel Landwerlin
he context image we just updated (Lionel) v6: In addition to drain, switch to kernel context & update all context in place (Chris) v7: Add missing mutex_unlock() if switching to kernel context fails (Matthew) Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin Reviewed-by: Ma

[Intel-gfx] [PATCH i-g-t 02/29] igt/perf: improve robustness of polling/blocking tests

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg There were a couple of problems with both of these tests that could lead to false negatives addressed by this patch. 1) The upper limit for the number of iterations missed a +1 to consider that there might be a sample immediately available at the start of the loop. 2) T

[Intel-gfx] [PATCH i-g-t 09/29] igt/perf: move timebase + oa exponent utilities up

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 56 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 48e8750f..600fa7d9 100644 --- a/tests

[Intel-gfx] [PATCH i-g-t 01/29] igt/perf: generalize lookup for test metric set

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 85 1 file changed, 57 insertions(+), 28 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 2a66bb63..0422e517 100644 --- a

[Intel-gfx] [PATCH i-g-t 11/29] igt/perf: handling printing gen8 formats

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 73 +--- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 864c465c..15f41246 100644 --- a

[Intel-gfx] [PATCH i-g-t 18/29] igt/perf: print [un]slice freq and report reasons in debug

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 58 +- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/tests/perf.c b/tests/perf.c index 08ee8665..ab8db296 100644 --- a/tests

[Intel-gfx] [PATCH i-g-t 07/29] igt/perf: generalize checks for undefined A counters

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 5a6bd05a..fe39f4dd 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -232,6 +232,9

[Intel-gfx] [PATCH i-g-t 03/29] igt/perf: init timestamp freq and oa format per devid

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin --- tests/perf.c | 120 +-- 1 file changed, 67 insertions(+), 53 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index df0120b2..f518bcc1 100644 --- a

[Intel-gfx] [PATCH i-g-t 14/29] igt/perf: s/test_perf_ctx_mi_rpc/hsw_test_single_ctx_counters/

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index c8092eaa..62bfd80f 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -2177,9

[Intel-gfx] [PATCH i-g-t 04/29] igt/perf: update init_sys_info for skl with per-gt configs

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/perf.c b/tests/perf.c index f518bcc1..29487cdf 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -381,7

[Intel-gfx] [PATCH i-g-t 08/29] igt/perf: generalize reading gpu ticks from reports

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 67 +--- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index fe39f4dd..48e8750f 100644 --- a

[Intel-gfx] [PATCH i-g-t 12/29] igt/perf: avoid assumptions about oa exponent <-> freq mappings

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 135 +-- 1 file changed, 84 insertions(+), 51 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 15f41246..d47e45c8 100644 --- a

[Intel-gfx] [PATCH i-g-t 00/29] Update i915 perf tests for Gen8+

2017-04-25 Thread Lionel Landwerlin
lly expecting a someone to thoroughly review all of these changes as it takes a fair amount of time to get into all of the fiddly details, but if someone could look at the end result and quickly read through to check there isn't something terribly wrong, that would be helpful. Thanks a lot,

[Intel-gfx] [PATCH i-g-t 17/29] igt/perf: factor out oa report sanity checking

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 274 +++ 1 file changed, 202 insertions(+), 72 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index fe5ff0fc..08ee8665 100644 --- a

[Intel-gfx] [PATCH i-g-t 15/29] igt/perf: don't assume constant of 40 EUs

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 62bfd80f..9a8c54fc 100644 --- a/tests/perf.c +++ b/tests/perf.c

[Intel-gfx] [PATCH i-g-t 25/29] igt/perf: rework oa-exponent test

2017-04-25 Thread Lionel Landwerlin
amount of clock cycles per timestamp deltas Signed-off-by: Lionel Landwerlin --- tests/perf.c | 765 --- 1 file changed, 573 insertions(+), 192 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 9fd40ff0..922c692d 100644 --- a

[Intel-gfx] [PATCH i-g-t 28/29] igt/perf: load gt_boost_freq_mhz as max gt frequency

2017-04-25 Thread Lionel Landwerlin
We want the absolute max the hardware can do, not the max value set by a previous application/user. Signed-off-by: Lionel Landwerlin --- tests/perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/perf.c b/tests/perf.c index 6026811b..3d033b3a 100644 --- a/tests

[Intel-gfx] [PATCH i-g-t 22/29] igt/perf: add per context filtering test for gen8+

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin --- tests/perf.c | 813 --- 1 file changed, 775 insertions(+), 38 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index b7af1c3b..98f80bfd 100644

[Intel-gfx] [PATCH i-g-t 05/29] igt/perf: add gen8 formats

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 78 +--- 1 file changed, 64 insertions(+), 14 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 29487cdf..3eef82d2 100644 --- a

[Intel-gfx] [PATCH i-g-t 16/29] igt/perf: consider ctx-switch reports while polling/blocking

2017-04-25 Thread Lionel Landwerlin
From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 92 1 file changed, 86 insertions(+), 6 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index 9a8c54fc..fe5ff0fc 100644 --- a

[Intel-gfx] [PATCH i-g-t 20/29] igt/perf: add utility function for checking periodic reports

2017-04-25 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- tests/perf.c | 55 +-- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index d057d943..f8ac06c3 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -450,6 +450,29

<    7   8   9   10   11   12   13   14   15   16   >