summaryrefslogtreecommitdiff
path: root/tests/kms_plane.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-26 09:18:11 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-26 18:50:27 +0100
commit9aea7ae541212e4116af8d5d922d7cbcc571df50 (patch)
treeaf199ac060429b4ad99d557bc6f4de45156d9e03 /tests/kms_plane.c
parent57d7db8cf8c407541d1ed57348a6f468c2b73577 (diff)
lib/igt_fb: switch to igt_ prefix from kmstest_
Shorter and more in line with our general igt_ prefix for everything which isn't somehow intel or i915-gem or otherwise hw specific - these helpers here are all fully generic framebuffer handling functions based on kms + cairo. Well, the actual buffer alloc is done with i915 gem, but meh ;-) Two special cases: - bpp_depth_to_drm_format and drm_format_to_bpp completely lacked prefixes, so just add igt_. - write_fb was a bit misleading given that we have gem_write for uploading to buffers. Rename that to write_fb_to_png to make it crystal clear what this thing does even without looking at docs. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/kms_plane.c')
-rw-r--r--tests/kms_plane.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index b24a1b77..6bdbca32 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -63,22 +63,22 @@ static void
create_fb_for_mode__position(data_t *data, drmModeModeInfo *mode,
double rect_x, double rect_y,
double rect_w, double rect_h,
- struct kmstest_fb *fb /* out */)
+ struct igt_fb *fb /* out */)
{
unsigned int fb_id;
cairo_t *cr;
- fb_id = kmstest_create_fb(data->drm_fd,
+ fb_id = igt_create_fb(data->drm_fd,
mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
false /* tiling */,
fb);
igt_assert(fb_id);
- cr = kmstest_get_cairo_ctx(data->drm_fd, fb);
- kmstest_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay,
+ cr = igt_get_cairo_ctx(data->drm_fd, fb);
+ igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay,
0.0, 1.0, 0.0);
- kmstest_paint_color(cr, rect_x, rect_y, rect_w, rect_h, 0.0, 0.0, 0.0);
+ igt_paint_color(cr, rect_x, rect_y, rect_w, rect_h, 0.0, 0.0, 0.0);
igt_assert(cairo_status(cr) == 0);
cairo_destroy(cr);
}
@@ -87,7 +87,7 @@ static void
test_position_init(test_position_t *test, igt_output_t *output, enum pipe pipe)
{
data_t *data = test->data;
- struct kmstest_fb green_fb;
+ struct igt_fb green_fb;
drmModeModeInfo *mode;
igt_plane_t *primary;
@@ -97,7 +97,7 @@ test_position_init(test_position_t *test, igt_output_t *output, enum pipe pipe)
primary = igt_output_get_plane(output, 0);
mode = igt_output_get_mode(output);
- kmstest_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
+ igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
false, /* tiled */
0.0, 1.0, 0.0,
@@ -111,7 +111,7 @@ test_position_init(test_position_t *test, igt_output_t *output, enum pipe pipe)
igt_plane_set_fb(primary, NULL);
igt_display_commit(&data->display);
- kmstest_remove_fb(data->drm_fd, &green_fb);
+ igt_remove_fb(data->drm_fd, &green_fb);
}
static void
@@ -136,7 +136,7 @@ test_plane_position_with_output(data_t *data,
{
test_position_t test = { .data = data };
igt_plane_t *primary, *sprite;
- struct kmstest_fb primary_fb, sprite_fb;
+ struct igt_fb primary_fb, sprite_fb;
drmModeModeInfo *mode;
igt_crc_t crc;
@@ -153,7 +153,7 @@ test_plane_position_with_output(data_t *data,
&primary_fb);
igt_plane_set_fb(primary, &primary_fb);
- kmstest_create_color_fb(data->drm_fd,
+ igt_create_color_fb(data->drm_fd,
64, 64, /* width, height */
DRM_FORMAT_XRGB8888,
false, /* tiled */