[PATCH] drm/i915/selftests: Fix dependency of some timeouts on HZ

Andi Shyti andi.shyti at linux.intel.com
Thu Feb 29 23:40:54 UTC 2024


Hi Janusz,

On Thu, Feb 22, 2024 at 12:32:40PM +0100, Janusz Krzysztofik wrote:
> Third argument of i915_request_wait() accepts a timeout value in jiffies.
> Most users pass either a simple HZ based expression, or a result of
> msecs_to_jiffies(), or MAX_SCHEDULE_TIMEOUT, or a very small number not
> exceeding 4 if applicable as that value.  However, there is one user --
> intel_selftest_wait_for_rq() -- that passes a WAIT_FOR_RESET_TIME symbol,
> defined as a large constant value that most probably represents a desired
> timeout in ms.  While that usage results in the intended value of timeout
> on usual x86_64 kernel configurations, it is not portable across different
> architectures and custom kernel configs.
> 
> Rename the symbol to clearly indicate intended units and convert it to
> jiffies before use.
> 
> Fixes: 3a4bfa091c46 ("drm/i915/selftest: Fix workarounds selftest for GuC submission")
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
> Cc: Rahul Kumar Singh <rahul.kumar.singh at intel.com>
> Cc: John Harrison <John.C.Harrison at Intel.com>
> Cc: Matthew Brost <matthew.brost at intel.com>

Reviewed-by: Andi Shyti <andi.shyti at linux.intel.com>

Thanks,
Andi


More information about the Intel-gfx mailing list