[igt-dev] [RFC 0/2] lib/xe_gpu: Introduce xe_gpu library

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Apr 25 03:41:28 UTC 2023


On Mon, Apr 24, 2023 at 01:38:01PM +0200, Karas, Anna wrote:
> Hi all,
> CC-ing Mauro, Matthew and Zbyszek to this thread (btw. sorry for using
> @intel.com instead of @linux.intel.com in the original email)
> 
> @all - folks, any thoughts on opens? :)
> 
> On 20.04.2023 22:38, Souza, Jose wrote:
> > On Thu, 2023-04-20 at 21:14 +0200, Anna Karas wrote:
> > > OPENS:
> > > 1. Lack of wedged concept in XE: @Matthew informed me that there is no
> > > intent to have reporting wedged device in XE. However, @Joonas believes
> > > that it may be useful - "it's used at least in specific diagnostics and
> > > hardware repair flows for PVC and FLR for all platforms, where we
> > > prevent further accesses to the hardware. So an alternative mechanism is
> > > needed for those". Since xe_require_gpu() is a direct port of i915's
> > > igt_require_gem() stripped of wedged device reporting, this could be a
> > > good opportunity to discuss this.
> > 
> > I guess you could create a Xe engine, submit NOPs and check for XE_ENGINE_GET_PROPERTY_BAN to detect if GPU is wedged.
> > 
> 
> @Jose - It seems that this may help here, thanks
> 
> On 21.04.2023 09:56, Zbigniew Kempczyński wrote:
> >> +int xe_reopen_driver(int fd)
> >> +{
> >> +	char path[256];
> >> +
> >> +	snprintf(path, sizeof(path), "/proc/self/fd/%d", fd);
> >> +	fd = open(path, O_RDWR);
> >> +	igt_assert_fd(fd);
> >> +
> >> +	return fd;
> >> +}
> >
> > On quick first look:
> >
> > Duplicates gem_reopen_driver() code, maybe just replace 'i915' to 'fd'
> > there?
> >
> > --
> > Zbigniew
> 
> @Zbyszek - I agree. gem_reopen_driver() is currently placed in lib/i915,
> would it be a good idea to move it (as "drm_reopen_driver()", with 'i915'
> replaced with 'fd') to lib/drmtest.c?

Yes, looks reasonable. Go ahead.

--
Zbigniew


> 
> Ania


More information about the igt-dev mailing list