From: Christof Efkemann <efkemann@uni-bremen.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Intel 830 support for agpgart
Date: Tue, 2 Oct 2001 03:32:27 +0200 [thread overview]
Message-ID: <20011002033227.6e047544.efkemann@uni-bremen.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
Hi,
this patch for 2.4.10 adds support for the Intel i830 chipset to the agpgart
module, thus eliminating the need for "agp_try_unsupported" with this chip.
It seems to work fine on my Siemens Fujitsu notebook which has an ATI Radeon
Mobility M6 graphics chip.
I guess it should work for others too, maybe someone could try.
--
Regards,
Christof Efkemann
[-- Attachment #2: i830-agp.patch --]
[-- Type: application/octet-stream, Size: 5144 bytes --]
diff -ur linux-2.4.10.orig/drivers/char/Config.in linux/drivers/char/Config.in
--- linux-2.4.10.orig/drivers/char/Config.in Sun Sep 23 18:52:38 2001
+++ linux/drivers/char/Config.in Tue Oct 2 01:00:37 2001
@@ -205,7 +205,7 @@
dep_tristate '/dev/agpgart (AGP Support)' CONFIG_AGP $CONFIG_DRM_AGP
if [ "$CONFIG_AGP" != "n" ]; then
- bool ' Intel 440LX/BX/GX and I815/I840/I850 support' CONFIG_AGP_INTEL
+ bool ' Intel 440LX/BX/GX and I815/I830/I840/I850 support' CONFIG_AGP_INTEL
bool ' Intel I810/I815 (on-board) support' CONFIG_AGP_I810
bool ' VIA chipset support' CONFIG_AGP_VIA
bool ' AMD Irongate, 761, and 762 support' CONFIG_AGP_AMD
diff -ur linux-2.4.10.orig/drivers/char/agp/agp.h linux/drivers/char/agp/agp.h
--- linux-2.4.10.orig/drivers/char/agp/agp.h Sun Sep 23 18:52:38 2001
+++ linux/drivers/char/agp/agp.h Tue Oct 2 01:01:31 2001
@@ -166,6 +166,9 @@
#ifndef PCI_DEVICE_ID_INTEL_810_0
#define PCI_DEVICE_ID_INTEL_810_0 0x7120
#endif
+#ifndef PCI_DEVICE_ID_INTEL_830_0
+#define PCI_DEVICE_ID_INTEL_830_0 0x3575
+#endif
#ifndef PCI_DEVICE_ID_INTEL_840_0
#define PCI_DEVICE_ID_INTEL_840_0 0x1a21
#endif
@@ -240,6 +243,10 @@
#define INTEL_AGPCTRL 0xb0
#define INTEL_NBXCFG 0x50
#define INTEL_ERRSTS 0x91
+
+/* intel i830 registers */
+#define INTEL_I830_GCC0 0x50
+#define INTEL_I830_ERRSTS 0x92
/* intel i840 registers */
#define INTEL_I840_MCHCFG 0x50
diff -ur linux-2.4.10.orig/drivers/char/agp/agpgart_be.c linux/drivers/char/agp/agpgart_be.c
--- linux-2.4.10.orig/drivers/char/agp/agpgart_be.c Sun Sep 23 18:52:38 2001
+++ linux/drivers/char/agp/agpgart_be.c Tue Oct 2 01:05:01 2001
@@ -387,7 +387,7 @@
/*
* Driver routines - start
* Currently this module supports the following chipsets:
- * i810, i815, 440lx, 440bx, 440gx, i840, i850, via vp3, via mvp3,
+ * i810, i815, 440lx, 440bx, 440gx, i830, i840, i850, via vp3, via mvp3,
* via kx133, via kt133, amd irongate, amd 761, amd 762, ALi M1541,
* and generic support for the SiS chipsets.
*/
@@ -1188,6 +1188,38 @@
return 0;
}
+static int intel_830_configure(void)
+{
+ u32 temp;
+ u16 temp2;
+ aper_size_info_16 *current_size;
+
+ current_size = A_SIZE_16(agp_bridge.current_size);
+
+ /* aperture size */
+ pci_write_config_byte(agp_bridge.dev, INTEL_APSIZE,
+ (char)current_size->size_value);
+
+ /* address to map to */
+ pci_read_config_dword(agp_bridge.dev, INTEL_APBASE, &temp);
+ agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
+
+ /* attbase - aperture base */
+ pci_write_config_dword(agp_bridge.dev, INTEL_ATTBASE,
+ agp_bridge.gatt_bus_addr);
+
+ /* agpctrl */
+ pci_write_config_dword(agp_bridge.dev, INTEL_AGPCTRL, 0x0000);
+
+ /* mcgcfg */
+ pci_read_config_word(agp_bridge.dev, INTEL_I830_GCC0, &temp2);
+ pci_write_config_word(agp_bridge.dev, INTEL_I830_GCC0,
+ temp2 | (1 << 9));
+ /* clear any possible AGP-related error conditions */
+ pci_write_config_word(agp_bridge.dev, INTEL_I830_ERRSTS, 0x001c);
+ return 0;
+}
+
static int intel_840_configure(void)
{
u32 temp;
@@ -1314,6 +1346,39 @@
(void) pdev; /* unused */
}
+static int __init intel_830_setup (struct pci_dev *pdev)
+{
+ agp_bridge.masks = intel_generic_masks;
+ agp_bridge.num_of_masks = 1;
+ agp_bridge.aperture_sizes = (void *) intel_generic_sizes;
+ agp_bridge.size_type = U16_APER_SIZE;
+ agp_bridge.num_aperture_sizes = 4;
+ agp_bridge.dev_private_data = NULL;
+ agp_bridge.needs_scratch_page = FALSE;
+ agp_bridge.configure = intel_830_configure;
+ agp_bridge.fetch_size = intel_fetch_size;
+ agp_bridge.cleanup = intel_cleanup;
+ agp_bridge.tlb_flush = intel_tlbflush;
+ agp_bridge.mask_memory = intel_mask_memory;
+ agp_bridge.agp_enable = agp_generic_agp_enable;
+ agp_bridge.cache_flush = global_cache_flush;
+ agp_bridge.create_gatt_table = agp_generic_create_gatt_table;
+ agp_bridge.free_gatt_table = agp_generic_free_gatt_table;
+ agp_bridge.insert_memory = agp_generic_insert_memory;
+ agp_bridge.remove_memory = agp_generic_remove_memory;
+ agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
+ agp_bridge.free_by_type = agp_generic_free_by_type;
+ agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+ agp_bridge.agp_destroy_page = agp_generic_destroy_page;
+ agp_bridge.suspend = agp_generic_suspend;
+ agp_bridge.resume = agp_generic_resume;
+ agp_bridge.cant_use_aperture = 0;
+
+ return 0;
+
+ (void) pdev; /* unused */
+}
+
static int __init intel_840_setup (struct pci_dev *pdev)
{
agp_bridge.masks = intel_generic_masks;
@@ -2976,6 +3041,12 @@
"Intel",
"i815",
intel_generic_setup },
+ { PCI_DEVICE_ID_INTEL_830_0,
+ PCI_VENDOR_ID_INTEL,
+ INTEL_I830,
+ "Intel",
+ "i830",
+ intel_830_setup },
{ PCI_DEVICE_ID_INTEL_840_0,
PCI_VENDOR_ID_INTEL,
INTEL_I840,
diff -ur linux-2.4.10.orig/include/linux/agp_backend.h linux/include/linux/agp_backend.h
--- linux-2.4.10.orig/include/linux/agp_backend.h Sun Sep 23 18:52:38 2001
+++ linux/include/linux/agp_backend.h Tue Oct 2 01:00:37 2001
@@ -46,6 +46,7 @@
INTEL_GX,
INTEL_I810,
INTEL_I815,
+ INTEL_I830,
INTEL_I840,
INTEL_I850,
VIA_GENERIC,
next reply other threads:[~2001-10-02 1:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-02 1:32 Christof Efkemann [this message]
2001-10-02 2:02 ` Robert Love
2001-10-02 23:45 ` Robert Love
2001-10-03 0:16 ` David Weinehall
2001-10-03 2:20 ` Robert Love
2001-10-03 2:52 ` David Weinehall
2001-10-03 11:55 ` Christof Efkemann
2001-10-06 23:47 ` Paul Mundt
2001-10-07 1:30 ` Wenzhuo Zhang
2001-10-02 13:10 ` Christof Efkemann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011002033227.6e047544.efkemann@uni-bremen.de \
--to=efkemann@uni-bremen.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®