[Intel-gfx] [PATCH i-g-t 2/3 v3] tests/drv_module_reload: Convert sh script to C version.
Chris Wilson
chris at chris-wilson.co.uk
Wed Oct 26 14:15:16 UTC 2016
On Wed, Oct 26, 2016 at 04:54:40PM +0300, Marius Vlad wrote:
> +int main(void)
> +{
> + struct drm_i915_gem_sw_finish arg = { 0 };
> + int fd;
> +
> + signal(SIGALRM, SIG_IGN);
> +
> + fd = __drm_open_driver(DRIVER_INTEL);
> + if (fd < 0)
> + return IGT_EXIT_SKIP;
> +
> + alarm(1);
> + if (ioctl(fd, DRM_IOCTL_I915_GEM_SW_FINISH, &arg) == 0)
> + return IGT_EXIT_SKIP;
Hmm, good point. sw-finish work like this any more. The key was that we
used to wait on the struct_mutex before doing the lookup (and so we
could probe whether the driver was stuck on the reset, or just stuck).
Current candidate for replacement is the SET_CACHEING ioctl
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list