Message ID | 87h8ucephj.fsf@gaia.fi.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 387667fe50d3..9131d66fb628 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h @@ -599,12 +599,12 @@ execlists_port_tail(struct intel_engine_execlists * const execlists) static inline struct execlist_port * execlists_port_next(struct intel_engine_execlists * const execlists, - const struct execlist_port * const port) + struct execlist_port *port) { - const unsigned int n = __port_add(port_index(port, execlists), - 1, - execlists->port_mask); - return &execlists->port[n]; + if (port++ == execlists->port + execlists->port_mask) + port = execlists->port; + + return port; }