Re: [Intel-gfx] [PATCH 27/62] drm/i915: Rename request->ringbuf to request->ring
On Mon, Jun 06, 2016 at 02:44:41PM +0100, Tvrtko Ursulin wrote: > > On 03/06/16 17:36, Chris Wilson wrote: > > Now that we have disambuigated ring and engine, we can use the clearer > > and more consistent name for the intel_ringbuffer pointer in the > > request. > > This one needs all the stakeholders to agree about the rename. As before, I > am not convinced it is better/worth it. If we've indeed succeeded in eradicating all instances of calling an intel_engine_cs a ring, then I think this makes sense. -Daniel > > Regards, > > Tvrtko > > > > Signed-off-by: Chris Wilson> > --- > > drivers/gpu/drm/i915/i915_gem_context.c| 4 +- > > drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +- > > drivers/gpu/drm/i915/i915_gem_gtt.c| 6 +- > > drivers/gpu/drm/i915/i915_gem_request.c| 16 +++--- > > drivers/gpu/drm/i915/i915_gem_request.h| 3 +- > > drivers/gpu/drm/i915/i915_gpu_error.c | 20 +++ > > drivers/gpu/drm/i915/intel_display.c | 10 ++-- > > drivers/gpu/drm/i915/intel_lrc.c | 57 +- > > drivers/gpu/drm/i915/intel_mocs.c | 36 ++-- > > drivers/gpu/drm/i915/intel_overlay.c | 8 +-- > > drivers/gpu/drm/i915/intel_ringbuffer.c| 92 > > +++--- > > 11 files changed, 126 insertions(+), 130 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_gem_context.c > > b/drivers/gpu/drm/i915/i915_gem_context.c > > index 899731f9a2c4..a7911f39f416 100644 > > --- a/drivers/gpu/drm/i915/i915_gem_context.c > > +++ b/drivers/gpu/drm/i915/i915_gem_context.c > > @@ -514,7 +514,7 @@ static inline int > > mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) > > { > > struct drm_i915_private *dev_priv = req->i915; > > - struct intel_ringbuffer *ring = req->ringbuf; > > + struct intel_ringbuffer *ring = req->ring; > > u32 flags = hw_flags | MI_MM_SPACE_GTT; > > const int num_rings = > > /* Use an extended w/a on ivb+ if signalling from other rings */ > > @@ -614,7 +614,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 > > hw_flags) > > static int remap_l3(struct drm_i915_gem_request *req, int slice) > > { > > u32 *remap_info = req->i915->l3_parity.remap_info[slice]; > > - struct intel_ringbuffer *ring = req->ringbuf; > > + struct intel_ringbuffer *ring = req->ring; > > int i, ret; > > > > if (!remap_info) > > diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c > > b/drivers/gpu/drm/i915/i915_gem_execbuffer.c > > index 99663e8429b3..246bd70c0c9f 100644 > > --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c > > +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c > > @@ -1140,7 +1140,7 @@ i915_gem_execbuffer_retire_commands(struct > > i915_execbuffer_params *params) > > static int > > i915_reset_gen7_sol_offsets(struct drm_i915_gem_request *req) > > { > > - struct intel_ringbuffer *ring = req->ringbuf; > > + struct intel_ringbuffer *ring = req->ring; > > int ret, i; > > > > if (!IS_GEN7(req->i915) || req->engine->id != RCS) { > > @@ -1270,7 +1270,7 @@ i915_gem_ringbuffer_submission(struct > > i915_execbuffer_params *params, > > > > if (params->engine->id == RCS && > > instp_mode != dev_priv->relative_constants_mode) { > > - struct intel_ringbuffer *ring = params->request->ringbuf; > > + struct intel_ringbuffer *ring = params->request->ring; > > > > ret = intel_ring_begin(params->request, 4); > > if (ret) > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c > > b/drivers/gpu/drm/i915/i915_gem_gtt.c > > index 4b4e3de58ad9..b0a644cede20 100644 > > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > > @@ -669,7 +669,7 @@ static int gen8_write_pdp(struct drm_i915_gem_request > > *req, > > unsigned entry, > > dma_addr_t addr) > > { > > - struct intel_ringbuffer *ring = req->ringbuf; > > + struct intel_ringbuffer *ring = req->ring; > > int ret; > > > > BUG_ON(entry >= 4); > > @@ -1660,7 +1660,7 @@ static uint32_t get_pd_offset(struct i915_hw_ppgtt > > *ppgtt) > > static int hsw_mm_switch(struct i915_hw_ppgtt *ppgtt, > > struct drm_i915_gem_request *req) > > { > > - struct intel_ringbuffer *ring = req->ringbuf; > > + struct intel_ringbuffer *ring = req->ring; > > int ret; > > > > /* NB: TLBs must be flushed and invalidated before a switch */ > > @@ -1699,7 +1699,7 @@ static int vgpu_mm_switch(struct i915_hw_ppgtt *ppgtt, > > static int gen7_mm_switch(struct i915_hw_ppgtt *ppgtt, > > struct drm_i915_gem_request *req) > > { > > - struct intel_ringbuffer *ring = req->ringbuf; > > + struct intel_ringbuffer *ring = req->ring; > > int ret; > > > > /* NB: TLBs must be flushed and invalidated before a switch */ > > diff --git
Re: [Intel-gfx] [PATCH 27/62] drm/i915: Rename request->ringbuf to request->ring
On 03/06/16 17:36, Chris Wilson wrote: Now that we have disambuigated ring and engine, we can use the clearer and more consistent name for the intel_ringbuffer pointer in the request. This one needs all the stakeholders to agree about the rename. As before, I am not convinced it is better/worth it. Regards, Tvrtko Signed-off-by: Chris Wilson--- drivers/gpu/drm/i915/i915_gem_context.c| 4 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +- drivers/gpu/drm/i915/i915_gem_gtt.c| 6 +- drivers/gpu/drm/i915/i915_gem_request.c| 16 +++--- drivers/gpu/drm/i915/i915_gem_request.h| 3 +- drivers/gpu/drm/i915/i915_gpu_error.c | 20 +++ drivers/gpu/drm/i915/intel_display.c | 10 ++-- drivers/gpu/drm/i915/intel_lrc.c | 57 +- drivers/gpu/drm/i915/intel_mocs.c | 36 ++-- drivers/gpu/drm/i915/intel_overlay.c | 8 +-- drivers/gpu/drm/i915/intel_ringbuffer.c| 92 +++--- 11 files changed, 126 insertions(+), 130 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 899731f9a2c4..a7911f39f416 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -514,7 +514,7 @@ static inline int mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) { struct drm_i915_private *dev_priv = req->i915; - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; u32 flags = hw_flags | MI_MM_SPACE_GTT; const int num_rings = /* Use an extended w/a on ivb+ if signalling from other rings */ @@ -614,7 +614,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) static int remap_l3(struct drm_i915_gem_request *req, int slice) { u32 *remap_info = req->i915->l3_parity.remap_info[slice]; - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int i, ret; if (!remap_info) diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 99663e8429b3..246bd70c0c9f 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -1140,7 +1140,7 @@ i915_gem_execbuffer_retire_commands(struct i915_execbuffer_params *params) static int i915_reset_gen7_sol_offsets(struct drm_i915_gem_request *req) { - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int ret, i; if (!IS_GEN7(req->i915) || req->engine->id != RCS) { @@ -1270,7 +1270,7 @@ i915_gem_ringbuffer_submission(struct i915_execbuffer_params *params, if (params->engine->id == RCS && instp_mode != dev_priv->relative_constants_mode) { - struct intel_ringbuffer *ring = params->request->ringbuf; + struct intel_ringbuffer *ring = params->request->ring; ret = intel_ring_begin(params->request, 4); if (ret) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 4b4e3de58ad9..b0a644cede20 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -669,7 +669,7 @@ static int gen8_write_pdp(struct drm_i915_gem_request *req, unsigned entry, dma_addr_t addr) { - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int ret; BUG_ON(entry >= 4); @@ -1660,7 +1660,7 @@ static uint32_t get_pd_offset(struct i915_hw_ppgtt *ppgtt) static int hsw_mm_switch(struct i915_hw_ppgtt *ppgtt, struct drm_i915_gem_request *req) { - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int ret; /* NB: TLBs must be flushed and invalidated before a switch */ @@ -1699,7 +1699,7 @@ static int vgpu_mm_switch(struct i915_hw_ppgtt *ppgtt, static int gen7_mm_switch(struct i915_hw_ppgtt *ppgtt, struct drm_i915_gem_request *req) { - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int ret; /* NB: TLBs must be flushed and invalidated before a switch */ diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c index 059ba88e182e..c6a7a7984f1f 100644 --- a/drivers/gpu/drm/i915/i915_gem_request.c +++ b/drivers/gpu/drm/i915/i915_gem_request.c @@ -351,7 +351,7 @@ static void i915_gem_request_retire(struct drm_i915_gem_request *request) * Note this requires that we are always called in request * completion order. */ - request->ringbuf->last_retired_head = request->postfix; +
[Intel-gfx] [PATCH 27/62] drm/i915: Rename request->ringbuf to request->ring
Now that we have disambuigated ring and engine, we can use the clearer and more consistent name for the intel_ringbuffer pointer in the request. Signed-off-by: Chris Wilson--- drivers/gpu/drm/i915/i915_gem_context.c| 4 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +- drivers/gpu/drm/i915/i915_gem_gtt.c| 6 +- drivers/gpu/drm/i915/i915_gem_request.c| 16 +++--- drivers/gpu/drm/i915/i915_gem_request.h| 3 +- drivers/gpu/drm/i915/i915_gpu_error.c | 20 +++ drivers/gpu/drm/i915/intel_display.c | 10 ++-- drivers/gpu/drm/i915/intel_lrc.c | 57 +- drivers/gpu/drm/i915/intel_mocs.c | 36 ++-- drivers/gpu/drm/i915/intel_overlay.c | 8 +-- drivers/gpu/drm/i915/intel_ringbuffer.c| 92 +++--- 11 files changed, 126 insertions(+), 130 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 899731f9a2c4..a7911f39f416 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -514,7 +514,7 @@ static inline int mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) { struct drm_i915_private *dev_priv = req->i915; - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; u32 flags = hw_flags | MI_MM_SPACE_GTT; const int num_rings = /* Use an extended w/a on ivb+ if signalling from other rings */ @@ -614,7 +614,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) static int remap_l3(struct drm_i915_gem_request *req, int slice) { u32 *remap_info = req->i915->l3_parity.remap_info[slice]; - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int i, ret; if (!remap_info) diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 99663e8429b3..246bd70c0c9f 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -1140,7 +1140,7 @@ i915_gem_execbuffer_retire_commands(struct i915_execbuffer_params *params) static int i915_reset_gen7_sol_offsets(struct drm_i915_gem_request *req) { - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int ret, i; if (!IS_GEN7(req->i915) || req->engine->id != RCS) { @@ -1270,7 +1270,7 @@ i915_gem_ringbuffer_submission(struct i915_execbuffer_params *params, if (params->engine->id == RCS && instp_mode != dev_priv->relative_constants_mode) { - struct intel_ringbuffer *ring = params->request->ringbuf; + struct intel_ringbuffer *ring = params->request->ring; ret = intel_ring_begin(params->request, 4); if (ret) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 4b4e3de58ad9..b0a644cede20 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -669,7 +669,7 @@ static int gen8_write_pdp(struct drm_i915_gem_request *req, unsigned entry, dma_addr_t addr) { - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int ret; BUG_ON(entry >= 4); @@ -1660,7 +1660,7 @@ static uint32_t get_pd_offset(struct i915_hw_ppgtt *ppgtt) static int hsw_mm_switch(struct i915_hw_ppgtt *ppgtt, struct drm_i915_gem_request *req) { - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int ret; /* NB: TLBs must be flushed and invalidated before a switch */ @@ -1699,7 +1699,7 @@ static int vgpu_mm_switch(struct i915_hw_ppgtt *ppgtt, static int gen7_mm_switch(struct i915_hw_ppgtt *ppgtt, struct drm_i915_gem_request *req) { - struct intel_ringbuffer *ring = req->ringbuf; + struct intel_ringbuffer *ring = req->ring; int ret; /* NB: TLBs must be flushed and invalidated before a switch */ diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c index 059ba88e182e..c6a7a7984f1f 100644 --- a/drivers/gpu/drm/i915/i915_gem_request.c +++ b/drivers/gpu/drm/i915/i915_gem_request.c @@ -351,7 +351,7 @@ static void i915_gem_request_retire(struct drm_i915_gem_request *request) * Note this requires that we are always called in request * completion order. */ - request->ringbuf->last_retired_head = request->postfix; + request->ring->last_retired_head = request->postfix; i915_gem_request_remove_from_client(request); @@ -415,7 +415,7 @@ void __i915_add_request(struct drm_i915_gem_request *request, bool