diff options
author | Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> | 2022-04-13 12:19:54 +0300 |
---|---|---|
committer | Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> | 2023-05-23 16:04:43 +0300 |
commit | 4b388fa87e1281587e723ef864e466fe396c3381 (patch) | |
tree | df8d89718f2c348c8797555eaaaf1bd2208f46ec /tests/kms_getfb.c | |
parent | 08d7b4960fd89ddc1a30a7b87152fc34d731a2d2 (diff) |
tests/kms_getfb: Add meteorlake related ccs modifiers
Add meteorlake related ccs modifiers for getfb2-accept-ccs and
getfb-reject-ccs subtests to allow them to run without skipping.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'tests/kms_getfb.c')
-rw-r--r-- | tests/kms_getfb.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c index 4adc7eee2..f44f42551 100644 --- a/tests/kms_getfb.c +++ b/tests/kms_getfb.c @@ -100,10 +100,15 @@ static void get_ccs_fb(int fd, struct drm_mode_fb_cmd2 *ret) size = add.pitches[0] * ALIGN(add.height, 8); size = ALIGN(size, 4096); } else if ((intel_display_ver(devid)) >= 12) { - add.modifier[0] = I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS; - add.modifier[1] = I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS; + add.modifier[0] = IS_METEORLAKE(devid) ? + I915_FORMAT_MOD_4_TILED_MTL_RC_CCS : + I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS; - /* The main surface for TGL is 4x4 tiles aligned + add.modifier[1] = IS_METEORLAKE(devid) ? + I915_FORMAT_MOD_4_TILED_MTL_RC_CCS : + I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS; + + /* The main surface for Gen12+ is 4x4 tiles aligned * For 32bpp the pitch is 4*4*32 bytes i.e. 512 bytes */ add.pitches[0] = ALIGN(add.width * 4, 4 * 128); @@ -138,7 +143,7 @@ static void get_ccs_fb(int fd, struct drm_mode_fb_cmd2 *ret) add.handles[0] = gem_buffer_create_fb_obj(fd, size); igt_require(add.handles[0] != 0); - if (!HAS_FLATCCS(intel_get_drm_devid(fd))) + if (!HAS_FLATCCS(devid)) add.handles[1] = add.handles[0]; if (drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &add) == 0) |