drm/i915: Add functions to emit register offsets to the ring
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 4 Nov 2015 21:20:07 +0000 (23:20 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 18 Nov 2015 12:35:24 +0000 (14:35 +0200)
commitf92a9162208a4d4e3d28fa8d00b9fb210d63487b
tree697817443091b10379c139727340af5631c69e5b
parente597ef40457fa14dbad551903d958f7253e9572a
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>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_lrc.h
drivers/gpu/drm/i915/intel_mocs.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h