From: Pekka Paalanen <pekka.paalanen@collabora.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, "Simon Ser" <contact@emersion.fr>,
"Jonas Ådahl" <jadahl@redhat.com>,
"Daniel Stone" <daniel@fooishbar.org>,
"Sameer Lattannavar" <sameer.lattannavar@intel.com>,
"Sebastian Wick" <sebastian.wick@redhat.com>,
"Harry Wentland" <harry.wentland@amd.com>
Subject: Re: [PATCH i-g-t 4/5] tests/kms_cursor_crc: Test the SIZE_HINTS property
Date: Thu, 4 Apr 2024 15:52:50 +0300 [thread overview]
Message-ID: <20240404155250.7fb245d2.pekka.paalanen@collabora.com> (raw)
In-Reply-To: <Zg6HQgfK4JZtH2tB@intel.com>
[-- Attachment #1: Type: text/plain, Size: 5463 bytes --]
On Thu, 4 Apr 2024 13:56:02 +0300
Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Thu, Apr 04, 2024 at 11:51:05AM +0300, Pekka Paalanen wrote:
> > On Fri, 15 Mar 2024 21:15:04 +0200
> > Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> >
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > Make sure the driver accepts all the sizes declared in the
> > > plane's SIZE_HINTS property.
> > >
> > > TODO: Actually test that each reported size works fully?
> >
> > What does this mean? What does cursor_size_supported() do?
>
> It does a TEST_ONLY commit using data->fb and the specified size.
> So just confirms that the kernel accepts it, not that it actually
> looks correct on screen.
Good, that's better than my first impression.
> > I don't know that, so it looks like you just create an FB and destroy
> > it, never putting it on the plane where the SIZE_HINTS were found.
> >
> > > Would need a bunch of restructuring of the test,
> > > and for the moment i915 is the only driver that
> > > supports SIZE_HINTS and it's already >100% covered
> > > by the existing tests. So I'll leave this for the
> > > next guy whose driver has different needs...
> >
> > How would they know to fix this test? They just see the test pass and
> > are happy, right?
>
> I would expect them to actually care about testing their driver
> properly. But perhaps my expectations are a bit high.
Yeah, a screenshot or CRC test would be best.
> >
> > This is the only question I have here, everything else is
> >
> > Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
>
> Ta.
This seems just enough, so please have my acked-by for this patch as
is, too.
Thanks,
pq
>
> >
> >
> > Thanks,
> > pq
> >
> >
> > >
> > > Cc: Simon Ser <contact@emersion.fr>
> > > Cc: Jonas Ådahl <jadahl@redhat.com>
> > > Cc: Daniel Stone <daniel@fooishbar.org>
> > > Cc: Sameer Lattannavar <sameer.lattannavar@intel.com>
> > > Cc: Sebastian Wick <sebastian.wick@redhat.com>
> > > Cc: Harry Wentland <harry.wentland@amd.com>
> > > Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > > tests/kms_cursor_crc.c | 63 ++++++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 63 insertions(+)
> > >
> > > diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> > > index 38b354972afd..6543e09d3ebb 100644
> > > --- a/tests/kms_cursor_crc.c
> > > +++ b/tests/kms_cursor_crc.c
> > > @@ -55,6 +55,10 @@
> > > * Description: Check random placement of a cursor with suspend.
> > > * Functionality: cursor, suspend
> > > *
> > > + * SUBTEST: cursor-size-hints
> > > + * Description: Check that sizes declared in SIZE_HINTS are accepted.
> > > + * Functionality: cursor
> > > + *
> > > * SUBTEST: cursor-%s
> > > * Description: %arg[1]
> > > *
> > > @@ -817,6 +821,46 @@ static bool execution_constraint(enum pipe pipe)
> > > return false;
> > > }
> > >
> > > +static void test_size_hints(data_t *data)
> > > +{
> > > + const struct drm_plane_size_hint *hints;
> > > + drmModePropertyBlobPtr blob;
> > > + uint64_t blob_id;
> > > + int count;
> > > +
> > > + igt_require(igt_plane_has_prop(data->cursor, IGT_PLANE_SIZE_HINTS));
> > > +
> > > + blob_id = igt_plane_get_prop(data->cursor, IGT_PLANE_SIZE_HINTS);
> > > + /*
> > > + * blob_id==0 is reserved for potential future use, but the
> > > + * meaning has not yet been defined for fail outright if we see it.
> > > + */
> > > + igt_assert(blob_id);
> > > +
> > > + blob = drmModeGetPropertyBlob(data->drm_fd, blob_id);
> > > + igt_assert(blob);
> > > +
> > > + hints = blob->data;
> > > + count = blob->length / sizeof(hints[0]);
> > > + igt_assert_lt(0, count);
> > > +
> > > + for (int i = 0; i < count; i++) {
> > > + int w = hints[i].width;
> > > + int h = hints[i].height;
> > > +
> > > + igt_create_fb(data->drm_fd, w, h,
> > > + DRM_FORMAT_ARGB8888,
> > > + DRM_FORMAT_MOD_LINEAR,
> > > + &data->fb);
> > > +
> > > + igt_assert(cursor_size_supported(data, w, h));
> > > +
> > > + igt_remove_fb(data->drm_fd, &data->fb);
> > > + }
> > > +
> > > + drmModeFreePropertyBlob(blob);
> > > +}
> > > +
> > > static void run_size_tests(data_t *data, int w, int h)
> > > {
> > > enum pipe pipe;
> > > @@ -1011,6 +1055,25 @@ static void run_tests_on_pipe(data_t *data)
> > > igt_fixture
> > > igt_remove_fb(data->drm_fd, &data->fb);
> > >
> > > + igt_describe("Check that sizes declared in SIZE_HINTS are accepted.");
> > > + igt_subtest_with_dynamic("cursor-size-hints") {
> > > + for_each_pipe_with_single_output(&data->display, pipe, data->output) {
> > > + if (execution_constraint(pipe))
> > > + continue;
> > > +
> > > + data->pipe = pipe;
> > > +
> > > + if (!valid_pipe_output_combo(data))
> > > + continue;
> > > +
> > > + igt_dynamic_f("pipe-%s-%s",
> > > + kmstest_pipe_name(pipe),
> > > + data->output->name)
> > > + run_test(data, test_size_hints,
> > > + data->cursor_max_w, data->cursor_max_h);
> > > + }
> > > + }
> > > +
> > > for (cursor_size = 32; cursor_size <= 512; cursor_size *= 2) {
> > > int w = cursor_size;
> > > int h = cursor_size;
> >
>
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-04-04 12:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 19:15 [PATCH i-g-t 0/5] tests/kms_cursor_crc: Test SIZE_HINTS Ville Syrjala
2024-03-15 19:15 ` [PATCH i-g-t 1/5] wip: drm-uapi: add drm_plane_size_hints Ville Syrjala
2024-03-15 19:15 ` [PATCH i-g-t 2/5] lib/igt_kms: Add IGT_PLANE_SIZE_HINTS Ville Syrjala
2024-03-15 19:15 ` [PATCH i-g-t 3/5] tests/kms_cursor_crc: Make require_cursor_size() a bit more sensible Ville Syrjala
2024-03-15 19:15 ` [PATCH i-g-t 4/5] tests/kms_cursor_crc: Test the SIZE_HINTS property Ville Syrjala
2024-04-04 8:51 ` Pekka Paalanen
2024-04-04 10:56 ` Ville Syrjälä
2024-04-04 12:52 ` Pekka Paalanen [this message]
2024-04-04 13:05 ` Ville Syrjälä
2024-03-15 19:15 ` [PATCH i-g-t 5/5] CI: tests/intel-ci: Run kms_cursor_crc@cursor-size-hints Ville Syrjala
2024-03-15 20:09 ` ✓ CI.xeBAT: success for tests/kms_cursor_crc: Test SIZE_HINTS Patchwork
2024-03-15 20:11 ` ✓ Fi.CI.BAT: " Patchwork
2024-03-16 21:18 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-03-18 10:45 ` [PATCH i-g-t 0/5] " Sebastian Wick
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=20240404155250.7fb245d2.pekka.paalanen@collabora.com \
--to=pekka.paalanen@collabora.com \
--cc=contact@emersion.fr \
--cc=daniel@fooishbar.org \
--cc=harry.wentland@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jadahl@redhat.com \
--cc=sameer.lattannavar@intel.com \
--cc=sebastian.wick@redhat.com \
--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