Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	igt-dev@lists.freedesktop.org,
	Ashutosh Dixit <ashutosh.dixit@intel.com>,
	Anshuman Gupta <anshuman.gupta@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 3/3] tests/i915_pm_disag_freq: New test for media freq factor
Date: Tue, 26 Apr 2022 12:45:00 -0700	[thread overview]
Message-ID: <87sfpz6343.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <YmGNw4x4W3p06Eve@kamilkon-DESK1>

On Thu, 21 Apr 2022 10:00:51 -0700, Kamil Konieczny wrote:
>
> Hi Ashutosh,

Hi Kamil,

I have made some changes to this test so that it can get merged in
increments as the kernel patches are reviewed and merged. The new patch is
posted here:

https://patchwork.freedesktop.org/series/103175/

Some sysfs entries which are still under review are removed till they are
approved.

> On 2022-04-19 at 23:12:51 -0700, Ashutosh Dixit wrote:
> > XEHPSDV and DG2/ATS-M allow media IP blocks to run at frequencies different
> > from the GT frequency. i915 exposes sysfs controls for this frequency
> > "disaggregation". IGT's introduced in this patch exercise and verify these
> -- ^
> I am not happy with that name here and with use of it in test
> name, there are many SoC with different clock dividers and/or
> multipliers and none of them is "disaggregated", they are just
> different IP blocks inside SoC which run with different
> frequncies. Maybe just drop this and do s/disag_// and
> s/"disaggregation"// and s/"disaggregated"// or use "media"
> instead (without colons).
> If you insist you can keep this and better describe this term.

Agreed, I have change the name of the test to "i915_pm_freq_mult" (in the
sense of frequency multiplier or factor) and discontinued using the
"disaggregated" term anywhere.

> > +IGT_TEST_DESCRIPTION(
> > +	"Tests for sysfs controls for \"disaggregated\" IP blocks, viz. IP "
> > +	"blocks which run at frequencies different from the main GT frequency."
>
> Imho this should be rewritten, those "disaggregated" should be
> dropped from description, so it will be like
>
>	"Tests for sysfs controls for IP blocks which run at frequencies "
>	"different from the main GT frequency."

Done, please take a look at the new text.

> > +#define FREQ_SCALE_FACTOR	0.00390625f	/* 1.0f / 256 */
> > +
> > +/*
> > + * Firmware interfaces are not completely synchronous, a delay is needed
> > + * before the requested freq is actually set.
> > + * Media ratio read back after set will mismatch if this value is too small
>
> Please add note that this is currently set to 0.1s.
>
> > + */
> > +#define wait_freq_set()	usleep(100000)

I'm skipping this since it is obvious that 0.1 seconds == 100000 us,
don't want to over-comment.

> > +
> > +static int i915 = -1;
> > +const intel_ctx_t *ctx;
> > +uint64_t ahnd;
> > +
> > +static void spin_all(void)
> > +{
> > +	igt_spin_t *spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx, .engine = ALL_ENGINES,
>
> What about only media engines here ? Or conversly, test without
> media engines ? This can go into separate test.

I have mentioned in reply to your other mail that at present the actual
media freq (after setting these factors) is not available on current
platforms but may be available on future platforms. We can make these
changes you suggest or add new tests later if needed after media freq is
available. At present just running the spinner to make sure GT is running
at max freq.

> > +igt_main
> > +{
> > +	int dir, gt;
> > +
> > +	igt_fixture {
> > +		i915 = drm_open_driver(DRIVER_INTEL);
> > +
> > +		/* Disag multipliers (aka "frequency factors") are not simulated. */
> > +		igt_require(!igt_run_in_simulation());
> > +		igt_install_exit_handler(__restore_rps_defaults);
> > +	}
> > +
> > +	igt_describe("Tests for \"disaggregated\" media freq sysfs");
> -------------------------------- ^ -------------------- ^
> imho this "dis" word should be dropped and please
> s/freq/frequency/

Done.

> > diff --git a/tests/meson.build b/tests/meson.build
> > index 7261e9aa2950..cd89defbb418 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -356,6 +356,14 @@ test_executables += executable('gem_mmap_offset',
> >	   install : true)
> >  test_list += 'gem_mmap_offset'
> >
> > +test_executables += executable('i915_pm_disag_freq',
> > +	   join_paths('i915', 'i915_pm_disag_freq.c'),
>
> What about i915_pm_media_freq.c or i915_pm_freq.c or even
> i915_pm_ip_freq.c ? Looks better imho.

Changed to i915_pm_freq_mult.c, let me know if you're ok with this name.

Thanks.
--
Ashutosh

  reply	other threads:[~2022-04-26 19:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  6:12 [igt-dev] [PATCH i-g-t 1/3] lib/igt_sysfs: Add helpers to iterate over GTs Ashutosh Dixit
2022-04-20  6:12 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_sysfs: Add RPS sysfs helpers Ashutosh Dixit
2022-04-21 15:49   ` Kamil Konieczny
2022-04-25 23:15     ` Dixit, Ashutosh
2022-04-20  6:12 ` [igt-dev] [PATCH i-g-t 3/3] tests/i915_pm_disag_freq: New test for media freq factor Ashutosh Dixit
2022-04-21 17:00   ` Kamil Konieczny
2022-04-26 19:45     ` Dixit, Ashutosh [this message]
2022-04-22 16:15   ` Kamil Konieczny
2022-04-26 19:46     ` Dixit, Ashutosh
2022-04-20  7:09 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] lib/igt_sysfs: Add helpers to iterate over GTs Patchwork
2022-04-21 11:05 ` [igt-dev] [PATCH i-g-t 1/3] " Dandamudi, Priyanka
  -- strict thread matches above, loose matches on Subject: below --
2022-04-13 17:27 [igt-dev] [PATCH i-g-t 1/2] lib/igt_sysfs: Add helpers to iterate over gts Ashutosh Dixit
2022-04-20  5:02 ` [igt-dev] [PATCH i-g-t 3/3] tests/i915_pm_disag_freq: New test for media freq factor Ashutosh Dixit

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=87sfpz6343.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.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