mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 01:46:14 +00:00
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>
This commit is contained in:
parent
e609955067
commit
0eadf638e4
@ -110,7 +110,7 @@ static bool is_vc4_device(int fd)
|
|||||||
return !ret && strcmp("vc4", name) == 0;
|
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;
|
struct drm_i915_getparam gp;
|
||||||
int devid = 0;
|
int devid = 0;
|
||||||
@ -199,7 +199,7 @@ int drm_get_card(void)
|
|||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!is_i915_device(fd) || !is_intel(fd)) {
|
if (!is_i915_device(fd) || !has_known_intel_chipset(fd)) {
|
||||||
close(fd);
|
close(fd);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -234,7 +234,9 @@ int __drm_open_driver(int chipset)
|
|||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
continue;
|
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);
|
found_vc4 = is_vc4_device(fd) && (chipset & DRIVER_VC4);
|
||||||
|
|
||||||
@ -265,7 +267,7 @@ static int __drm_open_driver_render(int chipset)
|
|||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!is_i915_device(fd) || !is_intel(fd)) {
|
if (!is_i915_device(fd) || !has_known_intel_chipset(fd)) {
|
||||||
close(fd);
|
close(fd);
|
||||||
fd = -1;
|
fd = -1;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user