Skip to contentSkip to conversation

lib/drmtest: Change DRIVER_INTEL check to avoid running GEM on non-Intel

PATCH In review [email protected] 2 participants 3 messages Jun 27, 2016 – Jun 28, 2016 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/drmtest: Change DRIVER_INTEL check to avoid running GEM on non-Intel

From: Robert Foss <[email protected]>

Avoid running gem_quiescent_gpu() on non-Intel hardware.

---
 lib/drmtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/drmtest.c +1 -1
index 632fec4..6427657 100644
@@ -338,7 +338,7 @@ int drm_open_driver(int chipset)
 	if (__sync_fetch_and_add(&open_count, 1))
 		return fd;
 
-	if(chipset & DRIVER_INTEL){
+	if(chipset == DRIVER_INTEL){
 		gem_quiescent_gpu(fd);
 		igt_install_exit_handler(quiescent_gpu_at_exit);
 	}
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 14 lines · On Mon, Jun 27, 2016 at 01:53:13PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Avoid running gem_quiescent_gpu() on non-Intel hardware.

---
 lib/drmtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/drmtest.c +0 -0
index 632fec4..6427657 100644

lib/drmtest.c int drm_open_driver(int chipset) · line 341

Quoted 5 lines
lib/drmtest.c +1 -1
@@ -338,7 +338,7 @@ int drm_open_driver(int chipset)
 	if (__sync_fetch_and_add(&open_count, 1))
 		return fd;
 
-	if(chipset & DRIVER_INTEL){
+	if(chipset == DRIVER_INTEL){

That doesn't work. You need an is_i915_device()
Took the liberty of making that change and pushing with your credit. -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Thanks Chris!

Quoted 18 lines · Chris Wilson
Quoted 17 lines · On Mon, Jun 27, 2016 at 01:53:13PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Avoid running gem_quiescent_gpu() on non-Intel hardware.

---
  lib/drmtest.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
lib/drmtest.c +0 -0
index 632fec4..6427657 100644
@@ -338,7 +338,7 @@ int drm_open_driver(int chipset)
  	if (__sync_fetch_and_add(&open_count, 1))
  		return fd;
 
Quoted 7 lines

lib/drmtest.c int drm_open_driver(int chipset) · line 341

Quoted 2 lines
lib/drmtest.c +1 -1
-	if(chipset & DRIVER_INTEL){
+	if(chipset == DRIVER_INTEL){

That doesn't work. You need an is_i915_device()
Took the liberty of making that change and pushing with your credit. -Chris

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx