[igt-dev] [i-g-t] lib/gem_execbuf_wr: Add gem_has_relocations check

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu Apr 8 09:16:14 UTC 2021


On Wed, Apr 07, 2021 at 03:08:57PM +0530, Tejas Upadhyay wrote:
> Check if relocation and execbuf ioctls are supported on
> respective platform or not. This will mark it skip instead
> of misleading fail if relocations are not supported.
> 
> Gitlab#3276

NAK.

That means we're not able to use gen12+ in IGT anymore. 
How do we could run GPU jobs then?

--
Zbigniew

> 
> Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay at intel.com>
> ---
>  lib/ioctl_wrappers.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index 4440004c..465da0bc 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -57,6 +57,7 @@
>  #include "igt_sysfs.h"
>  #include "config.h"
>  #include "i915/gem_mman.h"
> +#include "i915/gem_submission.h"
>  
>  #ifdef HAVE_VALGRIND
>  #include <valgrind/valgrind.h>
> @@ -636,6 +637,9 @@ void gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf)
>  int __gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf)
>  {
>  	int err = 0;
> +
> +	/* Check if relocations is supported with execbuffer2 */
> +	igt_require(gem_has_relocations(fd));
>  	if (igt_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2_WR, execbuf)) {
>  		err = -errno;
>  		igt_assume(err != 0);
> -- 
> 2.30.0
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev


More information about the igt-dev mailing list