Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Maíra Canal" <mcanal@igalia.com>
To: Melissa Wen <mwen@igalia.com>,
	Petri Latvala <adrinael@adrinael.net>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/4] tests/kms_rotation_crc: use DRM_FORMAT_MOD_LINEAR as default modifier
Date: Mon,  3 Apr 2023 10:01:22 -0300	[thread overview]
Message-ID: <20230403130124.15946-3-mcanal@igalia.com> (raw)
In-Reply-To: <20230403130124.15946-1-mcanal@igalia.com>

If the rotation is 90 or 270 degrees, the function prepare_fbs() uses a
i915-specific modifier, I915_FORMAT_MOD_Y_TILED. In order to make the
function more generic, use a i915-specific modifier only if the device
is i915. Otherwise, use the DRM_FORMAT_MOD_LINEAR modifier.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
---
 tests/kms_rotation_crc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 0d7b3962..cf02306f 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -296,7 +296,8 @@ static void prepare_fbs(data_t *data, igt_output_t *output,
 	 * frame can fit in
 	 */
 	if (igt_rotation_90_or_270(data->rotation)) {
-		modifier = data->override_modifier ?: I915_FORMAT_MOD_Y_TILED;
+		if (is_i915_device(data->gfx_fd))
+			modifier = data->override_modifier ?: I915_FORMAT_MOD_Y_TILED;
 
 		igt_swap(w, h);
 	}
-- 
2.39.2

  parent reply	other threads:[~2023-04-03 13:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 13:01 [igt-dev] [PATCH i-g-t 0/4] kms_rotation_crc improvements and generalization Maíra Canal
2023-04-03 13:01 ` [igt-dev] [PATCH i-g-t 1/4] tests/kms_rotation_crc: make the subtest "bad-pixel-format" i915-specific Maíra Canal
2023-05-22 13:25   ` Kamil Konieczny
2023-04-03 13:01 ` Maíra Canal [this message]
2023-05-22 13:40   ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_rotation_crc: use DRM_FORMAT_MOD_LINEAR as default modifier Kamil Konieczny
2023-04-03 13:01 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_rotation_crc: add tests for a rotated plane in a given position Maíra Canal
2023-05-22 13:48   ` Kamil Konieczny
2023-04-03 13:01 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_rotation_crc: create generic reflection tests Maíra Canal
2023-05-22 14:02   ` Kamil Konieczny
2023-04-03 13:52 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_rotation_crc improvements and generalization Patchwork
2023-04-03 18:37 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-04-25 11:58 ` [igt-dev] [PATCH i-g-t 0/4] " Maíra Canal
2023-04-27 17:19 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_rotation_crc improvements and generalization (rev2) Patchwork
2023-04-27 23:52 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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=20230403130124.15946-3-mcanal@igalia.com \
    --to=mcanal@igalia.com \
    --cc=adrinael@adrinael.net \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=mwen@igalia.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