summaryrefslogtreecommitdiff
path: root/tests/prime_vgem.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-07-18 17:38:07 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-09-25 16:27:39 +0300
commitc7b3e2465773f9fb30bf45976732028e4e4dc365 (patch)
tree6703d13493ffc7804e55f4f1af3dea9a50e49524 /tests/prime_vgem.c
parent42359edda12e5ebf715f2a978944a18baaba6490 (diff)
lib/kms: Pass the number of planes explicitly to __kms_addfb()
Currently __kms_addfb() assumes that only the first plane can be at offset 0. I don't particularly like such assumptions so let's just pass in the number of planes explicitly. We'll also require offsets[] to be passed in always. Nothing really to gain by making it optional. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests/prime_vgem.c')
-rw-r--r--tests/prime_vgem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
index b95fd4f5..5e0c4e28 100644
--- a/tests/prime_vgem.c
+++ b/tests/prime_vgem.c
@@ -751,6 +751,7 @@ static void test_flip(int i915, int vgem, unsigned hang)
for (int i = 0; i < 2; i++) {
uint32_t strides[4] = {};
+ uint32_t offsets[4] = {};
int fd;
bo[i].width = 1024;
@@ -768,7 +769,7 @@ static void test_flip(int i915, int vgem, unsigned hang)
do_or_die(__kms_addfb(i915, handle[i],
bo[i].width, bo[i].height,
DRM_FORMAT_XRGB8888, I915_TILING_NONE,
- strides, NULL,
+ strides, offsets, 1,
LOCAL_DRM_MODE_FB_MODIFIERS, &fb_id[i]));
igt_assert(fb_id[i]);
}