[igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion

Jani Nikula jani.nikula at linux.intel.com
Tue May 26 13:04:55 UTC 2020


On Tue, 19 May 2020, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> The debugfs modparams are more picky and refuse to do the implicit
> unsigned conversion.

I was wondering about this until I realized "reset" in i915_params.h has
type unsigned int, while the module param in i915_params.c has type
int. It's not that the debugfs is more picky, it's just that they have
different types!

BR,
Jani.


>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  tests/i915/gem_ctx_persistence.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
> index ce9f02350..4a1ef0f27 100644
> --- a/tests/i915/gem_ctx_persistence.c
> +++ b/tests/i915/gem_ctx_persistence.c
> @@ -1127,7 +1127,7 @@ igt_main
>  		igt_require_gem(i915);
>  
>  		/* Restore the reset modparam if left clobbered */
> -		igt_assert(igt_params_set(i915, "reset", "%d", -1));
> +		igt_assert(igt_params_set(i915, "reset", "%u", -1));
>  
>  		enable_hangcheck(i915);
>  		igt_install_exit_handler(exit_handler);

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the igt-dev mailing list