From: "Kahola, Mika" <mika.kahola@intel.com>
To: "daniel@ffwll.ch" <daniel@ffwll.ch>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Check supported format for rotation
Date: Thu, 4 Apr 2019 13:20:47 +0000 [thread overview]
Message-ID: <a32aef5b43cfffa6268aa2a2699cde2935faa878.camel@intel.com> (raw)
In-Reply-To: <20190404125756.GU2665@phenom.ffwll.local>
On Thu, 2019-04-04 at 14:57 +0200, Daniel Vetter wrote:
> On Thu, Apr 04, 2019 at 01:37:02PM +0300, Mika Kahola wrote:
> > Let's align with kernel and add checks for formats that are
> > not allowed to do 90/270 rotation.
> >
> > In dmesg we see for example, the following
> >
> > "[drm:skl_plane_check [i915]] Unsupported pixel format Y210
> > little-endian (0x30313259) for 90/270!"
> >
> > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
>
> Can we try to use try_commit/TEST_ONLY to figure at least some of
> this
> out? Duplicating hard-coded tables in tests from the kernel isn't
> great.
I see what the problem here is that we need to keep up with the tables
that are defined in kernel side also here in IGT side. We could do
try_commit but then kernel returns with -EINVAL. What should we do
then? We cannot be 100% sure that this was caused due to unsupported
format and skip this error and pass the test.
Maybe we could move all these tables into library routine instead? All
table would be defined in one place and probably the maintenance effort
would be less demanding?
Cheers,
Mika
>
> Note that the rotation support predates i915 atomic support, so back
> then
> we didn't have any other choice really. Now we do.
> -Daniel
>
> > ---
> > tests/kms_plane_scaling.c | 20 ++++++++++++++++++--
> > 1 file changed, 18 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> > index 3364073c..2d47c14b 100644
> > --- a/tests/kms_plane_scaling.c
> > +++ b/tests/kms_plane_scaling.c
> > @@ -176,9 +176,25 @@ static const igt_rotation_t rotations[] = {
> >
> > static bool can_rotate(data_t *d, unsigned format)
> > {
> > - if (format == DRM_FORMAT_C8 ||
> > - (intel_gen(d->devid) < 11 && format == DRM_FORMAT_RGB565))
> > + switch (format) {
> > + case DRM_FORMAT_RGB565:
> > + if (intel_gen(d->devid) >= 11)
> > + break;
> > + /* fall through */
> > + case DRM_FORMAT_C8:
> > + case DRM_FORMAT_XRGB16161616F:
> > + case DRM_FORMAT_XBGR16161616F:
> > + case DRM_FORMAT_ARGB16161616F:
> > + case DRM_FORMAT_ABGR16161616F:
> > + case DRM_FORMAT_Y210:
> > + case DRM_FORMAT_Y212:
> > + case DRM_FORMAT_Y216:
> > + case DRM_FORMAT_XVYU12_16161616:
> > + case DRM_FORMAT_XVYU16161616:
> > return false;
> > + default:
> > + break;
> > + }
> >
> > return true;
> > }
> > --
> > 2.17.1
> >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
>
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-04-04 13:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 10:37 [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Check supported format for rotation Mika Kahola
2019-04-04 12:57 ` Daniel Vetter
2019-04-04 13:20 ` Kahola, Mika [this message]
2019-04-04 13:57 ` Ville Syrjälä
2019-04-04 13:36 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-04-05 3:38 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-04-05 11:20 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_plane_scaling: Check supported format for rotation (rev2) Patchwork
2019-04-06 5:37 ` [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=a32aef5b43cfffa6268aa2a2699cde2935faa878.camel@intel.com \
--to=mika.kahola@intel.com \
--cc=daniel@ffwll.ch \
--cc=igt-dev@lists.freedesktop.org \
/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