diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2012-11-27 19:14:05 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-28 00:16:54 +0100 |
commit | b11887741cdcf28d962aa7957b2f8fd30b081e6b (patch) | |
tree | 4dce26ac044e2557deb2fe960e010e43198cc25f /tests/testdisplay.c | |
parent | e5315f9dad8eb1f24ce23d2a0b636a5ee3f4900a (diff) |
testdisplay: Use the fb stride when painting the color key
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55901
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/testdisplay.c')
-rw-r--r-- | tests/testdisplay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/testdisplay.c b/tests/testdisplay.c index cd83d9cd..72874870 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -334,7 +334,7 @@ static void connector_find_preferred_mode(struct connector *c) } static void -paint_color_key(void) +paint_color_key(struct kmstest_fb *fb_info) { int i, j; @@ -342,7 +342,7 @@ paint_color_key(void) for (j = crtc_x; j < crtc_x + crtc_w; j++) { uint32_t offset; - offset = (i * width) + j; + offset = (i * fb_info->stride / 4) + j; fb_ptr[offset] = SPRITE_COLOR_KEY; } } @@ -530,7 +530,7 @@ set_mode(struct connector *c) fb_ptr = gem_mmap(drm_fd, fb_info.gem_handle, fb_info.size, PROT_READ | PROT_WRITE); assert(fb_ptr); - paint_color_key(); + paint_color_key(&fb_info); gem_close(drm_fd, fb_info.gem_handle); |