From patchwork Wed Aug 14 08:01:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sedat Dilek X-Patchwork-Id: 2844221 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 B152FBF546 for ; Wed, 14 Aug 2013 08:04:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F38F20182 for ; Wed, 14 Aug 2013 08:04:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2B58620176 for ; Wed, 14 Aug 2013 08:04:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 301D4E7EC0 for ; Wed, 14 Aug 2013 01:04:43 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 795F0E7C9F for ; Wed, 14 Aug 2013 01:01:22 -0700 (PDT) Received: by mail-ee0-f41.google.com with SMTP id d17so4763301eek.28 for ; Wed, 14 Aug 2013 01:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=iJe4jr5YPrXAI5IWkoat4CgyZig0v3k668gmbFnAe+U=; b=QtqxAEt/fFFQQj9IpZReNmKCW/gloHjxLQVkDgqcNTs44FagzxdyjjYf08PaCArt/H NsEPjtJf6T+G3AZSfbg2rxNkuBxEDwfQry5sW+NHXSIU7XLrZ9PSjGUQtzjb85F1hGBp t5Gj6xHhJrWGJSTE3cZqpFkl9A2IJYbUdkgzbPQ3zCzdac6dWflKZIv4BW/fJFVr5gsJ NSY8oBYE6JyW5Z0ahb2dHG4AxNYzwcNaMCkDUOg5Q0XdkuLIWSyDQruDgmR3NgNCIvi8 07MUmzst9tYw64HOMFxQnKZKl8BQammpxHxSVs1cpChfO0rp1fT6Y5VRE855AtEmryhT L0mQ== X-Received: by 10.15.94.201 with SMTP id bb49mr13211011eeb.23.1376467281557; Wed, 14 Aug 2013 01:01:21 -0700 (PDT) Received: from fambox.fritz.box (p5B2EA84F.dip0.t-ipconnect.de. [91.46.168.79]) by mx.google.com with ESMTPSA id bn13sm72977683eeb.11.2013.08.14.01.01.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 01:01:21 -0700 (PDT) From: Sedat Dilek To: intel-gfx , Chris Wilson Date: Wed, 14 Aug 2013 10:01:13 +0200 Message-Id: <1376467273-4412-1-git-send-email-sedat.dilek@gmail.com> X-Mailer: git-send-email 1.8.3.4 Cc: Sedat Dilek Subject: [Intel-gfx] [PATCH] Correct misspelled caching X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Signed-off-by: Sedat Dilek --- configure.ac | 4 ++-- src/sna/kgem.c | 50 +++++++++++++++++++++++++------------------------- src/sna/kgem.h | 2 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/configure.ac b/configure.ac index 43c33eb..211a086 100644 --- a/configure.ac +++ b/configure.ac @@ -371,12 +371,12 @@ fi AC_ARG_ENABLE(wt, AS_HELP_STRING([--enable-wt], - [Enable use of WT cacheing (experimental) [default=no]]), + [Enable use of WT caching (experimental) [default=no]]), [WT="$enableval"], [WT=no]) AM_CONDITIONAL(USE_WT, test x$WT = xyes) if test "x$WT" = xyes; then - AC_DEFINE(USE_WT,1,[Assume WriteThrough cacheing support]) + AC_DEFINE(USE_WT,1,[Assume WriteThrough caching support]) xp_msg="$xp_msg wt-cache" fi diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 98e801a..e7de38c 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -162,13 +162,13 @@ struct local_i915_gem_userptr { #define SNOOPED 1 #define DISPLAY 2 -struct local_i915_gem_cacheing { +struct local_i915_gem_caching { uint32_t handle; - uint32_t cacheing; + uint32_t caching; }; -#define LOCAL_I915_GEM_SET_CACHEING 0x2f -#define LOCAL_IOCTL_I915_GEM_SET_CACHEING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_SET_CACHEING, struct local_i915_gem_cacheing) +#define LOCAL_I915_GEM_SET_CACHING 0x2f +#define LOCAL_IOCTL_I915_GEM_SET_CACHING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_SET_CACHING, struct local_i915_gem_caching) struct kgem_buffer { struct kgem_bo base; @@ -260,14 +260,14 @@ static bool gem_set_tiling(int fd, uint32_t handle, int tiling, int stride) return ret == 0; } -static bool gem_set_cacheing(int fd, uint32_t handle, int cacheing) +static bool gem_set_caching(int fd, uint32_t handle, int caching) { - struct local_i915_gem_cacheing arg; + struct local_i915_gem_caching arg; VG_CLEAR(arg); arg.handle = handle; - arg.cacheing = cacheing; - return drmIoctl(fd, LOCAL_IOCTL_I915_GEM_SET_CACHEING, &arg) == 0; + arg.caching = caching; + return drmIoctl(fd, LOCAL_IOCTL_I915_GEM_SET_CACHING, &arg) == 0; } static uint32_t gem_userptr(int fd, void *ptr, int size, int read_only) @@ -932,7 +932,7 @@ static bool test_has_llc(struct kgem *kgem) return has_llc; } -static bool test_has_cacheing(struct kgem *kgem) +static bool test_has_caching(struct kgem *kgem) { uint32_t handle; bool ret; @@ -948,7 +948,7 @@ static bool test_has_cacheing(struct kgem *kgem) if (handle == 0) return false; - ret = gem_set_cacheing(kgem->fd, handle, UNCACHED); + ret = gem_set_caching(kgem->fd, handle, UNCACHED); gem_close(kgem->fd, handle); return ret; } @@ -1171,12 +1171,12 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, unsigned gen) kgem->has_llc)); kgem->has_wt = test_has_wt(kgem); - DBG(("%s: has write-through cacheing for scanouts? %d\n", __FUNCTION__, + DBG(("%s: has write-through caching for scanouts? %d\n", __FUNCTION__, kgem->has_wt)); - kgem->has_cacheing = test_has_cacheing(kgem); + kgem->has_caching = test_has_caching(kgem); DBG(("%s: has set-cache-level? %d\n", __FUNCTION__, - kgem->has_cacheing)); + kgem->has_caching)); kgem->has_userptr = test_has_userptr(kgem); DBG(("%s: has userptr? %d\n", __FUNCTION__, @@ -1254,8 +1254,8 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, unsigned gen) kgem->next_request = __kgem_request_alloc(kgem); DBG(("%s: cpu bo enabled %d: llc? %d, set-cache-level? %d, userptr? %d\n", __FUNCTION__, - !DBG_NO_CPU && (kgem->has_llc | kgem->has_userptr | kgem->has_cacheing), - kgem->has_llc, kgem->has_cacheing, kgem->has_userptr)); + !DBG_NO_CPU && (kgem->has_llc | kgem->has_userptr | kgem->has_caching), + kgem->has_llc, kgem->has_caching, kgem->has_userptr)); VG_CLEAR(aperture); aperture.aper_size = 0; @@ -1344,7 +1344,7 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, unsigned gen) if (kgem->max_copy_tile_size < 16*PAGE_SIZE) kgem->max_copy_tile_size = 16*PAGE_SIZE; - if (kgem->has_llc | kgem->has_cacheing | kgem->has_userptr) { + if (kgem->has_llc | kgem->has_caching | kgem->has_userptr) { if (kgem->large_object_size > kgem->max_cpu_size) kgem->large_object_size = kgem->max_cpu_size; } else @@ -1870,7 +1870,7 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags) DBG(("%s: num_pages=%d, flags=%x\n", __FUNCTION__, num_pages, flags)); - if ((kgem->has_cacheing | kgem->has_userptr) == 0) + if ((kgem->has_caching | kgem->has_userptr) == 0) return NULL; if (list_is_empty(&kgem->snoop)) { @@ -3029,7 +3029,7 @@ void kgem_clean_scanout_cache(struct kgem *kgem) if (!bo->purged) { bo->reusable = true; if (kgem->has_llc && - !gem_set_cacheing(kgem->fd, bo->handle, SNOOPED)) + !gem_set_caching(kgem->fd, bo->handle, SNOOPED)) bo->reusable = false; } @@ -4444,7 +4444,7 @@ struct kgem_bo *kgem_create_cpu_2d(struct kgem *kgem, return bo; } - if (kgem->has_cacheing) { + if (kgem->has_caching) { bo = kgem_create_linear(kgem, size, flags); if (bo == NULL) return NULL; @@ -4452,7 +4452,7 @@ struct kgem_bo *kgem_create_cpu_2d(struct kgem *kgem, assert(bo->tiling == I915_TILING_NONE); assert_tiling(kgem, bo); - if (!gem_set_cacheing(kgem->fd, bo->handle, SNOOPED)) { + if (!gem_set_caching(kgem->fd, bo->handle, SNOOPED)) { kgem_bo_destroy(kgem, bo); return NULL; } @@ -5521,7 +5521,7 @@ create_snoopable_buffer(struct kgem *kgem, unsigned alloc) kgem_bo_free(kgem, &bo->base); } - if (kgem->has_cacheing) { + if (kgem->has_caching) { struct kgem_bo *old; bo = buffer_alloc(); @@ -5549,18 +5549,18 @@ create_snoopable_buffer(struct kgem *kgem, unsigned alloc) assert(bo->mmapped == true); assert(bo->need_io == false); - if (!gem_set_cacheing(kgem->fd, bo->base.handle, SNOOPED)) - goto free_cacheing; + if (!gem_set_caching(kgem->fd, bo->base.handle, SNOOPED)) + goto free_caching; bo->base.snoop = true; bo->mem = kgem_bo_map__cpu(kgem, &bo->base); if (bo->mem == NULL) - goto free_cacheing; + goto free_caching; return bo; -free_cacheing: +free_caching: bo->base.refcnt = 0; /* for valgrind */ kgem_bo_free(kgem, &bo->base); } diff --git a/src/sna/kgem.h b/src/sna/kgem.h index e08f842..63bba4c 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -177,7 +177,7 @@ struct kgem { uint32_t has_semaphores :1; uint32_t has_secure_batches :1; uint32_t has_pinned_batches :1; - uint32_t has_cacheing :1; + uint32_t has_caching :1; uint32_t has_llc :1; uint32_t has_wt :1; uint32_t has_no_reloc :1;