From patchwork Thu Mar 27 17:59:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: oscar.mateo@intel.com X-Patchwork-Id: 3898891 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C39389F2E8 for ; Thu, 27 Mar 2014 17:12:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B36F720240 for ; Thu, 27 Mar 2014 17:12:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 72B362025A for ; Thu, 27 Mar 2014 17:12:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E96A56EA22; Thu, 27 Mar 2014 10:12:29 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 857066EA1C for ; Thu, 27 Mar 2014 10:12:25 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 27 Mar 2014 10:07:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,743,1389772800"; d="scan'208";a="501086447" Received: from omateolo-linux2.iwi.intel.com ([172.28.253.148]) by fmsmga001.fm.intel.com with ESMTP; 27 Mar 2014 10:05:51 -0700 From: oscar.mateo@intel.com To: intel-gfx@lists.freedesktop.org Date: Thu, 27 Mar 2014 17:59:41 +0000 Message-Id: <1395943218-7708-13-git-send-email-oscar.mateo@intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1395943218-7708-1-git-send-email-oscar.mateo@intel.com> References: <1395943218-7708-1-git-send-email-oscar.mateo@intel.com> Subject: [Intel-gfx] [PATCH 12/49] drm/i915: Rename functions that mention ringbuffers (meaning rings) X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Oscar Mateo Continue the refactoring: do not init or clean a "ringbuffer" when you actually mean a "ring". Again, no functional changes. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_dma.c | 6 +++--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 28 ++++++++++++++-------------- drivers/gpu/drm/i915/intel_ringbuffer.c | 22 +++++++++++----------- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 +++++----- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 288e1c9..d9d28f4 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -179,7 +179,7 @@ static int i915_dma_cleanup(struct drm_device * dev) mutex_lock(&dev->struct_mutex); for (i = 0; i < I915_NUM_RINGS; i++) - intel_cleanup_ring_buffer(&dev_priv->ring[i]); + intel_cleanup_ring(&dev_priv->ring[i]); mutex_unlock(&dev->struct_mutex); /* Clear the HWS virtual address at teardown */ @@ -1381,7 +1381,7 @@ static int i915_load_modeset_init(struct drm_device *dev) cleanup_gem: mutex_lock(&dev->struct_mutex); - i915_gem_cleanup_ringbuffer(dev); + i915_gem_cleanup_ring(dev); i915_gem_context_fini(dev); mutex_unlock(&dev->struct_mutex); WARN_ON(dev_priv->mm.aliasing_ppgtt); @@ -1837,7 +1837,7 @@ int i915_driver_unload(struct drm_device *dev) mutex_lock(&dev->struct_mutex); i915_gem_free_all_phys_object(dev); - i915_gem_cleanup_ringbuffer(dev); + i915_gem_cleanup_ring(dev); i915_gem_context_fini(dev); WARN_ON(dev_priv->mm.aliasing_ppgtt); mutex_unlock(&dev->struct_mutex); diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index c03c674..264ea67 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2163,7 +2163,7 @@ int __must_check i915_gem_init(struct drm_device *dev); int __must_check i915_gem_init_hw(struct drm_device *dev); int i915_gem_l3_remap(struct intel_engine *ring, int slice); void i915_gem_init_swizzling(struct drm_device *dev); -void i915_gem_cleanup_ringbuffer(struct drm_device *dev); +void i915_gem_cleanup_ring(struct drm_device *dev); int __must_check i915_gpu_idle(struct drm_device *dev); int __must_check i915_gem_suspend(struct drm_device *dev); int __i915_add_request(struct intel_engine *ring, diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 26b89e9..7ed56f7 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2423,7 +2423,7 @@ void i915_gem_reset(struct drm_device *dev) for_each_active_ring(ring, dev_priv, i) i915_gem_reset_ring_cleanup(dev_priv, ring); - i915_gem_cleanup_ringbuffer(dev); + i915_gem_cleanup_ring(dev); i915_gem_context_reset(dev); @@ -4252,7 +4252,7 @@ i915_gem_suspend(struct drm_device *dev) i915_gem_evict_everything(dev); i915_kernel_lost_context(dev); - i915_gem_cleanup_ringbuffer(dev); + i915_gem_cleanup_ring(dev); /* Hack! Don't let anybody do execbuf while we don't control the chip. * We need to replace this with a semaphore, or something. @@ -4350,24 +4350,24 @@ static int i915_gem_init_rings(struct drm_device *dev) struct drm_i915_private *dev_priv = dev->dev_private; int ret; - ret = intel_init_render_ring_buffer(dev); + ret = intel_init_render_ring(dev); if (ret) return ret; if (HAS_BSD(dev)) { - ret = intel_init_bsd_ring_buffer(dev); + ret = intel_init_bsd_ring(dev); if (ret) goto cleanup_render_ring; } if (intel_enable_blt(dev)) { - ret = intel_init_blt_ring_buffer(dev); + ret = intel_init_blt_ring(dev); if (ret) goto cleanup_bsd_ring; } if (HAS_VEBOX(dev)) { - ret = intel_init_vebox_ring_buffer(dev); + ret = intel_init_vebox_ring(dev); if (ret) goto cleanup_blt_ring; } @@ -4380,13 +4380,13 @@ static int i915_gem_init_rings(struct drm_device *dev) return 0; cleanup_vebox_ring: - intel_cleanup_ring_buffer(&dev_priv->ring[VECS]); + intel_cleanup_ring(&dev_priv->ring[VECS]); cleanup_blt_ring: - intel_cleanup_ring_buffer(&dev_priv->ring[BCS]); + intel_cleanup_ring(&dev_priv->ring[BCS]); cleanup_bsd_ring: - intel_cleanup_ring_buffer(&dev_priv->ring[VCS]); + intel_cleanup_ring(&dev_priv->ring[VCS]); cleanup_render_ring: - intel_cleanup_ring_buffer(&dev_priv->ring[RCS]); + intel_cleanup_ring(&dev_priv->ring[RCS]); return ret; } @@ -4444,7 +4444,7 @@ i915_gem_init_hw(struct drm_device *dev) return 0; err_out: - i915_gem_cleanup_ringbuffer(dev); + i915_gem_cleanup_ring(dev); return ret; } @@ -4494,14 +4494,14 @@ int i915_gem_init(struct drm_device *dev) } void -i915_gem_cleanup_ringbuffer(struct drm_device *dev) +i915_gem_cleanup_ring(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; struct intel_engine *ring; int i; for_each_active_ring(ring, dev_priv, i) - intel_cleanup_ring_buffer(ring); + intel_cleanup_ring(ring); } int @@ -4539,7 +4539,7 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data, cleanup_ringbuffer: mutex_lock(&dev->struct_mutex); - i915_gem_cleanup_ringbuffer(dev); + i915_gem_cleanup_ring(dev); dev_priv->ums.mm_suspended = 1; mutex_unlock(&dev->struct_mutex); diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 0da4289..35e022f 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -1378,8 +1378,8 @@ static int alloc_ring_buffer(struct intel_engine *ring) return 0; } -static int intel_init_ring_buffer(struct drm_device *dev, - struct intel_engine *ring) +static int intel_init_ring(struct drm_device *dev, + struct intel_engine *ring) { struct drm_i915_gem_object *obj; struct drm_i915_private *dev_priv = dev->dev_private; @@ -1445,7 +1445,7 @@ err_hws: return ret; } -void intel_cleanup_ring_buffer(struct intel_engine *ring) +void intel_cleanup_ring(struct intel_engine *ring) { struct drm_i915_private *dev_priv; struct intel_ringbuffer *ringbuf = __get_ringbuf(ring); @@ -1902,7 +1902,7 @@ static int gen6_ring_flush(struct intel_engine *ring, return 0; } -int intel_init_render_ring_buffer(struct drm_device *dev) +int intel_init_render_ring(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; struct intel_engine *ring = &dev_priv->ring[RCS]; @@ -1996,7 +1996,7 @@ int intel_init_render_ring_buffer(struct drm_device *dev) ring->scratch.gtt_offset = i915_gem_obj_ggtt_offset(obj); } - return intel_init_ring_buffer(dev, ring); + return intel_init_ring(dev, ring); } int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size) @@ -2064,7 +2064,7 @@ int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size) return 0; } -int intel_init_bsd_ring_buffer(struct drm_device *dev) +int intel_init_bsd_ring(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; struct intel_engine *ring = &dev_priv->ring[VCS]; @@ -2119,10 +2119,10 @@ int intel_init_bsd_ring_buffer(struct drm_device *dev) } ring->init = init_ring_common; - return intel_init_ring_buffer(dev, ring); + return intel_init_ring(dev, ring); } -int intel_init_blt_ring_buffer(struct drm_device *dev) +int intel_init_blt_ring(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; struct intel_engine *ring = &dev_priv->ring[BCS]; @@ -2155,10 +2155,10 @@ int intel_init_blt_ring_buffer(struct drm_device *dev) ring->signal_mbox[VECS] = GEN6_VEBSYNC; ring->init = init_ring_common; - return intel_init_ring_buffer(dev, ring); + return intel_init_ring(dev, ring); } -int intel_init_vebox_ring_buffer(struct drm_device *dev) +int intel_init_vebox_ring(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; struct intel_engine *ring = &dev_priv->ring[VECS]; @@ -2192,7 +2192,7 @@ int intel_init_vebox_ring_buffer(struct drm_device *dev) ring->signal_mbox[VECS] = GEN6_NOSYNC; ring->init = init_ring_common; - return intel_init_ring_buffer(dev, ring); + return intel_init_ring(dev, ring); } int diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 2281228..a914348 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h @@ -279,7 +279,7 @@ intel_write_status_page(struct intel_engine *ring, #define I915_GEM_HWS_SCRATCH_INDEX 0x30 #define I915_GEM_HWS_SCRATCH_ADDR (I915_GEM_HWS_SCRATCH_INDEX << MI_STORE_DWORD_INDEX_SHIFT) -void intel_cleanup_ring_buffer(struct intel_engine *ring); +void intel_cleanup_ring(struct intel_engine *ring); int __must_check intel_ring_begin(struct intel_engine *ring, int n); int __must_check intel_ring_cacheline_align(struct intel_engine *ring); @@ -305,10 +305,10 @@ int intel_ring_flush_all_caches(struct intel_engine *ring); int intel_ring_invalidate_all_caches(struct intel_engine *ring); void intel_init_rings_early(struct drm_device *dev); -int intel_init_render_ring_buffer(struct drm_device *dev); -int intel_init_bsd_ring_buffer(struct drm_device *dev); -int intel_init_blt_ring_buffer(struct drm_device *dev); -int intel_init_vebox_ring_buffer(struct drm_device *dev); +int intel_init_render_ring(struct drm_device *dev); +int intel_init_bsd_ring(struct drm_device *dev); +int intel_init_blt_ring(struct drm_device *dev); +int intel_init_vebox_ring(struct drm_device *dev); u32 intel_ring_get_active_head(struct intel_engine *ring); void intel_ring_setup_status_page(struct intel_engine *ring);