From: "Kahola, Mika" <mika.kahola@intel.com>
To: "Deak, Imre" <imre.deak@intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t v2] tests/kms_ccs: Select highest resolution
Date: Thu, 6 Feb 2020 14:05:10 +0000 [thread overview]
Message-ID: <1e9358007c6763f1457488dac9d0ee92dbbd0688.camel@intel.com> (raw)
In-Reply-To: <20200206133012.GA24639@ideak-desk.fi.intel.com>
On Thu, 2020-02-06 at 15:30 +0200, Imre Deak wrote:
> On Thu, Feb 06, 2020 at 09:48:06AM +0200, Mika Kahola wrote:
> > In some cases we select resolution that is insufficient for testing
> > and we receive unnecessary skips on CI. Let's loop through all
> > available
> > modes and select the higest one when running the tests.
> >
> > v2: Pointer to drmModeModeInfo (Imre)
> > Set default to back to preferred mode (Imre)
> > Search mode only in cases with misaligned or small aux strides
> > test flags (Imre)
> > Fix requirement to from vertical to horizontal (Imre)
> >
> > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> > ---
> > tests/kms_ccs.c | 22 ++++++++++++++++++++++
> > 1 file changed, 22 insertions(+)
> >
> > diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
> > index 2259a4f1..f1f6cc6b 100644
> > --- a/tests/kms_ccs.c
> > +++ b/tests/kms_ccs.c
> > @@ -276,6 +276,22 @@ static igt_plane_t
> > *compatible_main_plane(data_t *data)
> > return igt_output_get_plane_type(data->output,
> > DRM_PLANE_TYPE_PRIMARY);
> > }
> >
> > +static drmModeModeInfo *get_mode(drmModeModeInfo *preferred_mode,
>
> Maybe get_wide_mode() or similar to better describe what's this node
> is
> used for?
>
> > + igt_output_t *output)
> > +{
> > + drmModeModeInfo *mode, *tmp;
> > + int i;
> > +
> > + mode = preferred_mode;
> > + for (i = 0; i < output->config.connector->count_modes; i++) {
>
> if (mode->hdisplay > 1024)
> break;
>
> > + tmp = &output->config.connector->modes[i];
> > + if (tmp->hdisplay > mode->hdisplay)
> > + mode = tmp;
> > + }
> > +
> > + return mode;
> > +}
> > +
> > static bool try_config(data_t *data, enum test_fb_flags fb_flags,
> > igt_crc_t *crc)
> > {
> > @@ -298,6 +314,12 @@ static bool try_config(data_t *data, enum
> > test_fb_flags fb_flags,
> > data->ccs_modifier))
> > return false;
> >
> > + if ((fb_flags & FB_MISALIGN_AUX_STRIDE) ||
> > + (fb_flags & FB_SMALL_AUX_STRIDE)) {
> > + drm_mode = get_mode(drm_mode, data->output);
> > + igt_output_override_mode(data->output, drm_mode);
> > + }
> > +
> > if (data->plane && fb_flags & FB_COMPRESSED) {
> > if (!igt_plane_has_format_mod(data->plane, data-
> > >format,
> > data->ccs_modifier))
>
> At the end of try_config() we need to restore the default mode:
> igt_output_override_mode(output, NULL);
>
> With the above:
> Reviewed-by: Imre Deak <imre.deak@intel.com>
Pushed with the proposed changes. Thanks for the review!
-Mika-
>
>
> > --
> > 2.17.1
> >
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-02-06 14:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 7:48 [igt-dev] [PATCH i-g-t v2] tests/kms_ccs: Select highest resolution Mika Kahola
2020-02-06 8:34 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_ccs: Select highest resolution (rev2) Patchwork
2020-02-06 13:30 ` [igt-dev] [PATCH i-g-t v2] tests/kms_ccs: Select highest resolution Imre Deak
2020-02-06 14:05 ` Kahola, Mika [this message]
2020-02-09 0:13 ` [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_ccs: Select highest resolution (rev2) 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=1e9358007c6763f1457488dac9d0ee92dbbd0688.camel@intel.com \
--to=mika.kahola@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=imre.deak@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