Skip to contentSkip to conversation

AGP 648[FX] cleaned+fixed but still have problem. Plz help.

PATCH New Heilmann, Oliver 1 participant 1 message Feb 11, 2004 Agpgart driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AGP 648[FX] cleaned+fixed but still have problem. Plz help.

Hello,

This patch is provides AGP support for sis 648 and 648FX chipsets (previous versions only worked on FX chipsets).

However there is still this issue that I haven't been able to figure out. First of, here's what I found out so far:

AGP initialisation is totally different between the two chipset versions. The FX version sticks to the AGP3 spec in most regards, claims to support 3.5 but does not support isochronous transactions. The plain (non-FX) version does not stick to the spec and uses the same register set as all the other sis chips supported in sis-agp.c. The capid register of the plain version shows agp3.0 and not 3.5 as the FX version, which is how I tell the two appart. Both share the same PCI-Id.

The only common thing (as far as AGP is concerned) between the two chip iterations is this bug(or is it):
Any time the agp rate is changed in the bridges command register, the bridge stops working for about 5ms, such that the master's (agp-card) config space cannot be read (returns the same value regardless of offset). This is fatal during initialisation because the bridge must be initialised before the master.
I recorded the config spaces of both the bridge and the master before, during and after the screw-up in order to find some event I can wait for.No such luck. Even if I just wait for the master's config space to become readable again, the bridge does not seem to be completely ready and initialisation still fails most of the time.
Could this indeed be a chipset bug? Can anybody think of any other event I could wait for? Currently I'm just waiting 10+ ms, which ALWAYS work.

Oliver

Changes since last patch:
* added 648 support
* cleaned up to only use one driver struct instance in sis-agp.c
* uses more existing code and recycles agp_device_command
* generally a lot cleaner

drivers/char/agp/agp.h +17 -0
diff -uprN -X dontdiff linux-2.6.2/drivers/char/agp/agp.h linux-2.6.2.lastmod/drivers/char/agp/agp.h
@@ -402,6 +402,16 @@ void global_cache_flush(void);
 void get_agp_version(struct agp_bridge_data *bridge);
 unsigned long agp_generic_mask_memory(unsigned long addr, int type);
 
+/* generic routines for agp>=3 */
+int agp3_generic_fetch_size(void);
+void agp3_generic_tlbflush(struct agp_memory *mem);
+int agp3_generic_configure(void);
+void agp3_generic_cleanup(void);
+
+/* aperture sizes have been standardised since v3 */
+#define AGP_GENERIC_SIZES_ENTRIES 11
+extern struct aper_size_info_16 agp3_generic_sizes[];
+
 extern int agp_off;
 extern int agp_try_unsupported_boot;
 
@@ -410,13 +420,17 @@ extern int agp_try_unsupported_boot;
 #define AGPCMD			0x8
 #define AGPNISTAT		0xc
 #define AGPCTRL                 0x10
+#define AGPAPSIZE               0x14
 #define AGPNEPG			0x16
+#define AGPGARTLO               0x18
+#define AGPGARTHI               0x1c
 #define AGPNICMD		0x20
 
 #define AGP_MAJOR_VERSION_SHIFT	(20)
 #define AGP_MINOR_VERSION_SHIFT	(16)
 
 #define AGPSTAT_RQ_DEPTH	(0xff000000)
+#define AGPSTAT_RQ_DEPTH_SHIFT  24
 
 #define AGPSTAT_CAL_MASK	(1<<12|1<<11|1<<10)
 #define AGPSTAT_ARQSZ		(1<<15|1<<14|1<<13)
@@ -435,4 +449,7 @@ extern int agp_try_unsupported_boot;
 #define AGPSTAT3_8X		(1<<1)
 #define AGPSTAT3_4X		(1)
 
+#define AGPCTRL_APERENB         (1<<8)
+#define AGPCTRL_GTLBEN          (1<<7)
+
 #endif				/* _AGP_BACKEND_PRIV_H */
drivers/char/agp/generic.c +83 -0

86 lines not on this page · raw message

drivers/char/agp/sis-agp.c +68 -3

94 lines not on this page · raw message

--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or via e-mail return. If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to
http://www.drkw.com/disc/email/ or contact the sender.
--------------------------------------------------------------------------------