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@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx