[igt-dev] [PATCH v17 2/4] tests/gem_ctx_sseu: Dynamic (sub)slice programming tests
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Tue Nov 20 13:03:14 UTC 2018
Quoting Tvrtko Ursulin (2018-11-15 18:37:07)
> From: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>
> Verify that the per-context dynamic SSEU uAPI works as expected.
<SNIP>
> +static bool
> +kernel_has_per_context_sseu_support(int fd)
> +{
> + struct drm_i915_gem_context_param_sseu sseu = { };
> + struct drm_i915_gem_context_param arg =
> + {
> + .param = I915_CONTEXT_PARAM_SSEU,
> + .size = sizeof(sseu),
> + .value = to_user_pointer(&sseu),
> + };
This ...
> + int ret;
> +
> + if (__gem_context_get_param(fd, &arg))
> + return false;
> +
> + arg.value = to_user_pointer(&sseu);
> +
> + ret = __gem_context_set_param(fd, &arg);
> +
> + igt_assert(ret == 0 || ret == -ENODEV || ret == -EINVAL);
> +
> + return ret == 0;
> +}
<SNIP>
> +static void test_engines(int fd)
> +{
> + struct drm_i915_gem_context_param_sseu sseu = { };
> + struct drm_i915_gem_context_param arg =
> + { .param = I915_CONTEXT_PARAM_SSEU,
> + .ctx_id = gem_context_create(fd),
> + .size = sizeof(sseu),
> + .value = to_user_pointer(&sseu) };
... and this don't seem to be consitent with kernel coding
style, which I thought we try to use in IGT?
There seems to be some other strangely indented structs too,
with those fixed this is;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Regards, Joonas
More information about the igt-dev
mailing list