From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org,
Matthew Auld <matthew.auld@intel.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tests/kms_rotation_crc: Add bad-rotation subtest
Date: Thu, 21 Jul 2016 14:05:49 +0300 [thread overview]
Message-ID: <20160721110549.GW4329@intel.com> (raw)
In-Reply-To: <1469097168.4821.4.camel@linux.intel.com>
On Thu, Jul 21, 2016 at 01:32:48PM +0300, Joonas Lahtinen wrote:
> Was not this implemented once and then dropped for some reason?
Dunno.
>
> On ke, 2016-07-20 at 16:18 +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Add "bad-rotation" subtest to make sure the kernel rejects some
> > invalid rotation values (0 and specifying multiple angles at one).
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > tests/kms_rotation_crc.c | 33 +++++++++++++++++++++++++++++++++
> > 1 file changed, 33 insertions(+)
> >
> > diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> > index 6cc15337fff9..e10a0a770437 100644
> > --- a/tests/kms_rotation_crc.c
> > +++ b/tests/kms_rotation_crc.c
> > @@ -237,6 +237,31 @@ static void wait_for_pageflip(int fd)
> > igt_assert(drmHandleEvent(fd, &evctx) == 0);
> > }
> >
> > +static void test_bad_prop_value(data_t *data)
> > +{
> > + igt_display_t *display = &data->display;
> > + int valid_tests = 0;
> > + enum pipe pipe;
> > + igt_plane_t *plane;
> > + int ret;
> > +
> > + for_each_pipe(display, pipe) {
> > + for_each_plane_on_pipe(display, pipe, plane) {
> > + igt_require(igt_plane_supports_rotation(plane));
> > +
> > + ret = drmModeObjectSetProperty(display->drm_fd,
> > + plane->drm_plane->plane_id,
> > + DRM_MODE_OBJECT_PLANE,
> > + plane->rotation_property,
> > + data->rotation);
> > +
> > + igt_assert_eq(ret, -EINVAL);
> > + valid_tests++;
> > + }
> > + }
> > + igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
> > +}
> > +
> > static void test_plane_rotation(data_t *data, enum igt_plane plane_type)
> > {
> > igt_display_t *display = &data->display;
> > @@ -508,6 +533,14 @@ igt_main
> >
> > igt_display_init(&data.display, data.gfx_fd);
> > }
> > + igt_subtest_f("bad-rotation") {
> > + data.rotation = 0;
> > + test_bad_prop_value(&data);
> > +
> > + data.rotation = IGT_ROTATION_0 | IGT_ROTATION_180;
> > + test_bad_prop_value(&data);
> > + }
> > +
> > igt_subtest_f("primary-rotation-180") {
> > data.rotation = IGT_ROTATION_180;
> > test_plane_rotation(&data, IGT_PLANE_PRIMARY);
> --
> Joonas Lahtinen
> Open Source Technology Center
> Intel Corporation
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-07-21 11:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 13:18 [PATCH 0/7] drm/i915: Per-plane rotation, fixes, and mirroring for CHV ville.syrjala
2016-07-20 13:18 ` [PATCH 1/7] drm: Add drm_rotation_90_or_270() ville.syrjala
2016-07-20 13:24 ` Joonas Lahtinen
2016-07-20 13:41 ` [Intel-gfx] " Chris Wilson
2016-07-20 13:18 ` [PATCH 2/7] drm/atomic: Reject attempts to use multiple rotation angles at once ville.syrjala
2016-07-20 13:26 ` Joonas Lahtinen
2016-07-20 13:27 ` Chris Wilson
2016-07-20 13:18 ` [PATCH 3/7] drm: Add support for optional per-plane rotation property ville.syrjala
2016-07-20 13:31 ` [Intel-gfx] " Chris Wilson
2016-07-20 13:51 ` Joonas Lahtinen
2016-07-20 14:08 ` Ville Syrjälä
2016-07-20 14:13 ` Joonas Lahtinen
2016-07-20 13:18 ` [PATCH 4/7] drm/i915: Use the " ville.syrjala
2016-07-20 13:34 ` Chris Wilson
2016-07-20 13:57 ` Joonas Lahtinen
2016-07-20 14:13 ` Ville Syrjälä
2016-07-20 13:18 ` [PATCH 5/7] drm/i915: Use & instead if == to check for rotations ville.syrjala
2016-07-20 13:35 ` [Intel-gfx] " Chris Wilson
2016-07-20 14:01 ` Joonas Lahtinen
2016-07-20 14:14 ` Ville Syrjälä
2016-07-20 13:18 ` [PATCH 6/7] drm/i915: Clean up rotation DSPCNTR/DVSCNTR/etc. setup ville.syrjala
2016-07-20 13:37 ` Chris Wilson
2016-07-20 14:03 ` Joonas Lahtinen
2016-07-20 13:18 ` [PATCH 7/7] drm/i915: Add horizontal mirroring support for CHV pipe B planes ville.syrjala
2016-07-21 10:30 ` Joonas Lahtinen
2016-07-20 13:18 ` [PATCH i-g-t] tests/kms_rotation_crc: Add bad-rotation subtest ville.syrjala
2016-07-21 10:32 ` Joonas Lahtinen
2016-07-21 11:05 ` Ville Syrjälä [this message]
2016-07-22 12:52 ` Matthew Auld
2016-07-22 13:23 ` Ville Syrjälä
2016-07-20 14:17 ` ✓ Ro.CI.BAT: success for drm/i915: Per-plane rotation, fixes, and mirroring for CHV 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=20160721110549.GW4329@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=matthew.auld@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