Message ID | 20191216093433.2517697-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [i-g-t] i915/perf: Skip OA testing on systems too old | expand |
On 16/12/2019 11:34, Chris Wilson wrote: > Don't flat out fail if the system doesn't support OA, just skip. > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/834 > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > tests/perf.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/tests/perf.c b/tests/perf.c > index f5dd6051e..12f552743 100644 > --- a/tests/perf.c > +++ b/tests/perf.c > @@ -884,11 +884,9 @@ init_sys_info(void) > const char *test_set_uuid = NULL; > char buf[256]; > > - igt_assert_neq(devid, 0); > - > timestamp_frequency = get_cs_timestamp_frequency(); > igt_debug("timestamp_frequency = %lu\n", timestamp_frequency); > - igt_assert_neq(timestamp_frequency, 0); > + igt_require(timestamp_frequency); This requires a kernel version more recent (4.16) than when perf support was added (4.13). Is this what you intended? -Lionel > > if (IS_HASWELL(devid)) { > /* We don't have a TestOa metric set for Haswell so use
Quoting Lionel Landwerlin (2019-12-16 09:46:56) > On 16/12/2019 11:34, Chris Wilson wrote: > > Don't flat out fail if the system doesn't support OA, just skip. > > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/834 > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > > --- > > tests/perf.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/tests/perf.c b/tests/perf.c > > index f5dd6051e..12f552743 100644 > > --- a/tests/perf.c > > +++ b/tests/perf.c > > @@ -884,11 +884,9 @@ init_sys_info(void) > > const char *test_set_uuid = NULL; > > char buf[256]; > > > > - igt_assert_neq(devid, 0); > > - > > timestamp_frequency = get_cs_timestamp_frequency(); > > igt_debug("timestamp_frequency = %lu\n", timestamp_frequency); > > - igt_assert_neq(timestamp_frequency, 0); > > + igt_require(timestamp_frequency); > > > This requires a kernel version more recent (4.16) than when perf support > was added (4.13). > > Is this what you intended? You have a fatal assert there. I am just changing it so that it skips when not supported as no testing is being performed. -Chris
On 16/12/2019 11:56, Chris Wilson wrote: > Quoting Lionel Landwerlin (2019-12-16 09:46:56) >> On 16/12/2019 11:34, Chris Wilson wrote: >>> Don't flat out fail if the system doesn't support OA, just skip. >>> >>> Closes: https://gitlab.freedesktop.org/drm/intel/issues/834 >>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >>> --- >>> tests/perf.c | 4 +--- >>> 1 file changed, 1 insertion(+), 3 deletions(-) >>> >>> diff --git a/tests/perf.c b/tests/perf.c >>> index f5dd6051e..12f552743 100644 >>> --- a/tests/perf.c >>> +++ b/tests/perf.c >>> @@ -884,11 +884,9 @@ init_sys_info(void) >>> const char *test_set_uuid = NULL; >>> char buf[256]; >>> >>> - igt_assert_neq(devid, 0); >>> - >>> timestamp_frequency = get_cs_timestamp_frequency(); >>> igt_debug("timestamp_frequency = %lu\n", timestamp_frequency); >>> - igt_assert_neq(timestamp_frequency, 0); >>> + igt_require(timestamp_frequency); >> >> This requires a kernel version more recent (4.16) than when perf support >> was added (4.13). >> >> Is this what you intended? > You have a fatal assert there. I am just changing it so that it skips > when not supported as no testing is being performed. > -Chris I think there might be a problem in i915 if this returns 0. When I added this param I went back and figured the value for each platform. What kind of machine is fi-blb-e6850 <https://intel-gfx-ci.01.org/hardware.html#fi-blb-e6850>? The number looks like a skylake. -Lionel
Quoting Lionel Landwerlin (2019-12-16 10:06:53) > On 16/12/2019 11:56, Chris Wilson wrote: > > Quoting Lionel Landwerlin (2019-12-16 09:46:56) > > On 16/12/2019 11:34, Chris Wilson wrote: > > Don't flat out fail if the system doesn't support OA, just skip. > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/834 > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > tests/perf.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/tests/perf.c b/tests/perf.c > index f5dd6051e..12f552743 100644 > --- a/tests/perf.c > +++ b/tests/perf.c > @@ -884,11 +884,9 @@ init_sys_info(void) > const char *test_set_uuid = NULL; > char buf[256]; > > - igt_assert_neq(devid, 0); > - > timestamp_frequency = get_cs_timestamp_frequency(); > igt_debug("timestamp_frequency = %lu\n", timestamp_frequency); > - igt_assert_neq(timestamp_frequency, 0); > + igt_require(timestamp_frequency); > > > This requires a kernel version more recent (4.16) than when perf support > was added (4.13). > > Is this what you intended? > > You have a fatal assert there. I am just changing it so that it skips > when not supported as no testing is being performed. > -Chris > > I think there might be a problem in i915 if this returns 0. > > When I added this param I went back and figured the value for each platform. > > What kind of machine is fi-blb-e6850? The number looks like a skylake. Bearlake-B, gen3. -Chris
On 16/12/2019 11:34, Chris Wilson wrote: > Don't flat out fail if the system doesn't support OA, just skip. > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/834 > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > tests/perf.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/tests/perf.c b/tests/perf.c > index f5dd6051e..12f552743 100644 > --- a/tests/perf.c > +++ b/tests/perf.c > @@ -884,11 +884,9 @@ init_sys_info(void) > const char *test_set_uuid = NULL; > char buf[256]; > > - igt_assert_neq(devid, 0); > - > timestamp_frequency = get_cs_timestamp_frequency(); > igt_debug("timestamp_frequency = %lu\n", timestamp_frequency); > - igt_assert_neq(timestamp_frequency, 0); > + igt_require(timestamp_frequency); > > if (IS_HASWELL(devid)) { > /* We don't have a TestOa metric set for Haswell so use I guess I'm too young to know that some platforms don't even have a timestamp register... Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Thanks, -Lionel
Quoting Lionel Landwerlin (2019-12-16 10:06:53) > On 16/12/2019 11:56, Chris Wilson wrote: > > Quoting Lionel Landwerlin (2019-12-16 09:46:56) > > On 16/12/2019 11:34, Chris Wilson wrote: > > Don't flat out fail if the system doesn't support OA, just skip. > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/834 > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > tests/perf.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/tests/perf.c b/tests/perf.c > index f5dd6051e..12f552743 100644 > --- a/tests/perf.c > +++ b/tests/perf.c > @@ -884,11 +884,9 @@ init_sys_info(void) > const char *test_set_uuid = NULL; > char buf[256]; > > - igt_assert_neq(devid, 0); > - > timestamp_frequency = get_cs_timestamp_frequency(); > igt_debug("timestamp_frequency = %lu\n", timestamp_frequency); > - igt_assert_neq(timestamp_frequency, 0); > + igt_require(timestamp_frequency); > > > This requires a kernel version more recent (4.16) than when perf support > was added (4.13). > > Is this what you intended? > > You have a fatal assert there. I am just changing it so that it skips > when not supported as no testing is being performed. > -Chris > > I think there might be a problem in i915 if this returns 0. It should return 0 for gen3 before Pineview. However, since it returns i915->rawclk_freq on pnv and g4x, it should have a value except that i915->cs_timestamp_freq is set in intel_device_info_runtime_init (i915_driver_hw_probe) before the rawclk_freq is set (i915_driver_modeset_probe). Not sure the best approach to straighten out that mess... Just delaying setting cs_timestamp_freq to i915_driver_register seems to be the best idea. -Chris
On 16/12/2019 12:27, Chris Wilson wrote: > Quoting Lionel Landwerlin (2019-12-16 10:06:53) >> On 16/12/2019 11:56, Chris Wilson wrote: >> >> Quoting Lionel Landwerlin (2019-12-16 09:46:56) >> >> On 16/12/2019 11:34, Chris Wilson wrote: >> >> Don't flat out fail if the system doesn't support OA, just skip. >> >> Closes: https://gitlab.freedesktop.org/drm/intel/issues/834 >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >> --- >> tests/perf.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/tests/perf.c b/tests/perf.c >> index f5dd6051e..12f552743 100644 >> --- a/tests/perf.c >> +++ b/tests/perf.c >> @@ -884,11 +884,9 @@ init_sys_info(void) >> const char *test_set_uuid = NULL; >> char buf[256]; >> >> - igt_assert_neq(devid, 0); >> - >> timestamp_frequency = get_cs_timestamp_frequency(); >> igt_debug("timestamp_frequency = %lu\n", timestamp_frequency); >> - igt_assert_neq(timestamp_frequency, 0); >> + igt_require(timestamp_frequency); >> >> >> This requires a kernel version more recent (4.16) than when perf support >> was added (4.13). >> >> Is this what you intended? >> >> You have a fatal assert there. I am just changing it so that it skips >> when not supported as no testing is being performed. >> -Chris >> >> I think there might be a problem in i915 if this returns 0. > It should return 0 for gen3 before Pineview. > > However, since it returns i915->rawclk_freq on pnv and g4x, it should > have a value except that i915->cs_timestamp_freq is set in > intel_device_info_runtime_init (i915_driver_hw_probe) before the > rawclk_freq is set (i915_driver_modeset_probe). > > Not sure the best approach to straighten out that mess... Just delaying > setting cs_timestamp_freq to i915_driver_register seems to be the best > idea. > -Chris That's what I remember reading from old specs (cs timestamp = a factor of rawclk). So I was expecting to always get a value. Can we call intel_update_rawclk() in read_timestamp_frequency() just for the <= gen4 case? -Lionel
Quoting Lionel Landwerlin (2019-12-16 10:41:40) > On 16/12/2019 12:27, Chris Wilson wrote: > > Quoting Lionel Landwerlin (2019-12-16 10:06:53) > >> On 16/12/2019 11:56, Chris Wilson wrote: > >> > >> Quoting Lionel Landwerlin (2019-12-16 09:46:56) > >> > >> On 16/12/2019 11:34, Chris Wilson wrote: > >> > >> Don't flat out fail if the system doesn't support OA, just skip. > >> > >> Closes: https://gitlab.freedesktop.org/drm/intel/issues/834 > >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > >> --- > >> tests/perf.c | 4 +--- > >> 1 file changed, 1 insertion(+), 3 deletions(-) > >> > >> diff --git a/tests/perf.c b/tests/perf.c > >> index f5dd6051e..12f552743 100644 > >> --- a/tests/perf.c > >> +++ b/tests/perf.c > >> @@ -884,11 +884,9 @@ init_sys_info(void) > >> const char *test_set_uuid = NULL; > >> char buf[256]; > >> > >> - igt_assert_neq(devid, 0); > >> - > >> timestamp_frequency = get_cs_timestamp_frequency(); > >> igt_debug("timestamp_frequency = %lu\n", timestamp_frequency); > >> - igt_assert_neq(timestamp_frequency, 0); > >> + igt_require(timestamp_frequency); > >> > >> > >> This requires a kernel version more recent (4.16) than when perf support > >> was added (4.13). > >> > >> Is this what you intended? > >> > >> You have a fatal assert there. I am just changing it so that it skips > >> when not supported as no testing is being performed. > >> -Chris > >> > >> I think there might be a problem in i915 if this returns 0. > > It should return 0 for gen3 before Pineview. > > > > However, since it returns i915->rawclk_freq on pnv and g4x, it should > > have a value except that i915->cs_timestamp_freq is set in > > intel_device_info_runtime_init (i915_driver_hw_probe) before the > > rawclk_freq is set (i915_driver_modeset_probe). > > > > Not sure the best approach to straighten out that mess... Just delaying > > setting cs_timestamp_freq to i915_driver_register seems to be the best > > idea. > > -Chris > > That's what I remember reading from old specs (cs timestamp = a factor > of rawclk). > > So I was expecting to always get a value. > > > Can we call intel_update_rawclk() in read_timestamp_frequency() just for > the <= gen4 case? It's only defined for g4x & pnv and later. It doesn't cover earlier gen4/gen3/gen2, so still we have 0. -Chris
diff --git a/tests/perf.c b/tests/perf.c index f5dd6051e..12f552743 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -884,11 +884,9 @@ init_sys_info(void) const char *test_set_uuid = NULL; char buf[256]; - igt_assert_neq(devid, 0); - timestamp_frequency = get_cs_timestamp_frequency(); igt_debug("timestamp_frequency = %lu\n", timestamp_frequency); - igt_assert_neq(timestamp_frequency, 0); + igt_require(timestamp_frequency); if (IS_HASWELL(devid)) { /* We don't have a TestOa metric set for Haswell so use
Don't flat out fail if the system doesn't support OA, just skip. Closes: https://gitlab.freedesktop.org/drm/intel/issues/834 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/perf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)