* [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-21 5:41 [igt-dev] [PATCH i-g-t 0/2] " Ashutosh Dixit
@ 2023-01-21 5:41 ` Ashutosh Dixit
2023-01-24 12:59 ` Tauro, Riana
2023-01-24 17:00 ` Kamil Konieczny
0 siblings, 2 replies; 19+ messages in thread
From: Ashutosh Dixit @ 2023-01-21 5:41 UTC (permalink / raw)
To: igt-dev; +Cc: Badal Nilawar
Add a test to sanity check power measurement on integrated/discrete by
requiring power under load to be > 0 and >= idle power.
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
tests/i915/i915_power.c | 73 +++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
2 files changed, 74 insertions(+)
create mode 100644 tests/i915/i915_power.c
diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
new file mode 100644
index 00000000000..e7d5c32f1af
--- /dev/null
+++ b/tests/i915/i915_power.c
@@ -0,0 +1,73 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#include "igt.h"
+#include "i915/gem.h"
+#include "igt_power.h"
+
+IGT_TEST_DESCRIPTION("i915 power measurement tests");
+
+static double power(int i915, const char *domain, bool load)
+{
+ const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
+ uint64_t ahnd = get_reloc_ahnd(i915, ctx->id);
+ struct power_sample sample[2];
+ int sleep_duration_sec = 2;
+ struct igt_power pwr;
+ igt_spin_t *spin;
+ double mW;
+
+ gem_quiescent_gpu(i915);
+ if (load) {
+ spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
+ .engine = ALL_ENGINES,
+ .flags = IGT_SPIN_POLL_RUN);
+ /* Wait till at least one spinner starts */
+ igt_spin_busywait_until_started(spin);
+ }
+
+ igt_require(!igt_power_open(i915, &pwr, domain));
+ igt_power_get_energy(&pwr, &sample[0]);
+ usleep(sleep_duration_sec * USEC_PER_SEC);
+ igt_power_get_energy(&pwr, &sample[1]);
+
+ mW = igt_power_get_mW(&pwr, &sample[0], &sample[1]);
+ igt_info("Domain: %s, Load: %d, Measured power: %g mW\n", domain, load, mW);
+
+ igt_power_close(&pwr);
+ igt_free_spins(i915);
+ put_ahnd(ahnd);
+ intel_ctx_destroy(i915, ctx);
+
+ return mW;
+}
+
+static void sanity(int i915, const char *domain)
+{
+ double idle, busy;
+
+ idle = power(i915, domain, false);
+ busy = power(i915, domain, true);
+
+ igt_assert(busy > 0 && busy >= idle);
+}
+
+igt_main
+{
+ int i915;
+
+ igt_fixture {
+ i915 = drm_open_driver_master(DRIVER_INTEL);
+ }
+
+ igt_describe("Sanity check power measurement");
+ igt_subtest("sanity") {
+ sanity(i915, "gpu");
+ }
+
+ igt_fixture {
+ close(i915);
+ }
+}
diff --git a/tests/meson.build b/tests/meson.build
index e20a864035b..e0f41e9e6a1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -212,6 +212,7 @@ i915_progs = [
'i915_pm_dc',
'i915_pm_rps',
'i915_pm_sseu',
+ 'i915_power',
'i915_query',
'i915_selftest',
'i915_suspend',
--
2.38.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-21 5:41 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
@ 2023-01-24 12:59 ` Tauro, Riana
2023-01-24 17:00 ` Kamil Konieczny
1 sibling, 0 replies; 19+ messages in thread
From: Tauro, Riana @ 2023-01-24 12:59 UTC (permalink / raw)
To: Ashutosh Dixit, igt-dev, Anshuman Gupta; +Cc: Badal Nilawar
Hi Ashutosh,
On 1/21/2023 11:11 AM, Ashutosh Dixit wrote:
> Add a test to sanity check power measurement on integrated/discrete by
> requiring power under load to be > 0 and >= idle power.
>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
> tests/i915/i915_power.c | 73 +++++++++++++++++++++++++++++++++++++++++
> tests/meson.build | 1 +
> 2 files changed, 74 insertions(+)
> create mode 100644 tests/i915/i915_power.c
>
> diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> new file mode 100644
> index 00000000000..e7d5c32f1af
> --- /dev/null
> +++ b/tests/i915/i915_power.c
> @@ -0,0 +1,73 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2022 Intel Corporation
> + */
Year 2023
With the above change
Looks good to me
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> +
> +#include "igt.h"
> +#include "i915/gem.h"
> +#include "igt_power.h"
> +
> +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> +
> +static double power(int i915, const char *domain, bool load)
measure_power instead of power?
> +{
> + const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
> + uint64_t ahnd = get_reloc_ahnd(i915, ctx->id);
> + struct power_sample sample[2];
> + int sleep_duration_sec = 2;
> + struct igt_power pwr;
> + igt_spin_t *spin;
> + double mW;
> +
> + gem_quiescent_gpu(i915);
> + if (load) {
> + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> + .engine = ALL_ENGINES,
> + .flags = IGT_SPIN_POLL_RUN);
> + /* Wait till at least one spinner starts */
> + igt_spin_busywait_until_started(spin);
> + }
> +
> + igt_require(!igt_power_open(i915, &pwr, domain));
> + igt_power_get_energy(&pwr, &sample[0]);
> + usleep(sleep_duration_sec * USEC_PER_SEC);
> + igt_power_get_energy(&pwr, &sample[1]);
> +
> + mW = igt_power_get_mW(&pwr, &sample[0], &sample[1]);
> + igt_info("Domain: %s, Load: %d, Measured power: %g mW\n", domain, load, mW);
> +
> + igt_power_close(&pwr);
> + igt_free_spins(i915);
> + put_ahnd(ahnd);
> + intel_ctx_destroy(i915, ctx);
> +
> + return mW;
> +}
> +
> +static void sanity(int i915, const char *domain)
> +{
> + double idle, busy;
> +
> + idle = power(i915, domain, false);
> + busy = power(i915, domain, true);
> +
> + igt_assert(busy > 0 && busy >= idle);
> +}
> +
> +igt_main
> +{
> + int i915;
> +
> + igt_fixture {
> + i915 = drm_open_driver_master(DRIVER_INTEL);
> + }
> +
> + igt_describe("Sanity check power measurement");
> + igt_subtest("sanity") {
> + sanity(i915, "gpu");
> + }
> +
> + igt_fixture {
> + close(i915);
> + }
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index e20a864035b..e0f41e9e6a1 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -212,6 +212,7 @@ i915_progs = [
> 'i915_pm_dc',
> 'i915_pm_rps',
> 'i915_pm_sseu',
> + 'i915_power',
> 'i915_query',
> 'i915_selftest',
> 'i915_suspend',
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-21 5:41 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
2023-01-24 12:59 ` Tauro, Riana
@ 2023-01-24 17:00 ` Kamil Konieczny
2023-01-24 18:01 ` Dixit, Ashutosh
1 sibling, 1 reply; 19+ messages in thread
From: Kamil Konieczny @ 2023-01-24 17:00 UTC (permalink / raw)
To: igt-dev; +Cc: Badal Nilawar
Hi Ashutosh,
one nit, see below.
On 2023-01-20 at 21:41:52 -0800, Ashutosh Dixit wrote:
> Add a test to sanity check power measurement on integrated/discrete by
> requiring power under load to be > 0 and >= idle power.
>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
> tests/i915/i915_power.c | 73 +++++++++++++++++++++++++++++++++++++++++
> tests/meson.build | 1 +
> 2 files changed, 74 insertions(+)
> create mode 100644 tests/i915/i915_power.c
>
> diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> new file mode 100644
> index 00000000000..e7d5c32f1af
> --- /dev/null
> +++ b/tests/i915/i915_power.c
> @@ -0,0 +1,73 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2022 Intel Corporation
> + */
> +
> +#include "igt.h"
> +#include "i915/gem.h"
> +#include "igt_power.h"
> +
> +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> +
> +static double power(int i915, const char *domain, bool load)
> +{
> + const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
> + uint64_t ahnd = get_reloc_ahnd(i915, ctx->id);
> + struct power_sample sample[2];
> + int sleep_duration_sec = 2;
> + struct igt_power pwr;
> + igt_spin_t *spin;
> + double mW;
> +
> + gem_quiescent_gpu(i915);
> + if (load) {
> + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> + .engine = ALL_ENGINES,
> + .flags = IGT_SPIN_POLL_RUN);
> + /* Wait till at least one spinner starts */
> + igt_spin_busywait_until_started(spin);
> + }
> +
> + igt_require(!igt_power_open(i915, &pwr, domain));
Please move this before igt_spin_new, also rewrite this so
you will free context before, or move context creation to
igt_fixture and give it as param for this function.
Regards,
Kamil
> + igt_power_get_energy(&pwr, &sample[0]);
> + usleep(sleep_duration_sec * USEC_PER_SEC);
> + igt_power_get_energy(&pwr, &sample[1]);
> +
> + mW = igt_power_get_mW(&pwr, &sample[0], &sample[1]);
> + igt_info("Domain: %s, Load: %d, Measured power: %g mW\n", domain, load, mW);
> +
> + igt_power_close(&pwr);
> + igt_free_spins(i915);
> + put_ahnd(ahnd);
> + intel_ctx_destroy(i915, ctx);
> +
> + return mW;
> +}
> +
> +static void sanity(int i915, const char *domain)
> +{
> + double idle, busy;
> +
> + idle = power(i915, domain, false);
> + busy = power(i915, domain, true);
> +
> + igt_assert(busy > 0 && busy >= idle);
> +}
> +
> +igt_main
> +{
> + int i915;
> +
> + igt_fixture {
> + i915 = drm_open_driver_master(DRIVER_INTEL);
> + }
> +
> + igt_describe("Sanity check power measurement");
> + igt_subtest("sanity") {
> + sanity(i915, "gpu");
> + }
> +
> + igt_fixture {
> + close(i915);
> + }
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index e20a864035b..e0f41e9e6a1 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -212,6 +212,7 @@ i915_progs = [
> 'i915_pm_dc',
> 'i915_pm_rps',
> 'i915_pm_sseu',
> + 'i915_power',
> 'i915_query',
> 'i915_selftest',
> 'i915_suspend',
> --
> 2.38.0
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-24 17:00 ` Kamil Konieczny
@ 2023-01-24 18:01 ` Dixit, Ashutosh
2023-01-25 9:40 ` Kamil Konieczny
0 siblings, 1 reply; 19+ messages in thread
From: Dixit, Ashutosh @ 2023-01-24 18:01 UTC (permalink / raw)
To: Kamil Konieczny, igt-dev, Ashutosh Dixit, Badal Nilawar,
Riana Tauro, Anshuman Gupta
On Tue, 24 Jan 2023 09:00:23 -0800, Kamil Konieczny wrote:
>
> Hi Ashutosh,
>
> one nit, see below.
Hi Kamil,
>
> On 2023-01-20 at 21:41:52 -0800, Ashutosh Dixit wrote:
> > Add a test to sanity check power measurement on integrated/discrete by
> > requiring power under load to be > 0 and >= idle power.
> >
> > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > ---
> > tests/i915/i915_power.c | 73 +++++++++++++++++++++++++++++++++++++++++
> > tests/meson.build | 1 +
> > 2 files changed, 74 insertions(+)
> > create mode 100644 tests/i915/i915_power.c
> >
> > diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> > new file mode 100644
> > index 00000000000..e7d5c32f1af
> > --- /dev/null
> > +++ b/tests/i915/i915_power.c
> > @@ -0,0 +1,73 @@
> > +// SPDX-License-Identifier: MIT
> > +/*
> > + * Copyright © 2022 Intel Corporation
> > + */
> > +
> > +#include "igt.h"
> > +#include "i915/gem.h"
> > +#include "igt_power.h"
> > +
> > +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> > +
> > +static double power(int i915, const char *domain, bool load)
> > +{
> > + const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
> > + uint64_t ahnd = get_reloc_ahnd(i915, ctx->id);
> > + struct power_sample sample[2];
> > + int sleep_duration_sec = 2;
> > + struct igt_power pwr;
> > + igt_spin_t *spin;
> > + double mW;
> > +
> > + gem_quiescent_gpu(i915);
> > + if (load) {
> > + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> > + .engine = ALL_ENGINES,
> > + .flags = IGT_SPIN_POLL_RUN);
> > + /* Wait till at least one spinner starts */
> > + igt_spin_busywait_until_started(spin);
> > + }
> > +
> > + igt_require(!igt_power_open(i915, &pwr, domain));
>
> Please move this before igt_spin_new,
Sure, I can move this to the top of the function.
> also rewrite this so you will free context before
Sorry, before what? I don't want to free the context before igt_free_spins
because that requires context persistence which is not fully supported on
GuC based systems.
> or move context creation to igt_fixture and give it as param for this
> function.
Here I consider the context internal to the power measurement so I prefer
to keep it in this function.
But if you explain the reason why you are asking for these changes maybe I
can figure out what to do.
Do you just want to create the context after igt_require?
Thanks.
--
Ashutosh
>
> Regards,
> Kamil
>
> > + igt_power_get_energy(&pwr, &sample[0]);
> > + usleep(sleep_duration_sec * USEC_PER_SEC);
> > + igt_power_get_energy(&pwr, &sample[1]);
> > +
> > + mW = igt_power_get_mW(&pwr, &sample[0], &sample[1]);
> > + igt_info("Domain: %s, Load: %d, Measured power: %g mW\n", domain, load, mW);
> > +
> > + igt_power_close(&pwr);
> > + igt_free_spins(i915);
> > + put_ahnd(ahnd);
> > + intel_ctx_destroy(i915, ctx);
> > +
> > + return mW;
> > +}
> > +
> > +static void sanity(int i915, const char *domain)
> > +{
> > + double idle, busy;
> > +
> > + idle = power(i915, domain, false);
> > + busy = power(i915, domain, true);
> > +
> > + igt_assert(busy > 0 && busy >= idle);
> > +}
> > +
> > +igt_main
> > +{
> > + int i915;
> > +
> > + igt_fixture {
> > + i915 = drm_open_driver_master(DRIVER_INTEL);
> > + }
> > +
> > + igt_describe("Sanity check power measurement");
> > + igt_subtest("sanity") {
> > + sanity(i915, "gpu");
> > + }
> > +
> > + igt_fixture {
> > + close(i915);
> > + }
> > +}
> > diff --git a/tests/meson.build b/tests/meson.build
> > index e20a864035b..e0f41e9e6a1 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -212,6 +212,7 @@ i915_progs = [
> > 'i915_pm_dc',
> > 'i915_pm_rps',
> > 'i915_pm_sseu',
> > + 'i915_power',
> > 'i915_query',
> > 'i915_selftest',
> > 'i915_suspend',
> > --
> > 2.38.0
> >
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-24 18:01 ` Dixit, Ashutosh
@ 2023-01-25 9:40 ` Kamil Konieczny
2023-01-27 6:28 ` Dixit, Ashutosh
0 siblings, 1 reply; 19+ messages in thread
From: Kamil Konieczny @ 2023-01-25 9:40 UTC (permalink / raw)
To: igt-dev; +Cc: Badal Nilawar
Hi,
On 2023-01-24 at 10:01:35 -0800, Dixit, Ashutosh wrote:
> On Tue, 24 Jan 2023 09:00:23 -0800, Kamil Konieczny wrote:
> >
> > Hi Ashutosh,
> >
> > one nit, see below.
>
> Hi Kamil,
>
> >
> > On 2023-01-20 at 21:41:52 -0800, Ashutosh Dixit wrote:
> > > Add a test to sanity check power measurement on integrated/discrete by
> > > requiring power under load to be > 0 and >= idle power.
> > >
> > > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > > ---
> > > tests/i915/i915_power.c | 73 +++++++++++++++++++++++++++++++++++++++++
> > > tests/meson.build | 1 +
> > > 2 files changed, 74 insertions(+)
> > > create mode 100644 tests/i915/i915_power.c
> > >
> > > diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> > > new file mode 100644
> > > index 00000000000..e7d5c32f1af
> > > --- /dev/null
> > > +++ b/tests/i915/i915_power.c
> > > @@ -0,0 +1,73 @@
> > > +// SPDX-License-Identifier: MIT
> > > +/*
> > > + * Copyright © 2022 Intel Corporation
> > > + */
> > > +
> > > +#include "igt.h"
> > > +#include "i915/gem.h"
> > > +#include "igt_power.h"
> > > +
> > > +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> > > +
> > > +static double power(int i915, const char *domain, bool load)
-------------------------------------------------------- ^
Maybe re-organize you test code and put this into sanity() function
along with igt_require, context and spinner creation ?
imho this function should be simple and it should return only
power consumed.
> > > +{
> > > + const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
> > > + uint64_t ahnd = get_reloc_ahnd(i915, ctx->id);
> > > + struct power_sample sample[2];
> > > + int sleep_duration_sec = 2;
-------------------------------- ^
imho make it define or const
> > > + struct igt_power pwr;
> > > + igt_spin_t *spin;
> > > + double mW;
> > > +
> > > + gem_quiescent_gpu(i915);
> > > + if (load) {
> > > + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> > > + .engine = ALL_ENGINES,
> > > + .flags = IGT_SPIN_POLL_RUN);
> > > + /* Wait till at least one spinner starts */
> > > + igt_spin_busywait_until_started(spin);
> > > + }
> > > +
> > > + igt_require(!igt_power_open(i915, &pwr, domain));
> >
> > Please move this before igt_spin_new,
>
> Sure, I can move this to the top of the function.
>
> > also rewrite this so you will free context before
>
> Sorry, before what? I don't want to free the context before igt_free_spins
> because that requires context persistence which is not fully supported on
> GuC based systems.
>
> > or move context creation to igt_fixture and give it as param for this
> > function.
>
> Here I consider the context internal to the power measurement so I prefer
> to keep it in this function.
>
> But if you explain the reason why you are asking for these changes maybe I
> can figure out what to do.
>
> Do you just want to create the context after igt_require?
Yes this is what I mean, context and spinner should be created
after check(s) for skip.
> > > + igt_power_get_energy(&pwr, &sample[0]);
> > > + usleep(sleep_duration_sec * USEC_PER_SEC);
> > > + igt_power_get_energy(&pwr, &sample[1]);
> > > +
> > > + mW = igt_power_get_mW(&pwr, &sample[0], &sample[1]);
> > > + igt_info("Domain: %s, Load: %d, Measured power: %g mW\n", domain, load, mW);
This print will be better placed in sanity() function.
Regards,
Kamil
> > > +
> > > + igt_power_close(&pwr);
> > > + igt_free_spins(i915);
> > > + put_ahnd(ahnd);
> > > + intel_ctx_destroy(i915, ctx);
> > > +
> > > + return mW;
> > > +}
> > > +
> > > +static void sanity(int i915, const char *domain)
> > > +{
> > > + double idle, busy;
> > > +
> > > + idle = power(i915, domain, false);
> > > + busy = power(i915, domain, true);
> > > +
> > > + igt_assert(busy > 0 && busy >= idle);
> > > +}
> > > +
> > > +igt_main
> > > +{
> > > + int i915;
> > > +
> > > + igt_fixture {
> > > + i915 = drm_open_driver_master(DRIVER_INTEL);
> > > + }
> > > +
> > > + igt_describe("Sanity check power measurement");
> > > + igt_subtest("sanity") {
> > > + sanity(i915, "gpu");
> > > + }
> > > +
> > > + igt_fixture {
> > > + close(i915);
> > > + }
> > > +}
> > > diff --git a/tests/meson.build b/tests/meson.build
> > > index e20a864035b..e0f41e9e6a1 100644
> > > --- a/tests/meson.build
> > > +++ b/tests/meson.build
> > > @@ -212,6 +212,7 @@ i915_progs = [
> > > 'i915_pm_dc',
> > > 'i915_pm_rps',
> > > 'i915_pm_sseu',
> > > + 'i915_power',
> > > 'i915_query',
> > > 'i915_selftest',
> > > 'i915_suspend',
> > > --
> > > 2.38.0
> > >
^ permalink raw reply [flat|nested] 19+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] i915/i915_power: Sanity check power measurement
@ 2023-01-27 6:25 Ashutosh Dixit
2023-01-27 6:25 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
` (3 more replies)
0 siblings, 4 replies; 19+ messages in thread
From: Ashutosh Dixit @ 2023-01-27 6:25 UTC (permalink / raw)
To: igt-dev
Ashutosh Dixit (2):
i915/i915_power: Sanity check power measurement
HAX: Add i915_power@sanity to fast-feedback.testlist
tests/i915/i915_power.c | 80 +++++++++++++++++++++++++++
tests/intel-ci/fast-feedback.testlist | 1 +
tests/meson.build | 1 +
3 files changed, 82 insertions(+)
create mode 100644 tests/i915/i915_power.c
--
2.38.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-27 6:25 [igt-dev] [PATCH i-g-t 0/2] i915/i915_power: Sanity check power measurement Ashutosh Dixit
@ 2023-01-27 6:25 ` Ashutosh Dixit
2023-01-27 12:29 ` Kamil Konieczny
2023-01-27 6:25 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Add i915_power@sanity to fast-feedback.testlist Ashutosh Dixit
` (2 subsequent siblings)
3 siblings, 1 reply; 19+ messages in thread
From: Ashutosh Dixit @ 2023-01-27 6:25 UTC (permalink / raw)
To: igt-dev
Add a test to sanity check power measurement on integrated/discrete by
requiring power under load to be > 0 and >= idle power.
v2: Code reorganization (Kamil K)
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
---
tests/i915/i915_power.c | 80 +++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
2 files changed, 81 insertions(+)
create mode 100644 tests/i915/i915_power.c
diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
new file mode 100644
index 00000000000..00993cdc846
--- /dev/null
+++ b/tests/i915/i915_power.c
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include "igt.h"
+#include "i915/gem.h"
+#include "igt_power.h"
+
+IGT_TEST_DESCRIPTION("i915 power measurement tests");
+
+static double get_power(struct igt_power *pwr, const char *domain)
+{
+ const int sleep_duration_sec = 2;
+ struct power_sample sample[2];
+
+ igt_power_get_energy(pwr, &sample[0]);
+ usleep(sleep_duration_sec * USEC_PER_SEC);
+ igt_power_get_energy(pwr, &sample[1]);
+
+ return igt_power_get_mW(pwr, &sample[0], &sample[1]);
+}
+
+static double measure_power(int i915, struct igt_power *pwr,
+ const char *domain, bool load)
+{
+ const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
+ uint64_t ahnd = get_reloc_ahnd(i915, ctx->id);
+ igt_spin_t *spin;
+ double mW;
+
+ gem_quiescent_gpu(i915);
+ if (load) {
+ spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
+ .engine = ALL_ENGINES,
+ .flags = IGT_SPIN_POLL_RUN);
+ /* Wait till at least one spinner starts */
+ igt_spin_busywait_until_started(spin);
+ }
+
+ mW = get_power(pwr, domain);
+ igt_info("Domain: %s, Load: %d, Measured power: %g mW\n", domain, load, mW);
+
+ igt_free_spins(i915);
+ put_ahnd(ahnd);
+ intel_ctx_destroy(i915, ctx);
+
+ return mW;
+}
+
+static void sanity(int i915, const char *domain)
+{
+ struct igt_power pwr;
+ double idle, busy;
+
+ igt_require(!igt_power_open(i915, &pwr, domain));
+ idle = measure_power(i915, &pwr, domain, false);
+ busy = measure_power(i915, &pwr, domain, true);
+ igt_power_close(&pwr);
+
+ igt_assert(idle >= 0 && busy > 0 && busy >= idle);
+}
+
+igt_main
+{
+ int i915;
+
+ igt_fixture {
+ i915 = drm_open_driver_master(DRIVER_INTEL);
+ }
+
+ igt_describe("Sanity check power measurement");
+ igt_subtest("sanity") {
+ sanity(i915, "gpu");
+ }
+
+ igt_fixture {
+ close(i915);
+ }
+}
diff --git a/tests/meson.build b/tests/meson.build
index cce9d89e1c8..d93a07c9ed6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -213,6 +213,7 @@ i915_progs = [
'i915_pm_dc',
'i915_pm_rps',
'i915_pm_sseu',
+ 'i915_power',
'i915_query',
'i915_selftest',
'i915_suspend',
--
2.38.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] HAX: Add i915_power@sanity to fast-feedback.testlist
2023-01-27 6:25 [igt-dev] [PATCH i-g-t 0/2] i915/i915_power: Sanity check power measurement Ashutosh Dixit
2023-01-27 6:25 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
@ 2023-01-27 6:25 ` Ashutosh Dixit
2023-01-27 7:05 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/i915_power: Sanity check power measurement Patchwork
2023-01-27 8:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 19+ messages in thread
From: Ashutosh Dixit @ 2023-01-27 6:25 UTC (permalink / raw)
To: igt-dev
CI.
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
tests/intel-ci/fast-feedback.testlist | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index 4188e97375d..a266c316db9 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -128,6 +128,7 @@ igt@i915_pm_backlight@basic-brightness
igt@i915_pm_rpm@basic-pci-d3-state
igt@i915_pm_rpm@basic-rte
igt@i915_pm_rps@basic-api
+igt@i915_power@sanity
igt@prime_self_import@basic-llseek-bad
igt@prime_self_import@basic-llseek-size
igt@prime_self_import@basic-with_fd_dup
--
2.38.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-25 9:40 ` Kamil Konieczny
@ 2023-01-27 6:28 ` Dixit, Ashutosh
0 siblings, 0 replies; 19+ messages in thread
From: Dixit, Ashutosh @ 2023-01-27 6:28 UTC (permalink / raw)
To: Kamil Konieczny, igt-dev, Riana Tauro
On Wed, 25 Jan 2023 01:40:18 -0800, Kamil Konieczny wrote:
>
> Hi,
>
Hi Kamil,
Not exactly what you said but pretty close. Please take a look at the
latest version:
https://patchwork.freedesktop.org/series/113412/
Thanks.
--
Ashutosh
> On 2023-01-24 at 10:01:35 -0800, Dixit, Ashutosh wrote:
> > On Tue, 24 Jan 2023 09:00:23 -0800, Kamil Konieczny wrote:
> > >
> > > Hi Ashutosh,
> > >
> > > one nit, see below.
> >
> > Hi Kamil,
> >
> > >
> > > On 2023-01-20 at 21:41:52 -0800, Ashutosh Dixit wrote:
> > > > Add a test to sanity check power measurement on integrated/discrete by
> > > > requiring power under load to be > 0 and >= idle power.
> > > >
> > > > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > > > ---
> > > > tests/i915/i915_power.c | 73 +++++++++++++++++++++++++++++++++++++++++
> > > > tests/meson.build | 1 +
> > > > 2 files changed, 74 insertions(+)
> > > > create mode 100644 tests/i915/i915_power.c
> > > >
> > > > diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> > > > new file mode 100644
> > > > index 00000000000..e7d5c32f1af
> > > > --- /dev/null
> > > > +++ b/tests/i915/i915_power.c
> > > > @@ -0,0 +1,73 @@
> > > > +// SPDX-License-Identifier: MIT
> > > > +/*
> > > > + * Copyright © 2022 Intel Corporation
> > > > + */
> > > > +
> > > > +#include "igt.h"
> > > > +#include "i915/gem.h"
> > > > +#include "igt_power.h"
> > > > +
> > > > +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> > > > +
> > > > +static double power(int i915, const char *domain, bool load)
> -------------------------------------------------------- ^
> Maybe re-organize you test code and put this into sanity() function
> along with igt_require, context and spinner creation ?
>
> imho this function should be simple and it should return only
> power consumed.
>
> > > > +{
> > > > + const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
> > > > + uint64_t ahnd = get_reloc_ahnd(i915, ctx->id);
> > > > + struct power_sample sample[2];
> > > > + int sleep_duration_sec = 2;
> -------------------------------- ^
> imho make it define or const
>
> > > > + struct igt_power pwr;
> > > > + igt_spin_t *spin;
> > > > + double mW;
> > > > +
> > > > + gem_quiescent_gpu(i915);
> > > > + if (load) {
> > > > + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> > > > + .engine = ALL_ENGINES,
> > > > + .flags = IGT_SPIN_POLL_RUN);
> > > > + /* Wait till at least one spinner starts */
> > > > + igt_spin_busywait_until_started(spin);
> > > > + }
> > > > +
> > > > + igt_require(!igt_power_open(i915, &pwr, domain));
> > >
> > > Please move this before igt_spin_new,
> >
> > Sure, I can move this to the top of the function.
> >
> > > also rewrite this so you will free context before
> >
> > Sorry, before what? I don't want to free the context before igt_free_spins
> > because that requires context persistence which is not fully supported on
> > GuC based systems.
> >
> > > or move context creation to igt_fixture and give it as param for this
> > > function.
> >
> > Here I consider the context internal to the power measurement so I prefer
> > to keep it in this function.
> >
> > But if you explain the reason why you are asking for these changes maybe I
> > can figure out what to do.
> >
> > Do you just want to create the context after igt_require?
>
> Yes this is what I mean, context and spinner should be created
> after check(s) for skip.
>
> > > > + igt_power_get_energy(&pwr, &sample[0]);
> > > > + usleep(sleep_duration_sec * USEC_PER_SEC);
> > > > + igt_power_get_energy(&pwr, &sample[1]);
> > > > +
> > > > + mW = igt_power_get_mW(&pwr, &sample[0], &sample[1]);
> > > > + igt_info("Domain: %s, Load: %d, Measured power: %g mW\n", domain, load, mW);
>
> This print will be better placed in sanity() function.
>
> Regards,
> Kamil
>
> > > > +
> > > > + igt_power_close(&pwr);
> > > > + igt_free_spins(i915);
> > > > + put_ahnd(ahnd);
> > > > + intel_ctx_destroy(i915, ctx);
> > > > +
> > > > + return mW;
> > > > +}
> > > > +
> > > > +static void sanity(int i915, const char *domain)
> > > > +{
> > > > + double idle, busy;
> > > > +
> > > > + idle = power(i915, domain, false);
> > > > + busy = power(i915, domain, true);
> > > > +
> > > > + igt_assert(busy > 0 && busy >= idle);
> > > > +}
> > > > +
> > > > +igt_main
> > > > +{
> > > > + int i915;
> > > > +
> > > > + igt_fixture {
> > > > + i915 = drm_open_driver_master(DRIVER_INTEL);
> > > > + }
> > > > +
> > > > + igt_describe("Sanity check power measurement");
> > > > + igt_subtest("sanity") {
> > > > + sanity(i915, "gpu");
> > > > + }
> > > > +
> > > > + igt_fixture {
> > > > + close(i915);
> > > > + }
> > > > +}
> > > > diff --git a/tests/meson.build b/tests/meson.build
> > > > index e20a864035b..e0f41e9e6a1 100644
> > > > --- a/tests/meson.build
> > > > +++ b/tests/meson.build
> > > > @@ -212,6 +212,7 @@ i915_progs = [
> > > > 'i915_pm_dc',
> > > > 'i915_pm_rps',
> > > > 'i915_pm_sseu',
> > > > + 'i915_power',
> > > > 'i915_query',
> > > > 'i915_selftest',
> > > > 'i915_suspend',
> > > > --
> > > > 2.38.0
> > > >
^ permalink raw reply [flat|nested] 19+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for i915/i915_power: Sanity check power measurement
2023-01-27 6:25 [igt-dev] [PATCH i-g-t 0/2] i915/i915_power: Sanity check power measurement Ashutosh Dixit
2023-01-27 6:25 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
2023-01-27 6:25 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Add i915_power@sanity to fast-feedback.testlist Ashutosh Dixit
@ 2023-01-27 7:05 ` Patchwork
2023-01-27 8:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2023-01-27 7:05 UTC (permalink / raw)
To: Dixit, Ashutosh; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 5787 bytes --]
== Series Details ==
Series: i915/i915_power: Sanity check power measurement
URL : https://patchwork.freedesktop.org/series/113412/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12651 -> IGTPW_8408
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/index.html
Participating hosts (25 -> 24)
------------------------------
Additional (1): bat-atsm-1
Missing (2): fi-kbl-soraka fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8408:
### IGT changes ###
#### Possible regressions ####
* {igt@i915_power@sanity} (NEW):
- {bat-jsl-3}: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/bat-jsl-3/igt@i915_power@sanity.html
- {bat-jsl-1}: NOTRUN -> [SKIP][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/bat-jsl-1/igt@i915_power@sanity.html
New tests
---------
New tests have been introduced between CI_DRM_12651 and IGTPW_8408:
### New IGT tests (1) ###
* igt@i915_power@sanity:
- Statuses : 19 pass(s) 5 skip(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in IGTPW_8408 that come from known issues:
### IGT changes ###
#### Issues hit ####
* {igt@i915_power@sanity} (NEW):
- fi-blb-e6850: NOTRUN -> [SKIP][3] ([fdo#109271])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/fi-blb-e6850/igt@i915_power@sanity.html
- fi-bsw-n3050: NOTRUN -> [SKIP][4] ([fdo#109271])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/fi-bsw-n3050/igt@i915_power@sanity.html
- fi-bsw-nick: NOTRUN -> [SKIP][5] ([fdo#109271])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/fi-bsw-nick/igt@i915_power@sanity.html
* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [PASS][6] -> [DMESG-FAIL][7] ([i915#5334])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
#### Possible fixes ####
* igt@i915_selftest@live@migrate:
- {bat-dg2-11}: [DMESG-WARN][8] ([i915#7699]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/bat-dg2-11/igt@i915_selftest@live@migrate.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/bat-dg2-11/igt@i915_selftest@live@migrate.html
* igt@i915_selftest@live@requests:
- {bat-rpls-1}: [INCOMPLETE][10] ([i915#4983] / [i915#6257]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/bat-rpls-1/igt@i915_selftest@live@requests.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/bat-rpls-1/igt@i915_selftest@live@requests.html
* igt@i915_selftest@live@workarounds:
- {bat-adlp-9}: [INCOMPLETE][12] ([i915#4983] / [i915#7677]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/bat-adlp-9/igt@i915_selftest@live@workarounds.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/bat-adlp-9/igt@i915_selftest@live@workarounds.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1836]: https://gitlab.freedesktop.org/drm/intel/issues/1836
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6077]: https://gitlab.freedesktop.org/drm/intel/issues/6077
[i915#6078]: https://gitlab.freedesktop.org/drm/intel/issues/6078
[i915#6093]: https://gitlab.freedesktop.org/drm/intel/issues/6093
[i915#6094]: https://gitlab.freedesktop.org/drm/intel/issues/6094
[i915#6166]: https://gitlab.freedesktop.org/drm/intel/issues/6166
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6311]: https://gitlab.freedesktop.org/drm/intel/issues/6311
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#7357]: https://gitlab.freedesktop.org/drm/intel/issues/7357
[i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
[i915#7625]: https://gitlab.freedesktop.org/drm/intel/issues/7625
[i915#7677]: https://gitlab.freedesktop.org/drm/intel/issues/7677
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7137 -> IGTPW_8408
CI-20190529: 20190529
CI_DRM_12651: fce901b03b34c10947c3dd53b338032f6d22812f @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8408: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/index.html
IGT_7137: 5f7ea985ac0828bec5e1bbc101b7931bd7fb62e3 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@i915_power@sanity
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/index.html
[-- Attachment #2: Type: text/html, Size: 5461 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for i915/i915_power: Sanity check power measurement
2023-01-27 6:25 [igt-dev] [PATCH i-g-t 0/2] i915/i915_power: Sanity check power measurement Ashutosh Dixit
` (2 preceding siblings ...)
2023-01-27 7:05 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/i915_power: Sanity check power measurement Patchwork
@ 2023-01-27 8:13 ` Patchwork
3 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2023-01-27 8:13 UTC (permalink / raw)
To: Dixit, Ashutosh; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 22387 bytes --]
== Series Details ==
Series: i915/i915_power: Sanity check power measurement
URL : https://patchwork.freedesktop.org/series/113412/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12651_full -> IGTPW_8408_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/index.html
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8408_full:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@gem_exec_whisper@basic-fds-priority-all:
- {shard-tglu-10}: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-tglu-10/igt@gem_exec_whisper@basic-fds-priority-all.html
New tests
---------
New tests have been introduced between CI_DRM_12651_full and IGTPW_8408_full:
### New IGT tests (1) ###
* igt@i915_power@sanity:
- Statuses : 3 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in IGTPW_8408_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_fair@basic-deadline:
- shard-glk: [PASS][2] -> [FAIL][3] ([i915#2846])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-glk7/igt@gem_exec_fair@basic-deadline.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-glk4/igt@gem_exec_fair@basic-deadline.html
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [PASS][4] -> [FAIL][5] ([i915#2842]) +3 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-glk4/igt@gem_exec_fair@basic-pace-share@rcs0.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-glk7/igt@gem_exec_fair@basic-pace-share@rcs0.html
* igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
- shard-glk: [PASS][6] -> [FAIL][7] ([i915#72])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-glk5/igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-glk3/igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy.html
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bc-hdmi-a1-hdmi-a2:
- shard-glk: [PASS][8] -> [FAIL][9] ([i915#79]) +1 similar issue
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bc-hdmi-a1-hdmi-a2.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-glk1/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bc-hdmi-a1-hdmi-a2.html
* igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-32bpp-xtile-upscaling@pipe-a-valid-mode:
- shard-glk: NOTRUN -> [SKIP][10] ([fdo#109271]) +5 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-glk6/igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-32bpp-xtile-upscaling@pipe-a-valid-mode.html
#### Possible fixes ####
* igt@fbdev@unaligned-write:
- {shard-rkl}: [SKIP][11] ([i915#2582]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-1/igt@fbdev@unaligned-write.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-6/igt@fbdev@unaligned-write.html
* igt@gem_exec_fair@basic-none-rrul@rcs0:
- {shard-rkl}: [FAIL][13] ([i915#2842]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-4/igt@gem_exec_fair@basic-none-rrul@rcs0.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-5/igt@gem_exec_fair@basic-none-rrul@rcs0.html
* igt@gem_exec_reloc@basic-wc-read-noreloc:
- {shard-rkl}: [SKIP][15] ([i915#3281]) -> [PASS][16] +3 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-1/igt@gem_exec_reloc@basic-wc-read-noreloc.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-5/igt@gem_exec_reloc@basic-wc-read-noreloc.html
* igt@gem_mmap_gtt@coherency:
- {shard-rkl}: [SKIP][17] ([fdo#111656]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-4/igt@gem_mmap_gtt@coherency.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-5/igt@gem_mmap_gtt@coherency.html
* igt@gen9_exec_parse@batch-invalid-length:
- {shard-rkl}: [SKIP][19] ([i915#2527]) -> [PASS][20] +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-4/igt@gen9_exec_parse@batch-invalid-length.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-5/igt@gen9_exec_parse@batch-invalid-length.html
* igt@i915_hangman@gt-engine-error@bcs0:
- {shard-rkl}: [SKIP][21] ([i915#6258]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-5/igt@i915_hangman@gt-engine-error@bcs0.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-2/igt@i915_hangman@gt-engine-error@bcs0.html
* igt@i915_pm_dc@dc6-dpms:
- {shard-rkl}: [SKIP][23] ([i915#3361]) -> [PASS][24] +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-5/igt@i915_pm_dc@dc6-dpms.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-1/igt@i915_pm_dc@dc6-dpms.html
* igt@i915_pm_dc@dc6-psr:
- {shard-rkl}: [SKIP][25] ([i915#658]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-3/igt@i915_pm_dc@dc6-psr.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-6/igt@i915_pm_dc@dc6-psr.html
* igt@i915_pm_rpm@modeset-lpsp-stress:
- {shard-rkl}: [SKIP][27] ([i915#1397]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-1/igt@i915_pm_rpm@modeset-lpsp-stress.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-6/igt@i915_pm_rpm@modeset-lpsp-stress.html
* igt@i915_pm_rpm@modeset-non-lpsp:
- {shard-dg1}: [SKIP][29] ([i915#1397]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-dg1-14/igt@i915_pm_rpm@modeset-non-lpsp.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-dg1-18/igt@i915_pm_rpm@modeset-non-lpsp.html
* igt@kms_async_flips@alternate-sync-async-flip@pipe-b-hdmi-a-1:
- shard-glk: [FAIL][31] ([i915#2521]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-glk7/igt@kms_async_flips@alternate-sync-async-flip@pipe-b-hdmi-a-1.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-glk7/igt@kms_async_flips@alternate-sync-async-flip@pipe-b-hdmi-a-1.html
* igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs:
- {shard-rkl}: [SKIP][33] ([i915#1845] / [i915#4098]) -> [PASS][34] +22 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-5/igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-6/igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render:
- {shard-tglu}: [SKIP][35] ([i915#1849]) -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-tglu-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-tglu-8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html
* igt@kms_frontbuffer_tracking@fbc-tiling-linear:
- {shard-rkl}: [SKIP][37] ([i915#1849] / [i915#4098]) -> [PASS][38] +13 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-4/igt@kms_frontbuffer_tracking@fbc-tiling-linear.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-6/igt@kms_frontbuffer_tracking@fbc-tiling-linear.html
* igt@kms_properties@crtc-properties-atomic:
- {shard-rkl}: [SKIP][39] ([i915#1849]) -> [PASS][40] +1 similar issue
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-3/igt@kms_properties@crtc-properties-atomic.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-6/igt@kms_properties@crtc-properties-atomic.html
* igt@kms_psr@sprite_mmap_gtt:
- {shard-rkl}: [SKIP][41] ([i915#1072]) -> [PASS][42] +2 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-5/igt@kms_psr@sprite_mmap_gtt.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-6/igt@kms_psr@sprite_mmap_gtt.html
* igt@kms_psr_stress_test@flip-primary-invalidate-overlay:
- {shard-rkl}: [SKIP][43] ([i915#5461]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-1/igt@kms_psr_stress_test@flip-primary-invalidate-overlay.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-6/igt@kms_psr_stress_test@flip-primary-invalidate-overlay.html
* igt@kms_universal_plane@universal-plane-pipe-c-sanity:
- {shard-tglu}: [SKIP][45] ([fdo#109274]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-tglu-6/igt@kms_universal_plane@universal-plane-pipe-c-sanity.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-tglu-2/igt@kms_universal_plane@universal-plane-pipe-c-sanity.html
* igt@kms_vblank@pipe-a-query-forked-busy:
- {shard-tglu}: [SKIP][47] ([i915#7651]) -> [PASS][48] +6 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-tglu-6/igt@kms_vblank@pipe-a-query-forked-busy.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-tglu-2/igt@kms_vblank@pipe-a-query-forked-busy.html
* igt@perf@gen12-unprivileged-single-ctx-counters:
- {shard-rkl}: [SKIP][49] ([fdo#109289]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-5/igt@perf@gen12-unprivileged-single-ctx-counters.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-1/igt@perf@gen12-unprivileged-single-ctx-counters.html
* igt@perf_pmu@idle@rcs0:
- {shard-rkl}: [FAIL][51] ([i915#4349]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-4/igt@perf_pmu@idle@rcs0.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-5/igt@perf_pmu@idle@rcs0.html
* igt@prime_vgem@basic-write:
- {shard-rkl}: [SKIP][53] ([fdo#109295] / [i915#3291] / [i915#3708]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12651/shard-rkl-2/igt@prime_vgem@basic-write.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/shard-rkl-5/igt@prime_vgem@basic-write.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1257]: https://gitlab.freedesktop.org/drm/intel/issues/1257
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1769]: https://gitlab.freedesktop.org/drm/intel/issues/1769
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3547]: https://gitlab.freedesktop.org/drm/intel/issues/3547
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3810]: https://gitlab.freedesktop.org/drm/intel/issues/3810
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[i915#4884]: https://gitlab.freedesktop.org/drm/intel/issues/4884
[i915#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
[i915#4958]: https://gitlab.freedesktop.org/drm/intel/issues/4958
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
[i915#6258]: https://gitlab.freedesktop.org/drm/intel/issues/6258
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6355]: https://gitlab.freedesktop.org/drm/intel/issues/6355
[i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6463]: https://gitlab.freedesktop.org/drm/intel/issues/6463
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
[i915#7178]: https://gitlab.freedesktop.org/drm/intel/issues/7178
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7137 -> IGTPW_8408
CI-20190529: 20190529
CI_DRM_12651: fce901b03b34c10947c3dd53b338032f6d22812f @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8408: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/index.html
IGT_7137: 5f7ea985ac0828bec5e1bbc101b7931bd7fb62e3 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8408/index.html
[-- Attachment #2: Type: text/html, Size: 15219 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-27 6:25 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
@ 2023-01-27 12:29 ` Kamil Konieczny
2023-01-27 16:13 ` Dixit, Ashutosh
0 siblings, 1 reply; 19+ messages in thread
From: Kamil Konieczny @ 2023-01-27 12:29 UTC (permalink / raw)
To: igt-dev
Hi Ashutosh,
On 2023-01-26 at 22:25:01 -0800, Ashutosh Dixit wrote:
> Add a test to sanity check power measurement on integrated/discrete by
> requiring power under load to be > 0 and >= idle power.
>
> v2: Code reorganization (Kamil K)
>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> ---
> tests/i915/i915_power.c | 80 +++++++++++++++++++++++++++++++++++++++++
> tests/meson.build | 1 +
> 2 files changed, 81 insertions(+)
> create mode 100644 tests/i915/i915_power.c
>
> diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> new file mode 100644
> index 00000000000..00993cdc846
> --- /dev/null
> +++ b/tests/i915/i915_power.c
> @@ -0,0 +1,80 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2023 Intel Corporation
> + */
> +
> +#include "igt.h"
> +#include "i915/gem.h"
> +#include "igt_power.h"
> +
> +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> +
> +static double get_power(struct igt_power *pwr, const char *domain)
------------------------------------------------------------- ^
You are not using this so delete it.
> +{
> + const int sleep_duration_sec = 2;
----------------- ^
Make this a parameter for function.
> + struct power_sample sample[2];
> +
> + igt_power_get_energy(pwr, &sample[0]);
> + usleep(sleep_duration_sec * USEC_PER_SEC);
> + igt_power_get_energy(pwr, &sample[1]);
> +
> + return igt_power_get_mW(pwr, &sample[0], &sample[1]);
> +}
> +
> +static double measure_power(int i915, struct igt_power *pwr,
> + const char *domain, bool load)
----------------------------------------------- ^
This is confusing, delete this. Please avoid creating functions
with boolean parameter, just do its work in place you will use
true or false.
> +{
> + const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
> + uint64_t ahnd = get_reloc_ahnd(i915, ctx->id);
> + igt_spin_t *spin;
> + double mW;
> +
> + gem_quiescent_gpu(i915);
> + if (load) {
------- ^
Delete this if() and move spin creation after idle see below.
> + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> + .engine = ALL_ENGINES,
> + .flags = IGT_SPIN_POLL_RUN);
> + /* Wait till at least one spinner starts */
> + igt_spin_busywait_until_started(spin);
> + }
> +
> + mW = get_power(pwr, domain);
> + igt_info("Domain: %s, Load: %d, Measured power: %g mW\n", domain, load, mW);
> +
> + igt_free_spins(i915);
> + put_ahnd(ahnd);
> + intel_ctx_destroy(i915, ctx);
> +
> + return mW;
> +}
> +
> +static void sanity(int i915, const char *domain)
> +{
> + struct igt_power pwr;
> + double idle, busy;
> +
> + igt_require(!igt_power_open(i915, &pwr, domain));
> + idle = measure_power(i915, &pwr, domain, false);
> + busy = measure_power(i915, &pwr, domain, true);
> + igt_power_close(&pwr);
> +
> + igt_assert(idle >= 0 && busy > 0 && busy >= idle);
------------------------------------------------ ^
imho this should be "busy > idle" ?
Merge sanity() with measure_power() so it will be simple.
This should look like:
// check require
// prepare ctx and other
idle = get_power(pwr, 2 * USEC_PER_SEC); /* 2 seconds */
// create spin and wait until it will run
busy = get_power(pwr, 2 * USEC_PER_SEC); /* 2 seconds */
// cleanup after spin, ctx, and other
// print info what was measured, domain, power and time used
// assert
> +}
> +
> +igt_main
> +{
> + int i915;
> +
> + igt_fixture {
> + i915 = drm_open_driver_master(DRIVER_INTEL);
> + }
> +
> + igt_describe("Sanity check power measurement");
> + igt_subtest("sanity") {
> + sanity(i915, "gpu");
----------------------------- ^
Do you plan other domains, maybe multi-gpu like gpu-#number ?
Regards,
Kamil
> + }
> +
> + igt_fixture {
> + close(i915);
> + }
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index cce9d89e1c8..d93a07c9ed6 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -213,6 +213,7 @@ i915_progs = [
> 'i915_pm_dc',
> 'i915_pm_rps',
> 'i915_pm_sseu',
> + 'i915_power',
> 'i915_query',
> 'i915_selftest',
> 'i915_suspend',
> --
> 2.38.0
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-27 16:08 [igt-dev] [PATCH i-g-t 0/2] " Ashutosh Dixit
@ 2023-01-27 16:08 ` Ashutosh Dixit
2023-01-27 16:46 ` Kamil Konieczny
0 siblings, 1 reply; 19+ messages in thread
From: Ashutosh Dixit @ 2023-01-27 16:08 UTC (permalink / raw)
To: igt-dev
Add a test to sanity check power measurement on integrated/discrete by
requiring power under load to be > 0 and >= idle power.
v2: Code reorganization (Kamil K)
v3: More code reorganization (Kamil K)
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
---
tests/i915/i915_power.c | 70 +++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
2 files changed, 71 insertions(+)
create mode 100644 tests/i915/i915_power.c
diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
new file mode 100644
index 00000000000..533cf769b54
--- /dev/null
+++ b/tests/i915/i915_power.c
@@ -0,0 +1,70 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include "igt.h"
+#include "i915/gem.h"
+#include "igt_power.h"
+
+IGT_TEST_DESCRIPTION("i915 power measurement tests");
+
+static double measure_power(struct igt_power *pwr, int sleep_duration_sec)
+{
+ struct power_sample sample[2];
+
+ igt_power_get_energy(pwr, &sample[0]);
+ usleep(sleep_duration_sec * USEC_PER_SEC);
+ igt_power_get_energy(pwr, &sample[1]);
+
+ return igt_power_get_mW(pwr, &sample[0], &sample[1]);
+}
+
+static void sanity(int i915)
+{
+ const intel_ctx_t *ctx;
+ struct igt_power pwr;
+ double idle, busy;
+ igt_spin_t *spin;
+ uint64_t ahnd;
+
+ /* Idle power */
+ igt_require(!igt_power_open(i915, &pwr, "gpu"));
+ gem_quiescent_gpu(i915);
+ idle = measure_power(&pwr, 2);
+
+ /* Busy power */
+ ctx = intel_ctx_create_all_physical(i915);
+ ahnd = get_reloc_ahnd(i915, ctx->id);
+ spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
+ .engine = ALL_ENGINES,
+ .flags = IGT_SPIN_POLL_RUN);
+ /* Wait till at least one spinner starts */
+ igt_spin_busywait_until_started(spin);
+ busy = measure_power(&pwr, 2);
+ igt_free_spins(i915);
+ put_ahnd(ahnd);
+ intel_ctx_destroy(i915, ctx);
+ igt_power_close(&pwr);
+
+ igt_info("Measured power: idle: %g mW, busy: %g mW\n", idle, busy);
+ igt_assert(idle >= 0 && busy > 0 && busy > idle);
+}
+
+igt_main
+{
+ int i915;
+
+ igt_fixture {
+ i915 = drm_open_driver_master(DRIVER_INTEL);
+ }
+
+ igt_describe("Sanity check gpu power measurement");
+ igt_subtest("sanity") {
+ sanity(i915);
+ }
+
+ igt_fixture {
+ close(i915);
+ }
+}
diff --git a/tests/meson.build b/tests/meson.build
index cce9d89e1c8..d93a07c9ed6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -213,6 +213,7 @@ i915_progs = [
'i915_pm_dc',
'i915_pm_rps',
'i915_pm_sseu',
+ 'i915_power',
'i915_query',
'i915_selftest',
'i915_suspend',
--
2.38.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-27 12:29 ` Kamil Konieczny
@ 2023-01-27 16:13 ` Dixit, Ashutosh
0 siblings, 0 replies; 19+ messages in thread
From: Dixit, Ashutosh @ 2023-01-27 16:13 UTC (permalink / raw)
To: Kamil Konieczny, igt-dev, Ashutosh Dixit, Riana Tauro
On Fri, 27 Jan 2023 04:29:45 -0800, Kamil Konieczny wrote:
>
> Hi Ashutosh,
Hi Kamil,
I have addressed all comments. Please take a look at the latest
version:
https://patchwork.freedesktop.org/series/113436/
(not sure why Patchwork is creating new series each time).
Thanks.
--
Ashutosh
>
> On 2023-01-26 at 22:25:01 -0800, Ashutosh Dixit wrote:
> > Add a test to sanity check power measurement on integrated/discrete by
> > requiring power under load to be > 0 and >= idle power.
> >
> > v2: Code reorganization (Kamil K)
> >
> > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> > ---
> > tests/i915/i915_power.c | 80 +++++++++++++++++++++++++++++++++++++++++
> > tests/meson.build | 1 +
> > 2 files changed, 81 insertions(+)
> > create mode 100644 tests/i915/i915_power.c
> >
> > diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> > new file mode 100644
> > index 00000000000..00993cdc846
> > --- /dev/null
> > +++ b/tests/i915/i915_power.c
> > @@ -0,0 +1,80 @@
> > +// SPDX-License-Identifier: MIT
> > +/*
> > + * Copyright © 2023 Intel Corporation
> > + */
> > +
> > +#include "igt.h"
> > +#include "i915/gem.h"
> > +#include "igt_power.h"
> > +
> > +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> > +
> > +static double get_power(struct igt_power *pwr, const char *domain)
> ------------------------------------------------------------- ^
> You are not using this so delete it.
Done.
>
> > +{
> > + const int sleep_duration_sec = 2;
> ----------------- ^
> Make this a parameter for function.
Done.
>
> > + struct power_sample sample[2];
> > +
> > + igt_power_get_energy(pwr, &sample[0]);
> > + usleep(sleep_duration_sec * USEC_PER_SEC);
> > + igt_power_get_energy(pwr, &sample[1]);
> > +
> > + return igt_power_get_mW(pwr, &sample[0], &sample[1]);
> > +}
> > +
> > +static double measure_power(int i915, struct igt_power *pwr,
> > + const char *domain, bool load)
> ----------------------------------------------- ^
> This is confusing, delete this. Please avoid creating functions
> with boolean parameter, just do its work in place you will use
> true or false.
Done.
>
> > +{
> > + const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
> > + uint64_t ahnd = get_reloc_ahnd(i915, ctx->id);
> > + igt_spin_t *spin;
> > + double mW;
> > +
> > + gem_quiescent_gpu(i915);
> > + if (load) {
> ------- ^
> Delete this if() and move spin creation after idle see below.
Done.
>
> > + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> > + .engine = ALL_ENGINES,
> > + .flags = IGT_SPIN_POLL_RUN);
> > + /* Wait till at least one spinner starts */
> > + igt_spin_busywait_until_started(spin);
> > + }
> > +
> > + mW = get_power(pwr, domain);
> > + igt_info("Domain: %s, Load: %d, Measured power: %g mW\n", domain, load, mW);
> > +
> > + igt_free_spins(i915);
> > + put_ahnd(ahnd);
> > + intel_ctx_destroy(i915, ctx);
> > +
> > + return mW;
> > +}
> > +
> > +static void sanity(int i915, const char *domain)
> > +{
> > + struct igt_power pwr;
> > + double idle, busy;
> > +
> > + igt_require(!igt_power_open(i915, &pwr, domain));
> > + idle = measure_power(i915, &pwr, domain, false);
> > + busy = measure_power(i915, &pwr, domain, true);
> > + igt_power_close(&pwr);
> > +
> > + igt_assert(idle >= 0 && busy > 0 && busy >= idle);
> ------------------------------------------------ ^
> imho this should be "busy > idle" ?
Done.
>
> Merge sanity() with measure_power() so it will be simple.
> This should look like:
> // check require
> // prepare ctx and other
> idle = get_power(pwr, 2 * USEC_PER_SEC); /* 2 seconds */
> // create spin and wait until it will run
> busy = get_power(pwr, 2 * USEC_PER_SEC); /* 2 seconds */
> // cleanup after spin, ctx, and other
> // print info what was measured, domain, power and time used
> // assert
Done.
>
> > +}
> > +
> > +igt_main
> > +{
> > + int i915;
> > +
> > + igt_fixture {
> > + i915 = drm_open_driver_master(DRIVER_INTEL);
> > + }
> > +
> > + igt_describe("Sanity check power measurement");
> > + igt_subtest("sanity") {
> > + sanity(i915, "gpu");
> ----------------------------- ^
> Do you plan other domains, maybe multi-gpu like gpu-#number ?
Future patch.
>
> Regards,
> Kamil
>
> > + }
> > +
> > + igt_fixture {
> > + close(i915);
> > + }
> > +}
> > diff --git a/tests/meson.build b/tests/meson.build
> > index cce9d89e1c8..d93a07c9ed6 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -213,6 +213,7 @@ i915_progs = [
> > 'i915_pm_dc',
> > 'i915_pm_rps',
> > 'i915_pm_sseu',
> > + 'i915_power',
> > 'i915_query',
> > 'i915_selftest',
> > 'i915_suspend',
> > --
> > 2.38.0
> >
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-27 16:08 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
@ 2023-01-27 16:46 ` Kamil Konieczny
2023-01-27 16:55 ` Dixit, Ashutosh
0 siblings, 1 reply; 19+ messages in thread
From: Kamil Konieczny @ 2023-01-27 16:46 UTC (permalink / raw)
To: igt-dev
Hi Ashutosh,
looks much better, few small nits left, see below.
On 2023-01-27 at 08:08:12 -0800, Ashutosh Dixit wrote:
> Add a test to sanity check power measurement on integrated/discrete by
> requiring power under load to be > 0 and >= idle power.
>
> v2: Code reorganization (Kamil K)
> v3: More code reorganization (Kamil K)
>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> ---
> tests/i915/i915_power.c | 70 +++++++++++++++++++++++++++++++++++++++++
> tests/meson.build | 1 +
> 2 files changed, 71 insertions(+)
> create mode 100644 tests/i915/i915_power.c
>
> diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> new file mode 100644
> index 00000000000..533cf769b54
> --- /dev/null
> +++ b/tests/i915/i915_power.c
> @@ -0,0 +1,70 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2023 Intel Corporation
> + */
> +
> +#include "igt.h"
> +#include "i915/gem.h"
> +#include "igt_power.h"
> +
> +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> +
> +static double measure_power(struct igt_power *pwr, int sleep_duration_sec)
----------------------------------------------------- ^
unsigned int
> +{
> + struct power_sample sample[2];
> +
> + igt_power_get_energy(pwr, &sample[0]);
> + usleep(sleep_duration_sec * USEC_PER_SEC);
> + igt_power_get_energy(pwr, &sample[1]);
> +
> + return igt_power_get_mW(pwr, &sample[0], &sample[1]);
> +}
> +
> +static void sanity(int i915)
> +{
> + const intel_ctx_t *ctx;
> + struct igt_power pwr;
> + double idle, busy;
> + igt_spin_t *spin;
> + uint64_t ahnd;
> +
> + /* Idle power */
> + igt_require(!igt_power_open(i915, &pwr, "gpu"));
> + gem_quiescent_gpu(i915);
> + idle = measure_power(&pwr, 2);
---------------------------------- ^
> +
> + /* Busy power */
> + ctx = intel_ctx_create_all_physical(i915);
> + ahnd = get_reloc_ahnd(i915, ctx->id);
> + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> + .engine = ALL_ENGINES,
> + .flags = IGT_SPIN_POLL_RUN);
> + /* Wait till at least one spinner starts */
> + igt_spin_busywait_until_started(spin);
> + busy = measure_power(&pwr, 2);
---------------------------------- ^
Make it define or const as you are using it twice and this
should be the same.
With that fixed:
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
--
Kamil
> + igt_free_spins(i915);
> + put_ahnd(ahnd);
> + intel_ctx_destroy(i915, ctx);
> + igt_power_close(&pwr);
> +
> + igt_info("Measured power: idle: %g mW, busy: %g mW\n", idle, busy);
> + igt_assert(idle >= 0 && busy > 0 && busy > idle);
> +}
> +
> +igt_main
> +{
> + int i915;
> +
> + igt_fixture {
> + i915 = drm_open_driver_master(DRIVER_INTEL);
> + }
> +
> + igt_describe("Sanity check gpu power measurement");
> + igt_subtest("sanity") {
> + sanity(i915);
> + }
> +
> + igt_fixture {
> + close(i915);
> + }
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index cce9d89e1c8..d93a07c9ed6 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -213,6 +213,7 @@ i915_progs = [
> 'i915_pm_dc',
> 'i915_pm_rps',
> 'i915_pm_sseu',
> + 'i915_power',
> 'i915_query',
> 'i915_selftest',
> 'i915_suspend',
> --
> 2.38.0
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-27 16:46 ` Kamil Konieczny
@ 2023-01-27 16:55 ` Dixit, Ashutosh
2023-01-27 17:44 ` Kamil Konieczny
0 siblings, 1 reply; 19+ messages in thread
From: Dixit, Ashutosh @ 2023-01-27 16:55 UTC (permalink / raw)
To: Kamil Konieczny, igt-dev, Riana Tauro, Ashutosh Dixit
On Fri, 27 Jan 2023 08:46:03 -0800, Kamil Konieczny wrote:
>
> Hi Ashutosh,
>
> looks much better, few small nits left, see below.
>
> On 2023-01-27 at 08:08:12 -0800, Ashutosh Dixit wrote:
> > Add a test to sanity check power measurement on integrated/discrete by
> > requiring power under load to be > 0 and >= idle power.
> >
> > v2: Code reorganization (Kamil K)
> > v3: More code reorganization (Kamil K)
> >
> > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> > ---
> > tests/i915/i915_power.c | 70 +++++++++++++++++++++++++++++++++++++++++
> > tests/meson.build | 1 +
> > 2 files changed, 71 insertions(+)
> > create mode 100644 tests/i915/i915_power.c
> >
> > diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> > new file mode 100644
> > index 00000000000..533cf769b54
> > --- /dev/null
> > +++ b/tests/i915/i915_power.c
> > @@ -0,0 +1,70 @@
> > +// SPDX-License-Identifier: MIT
> > +/*
> > + * Copyright © 2023 Intel Corporation
> > + */
> > +
> > +#include "igt.h"
> > +#include "i915/gem.h"
> > +#include "igt_power.h"
> > +
> > +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> > +
> > +static double measure_power(struct igt_power *pwr, int sleep_duration_sec)
> ----------------------------------------------------- ^
> unsigned int
No this is double, see igt_power_get_mW.
>
> > +{
> > + struct power_sample sample[2];
> > +
> > + igt_power_get_energy(pwr, &sample[0]);
> > + usleep(sleep_duration_sec * USEC_PER_SEC);
> > + igt_power_get_energy(pwr, &sample[1]);
> > +
> > + return igt_power_get_mW(pwr, &sample[0], &sample[1]);
> > +}
> > +
> > +static void sanity(int i915)
> > +{
> > + const intel_ctx_t *ctx;
> > + struct igt_power pwr;
> > + double idle, busy;
> > + igt_spin_t *spin;
> > + uint64_t ahnd;
> > +
> > + /* Idle power */
> > + igt_require(!igt_power_open(i915, &pwr, "gpu"));
> > + gem_quiescent_gpu(i915);
> > + idle = measure_power(&pwr, 2);
> ---------------------------------- ^
>
> > +
> > + /* Busy power */
> > + ctx = intel_ctx_create_all_physical(i915);
> > + ahnd = get_reloc_ahnd(i915, ctx->id);
> > + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> > + .engine = ALL_ENGINES,
> > + .flags = IGT_SPIN_POLL_RUN);
> > + /* Wait till at least one spinner starts */
> > + igt_spin_busywait_until_started(spin);
> > + busy = measure_power(&pwr, 2);
> ---------------------------------- ^
> Make it define or const as you are using it twice and this
> should be the same.
Will fix this up.
>
> With that fixed:
> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Thanks!
>
> --
> Kamil
>
> > + igt_free_spins(i915);
> > + put_ahnd(ahnd);
> > + intel_ctx_destroy(i915, ctx);
> > + igt_power_close(&pwr);
> > +
> > + igt_info("Measured power: idle: %g mW, busy: %g mW\n", idle, busy);
> > + igt_assert(idle >= 0 && busy > 0 && busy > idle);
> > +}
> > +
> > +igt_main
> > +{
> > + int i915;
> > +
> > + igt_fixture {
> > + i915 = drm_open_driver_master(DRIVER_INTEL);
> > + }
> > +
> > + igt_describe("Sanity check gpu power measurement");
> > + igt_subtest("sanity") {
> > + sanity(i915);
> > + }
> > +
> > + igt_fixture {
> > + close(i915);
> > + }
> > +}
> > diff --git a/tests/meson.build b/tests/meson.build
> > index cce9d89e1c8..d93a07c9ed6 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -213,6 +213,7 @@ i915_progs = [
> > 'i915_pm_dc',
> > 'i915_pm_rps',
> > 'i915_pm_sseu',
> > + 'i915_power',
> > 'i915_query',
> > 'i915_selftest',
> > 'i915_suspend',
> > --
> > 2.38.0
> >
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-27 16:55 ` Dixit, Ashutosh
@ 2023-01-27 17:44 ` Kamil Konieczny
2023-01-27 18:12 ` Dixit, Ashutosh
0 siblings, 1 reply; 19+ messages in thread
From: Kamil Konieczny @ 2023-01-27 17:44 UTC (permalink / raw)
To: igt-dev
Hi Ashutosh,
On 2023-01-27 at 08:55:48 -0800, Dixit, Ashutosh wrote:
> On Fri, 27 Jan 2023 08:46:03 -0800, Kamil Konieczny wrote:
> >
> > Hi Ashutosh,
> >
> > looks much better, few small nits left, see below.
> >
> > On 2023-01-27 at 08:08:12 -0800, Ashutosh Dixit wrote:
> > > Add a test to sanity check power measurement on integrated/discrete by
> > > requiring power under load to be > 0 and >= idle power.
> > >
> > > v2: Code reorganization (Kamil K)
> > > v3: More code reorganization (Kamil K)
> > >
> > > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > > Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> > > ---
> > > tests/i915/i915_power.c | 70 +++++++++++++++++++++++++++++++++++++++++
> > > tests/meson.build | 1 +
> > > 2 files changed, 71 insertions(+)
> > > create mode 100644 tests/i915/i915_power.c
> > >
> > > diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> > > new file mode 100644
> > > index 00000000000..533cf769b54
> > > --- /dev/null
> > > +++ b/tests/i915/i915_power.c
> > > @@ -0,0 +1,70 @@
> > > +// SPDX-License-Identifier: MIT
> > > +/*
> > > + * Copyright © 2023 Intel Corporation
> > > + */
> > > +
> > > +#include "igt.h"
> > > +#include "i915/gem.h"
> > > +#include "igt_power.h"
> > > +
> > > +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> > > +
> > > +static double measure_power(struct igt_power *pwr, int sleep_duration_sec)
> > ----------------------------------------------------- ^
> > unsigned int
>
> No this is double, see igt_power_get_mW.
I mean type of sleep_duration_sec should be unsigned int.
Regards,
Kamil
>
> >
> > > +{
> > > + struct power_sample sample[2];
> > > +
> > > + igt_power_get_energy(pwr, &sample[0]);
> > > + usleep(sleep_duration_sec * USEC_PER_SEC);
> > > + igt_power_get_energy(pwr, &sample[1]);
> > > +
> > > + return igt_power_get_mW(pwr, &sample[0], &sample[1]);
> > > +}
> > > +
> > > +static void sanity(int i915)
> > > +{
> > > + const intel_ctx_t *ctx;
> > > + struct igt_power pwr;
> > > + double idle, busy;
> > > + igt_spin_t *spin;
> > > + uint64_t ahnd;
> > > +
> > > + /* Idle power */
> > > + igt_require(!igt_power_open(i915, &pwr, "gpu"));
> > > + gem_quiescent_gpu(i915);
> > > + idle = measure_power(&pwr, 2);
> > ---------------------------------- ^
> >
> > > +
> > > + /* Busy power */
> > > + ctx = intel_ctx_create_all_physical(i915);
> > > + ahnd = get_reloc_ahnd(i915, ctx->id);
> > > + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> > > + .engine = ALL_ENGINES,
> > > + .flags = IGT_SPIN_POLL_RUN);
> > > + /* Wait till at least one spinner starts */
> > > + igt_spin_busywait_until_started(spin);
> > > + busy = measure_power(&pwr, 2);
> > ---------------------------------- ^
> > Make it define or const as you are using it twice and this
> > should be the same.
>
> Will fix this up.
>
> >
> > With that fixed:
> > Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
>
> Thanks!
>
> >
> > --
> > Kamil
> >
> > > + igt_free_spins(i915);
> > > + put_ahnd(ahnd);
> > > + intel_ctx_destroy(i915, ctx);
> > > + igt_power_close(&pwr);
> > > +
> > > + igt_info("Measured power: idle: %g mW, busy: %g mW\n", idle, busy);
> > > + igt_assert(idle >= 0 && busy > 0 && busy > idle);
> > > +}
> > > +
> > > +igt_main
> > > +{
> > > + int i915;
> > > +
> > > + igt_fixture {
> > > + i915 = drm_open_driver_master(DRIVER_INTEL);
> > > + }
> > > +
> > > + igt_describe("Sanity check gpu power measurement");
> > > + igt_subtest("sanity") {
> > > + sanity(i915);
> > > + }
> > > +
> > > + igt_fixture {
> > > + close(i915);
> > > + }
> > > +}
> > > diff --git a/tests/meson.build b/tests/meson.build
> > > index cce9d89e1c8..d93a07c9ed6 100644
> > > --- a/tests/meson.build
> > > +++ b/tests/meson.build
> > > @@ -213,6 +213,7 @@ i915_progs = [
> > > 'i915_pm_dc',
> > > 'i915_pm_rps',
> > > 'i915_pm_sseu',
> > > + 'i915_power',
> > > 'i915_query',
> > > 'i915_selftest',
> > > 'i915_suspend',
> > > --
> > > 2.38.0
> > >
^ permalink raw reply [flat|nested] 19+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-27 18:09 [igt-dev] [PATCH i-g-t 0/2] " Ashutosh Dixit
@ 2023-01-27 18:09 ` Ashutosh Dixit
0 siblings, 0 replies; 19+ messages in thread
From: Ashutosh Dixit @ 2023-01-27 18:09 UTC (permalink / raw)
To: igt-dev
Add a test to sanity check power measurement on integrated/discrete by
requiring power under load to be > 0 and >= idle power.
v2: Code reorganization (Kamil K)
v3: More code reorganization (Kamil K)
v4: Make sleep duration uint32_t and use #define (Kamil K)
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
tests/i915/i915_power.c | 72 +++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
2 files changed, 73 insertions(+)
create mode 100644 tests/i915/i915_power.c
diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
new file mode 100644
index 00000000000..f2fd228698a
--- /dev/null
+++ b/tests/i915/i915_power.c
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include "igt.h"
+#include "i915/gem.h"
+#include "igt_power.h"
+
+IGT_TEST_DESCRIPTION("i915 power measurement tests");
+
+static double measure_power(struct igt_power *pwr, uint32_t duration_sec)
+{
+ struct power_sample sample[2];
+
+ igt_power_get_energy(pwr, &sample[0]);
+ usleep(duration_sec * USEC_PER_SEC);
+ igt_power_get_energy(pwr, &sample[1]);
+
+ return igt_power_get_mW(pwr, &sample[0], &sample[1]);
+}
+
+static void sanity(int i915)
+{
+ const intel_ctx_t *ctx;
+ struct igt_power pwr;
+ double idle, busy;
+ igt_spin_t *spin;
+ uint64_t ahnd;
+
+#define DURATION_SEC 2
+
+ /* Idle power */
+ igt_require(!igt_power_open(i915, &pwr, "gpu"));
+ gem_quiescent_gpu(i915);
+ idle = measure_power(&pwr, DURATION_SEC);
+
+ /* Busy power */
+ ctx = intel_ctx_create_all_physical(i915);
+ ahnd = get_reloc_ahnd(i915, ctx->id);
+ spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
+ .engine = ALL_ENGINES,
+ .flags = IGT_SPIN_POLL_RUN);
+ /* Wait till at least one spinner starts */
+ igt_spin_busywait_until_started(spin);
+ busy = measure_power(&pwr, DURATION_SEC);
+ igt_free_spins(i915);
+ put_ahnd(ahnd);
+ intel_ctx_destroy(i915, ctx);
+ igt_power_close(&pwr);
+
+ igt_info("Measured power: idle: %g mW, busy: %g mW\n", idle, busy);
+ igt_assert(idle >= 0 && busy > 0 && busy > idle);
+}
+
+igt_main
+{
+ int i915;
+
+ igt_fixture {
+ i915 = drm_open_driver_master(DRIVER_INTEL);
+ }
+
+ igt_describe("Sanity check gpu power measurement");
+ igt_subtest("sanity") {
+ sanity(i915);
+ }
+
+ igt_fixture {
+ close(i915);
+ }
+}
diff --git a/tests/meson.build b/tests/meson.build
index cce9d89e1c8..d93a07c9ed6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -213,6 +213,7 @@ i915_progs = [
'i915_pm_dc',
'i915_pm_rps',
'i915_pm_sseu',
+ 'i915_power',
'i915_query',
'i915_selftest',
'i915_suspend',
--
2.38.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] i915/i915_power: Sanity check power measurement
2023-01-27 17:44 ` Kamil Konieczny
@ 2023-01-27 18:12 ` Dixit, Ashutosh
0 siblings, 0 replies; 19+ messages in thread
From: Dixit, Ashutosh @ 2023-01-27 18:12 UTC (permalink / raw)
To: Kamil Konieczny, igt-dev, Riana Tauro, Ashutosh Dixit
On Fri, 27 Jan 2023 09:44:00 -0800, Kamil Konieczny wrote:
>
> Hi Ashutosh,
>
> On 2023-01-27 at 08:55:48 -0800, Dixit, Ashutosh wrote:
> > On Fri, 27 Jan 2023 08:46:03 -0800, Kamil Konieczny wrote:
> > >
> > > Hi Ashutosh,
> > >
> > > looks much better, few small nits left, see below.
> > >
> > > On 2023-01-27 at 08:08:12 -0800, Ashutosh Dixit wrote:
> > > > Add a test to sanity check power measurement on integrated/discrete by
> > > > requiring power under load to be > 0 and >= idle power.
> > > >
> > > > v2: Code reorganization (Kamil K)
> > > > v3: More code reorganization (Kamil K)
> > > >
> > > > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > > > Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> > > > ---
> > > > tests/i915/i915_power.c | 70 +++++++++++++++++++++++++++++++++++++++++
> > > > tests/meson.build | 1 +
> > > > 2 files changed, 71 insertions(+)
> > > > create mode 100644 tests/i915/i915_power.c
> > > >
> > > > diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> > > > new file mode 100644
> > > > index 00000000000..533cf769b54
> > > > --- /dev/null
> > > > +++ b/tests/i915/i915_power.c
> > > > @@ -0,0 +1,70 @@
> > > > +// SPDX-License-Identifier: MIT
> > > > +/*
> > > > + * Copyright © 2023 Intel Corporation
> > > > + */
> > > > +
> > > > +#include "igt.h"
> > > > +#include "i915/gem.h"
> > > > +#include "igt_power.h"
> > > > +
> > > > +IGT_TEST_DESCRIPTION("i915 power measurement tests");
> > > > +
> > > > +static double measure_power(struct igt_power *pwr, int sleep_duration_sec)
> > > ----------------------------------------------------- ^
> > > unsigned int
> >
> > No this is double, see igt_power_get_mW.
>
> I mean type of sleep_duration_sec should be unsigned int.
Oops, got it. Latest version after addressing your comments here:
https://patchwork.freedesktop.org/series/113445/
Thanks.
--
Ashutosh
> > >
> > > > +{
> > > > + struct power_sample sample[2];
> > > > +
> > > > + igt_power_get_energy(pwr, &sample[0]);
> > > > + usleep(sleep_duration_sec * USEC_PER_SEC);
> > > > + igt_power_get_energy(pwr, &sample[1]);
> > > > +
> > > > + return igt_power_get_mW(pwr, &sample[0], &sample[1]);
> > > > +}
> > > > +
> > > > +static void sanity(int i915)
> > > > +{
> > > > + const intel_ctx_t *ctx;
> > > > + struct igt_power pwr;
> > > > + double idle, busy;
> > > > + igt_spin_t *spin;
> > > > + uint64_t ahnd;
> > > > +
> > > > + /* Idle power */
> > > > + igt_require(!igt_power_open(i915, &pwr, "gpu"));
> > > > + gem_quiescent_gpu(i915);
> > > > + idle = measure_power(&pwr, 2);
> > > ---------------------------------- ^
> > >
> > > > +
> > > > + /* Busy power */
> > > > + ctx = intel_ctx_create_all_physical(i915);
> > > > + ahnd = get_reloc_ahnd(i915, ctx->id);
> > > > + spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
> > > > + .engine = ALL_ENGINES,
> > > > + .flags = IGT_SPIN_POLL_RUN);
> > > > + /* Wait till at least one spinner starts */
> > > > + igt_spin_busywait_until_started(spin);
> > > > + busy = measure_power(&pwr, 2);
> > > ---------------------------------- ^
> > > Make it define or const as you are using it twice and this
> > > should be the same.
> >
> > Will fix this up.
> >
> > >
> > > With that fixed:
> > > Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> >
> > Thanks!
> >
> > >
> > > --
> > > Kamil
> > >
> > > > + igt_free_spins(i915);
> > > > + put_ahnd(ahnd);
> > > > + intel_ctx_destroy(i915, ctx);
> > > > + igt_power_close(&pwr);
> > > > +
> > > > + igt_info("Measured power: idle: %g mW, busy: %g mW\n", idle, busy);
> > > > + igt_assert(idle >= 0 && busy > 0 && busy > idle);
> > > > +}
> > > > +
> > > > +igt_main
> > > > +{
> > > > + int i915;
> > > > +
> > > > + igt_fixture {
> > > > + i915 = drm_open_driver_master(DRIVER_INTEL);
> > > > + }
> > > > +
> > > > + igt_describe("Sanity check gpu power measurement");
> > > > + igt_subtest("sanity") {
> > > > + sanity(i915);
> > > > + }
> > > > +
> > > > + igt_fixture {
> > > > + close(i915);
> > > > + }
> > > > +}
> > > > diff --git a/tests/meson.build b/tests/meson.build
> > > > index cce9d89e1c8..d93a07c9ed6 100644
> > > > --- a/tests/meson.build
> > > > +++ b/tests/meson.build
> > > > @@ -213,6 +213,7 @@ i915_progs = [
> > > > 'i915_pm_dc',
> > > > 'i915_pm_rps',
> > > > 'i915_pm_sseu',
> > > > + 'i915_power',
> > > > 'i915_query',
> > > > 'i915_selftest',
> > > > 'i915_suspend',
> > > > --
> > > > 2.38.0
> > > >
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2023-01-27 18:12 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-27 6:25 [igt-dev] [PATCH i-g-t 0/2] i915/i915_power: Sanity check power measurement Ashutosh Dixit
2023-01-27 6:25 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
2023-01-27 12:29 ` Kamil Konieczny
2023-01-27 16:13 ` Dixit, Ashutosh
2023-01-27 6:25 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Add i915_power@sanity to fast-feedback.testlist Ashutosh Dixit
2023-01-27 7:05 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/i915_power: Sanity check power measurement Patchwork
2023-01-27 8:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-01-27 18:09 [igt-dev] [PATCH i-g-t 0/2] " Ashutosh Dixit
2023-01-27 18:09 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
2023-01-27 16:08 [igt-dev] [PATCH i-g-t 0/2] " Ashutosh Dixit
2023-01-27 16:08 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
2023-01-27 16:46 ` Kamil Konieczny
2023-01-27 16:55 ` Dixit, Ashutosh
2023-01-27 17:44 ` Kamil Konieczny
2023-01-27 18:12 ` Dixit, Ashutosh
2023-01-21 5:41 [igt-dev] [PATCH i-g-t 0/2] " Ashutosh Dixit
2023-01-21 5:41 ` [igt-dev] [PATCH i-g-t 1/2] " Ashutosh Dixit
2023-01-24 12:59 ` Tauro, Riana
2023-01-24 17:00 ` Kamil Konieczny
2023-01-24 18:01 ` Dixit, Ashutosh
2023-01-25 9:40 ` Kamil Konieczny
2023-01-27 6:28 ` Dixit, Ashutosh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox