diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-10-01 15:44:44 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-10-02 07:53:44 -0400 |
commit | 89d5efcc311cca135de623e9e4a81267e7a9eaa8 (patch) | |
tree | 445f83542524444caa508d18af42fa126a7dd798 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | b20815255693733d06af788ea0b9dcd6271c3841 (diff) |
drm/i915: Replace some open-coded i915_coherent_map_type()
A few callsites were deciding on using WC or WB maps based on
HAS_LLC(), so replace them with the equivalent helper function
i915_coherent_map_type().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181001194447.29910-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index c092d5099ebf..b8a7a014d46d 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -1023,8 +1023,7 @@ i915_emit_bb_start(struct i915_request *rq, | |||
1023 | int intel_ring_pin(struct intel_ring *ring) | 1023 | int intel_ring_pin(struct intel_ring *ring) |
1024 | { | 1024 | { |
1025 | struct i915_vma *vma = ring->vma; | 1025 | struct i915_vma *vma = ring->vma; |
1026 | enum i915_map_type map = | 1026 | enum i915_map_type map = i915_coherent_map_type(vma->vm->i915); |
1027 | HAS_LLC(vma->vm->i915) ? I915_MAP_WB : I915_MAP_WC; | ||
1028 | unsigned int flags; | 1027 | unsigned int flags; |
1029 | void *addr; | 1028 | void *addr; |
1030 | int ret; | 1029 | int ret; |