diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2016-02-24 09:04:04 +0100 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2016-04-14 13:54:24 +0100 |
commit | 8a1a38661f5693409ad92b7ce60189dc52fe4ff6 (patch) | |
tree | 25c1378f51d0010dcffedf43fd0eaecbb71c2aa4 /lib/igt_fb.h | |
parent | 89b3ffe02c2a308c4663b6781ac1302c221932c2 (diff) |
lib: Add igt_create_bo_with_dimensions
igt_create_bo_with_dimensions() is intended to abstract differences
between drivers in buffer object creation.
The driver-specific ioctls will be called if the driver that is being
tested can satisfy the needs of the calling subtest, or it will be
skipped otherwise.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/igt_fb.h')
-rw-r--r-- | lib/igt_fb.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/igt_fb.h b/lib/igt_fb.h index c314aad0..ce2cc0f7 100644 --- a/lib/igt_fb.h +++ b/lib/igt_fb.h @@ -48,6 +48,7 @@ struct igt_fb { uint32_t fb_id; int fd; uint32_t gem_handle; + bool is_dumb; uint32_t drm_format; int width; int height; @@ -96,6 +97,11 @@ unsigned int igt_create_stereo_fb(int drm_fd, drmModeModeInfo *mode, void igt_remove_fb(int fd, struct igt_fb *fb); int igt_dirty_fb(int fd, struct igt_fb *fb); +int igt_create_bo_with_dimensions(int fd, int width, int height, uint32_t format, + uint64_t modifier, unsigned stride, + unsigned *stride_out, unsigned *size_out, + bool *is_dumb); + /* cairo-based painting */ cairo_t *igt_get_cairo_ctx(int fd, struct igt_fb *fb); void igt_paint_color(cairo_t *cr, int x, int y, int w, int h, |