summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-03-08 09:18:45 +0100
committerDaniel Stone <daniels@collabora.com>2016-04-14 13:54:24 +0100
commit0eadf638e4e11394adcb574b986f5dea077d4a4c (patch)
tree91123b76bf5447c8616118cf9722c14d83c3e15c /lib/drmtest.c
parente609955067b628c85297665e233b56da2c64c48d (diff)
lib: Rename is_intel to has_known_intel_chipset
As it reflects more clearly what the function actually does. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 01e874b7..02ba57ee 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;
@@ -199,7 +199,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;
}
@@ -234,7 +234,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);
@@ -265,7 +267,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;