diff options
-rw-r--r-- | drivers/char/Makefile | 2 | ||||
-rw-r--r-- | drivers/char/agp/Kconfig | 5 | ||||
-rw-r--r-- | drivers/char/agp/Makefile | 2 | ||||
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/Kconfig | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 4 |
6 files changed, 33 insertions, 4 deletions
diff --git a/drivers/char/Makefile b/drivers/char/Makefile index 7ff1d0d208a7..2d68054f9795 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile | |||
@@ -50,7 +50,7 @@ obj-$(CONFIG_GPIO_TB0219) += tb0219.o | |||
50 | obj-$(CONFIG_TELCLOCK) += tlclk.o | 50 | obj-$(CONFIG_TELCLOCK) += tlclk.o |
51 | 51 | ||
52 | obj-$(CONFIG_MWAVE) += mwave/ | 52 | obj-$(CONFIG_MWAVE) += mwave/ |
53 | obj-$(CONFIG_AGP) += agp/ | 53 | obj-y += agp/ |
54 | obj-$(CONFIG_PCMCIA) += pcmcia/ | 54 | obj-$(CONFIG_PCMCIA) += pcmcia/ |
55 | 55 | ||
56 | obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o | 56 | obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o |
diff --git a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig index d8b1b576556c..c528f96ee204 100644 --- a/drivers/char/agp/Kconfig +++ b/drivers/char/agp/Kconfig | |||
@@ -68,6 +68,7 @@ config AGP_AMD64 | |||
68 | config AGP_INTEL | 68 | config AGP_INTEL |
69 | tristate "Intel 440LX/BX/GX, I8xx and E7x05 chipset support" | 69 | tristate "Intel 440LX/BX/GX, I8xx and E7x05 chipset support" |
70 | depends on AGP && X86 | 70 | depends on AGP && X86 |
71 | select INTEL_GTT | ||
71 | help | 72 | help |
72 | This option gives you AGP support for the GLX component of X | 73 | This option gives you AGP support for the GLX component of X |
73 | on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850, 860, 875, | 74 | on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850, 860, 875, |
@@ -155,3 +156,7 @@ config AGP_SGI_TIOCA | |||
155 | This option gives you AGP GART support for the SGI TIO chipset | 156 | This option gives you AGP GART support for the SGI TIO chipset |
156 | for IA64 processors. | 157 | for IA64 processors. |
157 | 158 | ||
159 | config INTEL_GTT | ||
160 | tristate | ||
161 | depends on X86 && PCI | ||
162 | |||
diff --git a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile index 8eb56e273e75..604489bcdbf9 100644 --- a/drivers/char/agp/Makefile +++ b/drivers/char/agp/Makefile | |||
@@ -13,7 +13,7 @@ obj-$(CONFIG_AGP_HP_ZX1) += hp-agp.o | |||
13 | obj-$(CONFIG_AGP_PARISC) += parisc-agp.o | 13 | obj-$(CONFIG_AGP_PARISC) += parisc-agp.o |
14 | obj-$(CONFIG_AGP_I460) += i460-agp.o | 14 | obj-$(CONFIG_AGP_I460) += i460-agp.o |
15 | obj-$(CONFIG_AGP_INTEL) += intel-agp.o | 15 | obj-$(CONFIG_AGP_INTEL) += intel-agp.o |
16 | obj-$(CONFIG_AGP_INTEL) += intel-gtt.o | 16 | obj-$(CONFIG_INTEL_GTT) += intel-gtt.o |
17 | obj-$(CONFIG_AGP_NVIDIA) += nvidia-agp.o | 17 | obj-$(CONFIG_AGP_NVIDIA) += nvidia-agp.o |
18 | obj-$(CONFIG_AGP_SGI_TIOCA) += sgi-agp.o | 18 | obj-$(CONFIG_AGP_SGI_TIOCA) += sgi-agp.o |
19 | obj-$(CONFIG_AGP_SIS) += sis-agp.o | 19 | obj-$(CONFIG_AGP_SIS) += sis-agp.o |
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index b8e2014cb9cb..078968d8d07d 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -94,6 +94,7 @@ static struct _intel_private { | |||
94 | #define IS_IRONLAKE intel_private.driver->is_ironlake | 94 | #define IS_IRONLAKE intel_private.driver->is_ironlake |
95 | #define HAS_PGTBL_EN intel_private.driver->has_pgtbl_enable | 95 | #define HAS_PGTBL_EN intel_private.driver->has_pgtbl_enable |
96 | 96 | ||
97 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
97 | static int intel_gtt_map_memory(struct page **pages, | 98 | static int intel_gtt_map_memory(struct page **pages, |
98 | unsigned int num_entries, | 99 | unsigned int num_entries, |
99 | struct sg_table *st) | 100 | struct sg_table *st) |
@@ -168,6 +169,7 @@ static void i8xx_destroy_pages(struct page *page) | |||
168 | __free_pages(page, 2); | 169 | __free_pages(page, 2); |
169 | atomic_dec(&agp_bridge->current_memory_agp); | 170 | atomic_dec(&agp_bridge->current_memory_agp); |
170 | } | 171 | } |
172 | #endif | ||
171 | 173 | ||
172 | #define I810_GTT_ORDER 4 | 174 | #define I810_GTT_ORDER 4 |
173 | static int i810_setup(void) | 175 | static int i810_setup(void) |
@@ -209,6 +211,7 @@ static void i810_cleanup(void) | |||
209 | free_gatt_pages(intel_private.i81x_gtt_table, I810_GTT_ORDER); | 211 | free_gatt_pages(intel_private.i81x_gtt_table, I810_GTT_ORDER); |
210 | } | 212 | } |
211 | 213 | ||
214 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
212 | static int i810_insert_dcache_entries(struct agp_memory *mem, off_t pg_start, | 215 | static int i810_insert_dcache_entries(struct agp_memory *mem, off_t pg_start, |
213 | int type) | 216 | int type) |
214 | { | 217 | { |
@@ -289,6 +292,7 @@ static void intel_i810_free_by_type(struct agp_memory *curr) | |||
289 | } | 292 | } |
290 | kfree(curr); | 293 | kfree(curr); |
291 | } | 294 | } |
295 | #endif | ||
292 | 296 | ||
293 | static int intel_gtt_setup_scratch_page(void) | 297 | static int intel_gtt_setup_scratch_page(void) |
294 | { | 298 | { |
@@ -647,7 +651,9 @@ static int intel_gtt_init(void) | |||
647 | return -ENOMEM; | 651 | return -ENOMEM; |
648 | } | 652 | } |
649 | 653 | ||
654 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
650 | global_cache_flush(); /* FIXME: ? */ | 655 | global_cache_flush(); /* FIXME: ? */ |
656 | #endif | ||
651 | 657 | ||
652 | intel_private.stolen_size = intel_gtt_stolen_size(); | 658 | intel_private.stolen_size = intel_gtt_stolen_size(); |
653 | 659 | ||
@@ -671,6 +677,7 @@ static int intel_gtt_init(void) | |||
671 | return 0; | 677 | return 0; |
672 | } | 678 | } |
673 | 679 | ||
680 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
674 | static int intel_fake_agp_fetch_size(void) | 681 | static int intel_fake_agp_fetch_size(void) |
675 | { | 682 | { |
676 | int num_sizes = ARRAY_SIZE(intel_fake_agp_sizes); | 683 | int num_sizes = ARRAY_SIZE(intel_fake_agp_sizes); |
@@ -689,6 +696,7 @@ static int intel_fake_agp_fetch_size(void) | |||
689 | 696 | ||
690 | return 0; | 697 | return 0; |
691 | } | 698 | } |
699 | #endif | ||
692 | 700 | ||
693 | static void i830_cleanup(void) | 701 | static void i830_cleanup(void) |
694 | { | 702 | { |
@@ -801,6 +809,7 @@ static int i830_setup(void) | |||
801 | return 0; | 809 | return 0; |
802 | } | 810 | } |
803 | 811 | ||
812 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
804 | static int intel_fake_agp_create_gatt_table(struct agp_bridge_data *bridge) | 813 | static int intel_fake_agp_create_gatt_table(struct agp_bridge_data *bridge) |
805 | { | 814 | { |
806 | agp_bridge->gatt_table_real = NULL; | 815 | agp_bridge->gatt_table_real = NULL; |
@@ -825,6 +834,7 @@ static int intel_fake_agp_configure(void) | |||
825 | 834 | ||
826 | return 0; | 835 | return 0; |
827 | } | 836 | } |
837 | #endif | ||
828 | 838 | ||
829 | static bool i830_check_flags(unsigned int flags) | 839 | static bool i830_check_flags(unsigned int flags) |
830 | { | 840 | { |
@@ -863,6 +873,7 @@ void intel_gtt_insert_sg_entries(struct sg_table *st, | |||
863 | } | 873 | } |
864 | EXPORT_SYMBOL(intel_gtt_insert_sg_entries); | 874 | EXPORT_SYMBOL(intel_gtt_insert_sg_entries); |
865 | 875 | ||
876 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
866 | static void intel_gtt_insert_pages(unsigned int first_entry, | 877 | static void intel_gtt_insert_pages(unsigned int first_entry, |
867 | unsigned int num_entries, | 878 | unsigned int num_entries, |
868 | struct page **pages, | 879 | struct page **pages, |
@@ -928,6 +939,7 @@ out_err: | |||
928 | mem->is_flushed = true; | 939 | mem->is_flushed = true; |
929 | return ret; | 940 | return ret; |
930 | } | 941 | } |
942 | #endif | ||
931 | 943 | ||
932 | void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries) | 944 | void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries) |
933 | { | 945 | { |
@@ -941,6 +953,7 @@ void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries) | |||
941 | } | 953 | } |
942 | EXPORT_SYMBOL(intel_gtt_clear_range); | 954 | EXPORT_SYMBOL(intel_gtt_clear_range); |
943 | 955 | ||
956 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
944 | static int intel_fake_agp_remove_entries(struct agp_memory *mem, | 957 | static int intel_fake_agp_remove_entries(struct agp_memory *mem, |
945 | off_t pg_start, int type) | 958 | off_t pg_start, int type) |
946 | { | 959 | { |
@@ -982,6 +995,7 @@ static struct agp_memory *intel_fake_agp_alloc_by_type(size_t pg_count, | |||
982 | /* always return NULL for other allocation types for now */ | 995 | /* always return NULL for other allocation types for now */ |
983 | return NULL; | 996 | return NULL; |
984 | } | 997 | } |
998 | #endif | ||
985 | 999 | ||
986 | static int intel_alloc_chipset_flush_resource(void) | 1000 | static int intel_alloc_chipset_flush_resource(void) |
987 | { | 1001 | { |
@@ -1138,6 +1152,7 @@ static int i9xx_setup(void) | |||
1138 | return 0; | 1152 | return 0; |
1139 | } | 1153 | } |
1140 | 1154 | ||
1155 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
1141 | static const struct agp_bridge_driver intel_fake_agp_driver = { | 1156 | static const struct agp_bridge_driver intel_fake_agp_driver = { |
1142 | .owner = THIS_MODULE, | 1157 | .owner = THIS_MODULE, |
1143 | .size_type = FIXED_APER_SIZE, | 1158 | .size_type = FIXED_APER_SIZE, |
@@ -1159,6 +1174,7 @@ static const struct agp_bridge_driver intel_fake_agp_driver = { | |||
1159 | .agp_destroy_page = agp_generic_destroy_page, | 1174 | .agp_destroy_page = agp_generic_destroy_page, |
1160 | .agp_destroy_pages = agp_generic_destroy_pages, | 1175 | .agp_destroy_pages = agp_generic_destroy_pages, |
1161 | }; | 1176 | }; |
1177 | #endif | ||
1162 | 1178 | ||
1163 | static const struct intel_gtt_driver i81x_gtt_driver = { | 1179 | static const struct intel_gtt_driver i81x_gtt_driver = { |
1164 | .gen = 1, | 1180 | .gen = 1, |
@@ -1376,11 +1392,13 @@ int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev, | |||
1376 | 1392 | ||
1377 | intel_private.refcount++; | 1393 | intel_private.refcount++; |
1378 | 1394 | ||
1395 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
1379 | if (bridge) { | 1396 | if (bridge) { |
1380 | bridge->driver = &intel_fake_agp_driver; | 1397 | bridge->driver = &intel_fake_agp_driver; |
1381 | bridge->dev_private_data = &intel_private; | 1398 | bridge->dev_private_data = &intel_private; |
1382 | bridge->dev = bridge_pdev; | 1399 | bridge->dev = bridge_pdev; |
1383 | } | 1400 | } |
1401 | #endif | ||
1384 | 1402 | ||
1385 | intel_private.bridge_dev = pci_dev_get(bridge_pdev); | 1403 | intel_private.bridge_dev = pci_dev_get(bridge_pdev); |
1386 | 1404 | ||
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index 6199d0b5b958..b0f61679c598 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig | |||
@@ -1,8 +1,10 @@ | |||
1 | config DRM_I915 | 1 | config DRM_I915 |
2 | tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" | 2 | tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" |
3 | depends on DRM | 3 | depends on DRM |
4 | depends on AGP | 4 | depends on X86 && PCI |
5 | depends on AGP_INTEL | 5 | depends on (AGP || AGP=n) |
6 | select INTEL_GTT | ||
7 | select AGP_INTEL if AGP | ||
6 | # we need shmfs for the swappable backing store, and in particular | 8 | # we need shmfs for the swappable backing store, and in particular |
7 | # the shmem_readpage() which depends upon tmpfs | 9 | # the shmem_readpage() which depends upon tmpfs |
8 | select SHMEM | 10 | select SHMEM |
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 65447572b129..38a344694e35 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -155,7 +155,11 @@ MODULE_PARM_DESC(prefault_disable, | |||
155 | "Disable page prefaulting for pread/pwrite/reloc (default:false). For developers only."); | 155 | "Disable page prefaulting for pread/pwrite/reloc (default:false). For developers only."); |
156 | 156 | ||
157 | static struct drm_driver driver; | 157 | static struct drm_driver driver; |
158 | #if IS_ENABLED(CONFIG_AGP_INTEL) | ||
158 | extern int intel_agp_enabled; | 159 | extern int intel_agp_enabled; |
160 | #else | ||
161 | static int intel_agp_enabled; | ||
162 | #endif | ||
159 | 163 | ||
160 | static const struct intel_device_info intel_i830_info = { | 164 | static const struct intel_device_info intel_i830_info = { |
161 | .gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2, | 165 | .gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2, |