From: Chris Wilson Date: Fri, 9 Aug 2019 09:10:10 +0000 (+0100) Subject: drm/i915: Generalise BSD default selection X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1a07e86cceac170bede143937efd29cbc7d358a6;p=openwrt%2Fstaging%2Fblogic.git 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 Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20190809091010.23281-3-chris@chris-wilson.co.uk --- 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; }