From: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
To: "karthik.b.s@intel.com" <karthik.b.s@intel.com>,
"swati2.sharma@intel.com" <swati2.sharma@intel.com>,
"juhapekka.heikkila@gmail.com" <juhapekka.heikkila@gmail.com>,
"jani.nikula@intel.com" <jani.nikula@intel.com>,
"bhanuprakash.modem@gmail.com" <bhanuprakash.modem@gmail.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"kamil.konieczny@linux.intel.com"
<kamil.konieczny@linux.intel.com>,
"fshao@chromium.org" <fshao@chromium.org>
Cc: Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"Paul-pl Chen (陳柏霖)" <Paul-pl.Chen@mediatek.com>,
"markyacoub@chromium.org" <markyacoub@chromium.org>,
"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
"gildekel@google.com" <gildekel@google.com>
Subject: Re: [PATCH i-g-t] tests/kms_invalid_mode: Allow clock-too-high test on non-Intel platforms
Date: Wed, 15 Apr 2026 01:26:26 +0000 [thread overview]
Message-ID: <2591726e756287cc6c18060f4927802a51495b80.camel@mediatek.com> (raw)
In-Reply-To: <0399eabf55ed7aefb133376cfe307e468d646f91@intel.com>
Hi Jani,
Thanks for the suggestion!
On Tue, 2026-04-14 at 13:44 +0300, Jani Nikula wrote:
> On Tue, 14 Apr 2026, Jason-JH Lin <jason-jh.lin@mediatek.com> wrote:
> > The clock-too-high subtest was being skipped on non-Intel platforms
> > because igt_get_max_dotclock() returns 0 when reading from
> > Intel-specific debugfs fails.
> >
> > This change allows the test to run on all platforms by:
> > - Using a clearly invalid clock value (10 GHz) when max_dotclock is
> > unavailable, which any reasonable driver should reject
> > - Restricting bigjoiner/ultrajoiner logic to Intel devices only
> >
> > This prevents the test from being marked as IGNORED/SKIP on non-
> > Intel
> > platforms while maintaining the original test intent of verifying
> > that
> > drivers properly reject modes with excessively high clock rates.
> >
> > Tested on MTK platforms where the test now properly executes and
> > verifies invalid clock validation.
>
> I think overall we'll need a framework to ask platform/device
> specific
> things instead of portraying the services as generic, like
> igt_get_max_dotclock().
>
As for a more general platform/device-specific query framework,
I agree that would be beneficial for broader igt development,
and could be implemented in the future.
> >
> > Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
> > ---
> > tests/kms_invalid_mode.c | 38 +++++++++++++++++++++++-------------
> > --
> > 1 file changed, 23 insertions(+), 15 deletions(-)
> >
> > diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
> > index 5edffb649ef4..18d79e59c736 100644
> > --- a/tests/kms_invalid_mode.c
> > +++ b/tests/kms_invalid_mode.c
> > @@ -126,7 +126,13 @@ adjust_mode_clock_too_high(data_t *data,
> > drmModeModeInfoPtr mode)
> > {
> > int max_dotclock = data->max_dotclock;
> >
> > - igt_require(max_dotclock != 0);
> > + /*
> > + * If max_dotclock is unavailable (e.g., non-Intel
> > platforms),
> > + * use an obviously invalid value that any driver should
> > reject.
> > + * 10 GHz is well beyond any reasonable hardware
> > capability.
> > + */
> > + if (max_dotclock == 0)
> > + max_dotclock = 10000000; /* 10 GHz in kHz */
>
> Not a fan of using magic numbers like this.
>
> Perhaps
>
> if (!max_dotclock) {
> mode->clock = -1;
> return;
> }
>
> would be less magic?
>
For this particular test, since the intention is to always supply an
obviously invalid clock value to ensure proper driver validation,
I will set mode->clock = -1 in case max_dotclock is unavailable,
as you proposed.
This avoids magic numbers and keeps the original logic for Intel
platforms, so there should be no regression on previously tested
systems.
I'll send a new revision with the change.
Regards,
Jason-JH Lin
next prev parent reply other threads:[~2026-04-15 1:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 10:10 [PATCH i-g-t] tests/kms_invalid_mode: Allow clock-too-high test on non-Intel platforms Jason-JH Lin
2026-04-14 10:44 ` Jani Nikula
2026-04-15 1:26 ` Jason-JH Lin (林睿祥) [this message]
2026-04-14 13:11 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-04-14 13:34 ` ✓ i915.CI.BAT: " Patchwork
2026-04-14 14:23 ` ✓ Xe.CI.FULL: " Patchwork
2026-04-14 20:58 ` ✓ i915.CI.Full: " 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=2591726e756287cc6c18060f4927802a51495b80.camel@mediatek.com \
--to=jason-jh.lin@mediatek.com \
--cc=Nancy.Lin@mediatek.com \
--cc=Paul-pl.Chen@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Singo.Chang@mediatek.com \
--cc=bhanuprakash.modem@gmail.com \
--cc=fshao@chromium.org \
--cc=gildekel@google.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=juhapekka.heikkila@gmail.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=karthik.b.s@intel.com \
--cc=markyacoub@chromium.org \
--cc=swati2.sharma@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