/* * drivers/video/radeonfb.c * framebuffer driver for ATI Radeon chipset video boards * * Copyright 2000 Ani Joshi * * * ChangeLog: * 2000-08-03 initial version 0.0.1 * 2000-09-10 more bug fixes, public release 0.0.5 * 2001-02-19 mode bug fixes, 0.0.7 * 2001-07-05 fixed scrolling issues, engine initialization, * and minor mode tweaking, 0.0.9 * 2001-09-07 Radeon VE support, Nick Kurshev * blanking, pan_display, and cmap fixes, 0.1.0 * 2001-10-10 Radeon 7500 and 8500 support, and experimental * flat panel support, 0.1.1 * 2001-11-17 Radeon M6 (ppc) support, Daniel Berlin, 0.1.2 * 2001-11-18 DFP fixes, Kevin Hendricks, 0.1.3 * 2001-11-29 more cmap, backlight fixes, Benjamin Herrenschmidt * 2002-01-18 DFP panel detection via BIOS, Michael Clark, 0.1.4 * 2002-06-02 console switching, mode set fixes, accel fixes * 2002-06-03 MTRR support, Peter Horton, 0.1.5 * 2002-09-21 rv250, r300, m9 initial support, * added mirror option, 0.1.6 * 2003-04-10 accel engine fixes, 0.1.7 * 2003-04-12 Mac PowerBook sleep fixes, Benjamin Herrenschmidt, * 0.1.8 * * Other change (--BenH) * * 2003-01-01 - Tweaks for PLL on some iBooks * - Fix SURFACE_CNTL usage on r9000 * 2003-03-23 - Added new Power Management code from ATI * - Added default PLL values for r300 from lkml * - Fix mirror ioctl result code (that ioctl still need some * rework to actually use the second head) * 2003-03-26 - Never set TMDS_PLL_EN, it seem to break more than * just old r300's * 2003-04-02 - Got final word from ATI, TMDS_PLL_EN has to be flipped * depending if we are dealing with an "RV" card or not * - Comsetic changes to sleep code, make it a bit more robust * hopefully * - Fix 800x600-8 mode accel (Daniel Mantione) * - Fix scaling on LCDs (not yet preserving aspect ratio though) * - Properly set scroll mode to SCROLL_YREDRAW when accel * is disabled from fbset * - Add some more radeon PCI IDs & default PLL values * 2003-04-05 - Update the code that retreive the panel infos from the * BIOS to match what XFree is doing * - Avoid a divide by 0 when failing to retreive those infos * 2003-04-07 - Fix the M6 video RAM workaround * - Some bits in the PM code were flipped, fix that. * - RB2D_DSTCACHE_MODE shouldn't be cleared on r300 (and * maybe not on others according to a comment in XFree, but * we keep working code for now). * - Use ROP3_S for rectangle fill * 2003-04-10 - Re-change the pitch workaround. We now align the pitch * when accel is enabled for a given mode, and we don't when * accel is disabled. That should properly deal with all cases * and allows us to remove the "special case" accel code * - Bring in XFree workaround to not write the same value to * the PLL (can cause blanking of some panels) * - Bring in some of Peter Horton fixes (accel reset, cleanups) * still some more to get in though... * - Back to use of ROP3_P for rectangle fill (hrm...) * 2003-04-11 - Properly reset accel engine on each console switch so * we work around switching from XFree leaving it in a weird * state. Also extend the comparison of values causing us to * reload the mode on console switch. * 2003-04-30 - For BIOS returned LCD infos, assume high sync polarity * 2003-07-08 - Fix an oops during boot related to disp not beeing initialized * when modedb called us back for set_var. Remove bogus refs to * RADEON_PM chip, this is really a mach64 chip, not a Radeon. * Add some DFP blanking support * 2003-07-11 - Merged with Ani's 0.1.8 version * * Special thanks to ATI DevRel team for their hardware donations, * and for spending the time to fix the power management code ! * * Note: This driver in in bad need of beeing completely re-organized. * My long term plans, if I ever get enough time for that, is * to split the actual mode setting code so it can properly * work on any head, the probe code, which will be stuffed with * OF parsing on PPC and i2c fallback (look at what XFree does) * and the PM code ought to be in a separate file. --BenH. * * * Known Bugs: * * - Incompatible with ATI FireGL drivers. They are playing with things * like MC_FB_LOCATION behind our back. Not much we can do. This is * becoming a real problem as DRI is also playing with those and the * GATOS CVS as well in a different way. * We should really define _once for all_ the way we want those setup * and do it the same way everywhere or we won't be able to keep * compatibility with radeonfb. * IMHO, the proper setup is what radeon_fixup_apertures() does on * PPC when SET_MC_FB_FROM_APERTURE is defined (not the case currently * because of compatiblity problems with DRI). This is, I think, also * what GATOS does. We shall ask ATI what they do in the FireGL drivers * - We don't preserve aspect ratio on scaled modes on LCDs yet * - The way we retreive the BIOS informations probably doesn't work with * anything but the primary card since we need a "live" BIOS image in * memory to find the tables configured by the BIOS during POST stage. */ #define RADEON_VERSION "0.1.8-ben" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef CONFIG_ALL_PPC #include #include #include