Patchwork [igt] igt/gem_mocs_settings: Force use of master device

login
register
mail settings
Submitter Chris Wilson
Date Dec. 7, 2017, 9:50 a.m.
Message ID <20171207095016.5687-1-chris@chris-wilson.co.uk>
Download mbox | patch
Permalink /patch/10097949/
State New
Headers show

Comments

Chris Wilson - Dec. 7, 2017, 9:50 a.m.
To use SECURE batches requires root + master, and we need SECURE batches
to write to the privileged mocs registers, do be sure to use
drm_open_driver_master()

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_mocs_settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/tests/gem_mocs_settings.c b/tests/gem_mocs_settings.c
index cb99010d7..29788b648 100644
--- a/tests/gem_mocs_settings.c
+++ b/tests/gem_mocs_settings.c
@@ -421,7 +421,7 @@  igt_main
 	int fd = -1;
 
 	igt_fixture {
-		fd = drm_open_driver(DRIVER_INTEL);
+		fd = drm_open_driver_master(DRIVER_INTEL); /* for SECURE */
 		igt_require_gem(fd);
 		gem_require_mocs_registers(fd);
 		igt_require(get_mocs_settings(fd, &table, false));