From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Allow userspace to specify ringsize on construction
Date: Mon, 25 Nov 2019 10:05:05 +0000 [thread overview]
Message-ID: <157467630510.2314.7834296122709280708@skylake-alporthouse-com> (raw)
In-Reply-To: <20191115160546.896305-2-chris@chris-wilson.co.uk>
Quoting Chris Wilson (2019-11-15 16:05:45)
> No good reason why we must always use a static ringsize, so let
> userspace select one during construction.
Do we have any news on whether userspace has materialised for this yet?
It's literally just
--- a/runtime/os_interface/linux/drm_neo.cpp
+++ b/runtime/os_interface/linux/drm_neo.cpp
@@ -182,6 +182,15 @@ void setNonPersistent(uint32_t drmContextId) {
ioctl(DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, &gcp);
}
+void setMaxRingSize(uint32_t drmContextId) {
+ drm_i915_gem_context_param gcp = {};
+ gcp.ctx_id = drmContextId;
+ gcp.param = 0xc; /* I915_CONTEXT_PARAM_RINGSIZE; */
+ gcp.value = 128 << 12; /* maximum ring size is 512KiB, or 128 pages */
+
+ ioctl(DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, &gcp);
+}
+
uint32_t Drm::createDrmContext() {
drm_i915_gem_context_create gcc = {};
auto retVal = ioctl(DRM_IOCTL_I915_GEM_CONTEXT_CREATE, &gcc);
@@ -190,6 +199,9 @@ uint32_t Drm::createDrmContext() {
/* enable cleanup of resources on process termination */
setNonPersistent(gcc.ctx_id);
+ /* Big rings for silly amounts of non-blocking work! */
+ setMaxRingSize(gcc.ctx_id);
with some justification.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915: Allow userspace to specify ringsize on construction
Date: Mon, 25 Nov 2019 10:05:05 +0000 [thread overview]
Message-ID: <157467630510.2314.7834296122709280708@skylake-alporthouse-com> (raw)
Message-ID: <20191125100505.CQn8p_IFvmDE3J2a_8S0hM9T_Vk1yHGiUy1ai11tCuU@z> (raw)
In-Reply-To: <20191115160546.896305-2-chris@chris-wilson.co.uk>
Quoting Chris Wilson (2019-11-15 16:05:45)
> No good reason why we must always use a static ringsize, so let
> userspace select one during construction.
Do we have any news on whether userspace has materialised for this yet?
It's literally just
--- a/runtime/os_interface/linux/drm_neo.cpp
+++ b/runtime/os_interface/linux/drm_neo.cpp
@@ -182,6 +182,15 @@ void setNonPersistent(uint32_t drmContextId) {
ioctl(DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, &gcp);
}
+void setMaxRingSize(uint32_t drmContextId) {
+ drm_i915_gem_context_param gcp = {};
+ gcp.ctx_id = drmContextId;
+ gcp.param = 0xc; /* I915_CONTEXT_PARAM_RINGSIZE; */
+ gcp.value = 128 << 12; /* maximum ring size is 512KiB, or 128 pages */
+
+ ioctl(DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, &gcp);
+}
+
uint32_t Drm::createDrmContext() {
drm_i915_gem_context_create gcc = {};
auto retVal = ioctl(DRM_IOCTL_I915_GEM_CONTEXT_CREATE, &gcc);
@@ -190,6 +199,9 @@ uint32_t Drm::createDrmContext() {
/* enable cleanup of resources on process termination */
setNonPersistent(gcc.ctx_id);
+ /* Big rings for silly amounts of non-blocking work! */
+ setMaxRingSize(gcc.ctx_id);
with some justification.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-11-25 10:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 16:05 [PATCH 1/3] drm/i915: Flush idle barriers when waiting Chris Wilson
2019-11-15 16:05 ` [Intel-gfx] " Chris Wilson
2019-11-15 16:05 ` [PATCH 2/3] drm/i915: Allow userspace to specify ringsize on construction Chris Wilson
2019-11-15 16:05 ` [Intel-gfx] " Chris Wilson
2019-11-18 11:14 ` Janusz Krzysztofik
2019-11-18 11:14 ` [Intel-gfx] " Janusz Krzysztofik
2019-11-18 11:28 ` Chris Wilson
2019-11-18 11:28 ` [Intel-gfx] " Chris Wilson
2019-11-25 10:05 ` Chris Wilson [this message]
2019-11-25 10:05 ` Chris Wilson
2019-11-15 16:05 ` [PATCH 3/3] drm/i915/gem: Honour O_NONBLOCK before throttling execbuf submissions Chris Wilson
2019-11-15 16:05 ` [Intel-gfx] " Chris Wilson
2019-11-15 20:56 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Flush idle barriers when waiting Patchwork
2019-11-15 20:56 ` [Intel-gfx] " Patchwork
2019-11-17 9:27 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-11-17 9:27 ` [Intel-gfx] " Patchwork
2019-11-25 12:18 ` ✗ Fi.CI.BUILD: failure for series starting with [1/3] drm/i915: Flush idle barriers when waiting (rev2) Patchwork
2019-11-25 12:18 ` [Intel-gfx] " 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=157467630510.2314.7834296122709280708@skylake-alporthouse-com \
--to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.