summaryrefslogtreecommitdiff
path: root/tests/i915/i915_pm_rps.c
AgeCommit message (Collapse)Author
2021-08-10tests/i915_pm_rps: Alter to use no-relocZbigniew Kempczyński
For newer gens we're not able to rely on relocations. Adopt to use offsets acquired from the allocator. v2: clean unnecessary commented code (Ashutosh) Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2020-06-13i915/i915_pm_rps: Tighten fence generation for waitboostChris Wilson
We need the object we wait on to be clean, and free of stray fences as the waitboosting only applies to i915_request that have not been started. If we use an exclusive fence (from a write dependency) that will strip off any foreign fences, allowing us to trick the driver into behaving as we expect. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-07lib/i915: Split igt_require_gem() into i915/Chris Wilson
igt_require_gem() is a pecularity of i915/, move it out of the core. Similar opportunistic move of gem_reopen_driver() and gem_quiescent_gpu(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-01-28i915/i915_pm_rps: Boosting can only apply when RP0 != RPnChris Wilson
If the min and max frequencies are the same, we cannot tell apart a boosted frequency from the norm. Closes: https://gitlab.freedesktop.org/drm/intel/issues/1038 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-01-27i915_pm_rps: Be wary if RP0 == RPnChris Wilson
If the HW min/max frequencies are the same, there is not much range to deal with and a couple of our invalid tests become confused as they are actually no-ops. Error reporting in i915_pm_rps is rudimentary and we deserve better. Closes: https://gitlab.freedesktop.org/drm/intel/issues/1008 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-12-03tests/i915: remove igt_skip_on_simulation()Swati Sharma
Removing igt_skip_on_simulation() from all i915 specific tests since this feature is not supported anymore. v2: Rebase Signed-off-by: Swati Sharma <swati2.sharma@intel.com> Signed-off-by: Karthik B S <karthik.b.s@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-11-23i915/pm_rps: install SIGTERM handler for load_helper processChuansheng Liu
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=112126 The issue we hit is the GPU keeps very high load after running the subtest min-max-config-loaded. Some background of the issue: Currently the rps is not fully enabled yet on TGL, and running the subtest min-max-config-loaded will hit below assertion: == (i915_pm_rps:1261) CRITICAL: Test assertion failure function loaded_check, file ../tests/i915/i915_pm_rps.c:505: (i915_pm_rps:1261) CRITICAL: Failed assertion: freqs[MAX] <= freqs[CUR] (i915_pm_rps:1261) CRITICAL: Last errno: 2, No such file or directory == with igt stress test, we find the GT keeps busy after running this subtest, it is due to the igt_spin_end() is not called randomly. The root cause analysis is: When the main process i915_pm_rps for running the subtest min-max-config-loaded hits the assertion, the main process will try to send signal SIGTERM to the child process loader_helper which is created by main process for starting GT load, then the main process itself will exit. The SIGTERM handler for loader_helper is the default one, which will cause the loader_helper exits directly. That is unsafe, we always expect the igt_spin_end() is called before loader_helper process exits, which is used to stop the load of GT. Furthermore, in normal scenario, before main process exits, it will send SIGUSR1 to child process for stopping GT loading in safe way. So here we install the proper handler for signal SIGTERM in the similar way. Without this patch, the GT may keep busy after running this subtest. Enabling rps should be tracked on the other side. V3: As suggested by Chris, s/SIGUSR1/SIGTERM, since both signals take the same function. Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-10-26i915/pm_rps: Wait for the actual frequency to settleChris Wilson
Check the actual frequency, and not just the current requested, before delaying the system stable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2019-04-18lib/igt_dummyload: Get rid of 'batch' on spinner accessorsMika Kuoppala
There is no guarantee that spinners are and will be implemented using batches. As we have igt_spin_t, manipulate it through igt_spin_* functions consistently and hide the batch nature. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-20lib/igt_device: Introduce igt_device_get_card_indexMichał Winiarski
And use it! But let's start small. Rather than going with "and by the way, here's the card index" from igt_sysfs_path, we're making things more explicit. v2: Drop idx comment. (Chris) Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-20tests/i915_pm_rps: Use sysfs helpersMichał Winiarski
Doing this lets us avoid drm_get_card, which we plan to remove eventually. v2: We were extermally unlikely to find rps knobs in current dir. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-02-20tests: Prefix pm_ tests with i915_ and move them to i915/Arkadiusz Hiler
They are i915-specific, so they belong to the directory. The (now) infix _pm_ is quite informative and worth keeping. v2: also prefix .c files Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ewelina Musial <ewelina.musial@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>