diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-25 10:05:20 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-25 11:19:39 +0000 |
commit | e1a73a54a96e80dc6009e73c9209e4f81ae22285 (patch) | |
tree | cadd51eb146190119e6fcd60916b77a2accc96a3 /drivers/gpu/drm/i915/intel_ringbuffer.h | |
parent | 8e525cb4a622148fbe30134ee3a1a34ad839a43a (diff) | |
download | linux-e1a73a54a96e80dc6009e73c9209e4f81ae22285.tar.gz linux-e1a73a54a96e80dc6009e73c9209e4f81ae22285.tar.bz2 linux-e1a73a54a96e80dc6009e73c9209e4f81ae22285.zip |
drm/i915: Measure the required reserved size for request emission
Instead of tediously and fragilely counting up the number of dwords
required to emit the breadcrumb to seal a request, fake a request and
measure it automatically once during engine setup.
The downside is that this requires a fair amount of mocking to create a
proper breadcrumb. Still, should be less error prone in future as the
breadcrumb size fluctuates!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190125100520.20163-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index c3ef0f9bf321..479bd53d4ac6 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h @@ -470,7 +470,7 @@ struct intel_engine_cs { unsigned int dispatch_flags); #define I915_DISPATCH_SECURE BIT(0) #define I915_DISPATCH_PINNED BIT(1) - void (*emit_breadcrumb)(struct i915_request *rq, u32 *cs); + u32 *(*emit_breadcrumb)(struct i915_request *rq, u32 *cs); int emit_breadcrumb_sz; /* Pass the request to the hardware queue (e.g. directly into |