Re: [PATCH] drm/i915: Extend wait-ioctl to only wait on writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 29, 2017 at 03:58:26PM +0100, Chris Wilson wrote:
> Currently, we allow read-read CPU/GPU concurrency via set-domain-ioctl,
> but we don't have a similar facility for a plain wait-ioctl. If we add a
> new flag that userspace can use to opt-in for only waiting for GPU
> writes, userspace can use it to co-ordinate its own read-read
> concurrency (without the side-effect of touching cache domains on the
> GEM object).
> 
> To test whether this flag is available, userspace needs to do a query
> operation like:
> 
> bool test_wait_has_read_only(int fd)
> {
> 	struct drm_i915_gem_wait arg = { .flags = I915_WAIT_READ_ONLY };
> 	int err = 0;
> 	if (ioctl(fd, DRM_IOCTL_I915_GEM_WAIT, &arg))
> 		err = -errno;
> 	return err == -ENOENT;
> }

Even though it is used for read-read concurrency, and that future access
should be read-only, the wait itself is only for writes, which suggests
the flag should be I915_WAIT_WRITE_ONLY.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux