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>
}
static void
-paint_color_key(void)
+paint_color_key(struct kmstest_fb *fb_info)
{
int i, j;
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;
}
}
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);