[Intel-gfx] [PATCH 1/3] drm/i915: Replace the hardcoded I915_FENCE_TIMEOUT
Jani Nikula
jani.nikula at linux.intel.com
Wed Feb 26 09:19:02 UTC 2020
On Tue, 25 Feb 2020, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> diff --git a/drivers/gpu/drm/i915/i915_config.c b/drivers/gpu/drm/i915/i915_config.c
> new file mode 100644
> index 000000000000..c879d26369e1
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/i915_config.c
> @@ -0,0 +1,15 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2020 Intel Corporation
> + */
> +
> +#include "i915_drv.h"
> +
> +unsigned long i915_fence_timeout(const struct drm_i915_private *i915)
i915_config_fence_timeout()? I guess you're planning on adding more
functions, and I'd really like to name based on filenames. We all use
cscope or GNU global or somesuch, but IMO the naming makes the codebase
easier to navigate.
BR,
Jani.
> +{
> +#if IS_ACTIVE(CONFIG_DRM_I915_FENCE_TIMEOUT)
> + return msecs_to_jiffies_timeout(CONFIG_DRM_I915_FENCE_TIMEOUT);
> +#else
> + return 0;
> +#endif
> +}
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list