From patchwork Tue Jan 15 21:26:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 1981591 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 1FB07DF264 for ; Tue, 15 Jan 2013 21:31:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D32CE625F for ; Tue, 15 Jan 2013 13:31:58 -0800 (PST) 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 DCD35E6240 for ; Tue, 15 Jan 2013 13:26:15 -0800 (PST) Received: by shiva.chad-versace.us (Postfix, from userid 1005) id 8D66488121; Tue, 15 Jan 2013 21:28:56 +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=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable version=3.3.2 Received: from lundgren.amr.corp.intel.com (jfdmzpr03-ext.jf.intel.com [134.134.139.72]) by shiva.chad-versace.us (Postfix) with ESMTPSA id 8604D88524; Tue, 15 Jan 2013 21:27:49 +0000 (UTC) From: Ben Widawsky To: intel-gfx@lists.freedesktop.org Date: Tue, 15 Jan 2013 13:26:21 -0800 Message-Id: <1358285181-2128-14-git-send-email-ben@bwidawsk.net> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1358285181-2128-1-git-send-email-ben@bwidawsk.net> References: <1358285181-2128-1-git-send-email-ben@bwidawsk.net> Cc: Ben Widawsky Subject: [Intel-gfx] [PATCH 13/13] drm/i915: Finally kill off struct intel-gtt 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 Nothing is shared anymore between AGP and drm/i915 driver. Pre-GEN6 still uses AGP, but all necessary info is encapsulated per driver. Signed-off-by: Ben Widawsky Reviewed-by: Rodrigo Vivi --- drivers/char/agp/intel-gtt.c | 7 ------- drivers/gpu/drm/i915/i915_gem_gtt.c | 21 +-------------------- include/drm/intel-gtt.h | 3 --- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 773ce8b..53086a2 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -60,7 +60,6 @@ struct intel_gtt_driver { }; static struct _intel_private { - struct intel_gtt base; const struct intel_gtt_driver *driver; struct pci_dev *pcidev; /* device one */ struct pci_dev *bridge_dev; @@ -1372,12 +1371,6 @@ int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev, } EXPORT_SYMBOL(intel_gmch_probe); -struct intel_gtt *intel_gtt_get(void) -{ - return &intel_private.base; -} -EXPORT_SYMBOL(intel_gtt_get); - void intel_gtt_chipset_flush(void) { if (intel_private.driver->chipset_flush) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index b7641f7..e3782bb 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -707,28 +707,10 @@ int i915_gem_gtt_init(struct drm_device *dev) * hostbridge query stuff. Skip it entirely */ if (INTEL_INFO(dev)->gen < 6) { - ret = intel_gmch_probe(dev_priv->bridge_dev, dev->pdev, NULL); - if (!ret) { - DRM_ERROR("failed to set up gmch\n"); - return -EIO; - } - - dev_priv->mm.gtt = intel_gtt_get(); - if (!dev_priv->mm.gtt) { - DRM_ERROR("Failed to initialize GTT\n"); - intel_gmch_remove(); - return -ENODEV; - } - dev_priv->gtt.do_idle_maps = needs_idle_maps(dev); - - return 0; + return intel_gmch_probe(dev_priv->bridge_dev, dev->pdev, NULL); } - dev_priv->mm.gtt = kzalloc(sizeof(*dev_priv->mm.gtt), GFP_KERNEL); - if (!dev_priv->mm.gtt) - return -ENOMEM; - if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(40))) pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(40)); @@ -794,5 +776,4 @@ void i915_gem_gtt_fini(struct drm_device *dev) teardown_scratch_page(dev); if (INTEL_INFO(dev)->gen < 6) intel_gmch_remove(); - kfree(dev_priv->mm.gtt); } diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h index ae55605..8b546ee 100644 --- a/include/drm/intel-gtt.h +++ b/include/drm/intel-gtt.h @@ -3,9 +3,6 @@ #ifndef _DRM_INTEL_GTT_H #define _DRM_INTEL_GTT_H -struct intel_gtt { -} *intel_gtt_get(void); - int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev, struct agp_bridge_data *bridge); void intel_gmch_remove(void);