summaryrefslogtreecommitdiff
path: root/tests/i915/i915_pm_backlight.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-01-31 10:57:06 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-01-31 16:00:34 +0000
commitd524f385a17a73e3cfeeb2ed5a0610f0f0e3a61b (patch)
treef0b97d32ee4f9579561dff501826711370b2dd89 /tests/i915/i915_pm_backlight.c
parent93aefe6baa3fabf8c0cabe83e185f7b8f8d8753d (diff)
lib: Find the associated runtime-pm sysfs for the device
Remove the hardcoded path to the igfx (00:00:02.00) and instead pass in the fd of the DRM device we wish to control, and look up the associated device/power/ under sysfs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'tests/i915/i915_pm_backlight.c')
-rw-r--r--tests/i915/i915_pm_backlight.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/i915/i915_pm_backlight.c b/tests/i915/i915_pm_backlight.c
index 83b1ed68..08c07a57 100644
--- a/tests/i915/i915_pm_backlight.c
+++ b/tests/i915/i915_pm_backlight.c
@@ -156,7 +156,7 @@ static void test_fade(struct context *context)
static void
test_fade_with_dpms(struct context *context, igt_output_t *output)
{
- igt_require(igt_setup_runtime_pm());
+ igt_require(igt_setup_runtime_pm(output->display->drm_fd));
kmstest_set_connector_dpms(output->display->drm_fd,
output->config.connector,