From patchwork Fri Aug 17 06:12:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 1337801 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 436FB3FC71 for ; Fri, 17 Aug 2012 07:59:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0421FA0DC9 for ; Fri, 17 Aug 2012 00:59:10 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from shiva.chad-versace.us (209-20-75-48.static.cloud-ips.com [209.20.75.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FCA59E8AB for ; Thu, 16 Aug 2012 23:13:49 -0700 (PDT) Received: by shiva.chad-versace.us (Postfix, from userid 1005) id F3A65885C8; Fri, 17 Aug 2012 06:14:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on shiva.chad-versace.us X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.2 Received: from stallone.kumite (static-50-53-63-81.bvtn.or.frontiernet.net [50.53.63.81]) by shiva.chad-versace.us (Postfix) with ESMTPSA id 2EFFA885BC; Fri, 17 Aug 2012 06:13:54 +0000 (UTC) From: Ben Widawsky To: intel-gfx@lists.freedesktop.org Date: Thu, 16 Aug 2012 23:12:57 -0700 Message-Id: <1345183977-1113-1-git-send-email-ben@bwidawsk.net> X-Mailer: git-send-email 1.7.11.5 Cc: Ben Widawsky Subject: [Intel-gfx] [PATCH] drm/i915: Fix gem_gtt_cpu_tlb 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 Revert "agp/intel, drm/i915: Use a write-combining map for updating PTEs" This reverts commit 15a80851c8166c05c6f600fede1719b29eb70737. I haven't spent any time looking at the patch but bisection and revert testing proves this fixes the issues. Begone ye ext4 errors! Signed-off-by: Ben Widawsky --- drivers/char/agp/intel-gtt.c | 13 +++---------- drivers/gpu/drm/i915/i915_dma.c | 14 ++------------ 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index be506ac..9ed92ef 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -674,14 +674,8 @@ static int intel_gtt_init(void) gtt_map_size = intel_private.base.gtt_total_entries * 4; - intel_private.gtt = ioremap_wc(intel_private.gtt_bus_addr, - gtt_map_size); - if (!intel_private.gtt) { - dev_err(&intel_private.bridge_dev->dev, - "failed to map GATT as wc, falling back to uc-\n"); - intel_private.gtt = ioremap(intel_private.gtt_bus_addr, - gtt_map_size); - } + intel_private.gtt = ioremap(intel_private.gtt_bus_addr, + gtt_map_size); if (!intel_private.gtt) { intel_private.driver->cleanup(); iounmap(intel_private.registers); @@ -1234,13 +1228,12 @@ static inline int needs_idle_maps(void) static int i9xx_setup(void) { u32 reg_addr; - int size; + int size = KB(512); pci_read_config_dword(intel_private.pcidev, I915_MMADDR, ®_addr); reg_addr &= 0xfff80000; - size = KB(512); if (INTEL_GTT_GEN >= 7) size = MB(2); diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index c81375c..2285ae3 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1458,7 +1458,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) { struct drm_i915_private *dev_priv; struct intel_device_info *info; - int ret = 0, mmio_bar, mmio_size; + int ret = 0, mmio_bar; uint32_t aperture_size; info = (struct intel_device_info *) flags; @@ -1522,18 +1522,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) if (IS_BROADWATER(dev) || IS_CRESTLINE(dev)) dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(32)); - /* Restrict iomap to avoid clobbering the GTT which we want WC mapped. - * Do not attempt to map the whole BAR! - */ mmio_bar = IS_GEN2(dev) ? 1 : 0; - if (info->gen < 3) - mmio_size = 64*1024; - else if (info->gen < 5) - mmio_size = 512*1024; - else - mmio_size = 2*1024*1024; - - dev_priv->regs = pci_iomap(dev->pdev, mmio_bar, mmio_size); + dev_priv->regs = pci_iomap(dev->pdev, mmio_bar, 0); if (!dev_priv->regs) { DRM_ERROR("failed to map registers\n"); ret = -EIO;