drm/i915 + agp/intel-gtt: prep work for direct setup
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 8 Jun 2012 13:55:40 +0000 (15:55 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 12 Jun 2012 20:19:49 +0000 (22:19 +0200)
commit14be93ddff61eb196382aeaa3ac86f4db844aeb0
tree0cfde7c3f444899508e2d07adb4245d4eb33216b
parent7e8f6306fe155d6fc3fe99d666be95b4ed24427d
drm/i915 + agp/intel-gtt: prep work for direct setup

To be able to directly set up the intel-gtt code from drm/i915 and
avoid setting up the fake-agp driver we need to prepare a few things:
- pass both the bridge and gpu pci_dev to the probe function and add
  code to handle the gpu pdev both being present (for drm/i915) and
  not present (fake agp).
- add refcounting to the remove function so that unloading drm/i915
  doesn't kill the fake agp driver

v2: Fix up the cleanup and refcount, noticed by Jani Nikula.

Reviewed-by: Jani Nikula <jani.nikula@linux.intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/char/agp/intel-agp.c
drivers/char/agp/intel-agp.h
drivers/char/agp/intel-gtt.c
drivers/gpu/drm/i915/i915_dma.c
include/drm/intel-gtt.h