drm/i915: Allow configuring default request expiry via modparam
Module parameter is added (request_timeout_ms) to allow configuring the default request/fence expiry. Default value is inherited from CONFIG_DRM_I915_REQUEST_TIMEOUT. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-8-tvrtko.ursulin@linux.intel.com
This commit is contained in:
parent
e8dbb566b3
commit
54d4e9f5c4
@ -815,11 +815,12 @@ static void __set_default_fence_expiry(struct i915_gem_context *ctx)
|
|||||||
struct drm_i915_private *i915 = ctx->i915;
|
struct drm_i915_private *i915 = ctx->i915;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!IS_ACTIVE(CONFIG_DRM_I915_REQUEST_TIMEOUT))
|
if (!IS_ACTIVE(CONFIG_DRM_I915_REQUEST_TIMEOUT) ||
|
||||||
|
!i915->params.request_timeout_ms)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Default expiry for user fences. */
|
/* Default expiry for user fences. */
|
||||||
ret = __set_watchdog(ctx, CONFIG_DRM_I915_REQUEST_TIMEOUT * 1000);
|
ret = __set_watchdog(ctx, i915->params.request_timeout_ms * 1000);
|
||||||
if (ret)
|
if (ret)
|
||||||
drm_notice(&i915->drm,
|
drm_notice(&i915->drm,
|
||||||
"Failed to configure default fence expiry! (%d)",
|
"Failed to configure default fence expiry! (%d)",
|
||||||
|
@ -197,6 +197,11 @@ i915_param_named_unsafe(fake_lmem_start, ulong, 0400,
|
|||||||
"Fake LMEM start offset (default: 0)");
|
"Fake LMEM start offset (default: 0)");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_DRM_I915_REQUEST_TIMEOUT
|
||||||
|
i915_param_named_unsafe(request_timeout_ms, uint, 0600,
|
||||||
|
"Default request/fence/batch buffer expiration timeout.");
|
||||||
|
#endif
|
||||||
|
|
||||||
static __always_inline void _print_param(struct drm_printer *p,
|
static __always_inline void _print_param(struct drm_printer *p,
|
||||||
const char *name,
|
const char *name,
|
||||||
const char *type,
|
const char *type,
|
||||||
|
@ -72,6 +72,7 @@ struct drm_printer;
|
|||||||
param(int, enable_dpcd_backlight, -1, 0600) \
|
param(int, enable_dpcd_backlight, -1, 0600) \
|
||||||
param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE, 0400) \
|
param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE, 0400) \
|
||||||
param(unsigned long, fake_lmem_start, 0, 0400) \
|
param(unsigned long, fake_lmem_start, 0, 0400) \
|
||||||
|
param(unsigned int, request_timeout_ms, CONFIG_DRM_I915_REQUEST_TIMEOUT, 0600) \
|
||||||
/* leave bools at the end to not create holes */ \
|
/* leave bools at the end to not create holes */ \
|
||||||
param(bool, enable_hangcheck, true, 0600) \
|
param(bool, enable_hangcheck, true, 0600) \
|
||||||
param(bool, load_detect_test, false, 0600) \
|
param(bool, load_detect_test, false, 0600) \
|
||||||
|
Loading…
Reference in New Issue
Block a user