Commit c256af5d authored by Imre Deak's avatar Imre Deak

test/kms, pm: use drm_open_any_master

These tests require DRM master right, so make sure they have it from the
beginning. This gives an early indication if another DRM master is running
and makes the given test skip (with a proper explanation of the reason)
instead of exiting with error.
Signed-off-by: Imre Deak's avatarImre Deak <imre.deak@intel.com>
parent bfda78cd
......@@ -36,7 +36,7 @@ igt_simple_main
size_t length;
int mode_count, connector_id;
drm_fd = drm_open_any();
drm_fd = drm_open_any_master();
res = drmModeGetResources(drm_fd);
igt_assert(drmSetClientCap(drm_fd, DRM_CLIENT_CAP_STEREO_3D, 1) >= 0);
......
......@@ -218,7 +218,7 @@ int fd;
igt_main
{
igt_fixture
fd = drm_open_any();
fd = drm_open_any_master();
pitch_tests(fd);
......
......@@ -492,7 +492,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
data.devid = intel_get_drm_devid(data.drm_fd);
......
......@@ -510,7 +510,7 @@ igt_main
char buf[64];
FILE *status;
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
kmstest_set_vt_graphics_mode();
data.devid = intel_get_drm_devid(data.drm_fd);
......
......@@ -212,7 +212,7 @@ igt_simple_main
igt_skip_on_simulation();
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
data.devid = intel_get_drm_devid(data.drm_fd);
......
......@@ -1590,7 +1590,7 @@ int main(int argc, char **argv)
igt_skip_on_simulation();
igt_fixture {
drm_fd = drm_open_any();
drm_fd = drm_open_any_master();
igt_enable_connectors();
......
......@@ -114,7 +114,7 @@ igt_simple_main
igt_skip_on_simulation();
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
kmstest_set_vt_graphics_mode();
igt_display_init(&data.display, data.drm_fd);
......
......@@ -127,7 +127,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
kmstest_set_vt_graphics_mode();
......
......@@ -38,7 +38,7 @@ main (int argc, char **argv)
igt_simple_init(argc, argv);
drm_fd = drm_open_any();
drm_fd = drm_open_any_master();
res = drmModeGetResources(drm_fd);
/* find the vga connector */
......
......@@ -542,7 +542,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
kmstest_set_vt_graphics_mode();
......
......@@ -229,7 +229,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
igt_enable_connectors();
......
......@@ -379,7 +379,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
kmstest_set_vt_graphics_mode();
......
......@@ -497,7 +497,7 @@ int main(int argc, char *argv[])
igt_skip_on_simulation();
igt_fixture {
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
kmstest_set_vt_graphics_mode();
data.devid = intel_get_drm_devid(data.drm_fd);
......
......@@ -230,7 +230,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
drm_fd = drm_open_any();
drm_fd = drm_open_any_master();
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
devid = intel_get_drm_devid(drm_fd);
......
......@@ -204,7 +204,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
data.gfx_fd = drm_open_any();
data.gfx_fd = drm_open_any_master();
kmstest_set_vt_graphics_mode();
......
......@@ -710,7 +710,7 @@ int main(int argc, char **argv)
"only one of -d and -t is accepted\n");
igt_fixture {
drm_fd = drm_open_any();
drm_fd = drm_open_any_master();
if (!dry_run)
kmstest_set_vt_graphics_mode();
......
......@@ -173,7 +173,7 @@ igt_simple_main
igt_skip_on_simulation();
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
kmstest_set_vt_graphics_mode();
igt_display_init(&data.display, data.drm_fd);
......
......@@ -560,7 +560,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
data.drm_fd = drm_open_any();
data.drm_fd = drm_open_any_master();
kmstest_set_vt_graphics_mode();
......
......@@ -226,7 +226,7 @@ igt_main
igt_fixture {
int i;
drm_fd = drm_open_any();
drm_fd = drm_open_any_master();
igt_require(drm_fd >= 0);
devid = intel_get_drm_devid(drm_fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment