summaryrefslogtreecommitdiff
path: root/tests/kms_frontbuffer_tracking.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-07-17 18:32:38 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-09-27 23:15:58 +0300
commit2238361afbfee71827e2ee6e71fc43f1a39dcefe (patch)
tree87a679513a25bf93ac774dcea3d8e8ffc7910d63 /tests/kms_frontbuffer_tracking.c
parentef43fce48d55eb0d37f9fb2f97785228dc844584 (diff)
lib/igt_fb: Pass around igt_fb internally
Instead of passing around a boatload of integers everywhere let's just pass around the igt_fb struct. That obviously means we have to populate it first sufficiently, to which end we'll add a small helper. Later on the stride/size calculations will consult the already pre-populated igt_fb and fill in the rest as needed. This makes the whole thing a lot less error prone as it's impossible to accidentally pass the arguments in the wrong order when there's just the one of them, and it's a pointer. v2: Rebase due to uint64_t size Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests/kms_frontbuffer_tracking.c')
-rw-r--r--tests/kms_frontbuffer_tracking.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 1bce6760..265c313a 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1157,7 +1157,7 @@ static void start_busy_thread(struct igt_fb *fb)
busy_thread.stop = false;
busy_thread.handle = fb->gem_handle;
busy_thread.size = fb->size;
- busy_thread.stride = fb->stride;
+ busy_thread.stride = fb->strides[0];
busy_thread.width = fb->width;
busy_thread.height = fb->height;
busy_thread.color = pick_color(fb, COLOR_PRIM_BG);
@@ -2859,7 +2859,7 @@ static void badstride_subtest(const struct test_mode *t)
create_fb(t->format, params->primary.fb->width + 4096, params->primary.fb->height,
opt.tiling, t->plane, &wide_fb);
- igt_assert(wide_fb.stride > 16384);
+ igt_assert(wide_fb.strides[0] > 16384);
fill_fb(&wide_fb, COLOR_PRIM_BG);
@@ -2928,7 +2928,7 @@ static void stridechange_subtest(const struct test_mode *t)
opt.tiling, t->plane, &new_fb);
fill_fb(&new_fb, COLOR_PRIM_BG);
- igt_assert(old_fb->stride != new_fb.stride);
+ igt_assert(old_fb->strides[0] != new_fb.strides[0]);
/* We can't assert that FBC will be enabled since there may not be
* enough space for the CFB, but we can check the CRC. */