Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: rename 'ring' where it refers to an engine or engine_id

'ring' is an old deprecated term for a GPU engine. Chris Wilson wants to
use the name for what is currently known as an intel_ringbuffer, but it
will be dreadfully confusing if some rings are ringbuffers but other
rings are still engines. So this patch changes the names of a bunch of
parameters called 'ring' to either 'engine' or 'engine_id' according to
what they actually are.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1469034967-15840-3-git-send-email-david.s.gordon@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

authored by

Dave Gordon and committed by
Chris Wilson
38a0f2db bbdc070a

+11 -11
+3 -3
drivers/gpu/drm/i915/intel_mocs.c
··· 204 204 return result; 205 205 } 206 206 207 - static i915_reg_t mocs_register(enum intel_engine_id ring, int index) 207 + static i915_reg_t mocs_register(enum intel_engine_id engine_id, int index) 208 208 { 209 - switch (ring) { 209 + switch (engine_id) { 210 210 case RCS: 211 211 return GEN9_GFX_MOCS(index); 212 212 case VCS: ··· 218 218 case VCS2: 219 219 return GEN9_MFX1_MOCS(index); 220 220 default: 221 - MISSING_CASE(ring); 221 + MISSING_CASE(engine_id); 222 222 return INVALID_MMIO_REG; 223 223 } 224 224 }
+1 -1
drivers/gpu/drm/i915/intel_mocs.h
··· 54 54 55 55 int intel_rcs_context_init_mocs(struct drm_i915_gem_request *req); 56 56 void intel_mocs_init_l3cc_table(struct drm_device *dev); 57 - int intel_mocs_init_engine(struct intel_engine_cs *ring); 57 + int intel_mocs_init_engine(struct intel_engine_cs *engine); 58 58 59 59 #endif
+1 -1
drivers/gpu/drm/i915/intel_ringbuffer.c
··· 1595 1595 } 1596 1596 1597 1597 static void 1598 - gen5_seqno_barrier(struct intel_engine_cs *ring) 1598 + gen5_seqno_barrier(struct intel_engine_cs *engine) 1599 1599 { 1600 1600 /* MI_STORE are internally buffered by the GPU and not flushed 1601 1601 * either by MI_FLUSH or SyncFlush or any other combination of
+6 -6
drivers/gpu/drm/i915/intel_ringbuffer.h
··· 197 197 198 198 u32 irq_keep_mask; /* always keep these interrupts */ 199 199 u32 irq_enable_mask; /* bitmask to enable ring interrupt */ 200 - void (*irq_enable)(struct intel_engine_cs *ring); 201 - void (*irq_disable)(struct intel_engine_cs *ring); 200 + void (*irq_enable)(struct intel_engine_cs *engine); 201 + void (*irq_disable)(struct intel_engine_cs *engine); 202 202 203 - int (*init_hw)(struct intel_engine_cs *ring); 203 + int (*init_hw)(struct intel_engine_cs *engine); 204 204 205 205 int (*init_context)(struct drm_i915_gem_request *req); 206 206 207 - void (*write_tail)(struct intel_engine_cs *ring, 207 + void (*write_tail)(struct intel_engine_cs *engine, 208 208 u32 value); 209 209 int __must_check (*flush)(struct drm_i915_gem_request *req, 210 210 u32 invalidate_domains, ··· 216 216 * seen value is good enough. Note that the seqno will always be 217 217 * monotonic, even if not coherent. 218 218 */ 219 - void (*irq_seqno_barrier)(struct intel_engine_cs *ring); 219 + void (*irq_seqno_barrier)(struct intel_engine_cs *engine); 220 220 int (*dispatch_execbuffer)(struct drm_i915_gem_request *req, 221 221 u64 offset, u32 length, 222 222 unsigned dispatch_flags); 223 223 #define I915_DISPATCH_SECURE 0x1 224 224 #define I915_DISPATCH_PINNED 0x2 225 225 #define I915_DISPATCH_RS 0x4 226 - void (*cleanup)(struct intel_engine_cs *ring); 226 + void (*cleanup)(struct intel_engine_cs *engine); 227 227 228 228 /* GEN8 signal/wait table - never trust comments! 229 229 * signal to signal to signal to signal to signal to