From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 2/6] tests/kms_invalid_mode: Convert the max dotclock test into a subtest
Date: Tue, 5 Oct 2021 13:38:53 +0300 [thread overview]
Message-ID: <YVwrPRiNN4lWNlMp@intel.com> (raw)
In-Reply-To: <YVwqFqjfzVW1RcOH@platvala-desk.ger.corp.intel.com>
On Tue, Oct 05, 2021 at 01:33:58PM +0300, Petri Latvala wrote:
> On Tue, Oct 05, 2021 at 03:43:50PM +0530, Karthik B S wrote:
> > On 9/16/2021 9:05 PM, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > We want to add different subtests to kms_invalud_mode. Convert
> >
> > Hi,
> >
> > Typo: 'kms_invalud_mode'
> >
> > > the current max dotclock test into a subtest.
> > >
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > > tests/i915/kms_invalid_mode.c | 80 +++++++++++++++++++++++++----------
> > > 1 file changed, 57 insertions(+), 23 deletions(-)
> > >
> > > diff --git a/tests/i915/kms_invalid_mode.c b/tests/i915/kms_invalid_mode.c
> > > index dc30e6bb5444..8b24993e40a3 100644
> > > --- a/tests/i915/kms_invalid_mode.c
> > > +++ b/tests/i915/kms_invalid_mode.c
> > > @@ -27,13 +27,16 @@
> > > IGT_TEST_DESCRIPTION("Make sure all modesets are rejected when the requested mode is invalid");
> > > -typedef struct {
> > > +typedef struct _data data_t;
> > > +
> > > +struct _data {
> > > int drm_fd;
> > > igt_display_t display;
> > > igt_output_t *output;
> > > drmModeResPtr res;
> > > int max_dotclock;
> > > -} data_t;
> > > + bool (*adjust_mode)(data_t *data, drmModeModeInfoPtr mode);
> > > +};
> > > static bool has_scaling_mode_prop(data_t *data)
> > > {
> > > @@ -63,13 +66,10 @@ can_bigjoiner(data_t *data)
> > > return false;
> > > }
> > > -static int
> > > -test_output(data_t *data)
> > > +static bool
> > > +adjust_mode_clock_too_high(data_t *data, drmModeModeInfoPtr mode)
> > > {
> > > - igt_output_t *output = data->output;
> > > - drmModeModeInfo mode;
> > > - struct igt_fb fb;
> > > - int i;
> > > + igt_require(data->max_dotclock != 0);
> > > /*
> > > * FIXME When we have a fixed mode, the kernel will ignore
> > > @@ -80,14 +80,28 @@ test_output(data_t *data)
> > > * test on any connector with a fixed mode.
> > > */
> > > if (has_scaling_mode_prop(data))
> > > - return 0;
> > > + return false;
> > > +
> > > + mode->clock = data->max_dotclock + 1;
> > > +
> > > + return true;
> > > +}
> > > +
> > > +static int
> > > +test_output(data_t *data)
> > > +{
> > > + igt_output_t *output = data->output;
> > > + drmModeModeInfo mode;
> > > + struct igt_fb fb;
> > > + int i;
> > > /*
> > > * FIXME test every mode we have to be more
> > > * sure everything is really getting rejected?
> > > */
> > > mode = *igt_output_get_mode(output);
> > > - mode.clock = data->max_dotclock + 1;
> > > + if (!data->adjust_mode(data, &mode))
> > > + return 0;
> > > /*
> > > * Newer platforms can support modes higher than the maximum dot clock
> > > @@ -154,25 +168,45 @@ static int i915_max_dotclock(data_t *data)
> > > return max_dotclock;
> > > }
> > > +static const struct {
> > > + const char *name;
> > > + bool (*adjust_mode)(data_t *data, drmModeModeInfoPtr mode);
> > > +} subtests[] = {
> > > + { .name = "clock-too-high",
> > > + .adjust_mode = adjust_mode_clock_too_high,
> > > + },
> > > +};
> > > +
> > > static data_t data;
> > > -igt_simple_main
> > > +igt_main
> > > {
> > > - data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> > > - igt_require_intel(data.drm_fd);
> > > + igt_fixture {
> > > + igt_skip_on_simulation();
> >
> > 'igt_skip_on_simulation()' is not used in any other kms tests now. Do we
> > still need this?
>
> Drive-by commenting: No, please remove the call.
Ack. Just some old copy pasta.
Though why does the function even exist anymore?
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2021-10-05 10:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 15:35 [igt-dev] [PATCH i-g-t 1/6] tests/kms_invalid_dotclock: Rename to kms_invalid_mode Ville Syrjala
2021-09-16 15:35 ` [igt-dev] [PATCH i-g-t 2/6] tests/kms_invalid_mode: Convert the max dotclock test into a subtest Ville Syrjala
2021-10-05 10:13 ` Karthik B S
2021-10-05 10:33 ` Petri Latvala
2021-10-05 10:38 ` Ville Syrjälä [this message]
2021-09-16 15:35 ` [igt-dev] [PATCH i-g-t 3/6] tests/kms_invalid_mode: Move bigjoiner handling into the proper place Ville Syrjala
2021-10-05 10:15 ` Karthik B S
2021-09-16 15:35 ` [igt-dev] [PATCH i-g-t 4/6] tests/kms_invalid_mode: Test various bogus timings Ville Syrjala
2021-10-05 10:22 ` Karthik B S
2021-09-16 15:35 ` [igt-dev] [PATCH i-g-t 5/6] tests/kms_invalid_mode: Test clock==(U)INT_MAX Ville Syrjala
2021-10-05 10:24 ` Karthik B S
2021-09-16 15:35 ` [igt-dev] [PATCH i-g-t 6/6] tests/kms_invalid_mode: Allow the test on !i915 Ville Syrjala
2021-10-05 10:27 ` Karthik B S
2021-09-16 19:05 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/6] tests/kms_invalid_dotclock: Rename to kms_invalid_mode Patchwork
2021-09-22 17:16 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] tests/kms_invalid_dotclock: Rename to kms_invalid_mode (rev2) Patchwork
2021-09-22 19:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-10-04 12:30 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] tests/kms_invalid_dotclock: Rename to kms_invalid_mode (rev3) Patchwork
2021-10-04 14:54 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-10-05 10:09 ` [igt-dev] [PATCH i-g-t 1/6] tests/kms_invalid_dotclock: Rename to kms_invalid_mode Karthik B S
2021-10-05 11:12 ` Ville Syrjälä
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=YVwrPRiNN4lWNlMp@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karthik.b.s@intel.com \
--cc=petri.latvala@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