diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-11-04 21:20:07 (GMT) |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-11-18 12:35:24 (GMT) |
commit | f92a9162208a4d4e3d28fa8d00b9fb210d63487b (patch) | |
tree | 697817443091b10379c139727340af5631c69e5b /drivers/gpu/drm/i915/intel_lrc.h | |
parent | e597ef40457fa14dbad551903d958f7253e9572a (diff) | |
download | linux-f92a9162208a4d4e3d28fa8d00b9fb210d63487b.tar.xz |
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_lrc.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.h b/drivers/gpu/drm/i915/intel_lrc.h index 8a08a27..93668f8 100644 --- a/drivers/gpu/drm/i915/intel_lrc.h +++ b/drivers/gpu/drm/i915/intel_lrc.h @@ -68,6 +68,11 @@ static inline void intel_logical_ring_emit(struct intel_ringbuffer *ringbuf, iowrite32(data, ringbuf->virtual_start + ringbuf->tail); ringbuf->tail += 4; } +static inline void intel_logical_ring_emit_reg(struct intel_ringbuffer *ringbuf, + u32 reg) +{ + intel_logical_ring_emit(ringbuf, reg); +} /* Logical Ring Contexts */ |