mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-11 16:32:58 +00:00
lib: extract kmstest_dump_mode
This commit is contained in:
+19
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user