Changeset View
Changeset View
Standalone View
Standalone View
graphics/igt-gpu-tools/files/patch-tests_fbdev.c
- This file was added.
--- tests/fbdev.c.orig 2022-08-17 23:41:17 UTC | |||||
+++ tests/fbdev.c | |||||
@@ -35,7 +35,9 @@ | |||||
#include <sys/types.h> | |||||
#include <unistd.h> | |||||
+#ifdef __linux__ | |||||
#include <linux/fb.h> | |||||
+#endif | |||||
#include "igt.h" | |||||
@@ -55,6 +57,7 @@ static void pan_test(int fd, const struct fb_var_scree | |||||
static void pan_test(int fd, const struct fb_var_screeninfo *var, int expected_ret) | |||||
{ | |||||
+#ifdef __linux__ | |||||
struct fb_var_screeninfo pan_var, new_var; | |||||
int ret; | |||||
@@ -72,10 +75,12 @@ static void pan_test(int fd, const struct fb_var_scree | |||||
igt_assert_f(pan_var.xoffset == new_var.xoffset && pan_var.yoffset == new_var.yoffset, | |||||
"panning to (%u, %u) moved to (%u, %u)\n", | |||||
pan_var.xoffset, pan_var.yoffset, new_var.xoffset, new_var.yoffset); | |||||
+#endif | |||||
} | |||||
static void mode_tests(int fd) | |||||
{ | |||||
+#ifdef __linux__ | |||||
struct fb_var_screeninfo var_info; | |||||
struct fb_fix_screeninfo fix_info; | |||||
@@ -200,10 +205,12 @@ static void mode_tests(int fd) | |||||
/* restore original panning offsets */ | |||||
ioctl(fd, FBIOPAN_DISPLAY, &var_info); | |||||
} | |||||
+#endif | |||||
} | |||||
static void framebuffer_tests(int fd) | |||||
{ | |||||
+#ifdef __linux__ | |||||
const int values[] = { 0, 0x55, 0xaa, 0xff }; | |||||
struct fb_fix_screeninfo fix_info; | |||||
unsigned char * volatile map; | |||||
@@ -413,6 +420,7 @@ static void framebuffer_tests(int fd) | |||||
memset(map, 0, fix_info.smem_len); | |||||
munmap(map, fix_info.smem_len); | |||||
} | |||||
+#endif | |||||
} | |||||
igt_main |