From: Karthik B S <karthik.b.s@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 4/8] tests/i915/kms_flip_tiling: Replace i915 interlace check with try_commit
Date: Mon, 18 Oct 2021 12:27:13 +0530 [thread overview]
Message-ID: <eafdb389-cc49-06e8-e35e-6a9ab7010d78@intel.com> (raw)
In-Reply-To: <20211013221727.6392-5-ville.syrjala@linux.intel.com>
On 10/14/2021 3:47 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Rather than having to maintain i915 specific exceptions here
> let's just use try_commit to figure out if we can even do the
> actual test (the page flip ioctl).
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
> tests/i915/kms_flip_tiling.c | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/tests/i915/kms_flip_tiling.c b/tests/i915/kms_flip_tiling.c
> index 0ed08f78f917..63e0b8b9648f 100644
> --- a/tests/i915/kms_flip_tiling.c
> +++ b/tests/i915/kms_flip_tiling.c
> @@ -65,6 +65,12 @@ static void pipe_crc_free(void)
> }
> }
>
> +static int try_commit(igt_display_t *display)
> +{
> + return igt_display_try_commit2(display, display->is_atomic ?
> + COMMIT_ATOMIC : COMMIT_LEGACY);
> +}
> +
> static void
> test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t modifier[2])
> {
> @@ -79,13 +85,6 @@ test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t mo
>
> mode = igt_output_get_mode(output);
>
> - /* Interlaced modes don't support Y/Yf tiling */
> - if (modifier[0] == I915_FORMAT_MOD_Y_TILED ||
> - modifier[0] == I915_FORMAT_MOD_Yf_TILED ||
> - modifier[1] == I915_FORMAT_MOD_Y_TILED ||
> - modifier[1] == I915_FORMAT_MOD_Yf_TILED)
> - igt_require(!(mode->flags & DRM_MODE_FLAG_INTERLACE));
> -
> primary = igt_output_get_plane(output, 0);
>
> fb_id = igt_create_pattern_fb(data->drm_fd,
> @@ -103,12 +102,16 @@ test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t mo
>
> /* Set the crtc and generate a reference CRC. */
> igt_plane_set_fb(primary, &data->fb[1]);
> - igt_display_commit(&data->display);
> + igt_require_f(try_commit(&data->display) == 0,
> + "commit failed with " IGT_MODIFIER_FMT "\n",
> + IGT_MODIFIER_ARGS(modifier[1]));
> igt_pipe_crc_collect_crc(pipe_crc, &reference_crc);
>
> /* Commit the first fb. */
> igt_plane_set_fb(primary, &data->fb[0]);
> - igt_display_commit(&data->display);
> + igt_require_f(try_commit(&data->display) == 0,
> + "commit failed with " IGT_MODIFIER_FMT "\n",
> + IGT_MODIFIER_ARGS(modifier[1]));
>
> /* Flip to the second fb. */
> ret = drmModePageFlip(data->drm_fd, output->config.crtc->crtc_id,
next prev parent reply other threads:[~2021-10-18 6:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 22:17 [igt-dev] [PATCH i-g-t 0/8] Promote kms_flip_tiling to general Ville Syrjala
2021-10-13 22:17 ` [igt-dev] [PATCH i-g-t 1/8] lib/fb: Introduce igt_fb_modifier_name() Ville Syrjala
2021-10-18 6:51 ` Karthik B S
2021-10-13 22:17 ` [igt-dev] [PATCH i-g-t 2/8] tests/kms_plane: Use IGT_MODIFIER_{FMT, ARGS} Ville Syrjala
2021-10-18 6:53 ` Karthik B S
2021-10-13 22:17 ` [igt-dev] [PATCH i-g-t 3/8] tests/i915/kms_flip_tiling: Drop ancient stride change restrictin Ville Syrjala
2021-10-18 6:56 ` Karthik B S
2021-10-13 22:17 ` [igt-dev] [PATCH i-g-t 4/8] tests/i915/kms_flip_tiling: Replace i915 interlace check with try_commit Ville Syrjala
2021-10-18 6:57 ` Karthik B S [this message]
2021-10-13 22:17 ` [igt-dev] [PATCH i-g-t 5/8] tests/i915/kms_flip_tiling: Generalize away copy-pasta Ville Syrjala
2021-10-18 7:02 ` Karthik B S
2021-10-18 7:28 ` Ville Syrjälä
2021-10-18 7:35 ` Karthik B S
2021-10-18 7:36 ` Ville Syrjälä
2021-10-13 22:17 ` [igt-dev] [PATCH i-g-t 6/8] tests/i915/kms_flip_tiling: Drop useless i915 include Ville Syrjala
2021-10-18 7:03 ` Karthik B S
2021-10-13 22:17 ` [igt-dev] [PATCH i-g-t 7/8] tests/i915/kms_flip_tiling: Stick pipe_crc into data_t Ville Syrjala
2021-10-18 7:04 ` Karthik B S
2021-10-13 22:17 ` [igt-dev] [PATCH i-g-t 8/8] tests/i915/kms_flip_tiling: Keep CRC running all the time Ville Syrjala
2021-10-18 7:05 ` Karthik B S
2021-10-13 23:07 ` [igt-dev] ✓ Fi.CI.BAT: success for Promote kms_flip_tiling to general Patchwork
2021-10-14 0:10 ` [igt-dev] ✓ Fi.CI.IGT: " 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=eafdb389-cc49-06e8-e35e-6a9ab7010d78@intel.com \
--to=karthik.b.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ville.syrjala@linux.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