diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-07-17 18:32:38 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-09-27 23:15:58 +0300 |
commit | 2238361afbfee71827e2ee6e71fc43f1a39dcefe (patch) | |
tree | 87a679513a25bf93ac774dcea3d8e8ffc7910d63 /tests/kms_flip.c | |
parent | ef43fce48d55eb0d37f9fb2f97785228dc844584 (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_flip.c')
-rw-r--r-- | tests/kms_flip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 393d690a..f7d08a60 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -592,7 +592,7 @@ static void recreate_fb(struct test_output *o) igt_assert(r); do_or_die(drmModeAddFB(drm_fd, o->fb_width, o->fb_height, o->depth, - o->bpp, fb_info->stride, + o->bpp, fb_info->strides[0], r->handle, &new_fb_id)); gem_close(drm_fd, r->handle); @@ -612,7 +612,7 @@ static void set_y_tiling(struct test_output *o, int fb_idx) r = drmModeGetFB(drm_fd, fb_info->fb_id); igt_assert(r); /* Newer kernels don't allow such shenagians any more, so skip the test. */ - igt_require(__gem_set_tiling(drm_fd, r->handle, I915_TILING_Y, fb_info->stride) == 0); + igt_require(__gem_set_tiling(drm_fd, r->handle, I915_TILING_Y, fb_info->strides[0]) == 0); gem_close(drm_fd, r->handle); drmFree(r); } |