From patchwork Fri May 9 12:08:38 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: 4142221 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D4013BFF02 for ; Fri, 9 May 2014 12:14:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9EEE72028D for ; Fri, 9 May 2014 12:14:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DC8E8202E6 for ; Fri, 9 May 2014 12:14:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA9A46E51A; Fri, 9 May 2014 05:14:33 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 79ADC6E507 for ; Fri, 9 May 2014 05:14:32 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 09 May 2014 05:14:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.97,1018,1389772800"; d="scan'208"; a="529106835" Received: from omateolo-linux2.iwi.intel.com ([172.28.253.145]) by fmsmga001.fm.intel.com with ESMTP; 09 May 2014 05:14:31 -0700 From: oscar.mateo@intel.com To: intel-gfx@lists.freedesktop.org Date: Fri, 9 May 2014 13:08:38 +0100 Message-Id: <1399637360-4277-9-git-send-email-oscar.mateo@intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1399637360-4277-1-git-send-email-oscar.mateo@intel.com> References: <1399637360-4277-1-git-send-email-oscar.mateo@intel.com> Subject: [Intel-gfx] [PATCH 08/50] 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.8 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 with the refactoring: do not init or clean a "ringbuffer" when you actually mean a "ring", because they are not the same thing anymore. 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 | 30 +++++++++++++++--------------- drivers/gpu/drm/i915/intel_ringbuffer.c | 30 +++++++++++++++--------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 14 +++++++------- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 8ec8963..eb3ce6d 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 */ @@ -1383,7 +1383,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); @@ -1839,7 +1839,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 3b7a36f9..ee27ce8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2266,7 +2266,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 d9253c4..e7565d9 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4262,7 +4262,7 @@ i915_gem_stop_ringbuffers(struct drm_device *dev) int i; for_each_active_ring(ring, dev_priv, i) - intel_stop_ring_buffer(ring); + intel_stop_ring(ring); } int @@ -4384,30 +4384,30 @@ 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; } if (HAS_BSD2(dev)) { - ret = intel_init_bsd2_ring_buffer(dev); + ret = intel_init_bsd2_ring(dev); if (ret) goto cleanup_vebox_ring; } @@ -4419,15 +4419,15 @@ static int i915_gem_init_rings(struct drm_device *dev) return 0; cleanup_bsd2_ring: - intel_cleanup_ring_buffer(&dev_priv->ring[VCS2]); + intel_cleanup_ring(&dev_priv->ring[VCS2]); 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; } @@ -4479,7 +4479,7 @@ i915_gem_init_hw(struct drm_device *dev) ret = i915_gem_context_enable(dev_priv); if (ret && ret != -EIO) { DRM_ERROR("Context enable failed %d\n", ret); - i915_gem_cleanup_ringbuffer(dev); + i915_gem_cleanup_ring(dev); } return ret; @@ -4529,14 +4529,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) { struct drm_i915_private *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 @@ -4573,7 +4573,7 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data, return 0; cleanup_ringbuffer: - 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 f02c21e..6d14dcb 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -1431,8 +1431,8 @@ err_unref: return ret; } -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 intel_ringbuffer *ringbuf = __get_ringbuf(ring); int ret; @@ -1474,7 +1474,7 @@ static int intel_init_ring_buffer(struct drm_device *dev, return ring->init(ring); } -void intel_cleanup_ring_buffer(struct intel_engine *ring) +void intel_cleanup_ring(struct intel_engine *ring) { struct drm_i915_private *dev_priv = to_i915(ring->dev); struct intel_ringbuffer *ringbuf = __get_ringbuf(ring); @@ -1482,7 +1482,7 @@ void intel_cleanup_ring_buffer(struct intel_engine *ring) if (ringbuf->obj == NULL) return; - intel_stop_ring_buffer(ring); + intel_stop_ring(ring); WARN_ON((I915_READ_MODE(ring) & MODE_IDLE) == 0); intel_destroy_ring_buffer(ring); @@ -1925,7 +1925,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) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_engine *ring = &dev_priv->ring[RCS]; @@ -2028,7 +2028,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) @@ -2095,7 +2095,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) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_engine *ring = &dev_priv->ring[VCS]; @@ -2159,14 +2159,14 @@ 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); } /** * Initialize the second BSD ring for Broadwell GT3. * It is noted that this only exists on Broadwell GT3. */ -int intel_init_bsd2_ring_buffer(struct drm_device *dev) +int intel_init_bsd2_ring(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_engine *ring = &dev_priv->ring[VCS2]; @@ -2207,10 +2207,10 @@ int intel_init_bsd2_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) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_engine *ring = &dev_priv->ring[BCS]; @@ -2252,10 +2252,10 @@ int intel_init_blt_ring_buffer(struct drm_device *dev) ring->semaphore.mbox.signal[VCS2] = GEN6_NOSYNC; 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) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_engine *ring = &dev_priv->ring[VECS]; @@ -2292,7 +2292,7 @@ int intel_init_vebox_ring_buffer(struct drm_device *dev) ring->semaphore.mbox.signal[VCS2] = GEN6_NOSYNC; ring->init = init_ring_common; - return intel_init_ring_buffer(dev, ring); + return intel_init_ring(dev, ring); } int @@ -2334,7 +2334,7 @@ intel_ring_invalidate_all_caches(struct intel_engine *ring) } void -intel_stop_ring_buffer(struct intel_engine *ring) +intel_stop_ring(struct intel_engine *ring) { int ret; diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 7299bff..c9328fd 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h @@ -286,8 +286,8 @@ 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_stop_ring_buffer(struct intel_engine *ring); -void intel_cleanup_ring_buffer(struct intel_engine *ring); +void intel_stop_ring(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); @@ -313,11 +313,11 @@ 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_bsd2_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_bsd2_ring(struct drm_device *dev); +int intel_init_blt_ring(struct drm_device *dev); +int intel_init_vebox_ring(struct drm_device *dev); u64 intel_ring_get_active_head(struct intel_engine *ring); void intel_ring_setup_status_page(struct intel_engine *ring);