summaryrefslogtreecommitdiff
path: root/tests/kms_frontbuffer_tracking.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-01-18 17:12:57 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-02-01 13:18:31 +0100
commite9277a3b6c44ae81c2e6f403e75e7612ce750c1f (patch)
treef362e0066871d62ba8223efa2d09ad23e3a7568f /tests/kms_frontbuffer_tracking.c
parentbe2f6fc1cba25372837daed6cec19107d44d3eb5 (diff)
lib/igt_fb: Pass format to igt_calc_fb_size
bpp is only sufficient to calculate dimensions for packed formats, in case of planar formats we need to pass the drm format fourcc, which will give us better information. This is required for supporting planar framebuffers. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'tests/kms_frontbuffer_tracking.c')
-rw-r--r--tests/kms_frontbuffer_tracking.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 79e4f586..1bbb6995 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -541,7 +541,6 @@ static void create_fb(enum pixel_format pformat, int width, int height,
{
uint32_t format;
unsigned int size, stride;
- int bpp;
uint64_t tiling_for_size;
switch (pformat) {
@@ -576,13 +575,12 @@ static void create_fb(enum pixel_format pformat, int width, int height,
* the same size regardless of tiling since we want to properly exercise
* the Kernel's specific tiling-checking code paths without accidentally
* hitting size-checking ones first. */
- bpp = igt_drm_format_to_bpp(format);
if (plane == PLANE_CUR)
tiling_for_size = LOCAL_DRM_FORMAT_MOD_NONE;
else
tiling_for_size = opt.tiling;
- igt_calc_fb_size(drm.fd, width, height, bpp, tiling_for_size, &size,
+ igt_calc_fb_size(drm.fd, width, height, format, tiling_for_size, &size,
&stride);
igt_create_fb_with_bo_size(drm.fd, width, height, format, tiling, fb,