[igt-dev] [PATCH i-g-t 4/4] tests/kms_getfb: Add meteorlake related ccs modifiers
Kahola, Mika
mika.kahola at intel.com
Mon May 22 12:56:15 UTC 2023
> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Juha-Pekka Heikkila
> Sent: Tuesday, May 16, 2023 6:43 PM
> To: igt-dev at lists.freedesktop.org
> Subject: [igt-dev] [PATCH i-g-t 4/4] 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.
>
Reviewed-by: Mika Kahola <mika.kahola at intel.com>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
> tests/kms_getfb.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c index 4adc7eee..f44f4255 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)
> --
> 2.25.1
More information about the igt-dev
mailing list