Commit bba09b12 authored by John Harrison's avatar John Harrison Committed by Daniel Vetter

drm/i915: Update cacheline_align() to take a request structure

Updated intel_ring_cacheline_align() to take a request instead of a ring.

For: VIZ-5115
Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Reviewed-by: default avatarTomas Elf <tomas.elf@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent f7169687
...@@ -11055,7 +11055,7 @@ static int intel_gen7_queue_flip(struct drm_device *dev, ...@@ -11055,7 +11055,7 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
* then do the cacheline alignment, and finally emit the * then do the cacheline alignment, and finally emit the
* MI_DISPLAY_FLIP. * MI_DISPLAY_FLIP.
*/ */
ret = intel_ring_cacheline_align(ring); ret = intel_ring_cacheline_align(req);
if (ret) if (ret)
return ret; return ret;
......
...@@ -2311,8 +2311,9 @@ int intel_ring_begin(struct intel_engine_cs *ring, ...@@ -2311,8 +2311,9 @@ int intel_ring_begin(struct intel_engine_cs *ring,
} }
/* Align the ring tail to a cacheline boundary */ /* Align the ring tail to a cacheline boundary */
int intel_ring_cacheline_align(struct intel_engine_cs *ring) int intel_ring_cacheline_align(struct drm_i915_gem_request *req)
{ {
struct intel_engine_cs *ring = req->ring;
int num_dwords = (ring->buffer->tail & (CACHELINE_BYTES - 1)) / sizeof(uint32_t); int num_dwords = (ring->buffer->tail & (CACHELINE_BYTES - 1)) / sizeof(uint32_t);
int ret; int ret;
......
...@@ -422,7 +422,7 @@ void intel_cleanup_ring_buffer(struct intel_engine_cs *ring); ...@@ -422,7 +422,7 @@ void intel_cleanup_ring_buffer(struct intel_engine_cs *ring);
int intel_ring_alloc_request_extras(struct drm_i915_gem_request *request); int intel_ring_alloc_request_extras(struct drm_i915_gem_request *request);
int __must_check intel_ring_begin(struct intel_engine_cs *ring, int n); int __must_check intel_ring_begin(struct intel_engine_cs *ring, int n);
int __must_check intel_ring_cacheline_align(struct intel_engine_cs *ring); int __must_check intel_ring_cacheline_align(struct drm_i915_gem_request *req);
static inline void intel_ring_emit(struct intel_engine_cs *ring, static inline void intel_ring_emit(struct intel_engine_cs *ring,
u32 data) u32 data)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment