diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-11-04 23:20:07 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-11-18 14:35:24 +0200 |
commit | f92a9162208a4d4e3d28fa8d00b9fb210d63487b (patch) | |
tree | 697817443091b10379c139727340af5631c69e5b /drivers/gpu/drm/i915/intel_ringbuffer.h | |
parent | e597ef40457fa14dbad551903d958f7253e9572a (diff) | |
download | op-kernel-dev-f92a9162208a4d4e3d28fa8d00b9fb210d63487b.zip op-kernel-dev-f92a9162208a4d4e3d28fa8d00b9fb210d63487b.tar.gz |
drm/i915: Add functions to emit register offsets to the ring
When register type safety happens, we can't just try to emit the
register itself to the ring. Instead we'll need to extract the
offset from it first. Add some convenience functions that will do
that.
v2: Convert MOCS setup too
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1446672017-24497-20-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 58b1976..1ab5cb8 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h @@ -443,6 +443,11 @@ static inline void intel_ring_emit(struct intel_engine_cs *ring, iowrite32(data, ringbuf->virtual_start + ringbuf->tail); ringbuf->tail += 4; } +static inline void intel_ring_emit_reg(struct intel_engine_cs *ring, + u32 reg) +{ + intel_ring_emit(ring, reg); +} static inline void intel_ring_advance(struct intel_engine_cs *ring) { struct intel_ringbuffer *ringbuf = ring->buffer; |