diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2014-06-30 16:44:30 -0700 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2014-07-04 12:04:26 +0100 |
commit | 3f46e815589ac5c0e9ba2d5ab94e7eff09527a8d (patch) | |
tree | 56a26dc5d7e4af3529e65c32cf085906fa6ddb00 /tests/kms_cursor_crc.c | |
parent | 07087ada293b18823ca10762bc7e28740bb0e6bf (diff) |
tests/kms_cursor_crc: Call drmModeMoveCursor() directly
We're calling drmModeSetCursor() to change the cursor image and never
actually doing a display commit (aside from when we display the cursor),
so call the move ioctl directly rather than igt_plane_set_position() to
ensure the changes actually take effect.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'tests/kms_cursor_crc.c')
-rw-r--r-- | tests/kms_cursor_crc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index d21fc998..82807b7b 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -349,10 +349,10 @@ static void test_cursor_size(data_t *data) igt_display_t *display = &data->display; igt_pipe_crc_t *pipe_crc = data->pipe_crc; igt_crc_t crc[10], ref_crc; - igt_plane_t *cursor; cairo_t *cr; uint32_t fb_id; int i, size, cursor_max_size = data->cursor_max_size; + int ret; /* Create a maximum size cursor, then change the size in flight to * smaller ones to see that the size is applied correctly @@ -367,12 +367,12 @@ static void test_cursor_size(data_t *data) /* Hardware test loop */ cursor_enable(data); - cursor = igt_output_get_plane(data->output, IGT_PLANE_CURSOR); - igt_plane_set_position(cursor, 0, 0); + ret = drmModeMoveCursor(data->drm_fd, data->output->config.crtc->crtc_id, 0, 0); + igt_assert(ret == 0); for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) { /* Change size in flight: */ - int ret = drmModeSetCursor(data->drm_fd, data->output->config.crtc->crtc_id, - data->fb.gem_handle, size, size); + ret = drmModeSetCursor(data->drm_fd, data->output->config.crtc->crtc_id, + data->fb.gem_handle, size, size); igt_assert(ret == 0); igt_wait_for_vblank(data->drm_fd, data->pipe); igt_pipe_crc_collect_crc(pipe_crc, &crc[i]); |