From: Karthik B S <karthik.b.s@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
<igt-dev@lists.freedesktop.org>, <swati2.sharma@intel.com>
Subject: Re: [igt-dev] [i-g-t V3 5/7] tests/kms_invalid_mode: Use helpers from IGT lib
Date: Wed, 5 Apr 2023 13:13:18 +0530 [thread overview]
Message-ID: <1e615f4b-c408-70bd-637e-6287045f956e@intel.com> (raw)
In-Reply-To: <20230331065029.3869109-6-bhanuprakash.modem@intel.com>
On 3/31/2023 12:20 PM, Bhanuprakash Modem wrote:
> Instead of writing own logic at test level, use existing IGT
> helper to read the max dot clock.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
> tests/kms_invalid_mode.c | 23 +----------------------
> 1 file changed, 1 insertion(+), 22 deletions(-)
>
> diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
> index 86f529e88b1..ec048305567 100644
> --- a/tests/kms_invalid_mode.c
> +++ b/tests/kms_invalid_mode.c
> @@ -213,27 +213,6 @@ test_output(data_t *data)
> igt_remove_fb(data->drm_fd, &fb);
> }
>
> -static int i915_max_dotclock(data_t *data)
> -{
> - char buf[4096];
> - char *s;
> - int max_dotclock = 0;
> -
> - if (!is_i915_device(data->drm_fd))
> - return 0;
> -
> - igt_debugfs_read(data->drm_fd, "i915_frequency_info", buf);
> - s = strstr(buf, "Max pixel clock frequency:");
> - igt_assert(s);
> - igt_assert_eq(sscanf(s, "Max pixel clock frequency: %d kHz", &max_dotclock), 1);
> -
> - /* 100 Mhz to 5 GHz seem like reasonable values to expect */
> - igt_assert_lt(max_dotclock, 5000000);
> - igt_assert_lt(100000, max_dotclock);
> -
> - return max_dotclock;
> -}
> -
> static const struct {
> const char *name;
> bool (*adjust_mode)(data_t *data, drmModeModeInfoPtr mode);
> @@ -293,7 +272,7 @@ igt_main
> data.res = drmModeGetResources(data.drm_fd);
> igt_assert(data.res);
>
> - data.max_dotclock = i915_max_dotclock(&data);
> + data.max_dotclock = igt_get_max_dotclock(data.drm_fd);
> igt_info("Max dotclock: %d kHz\n", data.max_dotclock);
> }
>
next prev parent reply other threads:[~2023-04-05 7:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 6:50 [igt-dev] [i-g-t V3 0/7] Fix Bigjoiner checks Bhanuprakash Modem
2023-03-31 6:50 ` [igt-dev] [i-g-t V3 1/7] lib/igt_kms: " Bhanuprakash Modem
2023-03-31 6:50 ` [igt-dev] [i-g-t V3 2/7] tests/i915/kms_big_joiner: " Bhanuprakash Modem
2023-04-05 9:45 ` [igt-dev] [i-g-t V2 " Bhanuprakash Modem
2023-04-12 9:32 ` Karthik B S
2023-03-31 6:50 ` [igt-dev] [i-g-t V3 3/7] tests/i915/kms_dsc: Update bigjoiner pipe constraint Bhanuprakash Modem
2023-03-31 6:50 ` [igt-dev] [i-g-t V3 4/7] tests/i915/kms_dsc: Drop bigjoiner check Bhanuprakash Modem
2023-04-13 9:49 ` Karthik B S
2023-03-31 6:50 ` [igt-dev] [i-g-t V3 5/7] tests/kms_invalid_mode: Use helpers from IGT lib Bhanuprakash Modem
2023-04-05 7:43 ` Karthik B S [this message]
2023-03-31 6:50 ` [igt-dev] [i-g-t V3 6/7] tests/kms_flip: Fix Bigjoiner checks Bhanuprakash Modem
2023-03-31 6:50 ` [igt-dev] [i-g-t V3 7/7] tests/kms_setmode: " Bhanuprakash Modem
2023-03-31 7:29 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix Bigjoiner checks (rev3) Patchwork
2023-04-01 5:11 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-04-05 15:02 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix Bigjoiner checks (rev4) Patchwork
2023-04-06 4:12 ` [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=1e615f4b-c408-70bd-637e-6287045f956e@intel.com \
--to=karthik.b.s@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.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