From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [RFC 4/5] drm/i915: move execlists selftests to their own file
Date: Wed, 11 Dec 2019 14:07:08 -0800 [thread overview]
Message-ID: <ba67f895-9f1e-9a8c-cbc2-25a12c2320f7@intel.com> (raw)
In-Reply-To: <157609956224.27099.17515091979474568822@skylake-alporthouse-com>
On 12/11/19 1:26 PM, Chris Wilson wrote:
> Quoting Daniele Ceraolo Spurio (2019-12-11 21:12:43)
>> Done ahead of splitting the lrc file as well, to keep that patch
>> smaller. Just a straight copy, with the exception of create_scratch()
>> that has been made common to avoid having 3 instances of it.
>>
>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>> Cc: Matthew Brost <matthew.brost@intel.com>
>> ---
>> .../drm/i915/gem/selftests/igt_gem_utils.c | 27 +
>> .../drm/i915/gem/selftests/igt_gem_utils.h | 3 +
>> drivers/gpu/drm/i915/gt/intel_lrc.c | 1 +
>> drivers/gpu/drm/i915/gt/selftest_execlists.c | 3316 ++++++++++++++++
>> drivers/gpu/drm/i915/gt/selftest_lrc.c | 3333 +----------------
>> drivers/gpu/drm/i915/gt/selftest_mocs.c | 30 +-
>> 6 files changed, 3351 insertions(+), 3359 deletions(-)
>> create mode 100644 drivers/gpu/drm/i915/gt/selftest_execlists.c
>>
>> diff --git a/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c b/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c
>> index 6718da20f35d..88109333cb79 100644
>> --- a/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c
>> +++ b/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c
>> @@ -15,6 +15,33 @@
>>
>> #include "i915_request.h"
>>
>> +struct i915_vma *igt_create_scratch(struct intel_gt *gt)
>
> _ggtt_scratch(size, coherency, pin) ?
>
> As it stands, it's not general enough...
>
ack.
>> +{
>> + struct drm_i915_gem_object *obj;
>> + struct i915_vma *vma;
>> + int err;
>> +
>> + obj = i915_gem_object_create_internal(gt->i915, PAGE_SIZE);
>> + if (IS_ERR(obj))
>> + return ERR_CAST(obj);
>> +
>> + i915_gem_object_set_cache_coherency(obj, I915_CACHING_CACHED);
>> +
>> + vma = i915_vma_instance(obj, >->ggtt->vm, NULL);
>> + if (IS_ERR(vma)) {
>> + i915_gem_object_put(obj);
>> + return vma;
>> + }
>> +
>> + err = i915_vma_pin(vma, 0, 0, PIN_GLOBAL);
>> + if (err) {
>> + i915_gem_object_put(obj);
>> + return ERR_PTR(err);
>> + }
>> +
>> + return vma;
>> +}
>> +
>> struct i915_request *
>> igt_request_alloc(struct i915_gem_context *ctx, struct intel_engine_cs *engine)
>> {
>> diff --git a/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.h b/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.h
>> index 4221cf84d175..aae781f59cfc 100644
>> --- a/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.h
>> +++ b/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.h
>> @@ -15,6 +15,9 @@ struct i915_vma;
>>
>> struct intel_context;
>> struct intel_engine_cs;
>> +struct intel_gt;
>> +
>> +struct i915_vma *igt_create_scratch(struct intel_gt *gt);
>>
>> struct i915_request *
>> igt_request_alloc(struct i915_gem_context *ctx, struct intel_engine_cs *engine);
>> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
>> index 3afae9a44911..fbdd3bdd06f1 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
>> @@ -4446,4 +4446,5 @@ intel_engine_in_execlists_submission_mode(const struct intel_engine_cs *engine)
>>
>> #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
>> #include "selftest_lrc.c"
>> +#include "selftest_execlists.c"
>> #endif
>> diff --git a/drivers/gpu/drm/i915/gt/selftest_execlists.c b/drivers/gpu/drm/i915/gt/selftest_execlists.c
>> new file mode 100644
>> index 000000000000..b58a4feb2ec4
>> --- /dev/null
>> +++ b/drivers/gpu/drm/i915/gt/selftest_execlists.c
>
> Note that many if not all (there are a few where the guc being a black
> box we cannot poke at internals) of these should also be used for guc
> submission as a BAT.
> -Chris
>
True, but several of them might also need minor updates due to GuC
taking control of some scheduling decisions (e.g. timeslicing,
pre-emption), so IMO better sort them out as we get the GuC flows in place.
Daniele
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-12-11 22:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 21:12 [Intel-gfx] [RFC 0/5] Split up intel_lrc.c Daniele Ceraolo Spurio
2019-12-11 21:12 ` [Intel-gfx] [RFC 1/5] drm/i915: introduce logical_ring and lr_context naming Daniele Ceraolo Spurio
2019-12-11 21:20 ` Chris Wilson
2019-12-11 21:33 ` Chris Wilson
2019-12-11 22:04 ` Daniele Ceraolo Spurio
2019-12-11 23:35 ` Matthew Brost
2019-12-11 21:12 ` [Intel-gfx] [RFC 2/5] drm/i915: Move struct intel_virtual_engine to its own header Daniele Ceraolo Spurio
2019-12-11 21:22 ` Chris Wilson
2019-12-11 21:12 ` [Intel-gfx] [RFC 3/5] drm/i915: split out virtual engine code Daniele Ceraolo Spurio
2019-12-11 21:22 ` Chris Wilson
2019-12-11 21:34 ` Daniele Ceraolo Spurio
2019-12-11 23:09 ` Matthew Brost
2019-12-11 21:12 ` [Intel-gfx] [RFC 4/5] drm/i915: move execlists selftests to their own file Daniele Ceraolo Spurio
2019-12-11 21:26 ` Chris Wilson
2019-12-11 22:07 ` Daniele Ceraolo Spurio [this message]
2019-12-11 21:12 ` [Intel-gfx] [RFC 5/5] drm/i915: introduce intel_execlists_submission.<c/h> Daniele Ceraolo Spurio
2019-12-11 21:31 ` Chris Wilson
2019-12-11 22:35 ` Daniele Ceraolo Spurio
2019-12-12 1:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Split up intel_lrc.c Patchwork
2019-12-12 1:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2019-12-12 12:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=ba67f895-9f1e-9a8c-cbc2-25a12c2320f7@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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