[i-g-t PATCH v2 01/17] lib: Rename is_intel to has_known_intel_chipset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As it reflects more clearly what the function actually does.

Suggested-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@xxxxxxxxxxxxx>
---

Changes in v2: None

 lib/drmtest.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 7b2227fe0f6a..b00f423d539b 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -110,7 +110,7 @@ static bool is_vc4_device(int fd)
 	return !ret && strcmp("vc4", name) == 0;
 }
 
-static bool is_intel(int fd)
+static bool has_known_intel_chipset(int fd)
 {
 	struct drm_i915_getparam gp;
 	int devid = 0;
@@ -219,7 +219,7 @@ int drm_get_card(void)
 		if (fd == -1)
 			continue;
 
-		if (!is_i915_device(fd) || !is_intel(fd)) {
+		if (!is_i915_device(fd) || !has_known_intel_chipset(fd)) {
 			close(fd);
 			continue;
 		}
@@ -254,7 +254,9 @@ int __drm_open_driver(int chipset)
 		if (fd == -1)
 			continue;
 
-		found_intel =  is_i915_device(fd) && is_intel(fd) && (chipset & DRIVER_INTEL);
+		found_intel = is_i915_device(fd) &&
+			      has_known_intel_chipset(fd) &&
+			      (chipset & DRIVER_INTEL);
 
 		found_vc4 = is_vc4_device(fd) && (chipset & DRIVER_VC4);
 
@@ -285,7 +287,7 @@ static int __drm_open_driver_render(int chipset)
 		if (fd == -1)
 			continue;
 
-		if (!is_i915_device(fd) || !is_intel(fd)) {
+		if (!is_i915_device(fd) || !has_known_intel_chipset(fd)) {
 			close(fd);
 			fd = -1;
 			continue;
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux