diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-09 10:10:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-09 14:06:52 +0100 |
commit | 1a07e86cceac170bede143937efd29cbc7d358a6 (patch) | |
tree | b40a3a051ac3478ef88d6387a247b52f20698e4e /drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | |
parent | 6b86f90019cf6286d0dc944f4bfd02c76db3b409 (diff) | |
download | linux-1a07e86cceac170bede143937efd29cbc7d358a6.tar.bz2 |
drm/i915: Generalise BSD default selection
For the default I915_EXEC_BSD round robin selector, it may select any
available VCS engine. Make it so.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190809091010.23281-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index 50ca96f69ed6..2fa08357944e 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -2120,7 +2120,8 @@ gen8_dispatch_bsd_engine(struct drm_i915_private *dev_priv, /* Check whether the file_priv has already selected one ring. */ if ((int)file_priv->bsd_engine < 0) - file_priv->bsd_engine = get_random_int() & 1; + file_priv->bsd_engine = + get_random_int() % num_vcs_engines(dev_priv); return file_priv->bsd_engine; } |