lib: extract kmstest_dump_mode

This commit is contained in:
Daniel Vetter
2012-05-22 16:15:15 +02:00
parent b7aa6756ce
commit 17787f30c6
5 changed files with 25 additions and 49 deletions
+19 -2
View File
@@ -37,8 +37,6 @@
#include <pciaccess.h>
#include <math.h>
#include "xf86drmMode.h"
#include "drmtest.h"
#include "i915_drm.h"
#include "intel_chipset.h"
@@ -719,3 +717,22 @@ unsigned int kmstest_create_fb(int fd, int width, int height, int bpp,
return fb_id;
}
void kmstest_dump_mode(drmModeModeInfo *mode)
{
printf(" %s %d %d %d %d %d %d %d %d %d 0x%x 0x%x %d\n",
mode->name,
mode->vrefresh,
mode->hdisplay,
mode->hsync_start,
mode->hsync_end,
mode->htotal,
mode->vdisplay,
mode->vsync_start,
mode->vsync_end,
mode->vtotal,
mode->flags,
mode->type,
mode->clock);
}
+2
View File
@@ -34,6 +34,7 @@
#include <cairo.h>
#include "xf86drm.h"
#include "xf86drmMode.h"
#include "intel_batchbuffer.h"
int drm_get_card(int master);
@@ -90,6 +91,7 @@ unsigned int kmstest_create_fb(int fd, int width, int height, int bpp,
struct kmstest_fb *fb_info,
kmstest_paint_func paint_func,
void *func_arg);
void kmstest_dump_mode(drmModeModeInfo *mode);
inline static void _do_or_die(const char *function, int line, int ret)
{