* [igt-dev] [PATCH i-g-t 0/2] tests/slpc: Add basic IGT test
@ 2023-03-28 2:00 Vinay Belgaumkar
2023-03-28 2:00 ` [igt-dev] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers Vinay Belgaumkar
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Vinay Belgaumkar @ 2023-03-28 2:00 UTC (permalink / raw)
To: intel-gfx, igt-dev
Borrow some subtests from xe_guc_pc. Also add per GT debugfs helpers.
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Vinay Belgaumkar (2):
lib/debugfs: Add per GT debugfs helpers
i915_pm_freq_api: Add some basic SLPC igt tests
lib/igt_debugfs.c | 60 ++++++++++++++
lib/igt_debugfs.h | 4 +
tests/i915/i915_pm_freq_api.c | 151 ++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
4 files changed, 216 insertions(+)
create mode 100644 tests/i915/i915_pm_freq_api.c
--
2.38.1
^ permalink raw reply [flat|nested] 11+ messages in thread* [igt-dev] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers 2023-03-28 2:00 [igt-dev] [PATCH i-g-t 0/2] tests/slpc: Add basic IGT test Vinay Belgaumkar @ 2023-03-28 2:00 ` Vinay Belgaumkar 2023-03-31 23:30 ` [igt-dev] [Intel-gfx] " Dixit, Ashutosh 2023-03-28 2:00 ` [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests Vinay Belgaumkar ` (2 subsequent siblings) 3 siblings, 1 reply; 11+ messages in thread From: Vinay Belgaumkar @ 2023-03-28 2:00 UTC (permalink / raw) To: intel-gfx, igt-dev These can be used to open per-gt debugfs files. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Vinay Belgaumkar <viay.belgaumkar@intel.com> --- lib/igt_debugfs.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++ lib/igt_debugfs.h | 4 ++++ 2 files changed, 64 insertions(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 05889bbe..afde2da6 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -217,6 +217,37 @@ int igt_debugfs_dir(int device) return open(path, O_RDONLY); } +/** + * igt_debugfs_gt_dir: + * @device: fd of the device + * @gt: GT instance number + * + * This opens the debugfs directory corresponding to device for use + * with igt_sysfs_get() and related functions. + * + * Returns: + * The directory fd, or -1 on failure. + */ +int igt_debugfs_gt_dir(int device, unsigned int gt) +{ + int debugfs_gt_dir_fd; + char path[PATH_MAX]; + char gtpath[16]; + int ret; + + if (!igt_debugfs_path(device, path, sizeof(path))) + return -1; + + ret = snprintf(gtpath, sizeof(gtpath), "/gt%u", gt); + igt_assert(ret < sizeof(gtpath)); + strncat(path, gtpath, sizeof(path) - 1); + + debugfs_gt_dir_fd = open(path, O_RDONLY); + igt_debug_on_f(debugfs_gt_dir_fd < 0, "path: %s\n", path); + + return debugfs_gt_dir_fd; +} + /** * igt_debugfs_connector_dir: * @device: fd of the device @@ -313,6 +344,35 @@ bool igt_debugfs_exists(int device, const char *filename, int mode) return false; } +/** + * igt_debugfs_gt_open: + * @device: open i915 drm fd + * @gt: gt instance number + * @filename: name of the debugfs node to open + * @mode: mode bits as used by open() + * + * This opens a debugfs file as a Unix file descriptor. The filename should be + * relative to the drm device's root, i.e. without "drm/$minor". + * + * Returns: + * The Unix file descriptor for the debugfs file or -1 if that didn't work out. + */ +int +igt_debugfs_gt_open(int device, unsigned int gt, const char *filename, int mode) +{ + int dir, ret; + + dir = igt_debugfs_gt_dir(device, gt); + if (dir < 0) + return dir; + + ret = openat(dir, filename, mode); + + close(dir); + + return ret; +} + /** * igt_debugfs_simple_read: * @dir: fd of the debugfs directory diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 4824344a..3e6194ad 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -45,6 +45,10 @@ void __igt_debugfs_write(int fd, const char *filename, const char *buf, int size int igt_debugfs_simple_read(int dir, const char *filename, char *buf, int size); bool igt_debugfs_search(int fd, const char *filename, const char *substring); +int igt_debugfs_gt_dir(int device, unsigned int gt); +int igt_debugfs_gt_open(int device, unsigned int gt, const char *filename, + int mode); + /** * igt_debugfs_read: * @filename: name of the debugfs file -- 2.38.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers 2023-03-28 2:00 ` [igt-dev] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers Vinay Belgaumkar @ 2023-03-31 23:30 ` Dixit, Ashutosh 0 siblings, 0 replies; 11+ messages in thread From: Dixit, Ashutosh @ 2023-03-31 23:30 UTC (permalink / raw) To: Vinay Belgaumkar; +Cc: igt-dev, intel-gfx On Mon, 27 Mar 2023 19:00:27 -0700, Vinay Belgaumkar wrote: > > These can be used to open per-gt debugfs files. > Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests 2023-03-28 2:00 [igt-dev] [PATCH i-g-t 0/2] tests/slpc: Add basic IGT test Vinay Belgaumkar 2023-03-28 2:00 ` [igt-dev] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers Vinay Belgaumkar @ 2023-03-28 2:00 ` Vinay Belgaumkar 2023-03-31 23:56 ` Dixit, Ashutosh 2023-03-28 2:33 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/slpc: Add basic IGT test Patchwork 2023-03-28 10:22 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 3 siblings, 1 reply; 11+ messages in thread From: Vinay Belgaumkar @ 2023-03-28 2:00 UTC (permalink / raw) To: intel-gfx, igt-dev Validate basic api for GT freq control. Also test interaction with GT reset. We skip rps tests with SLPC enabled, this will re-introduce some coverage. SLPC selftests are already covering some other workload related scenarios. v2: Rename test (Rodrigo) Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> --- tests/i915/i915_pm_freq_api.c | 151 ++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 2 files changed, 152 insertions(+) create mode 100644 tests/i915/i915_pm_freq_api.c diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c new file mode 100644 index 00000000..f1027d1c --- /dev/null +++ b/tests/i915/i915_pm_freq_api.c @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: MIT +/* + * Copyright © 2023 Intel Corporation + */ + +#include <dirent.h> +#include <errno.h> +#include <fcntl.h> +#include <inttypes.h> +#include <stdlib.h> +#include <sys/stat.h> +#include <sys/syscall.h> +#include <sys/types.h> +#include <unistd.h> + +#include "drmtest.h" +#include "i915/gem.h" +#include "igt_sysfs.h" +#include "igt.h" + +IGT_TEST_DESCRIPTION("Test SLPC freq API"); +/* + * Too many intermediate components and steps before freq is adjusted + * Specially if workload is under execution, so let's wait 100 ms. + */ +#define ACT_FREQ_LATENCY_US 100000 + +static uint32_t get_freq(int dirfd, uint8_t id) +{ + uint32_t val; + + igt_require(igt_sysfs_rps_scanf(dirfd, id, "%u", &val) == 1); + + return val; +} + +static int set_freq(int dirfd, uint8_t id, uint32_t val) +{ + return igt_sysfs_rps_printf(dirfd, id, "%u", val); +} + +static void test_freq_basic_api(int dirfd, int gt) +{ + uint32_t rpn, rp0, rpe; + + /* Save frequencies */ + rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ); + rp0 = get_freq(dirfd, RPS_RP0_FREQ_MHZ); + rpe = get_freq(dirfd, RPS_RP1_FREQ_MHZ); + igt_info("System min freq: %dMHz; max freq: %dMHz\n", rpn, rp0); + + /* + * Negative bound tests + * RPn is the floor + * RP0 is the ceiling + */ + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rp0 + 1) < 0); + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rp0 + 1) < 0); + + /* Assert min requests are respected from rp0 to rpn */ + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rp0) > 0); + igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rp0); + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpe) > 0); + igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpe); + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0); + igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn); + + /* Assert max requests are respected from rpn to rp0 */ + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0); + igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn); + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpe) > 0); + igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpe); + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rp0) > 0); + igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rp0); + +} + +static void test_reset(int i915, int dirfd, int gt) +{ + uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ); + int fd; + + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0); + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0); + usleep(ACT_FREQ_LATENCY_US); + igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn); + + /* Manually trigger a GT reset */ + fd = igt_debugfs_gt_open(i915, gt, "reset", O_WRONLY); + igt_require(fd >= 0); + igt_ignore_warn(write(fd, "1\n", 2)); + close(fd); + + igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn); + igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn); +} + +igt_main +{ + int i915 = -1; + uint32_t *stash_min, *stash_max; + + igt_fixture { + int num_gts, dirfd, gt; + + i915 = drm_open_driver(DRIVER_INTEL); + igt_require_gem(i915); + /* i915_pm_rps already covers execlist path */ + igt_require(gem_using_guc_submission(i915)); + + num_gts = igt_sysfs_get_num_gt(i915); + stash_min = (uint32_t*)malloc(sizeof(uint32_t) * num_gts); + stash_max = (uint32_t*)malloc(sizeof(uint32_t) * num_gts); + + /* Save curr min and max across GTs */ + for_each_sysfs_gt_dirfd(i915, dirfd, gt) { + stash_min[gt] = get_freq(dirfd, RPS_MIN_FREQ_MHZ); + stash_max[gt] = get_freq(dirfd, RPS_MAX_FREQ_MHZ); + } + } + + igt_describe("Test basic API for controlling min/max GT frequency"); + igt_subtest_with_dynamic_f("freq-basic-api") { + int dirfd, gt; + + for_each_sysfs_gt_dirfd(i915, dirfd, gt) + igt_dynamic_f("gt%u", gt) + test_freq_basic_api(dirfd, gt); + } + + igt_describe("Test basic freq API works after a reset"); + igt_subtest_with_dynamic_f("freq-reset") { + int dirfd, gt; + + for_each_sysfs_gt_dirfd(i915, dirfd, gt) + igt_dynamic_f("gt%u", gt) + test_reset(i915, dirfd, gt); + } + + igt_fixture { + int dirfd, gt; + /* Restore frequencies */ + for_each_sysfs_gt_dirfd(i915, dirfd, gt) { + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, stash_max[gt]) > 0); + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, stash_min[gt]) > 0); + } + close(i915); + } +} diff --git a/tests/meson.build b/tests/meson.build index 7d2168be..072cae30 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -202,6 +202,7 @@ i915_progs = [ 'gem_workarounds', 'i915_fb_tiling', 'i915_getparams_basic', + 'i915_pm_freq_api', 'i915_hangman', 'i915_hwmon', 'i915_module_load', -- 2.38.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests 2023-03-28 2:00 ` [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests Vinay Belgaumkar @ 2023-03-31 23:56 ` Dixit, Ashutosh 2023-04-03 15:23 ` Belgaumkar, Vinay 0 siblings, 1 reply; 11+ messages in thread From: Dixit, Ashutosh @ 2023-03-31 23:56 UTC (permalink / raw) To: Vinay Belgaumkar; +Cc: igt-dev, intel-gfx On Mon, 27 Mar 2023 19:00:28 -0700, Vinay Belgaumkar wrote: > Hi Vinay, > +/* > + * Too many intermediate components and steps before freq is adjusted > + * Specially if workload is under execution, so let's wait 100 ms. > + */ > +#define ACT_FREQ_LATENCY_US 100000 > + > +static uint32_t get_freq(int dirfd, uint8_t id) > +{ > + uint32_t val; > + > + igt_require(igt_sysfs_rps_scanf(dirfd, id, "%u", &val) == 1); igt_assert? > +static void test_freq_basic_api(int dirfd, int gt) > +{ > + uint32_t rpn, rp0, rpe; > + > + /* Save frequencies */ > + rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ); > + rp0 = get_freq(dirfd, RPS_RP0_FREQ_MHZ); > + rpe = get_freq(dirfd, RPS_RP1_FREQ_MHZ); > + igt_info("System min freq: %dMHz; max freq: %dMHz\n", rpn, rp0); > + > + /* > + * Negative bound tests > + * RPn is the floor > + * RP0 is the ceiling > + */ > + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); > + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rp0 + 1) < 0); > + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); Is this supposed to be RPS_MAX_FREQ_MHZ? > + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rp0 + 1) < 0); > + After addressing the above, this is: Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Also, before merging it would be good to see the results of the new tests. So could you add a HAX patch adding the new tests to fast-feedback.testlist and resend the series? Thanks. -- Ashutosh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests 2023-03-31 23:56 ` Dixit, Ashutosh @ 2023-04-03 15:23 ` Belgaumkar, Vinay 2023-04-03 15:36 ` Dixit, Ashutosh 0 siblings, 1 reply; 11+ messages in thread From: Belgaumkar, Vinay @ 2023-04-03 15:23 UTC (permalink / raw) To: Dixit, Ashutosh; +Cc: igt-dev, intel-gfx On 3/31/2023 4:56 PM, Dixit, Ashutosh wrote: > On Mon, 27 Mar 2023 19:00:28 -0700, Vinay Belgaumkar wrote: > Hi Vinay, > >> +/* >> + * Too many intermediate components and steps before freq is adjusted >> + * Specially if workload is under execution, so let's wait 100 ms. >> + */ >> +#define ACT_FREQ_LATENCY_US 100000 >> + >> +static uint32_t get_freq(int dirfd, uint8_t id) >> +{ >> + uint32_t val; >> + >> + igt_require(igt_sysfs_rps_scanf(dirfd, id, "%u", &val) == 1); > igt_assert? ok. > >> +static void test_freq_basic_api(int dirfd, int gt) >> +{ >> + uint32_t rpn, rp0, rpe; >> + >> + /* Save frequencies */ >> + rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ); >> + rp0 = get_freq(dirfd, RPS_RP0_FREQ_MHZ); >> + rpe = get_freq(dirfd, RPS_RP1_FREQ_MHZ); >> + igt_info("System min freq: %dMHz; max freq: %dMHz\n", rpn, rp0); >> + >> + /* >> + * Negative bound tests >> + * RPn is the floor >> + * RP0 is the ceiling >> + */ >> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); >> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rp0 + 1) < 0); >> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); > Is this supposed to be RPS_MAX_FREQ_MHZ? We could do this check for max as well. But this is trying to see if min can be set to below rpn. > >> + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rp0 + 1) < 0); >> + > After addressing the above, this is: > > Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> > > Also, before merging it would be good to see the results of the new > tests. So could you add a HAX patch adding the new tests to > fast-feedback.testlist and resend the series? Sure, will do. Thanks for the review. Vinay. > > Thanks. > -- > Ashutosh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests 2023-04-03 15:23 ` Belgaumkar, Vinay @ 2023-04-03 15:36 ` Dixit, Ashutosh 2023-04-03 17:22 ` Belgaumkar, Vinay 0 siblings, 1 reply; 11+ messages in thread From: Dixit, Ashutosh @ 2023-04-03 15:36 UTC (permalink / raw) To: Belgaumkar, Vinay; +Cc: igt-dev, intel-gfx On Mon, 03 Apr 2023 08:23:45 -0700, Belgaumkar, Vinay wrote: > > > On 3/31/2023 4:56 PM, Dixit, Ashutosh wrote: > > On Mon, 27 Mar 2023 19:00:28 -0700, Vinay Belgaumkar wrote: > > Hi Vinay, > > > >> +/* > >> + * Too many intermediate components and steps before freq is adjusted > >> + * Specially if workload is under execution, so let's wait 100 ms. > >> + */ > >> +#define ACT_FREQ_LATENCY_US 100000 > >> + > >> +static uint32_t get_freq(int dirfd, uint8_t id) > >> +{ > >> + uint32_t val; > >> + > >> + igt_require(igt_sysfs_rps_scanf(dirfd, id, "%u", &val) == 1); > > igt_assert? > ok. > > > >> +static void test_freq_basic_api(int dirfd, int gt) > >> +{ > >> + uint32_t rpn, rp0, rpe; > >> + > >> + /* Save frequencies */ > >> + rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ); > >> + rp0 = get_freq(dirfd, RPS_RP0_FREQ_MHZ); > >> + rpe = get_freq(dirfd, RPS_RP1_FREQ_MHZ); > >> + igt_info("System min freq: %dMHz; max freq: %dMHz\n", rpn, rp0); > >> + > >> + /* > >> + * Negative bound tests > >> + * RPn is the floor > >> + * RP0 is the ceiling > >> + */ > >> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); > >> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rp0 + 1) < 0); > >> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); > > Is this supposed to be RPS_MAX_FREQ_MHZ? > We could do this check for max as well. But this is trying to see if min > can be set to below rpn. In that case this statement is the same as the first one (2 lines above). Is that needed? > >> + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rp0 + 1) < 0); > >> + > > After addressing the above, this is: > > > > Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> > > > > Also, before merging it would be good to see the results of the new > > tests. So could you add a HAX patch adding the new tests to > > fast-feedback.testlist and resend the series? > > Sure, will do. Thanks for the review. > > Vinay. > > > > > Thanks. > > -- > > Ashutosh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests 2023-04-03 15:36 ` Dixit, Ashutosh @ 2023-04-03 17:22 ` Belgaumkar, Vinay 0 siblings, 0 replies; 11+ messages in thread From: Belgaumkar, Vinay @ 2023-04-03 17:22 UTC (permalink / raw) To: Dixit, Ashutosh; +Cc: igt-dev, intel-gfx On 4/3/2023 8:36 AM, Dixit, Ashutosh wrote: > On Mon, 03 Apr 2023 08:23:45 -0700, Belgaumkar, Vinay wrote: >> >> On 3/31/2023 4:56 PM, Dixit, Ashutosh wrote: >>> On Mon, 27 Mar 2023 19:00:28 -0700, Vinay Belgaumkar wrote: >>> Hi Vinay, >>> >>>> +/* >>>> + * Too many intermediate components and steps before freq is adjusted >>>> + * Specially if workload is under execution, so let's wait 100 ms. >>>> + */ >>>> +#define ACT_FREQ_LATENCY_US 100000 >>>> + >>>> +static uint32_t get_freq(int dirfd, uint8_t id) >>>> +{ >>>> + uint32_t val; >>>> + >>>> + igt_require(igt_sysfs_rps_scanf(dirfd, id, "%u", &val) == 1); >>> igt_assert? >> ok. >>>> +static void test_freq_basic_api(int dirfd, int gt) >>>> +{ >>>> + uint32_t rpn, rp0, rpe; >>>> + >>>> + /* Save frequencies */ >>>> + rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ); >>>> + rp0 = get_freq(dirfd, RPS_RP0_FREQ_MHZ); >>>> + rpe = get_freq(dirfd, RPS_RP1_FREQ_MHZ); >>>> + igt_info("System min freq: %dMHz; max freq: %dMHz\n", rpn, rp0); >>>> + >>>> + /* >>>> + * Negative bound tests >>>> + * RPn is the floor >>>> + * RP0 is the ceiling >>>> + */ >>>> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); >>>> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rp0 + 1) < 0); >>>> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); >>> Is this supposed to be RPS_MAX_FREQ_MHZ? >> We could do this check for max as well. But this is trying to see if min >> can be set to below rpn. > In that case this statement is the same as the first one (2 lines > above). Is that needed? ah, yes. Need more coffee. That should be RPS_MAX_FREQ_MHZ. Thanks, Vinay. > > > >>>> + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rp0 + 1) < 0); >>>> + >>> After addressing the above, this is: >>> >>> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> >>> >>> Also, before merging it would be good to see the results of the new >>> tests. So could you add a HAX patch adding the new tests to >>> fast-feedback.testlist and resend the series? >> Sure, will do. Thanks for the review. >> >> Vinay. >> >>> Thanks. >>> -- >>> Ashutosh ^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for tests/slpc: Add basic IGT test 2023-03-28 2:00 [igt-dev] [PATCH i-g-t 0/2] tests/slpc: Add basic IGT test Vinay Belgaumkar 2023-03-28 2:00 ` [igt-dev] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers Vinay Belgaumkar 2023-03-28 2:00 ` [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests Vinay Belgaumkar @ 2023-03-28 2:33 ` Patchwork 2023-03-28 10:22 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 3 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2023-03-28 2:33 UTC (permalink / raw) To: Vinay Belgaumkar; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 5344 bytes --] == Series Details == Series: tests/slpc: Add basic IGT test URL : https://patchwork.freedesktop.org/series/115698/ State : success == Summary == CI Bug Log - changes from CI_DRM_12923 -> IGTPW_8691 ==================================================== Summary ------- **WARNING** Minor unknown changes coming with IGTPW_8691 need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in IGTPW_8691, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/index.html Participating hosts (36 -> 36) ------------------------------ No changes in participating hosts Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_8691: ### IGT changes ### #### Warnings #### * igt@i915_module_load@load: - bat-atsm-1: [ABORT][1] ([i915#8219]) -> [ABORT][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/bat-atsm-1/igt@i915_module_load@load.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/bat-atsm-1/igt@i915_module_load@load.html Known issues ------------ Here are the changes found in IGTPW_8691 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_exec_suspend@basic-s3@smem: - bat-rpls-1: [PASS][3] -> [ABORT][4] ([i915#6687] / [i915#7978]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/bat-rpls-1/igt@gem_exec_suspend@basic-s3@smem.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/bat-rpls-1/igt@gem_exec_suspend@basic-s3@smem.html * igt@i915_selftest@live@migrate: - bat-dg2-11: NOTRUN -> [DMESG-WARN][5] ([i915#7699]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/bat-dg2-11/igt@i915_selftest@live@migrate.html * igt@kms_chamelium_hpd@common-hpd-after-suspend: - bat-dg2-11: NOTRUN -> [SKIP][6] ([i915#7828]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/bat-dg2-11/igt@kms_chamelium_hpd@common-hpd-after-suspend.html * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence: - bat-dg2-11: NOTRUN -> [SKIP][7] ([i915#5354]) +1 similar issue [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/bat-dg2-11/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html #### Possible fixes #### * igt@i915_selftest@live@gt_lrc: - bat-dg2-11: [INCOMPLETE][8] ([i915#7609] / [i915#7913]) -> [PASS][9] [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html * igt@i915_selftest@live@guc: - bat-rpls-1: [DMESG-WARN][10] ([i915#7852]) -> [PASS][11] [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/bat-rpls-1/igt@i915_selftest@live@guc.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/bat-rpls-1/igt@i915_selftest@live@guc.html * igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1: - bat-dg2-8: [FAIL][12] ([i915#7932]) -> [PASS][13] [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1.html #### Warnings #### * igt@i915_selftest@live@slpc: - bat-rpls-2: [DMESG-FAIL][14] ([i915#6367] / [i915#7913] / [i915#7996]) -> [DMESG-FAIL][15] ([i915#6997] / [i915#7913]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/bat-rpls-2/igt@i915_selftest@live@slpc.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/bat-rpls-2/igt@i915_selftest@live@slpc.html [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354 [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367 [i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687 [i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997 [i915#7609]: https://gitlab.freedesktop.org/drm/intel/issues/7609 [i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699 [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828 [i915#7852]: https://gitlab.freedesktop.org/drm/intel/issues/7852 [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913 [i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932 [i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978 [i915#7996]: https://gitlab.freedesktop.org/drm/intel/issues/7996 [i915#8219]: https://gitlab.freedesktop.org/drm/intel/issues/8219 Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_7221 -> IGTPW_8691 CI-20190529: 20190529 CI_DRM_12923: cdd32ac83137835a85bad4ca4b4751ea90960e72 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_8691: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/index.html IGT_7221: 4b77c6d85024d22ca521d510f8eee574128fe04f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Testlist changes ---------------- +++ 155 lines --- 18 lines == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/index.html [-- Attachment #2: Type: text/html, Size: 6288 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for tests/slpc: Add basic IGT test 2023-03-28 2:00 [igt-dev] [PATCH i-g-t 0/2] tests/slpc: Add basic IGT test Vinay Belgaumkar ` (2 preceding siblings ...) 2023-03-28 2:33 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/slpc: Add basic IGT test Patchwork @ 2023-03-28 10:22 ` Patchwork 3 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2023-03-28 10:22 UTC (permalink / raw) To: Vinay Belgaumkar; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 12755 bytes --] == Series Details == Series: tests/slpc: Add basic IGT test URL : https://patchwork.freedesktop.org/series/115698/ State : success == Summary == CI Bug Log - changes from CI_DRM_12923_full -> IGTPW_8691_full ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/index.html Participating hosts (7 -> 7) ------------------------------ No changes in participating hosts Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_8691_full: ### IGT changes ### #### Possible regressions #### * {igt@i915_pm_freq_api@freq-basic-api} (NEW): - {shard-tglu}: NOTRUN -> [SKIP][1] +1 similar issue [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-tglu-3/igt@i915_pm_freq_api@freq-basic-api.html New tests --------- New tests have been introduced between CI_DRM_12923_full and IGTPW_8691_full: ### New IGT tests (3) ### * igt@i915_pm_freq_api@freq-basic-api: - Statuses : 4 skip(s) - Exec time: [0.0] s * igt@i915_pm_freq_api@freq-basic-api@gt0: - Statuses : 1 pass(s) - Exec time: [0.0] s * igt@i915_pm_freq_api@freq-reset: - Statuses : 4 skip(s) - Exec time: [0.0] s Known issues ------------ Here are the changes found in IGTPW_8691_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_exec_fair@basic-pace@rcs0: - shard-glk: [PASS][2] -> [FAIL][3] ([i915#2842]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-glk3/igt@gem_exec_fair@basic-pace@rcs0.html [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-glk8/igt@gem_exec_fair@basic-pace@rcs0.html * igt@gem_mmap_gtt@fault-concurrent-x: - shard-snb: [PASS][4] -> [ABORT][5] ([i915#5161]) [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-snb7/igt@gem_mmap_gtt@fault-concurrent-x.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-snb2/igt@gem_mmap_gtt@fault-concurrent-x.html * {igt@i915_pm_freq_api@freq-basic-api} (NEW): - shard-apl: NOTRUN -> [SKIP][6] ([fdo#109271]) +1 similar issue [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-apl1/igt@i915_pm_freq_api@freq-basic-api.html - shard-glk: NOTRUN -> [SKIP][7] ([fdo#109271]) +1 similar issue [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-glk2/igt@i915_pm_freq_api@freq-basic-api.html * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions: - shard-apl: [PASS][8] -> [FAIL][9] ([i915#2346]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-apl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-apl3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-mmap-cpu: - shard-snb: NOTRUN -> [SKIP][10] ([fdo#109271]) +64 similar issues [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-snb2/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-mmap-cpu.html #### Possible fixes #### * igt@gem_exec_fair@basic-deadline: - shard-glk: [FAIL][11] ([i915#2846]) -> [PASS][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-glk6/igt@gem_exec_fair@basic-deadline.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-glk1/igt@gem_exec_fair@basic-deadline.html * igt@gem_exec_fair@basic-pace-solo@rcs0: - shard-apl: [FAIL][13] ([i915#2842]) -> [PASS][14] [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-apl4/igt@gem_exec_fair@basic-pace-solo@rcs0.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-apl2/igt@gem_exec_fair@basic-pace-solo@rcs0.html * igt@i915_pm_dc@dc6-dpms: - {shard-tglu}: [FAIL][15] ([i915#3989] / [i915#454]) -> [PASS][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-tglu-3/igt@i915_pm_dc@dc6-dpms.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-tglu-10/igt@i915_pm_dc@dc6-dpms.html * igt@i915_pm_dc@dc9-dpms: - {shard-tglu}: [SKIP][17] ([i915#4281]) -> [PASS][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-tglu-5/igt@i915_pm_dc@dc9-dpms.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-tglu-9/igt@i915_pm_dc@dc9-dpms.html * igt@i915_pm_rpm@dpms-lpsp: - {shard-dg1}: [SKIP][19] ([i915#1397]) -> [PASS][20] +1 similar issue [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-dg1-16/igt@i915_pm_rpm@dpms-lpsp.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-dg1-14/igt@i915_pm_rpm@dpms-lpsp.html * igt@i915_pm_rps@reset: - shard-snb: [INCOMPLETE][21] ([i915#7790]) -> [PASS][22] [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-snb4/igt@i915_pm_rps@reset.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-snb5/igt@i915_pm_rps@reset.html * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions: - shard-glk: [FAIL][23] ([i915#2346]) -> [PASS][24] [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12923/shard-glk2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/shard-glk9/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.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#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289 [fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300 [fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506 [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189 [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614 [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615 [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 [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072 [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397 [i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755 [i915#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937 [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346 [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437 [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527 [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575 [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587 [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672 [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705 [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#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281 [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282 [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297 [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299 [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359 [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#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555 [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#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840 [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886 [i915#3938]: https://gitlab.freedesktop.org/drm/intel/issues/3938 [i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952 [i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989 [i915#4036]: https://gitlab.freedesktop.org/drm/intel/issues/4036 [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#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103 [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213 [i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426 [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270 [i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281 [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#454]: https://gitlab.freedesktop.org/drm/intel/issues/454 [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579 [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#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860 [i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880 [i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881 [i915#5161]: https://gitlab.freedesktop.org/drm/intel/issues/5161 [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#5431]: https://gitlab.freedesktop.org/drm/intel/issues/5431 [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#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268 [i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301 [i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334 [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433 [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524 [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658 [i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946 [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116 [i915#7178]: https://gitlab.freedesktop.org/drm/intel/issues/7178 [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561 [i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697 [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711 [i915#7790]: https://gitlab.freedesktop.org/drm/intel/issues/7790 [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828 [i915#8150]: https://gitlab.freedesktop.org/drm/intel/issues/8150 Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_7221 -> IGTPW_8691 * Piglit: piglit_4509 -> None CI-20190529: 20190529 CI_DRM_12923: cdd32ac83137835a85bad4ca4b4751ea90960e72 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_8691: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/index.html IGT_7221: 4b77c6d85024d22ca521d510f8eee574128fe04f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8691/index.html [-- Attachment #2: Type: text/html, Size: 8369 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] tests/i915/slpc: Add basic IGT test @ 2023-03-24 22:49 Vinay Belgaumkar 2023-03-24 22:49 ` [igt-dev] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers Vinay Belgaumkar 0 siblings, 1 reply; 11+ messages in thread From: Vinay Belgaumkar @ 2023-03-24 22:49 UTC (permalink / raw) To: intel-gfx, igt-dev Borrow some subtests from xe_guc_pc. Also add per GT debugfs helpers. Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Vinay Belgaumkar (2): lib/debugfs: Add per GT debugfs helpers i915_guc_pc: Add some basic SLPC igt tests lib/igt_debugfs.c | 60 ++++++++++++++++ lib/igt_debugfs.h | 4 ++ tests/i915/i915_guc_pc.c | 151 +++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 4 files changed, 216 insertions(+) create mode 100644 tests/i915/i915_guc_pc.c -- 2.38.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers 2023-03-24 22:49 [igt-dev] [PATCH i-g-t 0/2] tests/i915/slpc: " Vinay Belgaumkar @ 2023-03-24 22:49 ` Vinay Belgaumkar 0 siblings, 0 replies; 11+ messages in thread From: Vinay Belgaumkar @ 2023-03-24 22:49 UTC (permalink / raw) To: intel-gfx, igt-dev These can be used to open per-gt debugfs files. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Vinay Belgaumkar <viay.belgaumkar@intel.com> --- lib/igt_debugfs.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++ lib/igt_debugfs.h | 4 ++++ 2 files changed, 64 insertions(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 05889bbe..afde2da6 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -217,6 +217,37 @@ int igt_debugfs_dir(int device) return open(path, O_RDONLY); } +/** + * igt_debugfs_gt_dir: + * @device: fd of the device + * @gt: GT instance number + * + * This opens the debugfs directory corresponding to device for use + * with igt_sysfs_get() and related functions. + * + * Returns: + * The directory fd, or -1 on failure. + */ +int igt_debugfs_gt_dir(int device, unsigned int gt) +{ + int debugfs_gt_dir_fd; + char path[PATH_MAX]; + char gtpath[16]; + int ret; + + if (!igt_debugfs_path(device, path, sizeof(path))) + return -1; + + ret = snprintf(gtpath, sizeof(gtpath), "/gt%u", gt); + igt_assert(ret < sizeof(gtpath)); + strncat(path, gtpath, sizeof(path) - 1); + + debugfs_gt_dir_fd = open(path, O_RDONLY); + igt_debug_on_f(debugfs_gt_dir_fd < 0, "path: %s\n", path); + + return debugfs_gt_dir_fd; +} + /** * igt_debugfs_connector_dir: * @device: fd of the device @@ -313,6 +344,35 @@ bool igt_debugfs_exists(int device, const char *filename, int mode) return false; } +/** + * igt_debugfs_gt_open: + * @device: open i915 drm fd + * @gt: gt instance number + * @filename: name of the debugfs node to open + * @mode: mode bits as used by open() + * + * This opens a debugfs file as a Unix file descriptor. The filename should be + * relative to the drm device's root, i.e. without "drm/$minor". + * + * Returns: + * The Unix file descriptor for the debugfs file or -1 if that didn't work out. + */ +int +igt_debugfs_gt_open(int device, unsigned int gt, const char *filename, int mode) +{ + int dir, ret; + + dir = igt_debugfs_gt_dir(device, gt); + if (dir < 0) + return dir; + + ret = openat(dir, filename, mode); + + close(dir); + + return ret; +} + /** * igt_debugfs_simple_read: * @dir: fd of the debugfs directory diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 4824344a..3e6194ad 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -45,6 +45,10 @@ void __igt_debugfs_write(int fd, const char *filename, const char *buf, int size int igt_debugfs_simple_read(int dir, const char *filename, char *buf, int size); bool igt_debugfs_search(int fd, const char *filename, const char *substring); +int igt_debugfs_gt_dir(int device, unsigned int gt); +int igt_debugfs_gt_open(int device, unsigned int gt, const char *filename, + int mode); + /** * igt_debugfs_read: * @filename: name of the debugfs file -- 2.38.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-04-03 17:22 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-03-28 2:00 [igt-dev] [PATCH i-g-t 0/2] tests/slpc: Add basic IGT test Vinay Belgaumkar 2023-03-28 2:00 ` [igt-dev] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers Vinay Belgaumkar 2023-03-31 23:30 ` [igt-dev] [Intel-gfx] " Dixit, Ashutosh 2023-03-28 2:00 ` [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests Vinay Belgaumkar 2023-03-31 23:56 ` Dixit, Ashutosh 2023-04-03 15:23 ` Belgaumkar, Vinay 2023-04-03 15:36 ` Dixit, Ashutosh 2023-04-03 17:22 ` Belgaumkar, Vinay 2023-03-28 2:33 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/slpc: Add basic IGT test Patchwork 2023-03-28 10:22 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2023-03-24 22:49 [igt-dev] [PATCH i-g-t 0/2] tests/i915/slpc: " Vinay Belgaumkar 2023-03-24 22:49 ` [igt-dev] [PATCH i-g-t 1/2] lib/debugfs: Add per GT debugfs helpers Vinay Belgaumkar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox