[PATCH 13/13 v2] drm/i915: Finally kill off struct intel_gtt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ops, I just noticed this v2 here...
same for this one:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>

On Wed, Jan 16, 2013 at 4:23 PM, Ben Widawsky <ben at bwidawsk.net> wrote:
> Nothing is shared anymore between AGP and drm/i915 driver. Pre-GEN6
> still uses AGP, but all necessary info is encapsulated per driver.
>
> v2: Conflict resolution from earlier rebase
>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> ---
>  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 b4227a1..c849e99 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -716,28 +716,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;
> -
>         /* For GEN6+ the PTEs for the ggtt live at 2MB + BAR0 */
>         gtt_bus_addr = pci_resource_start(dev->pdev, 0) + (2<<20);
>
> @@ -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);
> --
> 1.8.1.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux