Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Govindapillai <vinod.govindapillai@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: vinod.govindapillai@intel.com, swati2.sharma@intel.com,
	jeevan.b@intel.com, jani.saarinen@intel.com
Subject: [PATCH i-g-t v1] tests/intel/kms_dirty-fb: update modifier based on display version for fbc
Date: Thu, 20 Feb 2025 16:13:10 +0200	[thread overview]
Message-ID: <20250220141310.229053-1-vinod.govindapillai@intel.com> (raw)

FBC on display version 8 below supports only I915_FORMAT_MOD_X_TILED
modifier. So update the FBC specific tests based on this restriction,

Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
 tests/intel/kms_dirtyfb.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/tests/intel/kms_dirtyfb.c b/tests/intel/kms_dirtyfb.c
index f2bdd4546..e0fd84ade 100644
--- a/tests/intel/kms_dirtyfb.c
+++ b/tests/intel/kms_dirtyfb.c
@@ -58,6 +58,7 @@ typedef struct {
 	int debugfs_fd;
 	igt_display_t display;
 	drmModeModeInfo *mode;
+	uint64_t modifier;
 	igt_output_t *output;
 	igt_pipe_crc_t *pipe_crc;
 	enum pipe pipe;
@@ -238,7 +239,7 @@ static void prepare(data_t *data)
 
 	igt_create_color_fb(data->drm_fd, data->mode->hdisplay,
 			    data->mode->vdisplay, DRM_FORMAT_XRGB8888,
-			    DRM_FORMAT_MOD_LINEAR, 0.0, 1.0, 0.0,
+			    data->modifier, 0.0, 1.0, 0.0,
 			    &data->fbs[0]);
 
 	igt_draw_rect_fb(data->drm_fd, data->bops, 0, &data->fbs[0],
@@ -260,7 +261,7 @@ static void prepare(data_t *data)
 
 	igt_create_color_fb(data->drm_fd,  data->mode->hdisplay,
 			    data->mode->vdisplay, DRM_FORMAT_XRGB8888,
-			    DRM_FORMAT_MOD_LINEAR, 0.0, 1.0, 0.0,
+			    data->modifier, 0.0, 1.0, 0.0,
 			    &data->fbs[1]);
 	igt_draw_rect_fb(data->drm_fd, data->bops, 0, &data->fbs[1],
 			 data->rendercopy ? IGT_DRAW_RENDER : IGT_DRAW_BLT,
@@ -268,8 +269,8 @@ static void prepare(data_t *data)
 			 data->fbs[1].height, 0xFF);
 
 	igt_create_color_fb(data->drm_fd, data->mode->hdisplay,
-			     data->mode->vdisplay, DRM_FORMAT_XRGB8888,
-			    DRM_FORMAT_MOD_LINEAR, 0.0, 1.0, 0.0,
+			    data->mode->vdisplay, DRM_FORMAT_XRGB8888,
+			    data->modifier, 0.0, 1.0, 0.0,
 			    &data->fbs[2]);
 
 	igt_plane_set_fb(primary, &data->fbs[2]);
@@ -386,6 +387,13 @@ igt_main
 					igt_skip_on_f((IS_BATTLEMAGE(data.devid) && data.feature == FEATURE_FBC),
 						       "FBC isn't supported on BMG\n");
 
+					/* FBC Disp_ver 8 and below supports only I915_FORMAT_MOD_X_TILED */
+					if (data.feature == FEATURE_FBC &&
+					    intel_display_ver(intel_get_drm_devid(data.drm_fd) <= 8))
+						data.modifier = I915_FORMAT_MOD_X_TILED;
+					else
+						data.modifier = DRM_FORMAT_MOD_LINEAR;
+
 					if (!check_support(&data))
 						continue;
 
-- 
2.43.0


             reply	other threads:[~2025-02-20 14:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20 14:13 Vinod Govindapillai [this message]
2025-02-20 18:13 ` ✓ Xe.CI.BAT: success for tests/intel/kms_dirty-fb: update modifier based on display version for fbc Patchwork
2025-02-20 18:20 ` ✓ i915.CI.BAT: " Patchwork
2025-02-20 20:20 ` ✗ i915.CI.Full: failure " Patchwork
2025-02-25 13:48   ` Govindapillai, Vinod
2025-02-21 11:39 ` ✗ Xe.CI.Full: " Patchwork
2025-02-27 13:50 ` [PATCH i-g-t v1] " Juha-Pekka Heikkilä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250220141310.229053-1-vinod.govindapillai@intel.com \
    --to=vinod.govindapillai@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.saarinen@intel.com \
    --cc=jeevan.b@intel.com \
    --cc=swati2.sharma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox