#define type_name_fn(res) \
char * res##_str(int type) { \
- int i; \
+ unsigned int i; \
for (i = 0; i < ARRAY_SIZE(res##_names); i++) { \
if (res##_names[i].type == type) \
return res##_names[i].name; \
{
drmModePlaneRes *plane_resources;
drmModePlane *ovr;
- int i, j;
+ unsigned int i, j;
plane_resources = drmModeGetPlaneResources(fd);
if (!plane_resources) {
uint32_t plane_id = 0;
struct kms_bo *plane_bo;
uint32_t plane_flags = 0, format;
- int i, ret, crtc_x, crtc_y, crtc_w, crtc_h;
+ int ret, crtc_x, crtc_y, crtc_w, crtc_h;
+ unsigned int i;
/* find an unused plane which can be connected to our crtc */
plane_resources = drmModeGetPlaneResources(fd);
#define dump_resource(res) if (res) dump_##res()
-static int page_flipping_supported(int fd)
+static int page_flipping_supported(void)
{
/*FIXME: generic ioctl needed? */
return 1;
int encoders = 0, connectors = 0, crtcs = 0, planes = 0, framebuffers = 0;
int test_vsync = 0;
char *modules[] = { "i915", "radeon", "nouveau", "vmwgfx", "omapdrm" };
- char *modeset = NULL;
- int i, count = 0, plane_count = 0;
+ unsigned int i;
+ int count = 0, plane_count = 0;
struct connector con_args[2];
struct plane plane_args[2] = {0};
test_vsync = 1;
break;
case 's':
- modeset = strdup(optarg);
con_args[count].crtc = -1;
if (sscanf(optarg, "%d:%64s",
&con_args[count].id,
}
}
- if (test_vsync && !page_flipping_supported(fd)) {
+ if (test_vsync && !page_flipping_supported()) {
fprintf(stderr, "page flipping not supported by drm.\n");
return -1;
}