public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] tests/intel/kms: Drop unneeded igt_device_set_master calls
@ 2026-02-26 23:10 Jonathan Cavitt
  2026-02-27  2:31 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jonathan Cavitt @ 2026-02-26 23:10 UTC (permalink / raw)
  To: igt-dev; +Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt

In kms_fbcon_fbt, igt_set_device_master is already called on the target
fd by drm_open_driver_master, so doing so again in the subtest function
is unnecessary.

In kms_pm_rpm, we call __drm_open_driver and igt_set_device_master while
asserting the return of the former is not -1.  This is already
accomplished by drm_open_driver_master, which also has additional guards
in place for i915, so just call that instead.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
 tests/intel/kms_fbcon_fbt.c | 1 -
 tests/intel/kms_pm_rpm.c    | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/intel/kms_fbcon_fbt.c b/tests/intel/kms_fbcon_fbt.c
index 36de84f985..e44be15f60 100644
--- a/tests/intel/kms_fbcon_fbt.c
+++ b/tests/intel/kms_fbcon_fbt.c
@@ -371,7 +371,6 @@ static void restore_fbcon(struct drm_info *drm)
 
 static void subtest(struct drm_info *drm, struct feature *feature, bool suspend)
 {
-	igt_device_set_master(drm->fd);
 	kmstest_set_vt_graphics_mode();
 
 	igt_require(feature->supported_on_chipset(drm->fd, drm->debugfs_fd));
diff --git a/tests/intel/kms_pm_rpm.c b/tests/intel/kms_pm_rpm.c
index 5f24fd49b1..e16218ceeb 100644
--- a/tests/intel/kms_pm_rpm.c
+++ b/tests/intel/kms_pm_rpm.c
@@ -750,9 +750,7 @@ static bool setup_environment(void)
 	if (has_runtime_pm)
 		goto out;
 
-	drm_fd = __drm_open_driver(DRIVER_INTEL | DRIVER_XE);
-	igt_require(drm_fd != -1);
-	igt_device_set_master(drm_fd);
+	drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
 
 	debugfs = igt_debugfs_dir(drm_fd);
 	igt_require(debugfs != -1);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-27 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26 23:10 [PATCH] tests/intel/kms: Drop unneeded igt_device_set_master calls Jonathan Cavitt
2026-02-27  2:31 ` ✓ i915.CI.BAT: success for " Patchwork
2026-02-27  2:40 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-02-27 10:45 ` ✓ Xe.CI.FULL: success " Patchwork
2026-02-27 11:20 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-27 14:12 ` [PATCH] " Kamil Konieczny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox