OSDN Git Service

drm/i915/gem: Honour O_NONBLOCK before throttling execbuf submissions
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 25 Feb 2020 19:22:06 +0000 (19:22 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 25 Feb 2020 19:23:21 +0000 (19:23 +0000)
commitcb4d5dc3e7a8420f9894668268676a66a0e8a601
treee1366aa9eb8ea9a0e184026adf945515cf85f8c5
parent88be76cdafc7e60e2e4ed883bfe7e8dd7f35fa3a
drm/i915/gem: Honour O_NONBLOCK before throttling execbuf submissions

Check the user's flags on the struct file before deciding whether or not
to stall before submitting a request. This allows us to reasonably
cheaply honour O_NONBLOCK without checking at more critical phases
during request submission.

Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Steve Carbonari <steven.carbonari@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200225192206.1107336-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c