diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-07-18 17:38:07 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-09-25 16:27:39 +0300 |
commit | c7b3e2465773f9fb30bf45976732028e4e4dc365 (patch) | |
tree | 6703d13493ffc7804e55f4f1af3dea9a50e49524 /tests/kms_available_modes_crc.c | |
parent | 42359edda12e5ebf715f2a978944a18baaba6490 (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/kms_available_modes_crc.c')
-rw-r--r-- | tests/kms_available_modes_crc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c index e77bd80f..09fb2e99 100644 --- a/tests/kms_available_modes_crc.c +++ b/tests/kms_available_modes_crc.c @@ -256,6 +256,7 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane, unsigned tile_width, tile_height; uint32_t strides[4] = {}; uint32_t offsets[4] = {}; + int num_planes = 1; uint64_t tiling; int bpp = 0; int i; @@ -302,6 +303,7 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane, offsets[1] = data->size; strides[1] = strides[0]; gemsize = data->size * 2; + num_planes = 2; } data->gem_handle = gem_create(data->gfx_fd, gemsize); @@ -312,7 +314,8 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane, ret = __kms_addfb(data->gfx_fd, data->gem_handle, w, h, format, tiling, strides, offsets, - LOCAL_DRM_MODE_FB_MODIFIERS, &data->fb.fb_id); + num_planes, LOCAL_DRM_MODE_FB_MODIFIERS, + &data->fb.fb_id); if(ret < 0) { igt_info("Creating fb for format %s failed, return code %d\n", |