From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Surendrakumar Upadhyay,
TejaskumarX" <tejaskumarx.surendrakumar.upadhyay@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [i-g-t V3 1/2] lib/i915: find scheduler caps for timeslicing
Date: Tue, 1 Jun 2021 11:24:00 +0100 [thread overview]
Message-ID: <af525429-803a-ae46-ed1c-47223afa4c52@linux.intel.com> (raw)
In-Reply-To: <SN6PR11MB34212A492A43A9C2B00C7CEADF3E9@SN6PR11MB3421.namprd11.prod.outlook.com>
On 01/06/2021 11:10, Surendrakumar Upadhyay, TejaskumarX wrote:
>> -----Original Message-----
>> From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>> Sent: 01 June 2021 15:38
>> To: Surendrakumar Upadhyay, TejaskumarX
>> <tejaskumarx.surendrakumar.upadhyay@intel.com>; igt-
>> dev@lists.freedesktop.org
>> Subject: Re: [igt-dev] [i-g-t V3 1/2] lib/i915: find scheduler caps for timeslicing
>>
>>
>> On 31/05/2021 14:41, Tejas Upadhyay wrote:
>>> Check scheduler capability for timeslicing in appropriate way, which
>>> requires wrappers to be created for IGT.
>>>
>>> V3:
>>> removed conditional error - petri
>>> V2: has_timeslice = has_semaphore && has_preemption ||
>>> has_guc_submission - Tvrtko
>>>
>>> Signed-off-by: Tejas Upadhyay
>>> <tejaskumarx.surendrakumar.upadhyay@intel.com>
>>> ---
>>> lib/i915/gem_scheduler.c | 21 +++++++++++++++++++++
>>> lib/i915/gem_scheduler.h | 1 +
>>> 2 files changed, 22 insertions(+)
>>>
>>> diff --git a/lib/i915/gem_scheduler.c b/lib/i915/gem_scheduler.c index
>>> 184da843..f59c451f 100644
>>> --- a/lib/i915/gem_scheduler.c
>>> +++ b/lib/i915/gem_scheduler.c
>>> @@ -29,6 +29,7 @@
>>> #include "ioctl_wrappers.h"
>>>
>>> #include "i915/gem_scheduler.h"
>>> +#include "i915/gem_submission.h"
>>>
>>> /**
>>> * SECTION:gem_scheduler
>>> @@ -129,6 +130,22 @@ bool gem_scheduler_has_engine_busy_stats(int
>> fd)
>>> I915_SCHEDULER_CAP_ENGINE_BUSY_STATS;
>>> }
>>>
>>> +/**
>>> + * gem_scheduler_has_timeslicing:
>>> + * @fd: open i915 drm file descriptor
>>> + *
>>> + * Feature test macro to query whether the driver supports using HW
>>> +preemption
>>> + * to implement timeslicing of userspace batches. This allows
>>> +userspace to
>>> + * implement micro-level scheduling within their own batches.
>>> + */
>>> +bool gem_scheduler_has_timeslicing(int fd) {
>>> + return ((gem_scheduler_capability(fd) &
>>> + (I915_SCHEDULER_CAP_PREEMPTION |
>>> + I915_SCHEDULER_CAP_SEMAPHORES))
>>> + || gem_has_guc_submission(fd));
>>> +}
>>> +
>>> /**
>>> * gem_scheduler_print_capability:
>>> * @fd: open i915 drm file descriptor @@ -151,4 +168,8 @@ void
>>> gem_scheduler_print_capability(int fd)
>>> igt_info(" - With HW semaphores enabled\n");
>>> if (caps & I915_SCHEDULER_CAP_ENGINE_BUSY_STATS)
>>> igt_info(" - With engine busy statistics\n");
>>> + if ((caps & (I915_SCHEDULER_CAP_PREEMPTION
>>> + | I915_SCHEDULER_CAP_SEMAPHORES))
>>> + || gem_has_guc_submission(fd))
>>> + igt_info(" - With user timeslicing enabled\n");
>>
>> I don't think it's "user timeslicing" but just timeslicing. Otherwise looks okay.
>
> I think this is what it was before, I have not changed print. Do you want to change it?
I don't care hugely. It is just not clear to me reader of this banner
will have any idea what is "user timeslicing" versus just timeslicing.
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2021-06-01 10:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-31 13:41 [igt-dev] [i-g-t V3 0/2] gem_exec_schedule: Report and check for timeslicing Tejas Upadhyay
2021-05-31 13:41 ` [igt-dev] [i-g-t V3 1/2] lib/i915: find scheduler caps " Tejas Upadhyay
2021-06-01 10:07 ` Tvrtko Ursulin
2021-06-01 10:10 ` Surendrakumar Upadhyay, TejaskumarX
2021-06-01 10:24 ` Tvrtko Ursulin [this message]
2021-06-03 14:50 ` Chris Wilson
2021-06-04 8:21 ` Petri Latvala
2021-05-31 13:41 ` [igt-dev] [i-g-t V3 2/2] i915/gem_exec_schedule: Check " Tejas Upadhyay
2021-05-31 14:32 ` [igt-dev] ✓ Fi.CI.BAT: success for gem_exec_schedule: Report and check for timeslicing (rev4) Patchwork
2021-05-31 15:10 ` [igt-dev] [i-g-t V3 0/2] gem_exec_schedule: Report and check for timeslicing Petri Latvala
2021-05-31 17:45 ` [igt-dev] ✗ Fi.CI.IGT: failure for gem_exec_schedule: Report and check for timeslicing (rev4) 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=af525429-803a-ae46-ed1c-47223afa4c52@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=tejaskumarx.surendrakumar.upadhyay@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