xf86-video-ati: Branch 'ati-1-0-branch' - 6 commits

Dave Airlie airlied at kemper.freedesktop.org
Thu Jul 6 02:11:49 EEST 2006


 ChangeLog           |  438 ----------------------------------------------------
 src/radeon.h        |    2 
 src/radeon_dri.c    |    7 
 src/radeon_driver.c |   49 +++++
 4 files changed, 50 insertions(+), 446 deletions(-)

New commits:
diff-tree cd9bbbcb9032c5dbb46802690de6196ca6db0084 (from b45c0f63068d0a0b2aa78ce7df6981b1516e2c71)
Author: Dave Airlie <airlied at linux.ie>
Date:   Wed Apr 26 08:38:47 2006 +0000

    remove changelog from stable branch

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index c365283..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,448 +0,0 @@
-2006-04-26  Dave Airlie  <airlied at linux.ie>
-
-	* src/radeon.h:
-	* src/radeon_dri.c: (RADEONDRIMapInit):
-	* src/radeon_driver.c: (RADEONMapMMIO), (RADEONUnmapMMIO),
-	(RADEONPreInit):
-	Make the ATI driver use the PCI BAR size to determine
-	the MMIO register aperture size. Otherwise it tries to
-	overmap things if they are up near the end of memory.
-
-2006-04-24  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONInitCrtcRegisters),
-	(RADEONInitCrtc2Registers):
-	Fix enabling of external VGA output on some cards with dual entity
-	setup instead of MergedFB. This was broken due to bogus manipulations
-	of a register between the 2 entities. This fix is a big "violent" in
-	that it always enables the analog output regardless of what is
-	plugged. It should work though (at the expense of some additional
-	power consumption). A proper fix should be easy to do once Alex gets
-	his output mapping rework in.
-
-2006-04-21  Dave Airlie <airlied at linux.ie>
-
-	* src/radeon_driver.c: (RADEONRestoreMode):
-	Bugzilla 6672: fix interrupts on radeon since memmap changes
-
-2006-04-21  Dave Airlie <airlied at linux.ie>
-
-	* src/radeon.h:
-	* src/radeon_dri.c: (RADEONDRICloseScreen),
-	(RADEONDRIAllocatePCIGARTTable):
-	* src/radeon_driver.c: (RADEONEnterVT), (RADEONLeaveVT):
-	Add support for backing up the PCIE GART table on VT switch.
-	This makes suspend/resume work a lot better on PCIE cards.
-
-
-2006-04-04  Eric Anholt  <anholt at FreeBSD.org>
-
-	* man/ati.man:
-	* man/radeon.man:
-	Bug #5632: Fix up ati.4 to explain that it is a wrapper driver for the
-	other three.  While here, touch up radeon.4, and add an authors list
-	gleaned from checking copyright headers.
-
-2006-04-01  Alex Deucher  <agd5f at yahoo.com>
-
-	* src/radeon.h:
-	* src/radeon_driver.c: (RADEONPreInitModes), (RADEONPreInit),
-	(RADEONResetDPI), (RADEONSwitchMode):
-	* src/radeon_mergedfb.c: (RADEONMergedFBCalcDPI),
-	(RADEONMergedFBSetDpi), (RADEONMergedFBResetDpi):
-	* src/radeon_mergedfb.h:
-	- Fix dpi when switching from clone to dualhead with MergedFB.
-	- Add ConstantDPI option to force a particlar dpi across mode changes
-	Both based on Thomas Winischhofer's sis code.
-
-2006-03-27  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONRestoreMemMapRegisters),
-	(RADEONInit):
-	Fix a regression of my latest fix that broke color tiling on some
-	setups. RADEONRestoreMemMapRegisters() must not clear CRTC_OFFSET_CNTL
-	and friends unconditionally but only when there is a map change or it
-	will clear them after the DRI updates the AGP location, thus turning
-	tiling back off on the CRTC.
-	Also remove a duplicate call to RADEONInitCommonRegisters().
-
-2006-03-23  Roland Scheidegger  <rscheidegger_lists at hispeed.ch>
-	* src/radeon_reg.h:
-	* src/radeon_video.c: (RADEONResetVideo), (RADEONDisplayVideo),
-	(RADEONPutImage): Use programmable tap coefficients for (hopefully)
-	better video image quality when downscaling. Remove unnecessary code
-	programming the tap coefficients twice. Disable some code which is
-	supposed to improve filtering quality but causes very visible image
-	quality problems at least with rv250 when upscaling. Fix potentially
-	broken FOURCC_RGB16T format (untested if it was broken, untested if it
-	works now...). Change some magic numbers to (new) macro defines.
-
-2006-03-23  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONRestoreMode),
-	(RADEONInitCrtcRegisters), (RADEONInitCrtc2Registers):
-	Call RADEONRestoreCommonRegisters() before
-	RADEONRestoreCrtc2Registers() instead of after. I can't find any good
-	reason why we did it backward until now and it definitely causes
-	problems as the workaround for VT switch in
-	RADEONRestoreCommonRegisters() will break output to the secondary head
-	in various situations. Also does an unrelated minor update to a
-	comment.
-
-2006-03-18  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONRestoreMemMapRegisters),
-	(RADEONRestoreCrtcRegisters), (RADEONRestoreCrtc2Registers):
-	* src/radeon_reg.h:
-	Clear the offsets when updating the memory map instead of when
-	enabling the CRTCs and try to make that code more reliable. Doesn't
-	disable the CRTCs beforehand.
-
-2006-03-18  Roland Scheidegger  <rscheidegger_lists at hispeed.ch>
-	* src/radeon_dri.c: (RADEONDRIGetVersion)
-	* src/radeon_driver.c: (RADEONGetAccessibleVRAM):
-	* man/radeon_reg.h:
-	* src/radeon_video.c:
-	Fix various small cosmetic issues. Change a driver message, get the order
-	right for requesting drm versions, replace the use of some numbers with
-	the respective macro defines in radeon_video.c, and add some more macro
-	defines. None of that really matters.
-
-2006-03-17  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONGetAccessibleVRAM),
-	(RADEONPreInitVRAM):
-	Add missing return statement (the driver would not start randomly),
-	add RV410 to the list of new generation cards for the memory map
-	setup and fix a bogus message.
-
-2006-03-16  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONInitCrtcRegisters),
-	(RADEONInitCrtc2Registers), (RADEONDoAdjustFrame):
-	Fix incorrect CRTC2_OFFSET values when using old-style dual head (not
-	MergedFB). Fixes Xinerama for me.
-
-2006-03-16  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONWaitForVerticalSync),
-	(RADEONWaitForVerticalSync2), (RADEONLoadPalette),
-	(RADEONScreenInit), (RADEONRestoreMemMapRegisters),
-	(RADEONRestoreCrtcRegisters), (RADEONRestoreCrtc2Registers),
-	(RADEONDoAdjustFrame), (RADEONCloseScreen):
-	* src/radeon_reg.h:
-	Add various workarounds that seem to fix some remaning lockup
-	scenarios I'm experiencing with the driver when setting the memory
-	map. Some of the magic delays are a bit dodgy but they seem to work, I
-	suppose I can't do better now without help from ATI. Also removed some
-	really too noisy debug messages.
-
-2006-03-15  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon.h:
-	* src/radeon_dri.c: (RADEONDRIScreenInit),
-	(RADEONDRIDoCloseScreen), (RADEONDRIFinishScreenInit),
-	(RADEONDRIStop), (RADEONDRICloseScreen):
-	* src/radeon_driver.c: (RADEONCloseScreen):
-	Fix various issues with DRI & server recycle by putting DRICloseSreen
-	in the normal CloseScreen callback chain at a spot that matches the
-	call to DRIFinishScreenInit in order to unwrap at the right time.
-
-2006-03-13  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_video.c: (RADEONSetTransform):
-	Fix typo in the function setting the color space transformation
-	factors for old radeon
-
-2006-03-13  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONPreInitVRAM),
-	(RADEONPreInitChipType), (RADEONPreInit):
-	Earliest fix introduced a bug due to another chicken & egg problem in
-	card detection. Now split PreInitConfig into PreInitChipType and
-	PreInitVRAM so that PreInitDRI can be done just in between. Restores
-	proper AGPx4 functionality (when enabled)
-
-2006-03-12  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/ati.h:
-	* src/r128_dri.c:
-	* src/r128_driver.c:
-	* src/r128_probe.c:
-	* src/radeon_driver.c:
-	* src/radeon_mm_i2c.c:
-	* src/radeon_probe.c:
-	* src/radeon_video.c:
-	* src/radeon_vip.c:
-	* src/atipciids.h:
-	Stop using xf86PciInfo.h, instead use a local copy of the PCI IDs
-	we need in atipciids.h so we can update the ATI driver independently
-	of the server when new chips are added
-
-2006-03-10  Alan Coopersmith  <alan.coopersmith at sun.com>
-
-	* src/radeon_driver.c: 
-	Add #ifdef XF86DRI guards around references to info->allowPageFlip
-	and info->depthMoves, since they are only defined if building with
-	DRI.
-
-2006-03-10  Roland Scheidegger  <rscheidegger_lists at hispeed.ch>
-	* man/radeon.man:
-	* src/radeon_driver.c: (RADEONSetupMemXAA_DRI), (RADEONScreenInit):
-	Use "FBTexPercent" option for XAA too (only for increasing
-	memory reserved for textures).
-
-2006-03-10  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon.h:
-	* src/radeon_dri.c: (RADEONDRIGartHeapInit), (RADEONDRIGetVersion),
-	(RADEONDRIScreenInit), (RADEONDRIInitPageFlip), (RADEONDRIResume),
-	(RADEONDRIAllocatePCIGARTTable):
-	* src/radeon_driver.c: (RADEONInitMemoryMap),
-	(RADEONGetAccessibleVRAM), (RADEONPreInitConfig),
-	(RADEONPreInitDRI), (RADEONPreInitColorTiling), (RADEONPreInit),
-	(RADEONScreenInit), (RADEONRestoreMode):
-	More memory map fixes !!! This time, we add a way to get the DRM
-	kernel module version early, in order to properly limit the
-	framebuffer size when a module that doesn't support the new map is
-	loaded. That will improve backward compatibility. I also made the
-	minimum required kernel module version 1.3 which hopefully shouldn't
-	be a problem for anybody, and cleaned up the ordering in which we test
-	for DRM version to enable features
-
-2006-03-09  Michel Dänzer  <michel at daenzer.net>
-
-	* src/radeon_driver.c: (RADEONGetClockInfo), (RADEONGetVRamType),
-	(RADEONPreInitConfig):
-	Bugzilla #5766 <https://bugs.freedesktop.org/show_bug.cgi?id=5766>
-	Patch #4636  <https://bugs.freedesktop.org/attachment.cgi?id=4636>
-	- Acknowledge that RN50 only has one CRTC, and use this to distinguish
-	  it from RV100.
-	- Fix detection of RN50 memory type and bus width.
-	- Model RN50 memory bandwidth limits by capping the pixel clock range
-	  based on memory clock, bpp and memory bus width.
-	(ATI Technologies Inc.)
-
-2006-03-03  Michel Dänzer  <michel at daenzer.net>
-
-	* man/radeon.man:
-	* src/radeon_driver.c: (RADEONScreenInit):
-	* src/radeon_exa.c: (RADEONSetupMemEXA):
-	Add Option "FBTexPercent" to override the amount of video RAM reserved
-	for OpenGL textures with EXA.
-
-2006-03-02  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONPreInitConfig):
-	Fix the fix ... I didn't interpret PciInfo->size properly and forgot
-	that the function works in Kb not bytes... Ooops.
-
-2006-03-02  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONInitMemoryMap),
-	(RADEONPreInitConfig):
-	Extend the alignement workaround to post-rv280 chips as well (thanks
-	Hui) and also limit the CPU accessible memory to the size of the PCI
-	BAR size (yeah, it was passed to the driver, I just got blind for a
-	while it seems)
-
-2006-03-01  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_driver.c: (RADEONInitMemoryMap),
-	(RADEONPreInitConfig):
-	Workaround for rv280 bug which needs the framebuffer memory mapping
-	to be aligned to its own size. Also add back limit of 128Mb of mapped
-	fb space for now until I fully sort out what's up with dual function
-	cards. I would really need to access the PCI BAR sizes here but that
-	information seem to be missing from the PCI info passed to the driver.
-
-2006-02-27  Roland Scheidegger  <rscheidegger_lists at hispeed.ch>
-	* src/atichip.h:
-	* src/atichip.c:
-	* src/radeon_chipset.h:
-	Add the newly added (and tons of previously forgotten ones) pci ids
-	to the ati wrapper too (probably not required for it to work as
-	everything should default to radeon anyway there).
-
-2006-02-26  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon.h:
-	* src/radeon_dri.c: (RADEONDRIFinishScreenInit),
-	(RADEONDRIInitPageFlip):
-	* src/radeon_driver.c: (RADEONScreenInit):
-	Fix page flipping with XAA. The new code ended up calling
-	ShadowFBInit() before XAAInit(), which breaks ShadowFB.
-
-2006-02-24  Roland Scheidegger  <rscheidegger_lists at hispeed.ch>
-	* src/radeon.h:
-	* src/radeon_chipset.h:
-	* src/radeon_driver.c:
-	* src/radeon_probe.c:
-	Add pci ids known to exist (see #4284 for instance). There are still
-	entries which probably don't really exist (cancelled cards and such),
-	leave them as-is. Fix the name of some entries, mostly based on the
-	.inf file of the newest catalyst driver. Use own family id for rv410
-	and rs400, though there is no different code (yet?).
-
-2006-02-17  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon.h:
-	* src/radeon_common.h:
-	* src/radeon_commonfuncs.c: (RADEONWaitForIdle):
-	* src/radeon_cursor.c: (RADEONCursorAllocEXA),
-	(RADEONSetCursorColors), (RADEONSetCursorPosition),
-	(RADEONLoadCursorImage), (RADEONHideCursor), (RADEONShowCursor),
-	(RADEONLoadCursorARGB), (RADEONCursorInit):
-	* src/radeon_dri.c: (RADEONDRIScreenInit),
-	(RADEONDRIFinishScreenInit), (RADEONDRICloseScreen),
-	(RADEONDRIRefreshArea):
-	* src/radeon_driver.c: (RADEONMapFB), (RADEONInitMemMapRegisters),
-	(RADEONInitMemoryMap), (RADEONGetAccessibleVRAM),
-	(RADEONPreInitConfig), (RADEONLoadPalette), (RADEONBlockHandler),
-	(RADEONScreenInit), (RADEONRestoreMemMapRegisters),
-	(RADEONAdjustMemMapRegisters), (RADEONRestoreSurfaces),
-	(RADEONSaveSurfaces), (RADEONChangeSurfaces), (RADEONRestoreMode),
-	(RADEONSaveMemMapRegisters), (RADEONSaveMode), (RADEONSave),
-	(RADEONInitDispBandwidth), (RADEONInitPLLRegisters),
-	(RADEONInitPLL2Registers), (RADEONInit), (RADEONModeInit),
-	(RADEONSaveScreen), (RADEONSwitchMode), (RADEONDoAdjustFrame),
-	(RADEONAdjustFrame), (RADEONEnterVT), (RADEONLeaveVT),
-	(RADEONCloseScreen), (RADEONDisplayPowerManagementSet):
-	* src/radeon_reg.h:
-	* src/radeon_render.c: (RADEONSetupRenderByteswap):
-	Memory map and misc fixes. This completely reworks the way the driver
-	detects available & accessible video memory and initializes the card
-	internal memory map. Along the way, I re-ordered some of the stuffs
-	in pre-init in order to remove some dodgy codepath, fixed various
-	init, exit and vt switch issues, and overall made the driver more
-	robust. The full memory map fix requires an updated DRM. The X driver
-	no longer tries to position the AGP aperture, this becomes entirely
-	DRM responsibility.
-
-2006-02-16  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
-
-	* src/radeon_accel.c: (RADEONEngineRestore):
-	The engine setup would trigger a bogus line write before the proper
-	addresses are setup, thus causing the card to try to bus master over
-	the system bus to some stale location (usually 0 but could depend on
-	whatever was used before X). Remove that useless init bit, and always
-	setup some good enough engine source & destination pointers in case we
-	have some other spurrious engine activity going on.
-
-2006-02-13  Benjamin Herrenschmidt <benh at kernel.crashing.org>
-
-	* src/radeon_exa_render.c: (R100TextureSetup), (R200TextureSetup):
-	Fix EXA acceleration of textures with byteswap or tiling
-	From John Clemens <john at deater.net>
-
-2006-02-06  Eric Anholt  <anholt at FreeBSD.org>
-
-	* src/radeon_exa_render.c:
-	Fix a copy'n'paste-o in the EXA render implementation that resulted in
-	[ax]8b8g8r8 pict formats not being supported on r200, but no other
-	issues.
-
-2006-01-19  Daniel Stone  <daniel at freedesktop.org>
-
-	* src/radeon_driver.c:
-	Bug #5656: Set all Radeon XPRESS 200 R[CS]4xx-based chips to
-	have IsIGP = 1, fixing modesetting issues.
-
-2006-01-12  Alan Coopersmith  <alan.coopersmith at sun.com>
-
-	* src/theatre200_module.c (theatre200VersRec): 
-	* src/theatre_detect_module.c (theatre_detectVersRec): 
-	XF86_VERSION_CURRENT -> XORG_VERSION_CURRENT
-
-2006-01-12  Alan Coopersmith  <alan.coopersmith at sun.com>	
-
-	* src/radeon_driver.c (RADEONPreInitModes): 
-	When failing to parse MetaModes, reset CRT2pScrn to NULL after 
-	free'ing it so we don't crash when trying to use it later 
-	(such as in RADEONFreeRec).
-
-2006-01-08  Adam Jackson  <ajax at freedesktop.org>
-
-	* src/radeon.h:
-	Bug #5523: Make radeon compile without USE_XAA.  (Tilman Sauerbeck)
-
-2005-12-20  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-19  Alan Coopersmith  <alan.coopersmith at sun.com>
-
-	* README.ati.sgml:
-	* man/radeon.man:
-	Typo fixes, mailing list & url updates, and other changes
-        to prepare for X11R6.9 & 7.0 releases.
-
-2005-12-15  Alan Coopersmith  <alan.coopersmith at sun.com>
-
-	* man/r128.man: 
-	Bugzilla #5238 <https://bugs.freedesktop.org/show_bug.cgi?id=5238>
-	Patch #3978  <https://bugs.freedesktop.org/attachment.cgi?id=3978>
-	r128 man page dualhead note update (Alex Deucher)
-
-2005-12-14  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	* src/r128_version.h:
-	* src/radeon_version.h:
-	Update package version number for final X11R7 release candidate.
-	Bump driver version number.
-
-2005-12-14  Adam Jackson  <ajax at freedesktop.org>
-
-	* src/r128_accel.c:
-	* src/r128_driver.c:
-	* src/radeon_driver.c:
-	* src/radeon_probe.c:
-	Bug #1760: Fix ati wrapper multihead to be dlloader friendly.
-
-2005-12-08  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* src/Makefile.am:
-	Add configure options to allow hard-coded paths to be changed.
-
-2005-12-06  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-20  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	Bump libdrm dep to 2.0.
-
-2005-11-29  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update pkgcheck depedencies to work with separate build roots.
-
-2005-10-20  Donnie Berkholz  <spyderous at gentoo.org>
-
-	* configure.ac: Bug #4831
-	<https://bugs.freedesktop.org/show_bug.cgi?id=4831>. Check for x86_64 in
-	addition to amd64 in host_cpu.
diff-tree b45c0f63068d0a0b2aa78ce7df6981b1516e2c71 (from 6ff77d071ce7b30930f696814b4dfc0abe207036)
Author: Dave Airlie <airlied at linux.ie>
Date:   Wed Apr 26 08:38:47 2006 +0000

    Make the ATI driver use the PCI BAR size to determine the MMIO register
        aperture size. Otherwise it tries to overmap things if they are up near
        the end of memory.
    (cherry picked from 85e2ee6de6fd347aad66785ec7119f92013cd994 commit)

diff --git a/ChangeLog b/ChangeLog
index c408ba4..c365283 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-04-26  Dave Airlie  <airlied at linux.ie>
+
+	* src/radeon.h:
+	* src/radeon_dri.c: (RADEONDRIMapInit):
+	* src/radeon_driver.c: (RADEONMapMMIO), (RADEONUnmapMMIO),
+	(RADEONPreInit):
+	Make the ATI driver use the PCI BAR size to determine
+	the MMIO register aperture size. Otherwise it tries to
+	overmap things if they are up near the end of memory.
+
 2006-04-24  Benjamin Herrenschmidt  <benh at kernel.crashing.org>
 
 	* src/radeon_driver.c: (RADEONInitCrtcRegisters),
diff --git a/src/radeon.h b/src/radeon.h
index 02098b6..3a14295 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -105,7 +105,6 @@ typedef struct _region {
 #define RADEON_DEBUG            1 /* Turn off debugging output               */
 #define RADEON_IDLE_RETRY      16 /* Fall out of idle loops after this count */
 #define RADEON_TIMEOUT    2000000 /* Fall out of wait loops after this count */
-#define RADEON_MMIOSIZE   0x80000
 
 /* Buffer are aligned on 4096 byte boundaries */
 #define RADEON_BUFFER_ALIGN 0x00000fff
@@ -347,6 +346,7 @@ typedef struct {
 
     CARD32            MemCntl;
     CARD32            BusCntl;
+    unsigned long     MMIOSize;         /* MMIO region physical address      */
     unsigned long     FbMapSize;        /* Size of frame buffer, in bytes    */
     unsigned long     FbSecureSize;     /* Size of secured fb area at end of
                                            framebuffer */
diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 7aef521..e919b7b 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -1023,7 +1023,7 @@ static Bool RADEONDRIPciInit(RADEONInfoP
 static Bool RADEONDRIMapInit(RADEONInfoPtr info, ScreenPtr pScreen)
 {
 				/* Map registers */
-    info->registerSize = RADEON_MMIOSIZE;
+    info->registerSize = info->MMIOSize;
     if (drmAddMap(info->drmFD, info->MMIOAddr, info->registerSize,
 		  DRM_REGISTERS, DRM_READ_ONLY, &info->registerHandle) < 0) {
 	return FALSE;
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 68cb0dc..03d1e89 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1,5 +1,5 @@
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v 1.117 2004/02/19 22:38:12 tsi Exp $ */
-/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.92.2.16 2006/04/21 00:46:53 airlied Exp $ */
+/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.113 2006/04/24 07:44:52 benh Exp $ */
 /*
  * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
  *                VA Linux Systems Inc., Fremont, California.
@@ -709,7 +709,7 @@ static Bool RADEONMapMMIO(ScrnInfoPtr pS
 				   VIDMEM_MMIO | VIDMEM_READSIDEEFFECT,
 				   info->PciTag,
 				   info->MMIOAddr,
-				   RADEON_MMIOSIZE);
+				   info->MMIOSize);
     }
 
     if (!info->MMIO) return FALSE;
@@ -726,7 +726,7 @@ static Bool RADEONUnmapMMIO(ScrnInfoPtr 
     if (info->FBDev)
 	fbdevHWUnmapMMIO(pScrn);
     else {
-	xf86UnMapVidMem(pScrn->scrnIndex, info->MMIO, RADEON_MMIOSIZE);
+	xf86UnMapVidMem(pScrn->scrnIndex, info->MMIO, info->MMIOSize);
     }
     info->MMIO = NULL;
     return TRUE;
@@ -4859,6 +4859,7 @@ _X_EXPORT Bool RADEONPreInit(ScrnInfoPtr
 			   info->PciInfo->device,
 			   info->PciInfo->func);
     info->MMIOAddr   = info->PciInfo->memBase[2] & 0xffffff00;
+    info->MMIOSize  = (1 << info->PciInfo->size[2]);
     if (info->pEnt->device->IOBase) {
 	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
 		   "MMIO address override, using 0x%08lx instead of 0x%08lx\n",
@@ -4870,7 +4871,7 @@ _X_EXPORT Bool RADEONPreInit(ScrnInfoPtr
 	goto fail1;
     }
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-	       "MMIO registers at 0x%08lx\n", info->MMIOAddr);
+	       "MMIO registers at 0x%08lx: size %dKB\n", info->MMIOAddr, info->MMIOSize / 1024);
 
     if(!RADEONMapMMIO(pScrn)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
diff-tree 6ff77d071ce7b30930f696814b4dfc0abe207036 (from b779109051f86b5b8af2359b2b940ac4567d77b9)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Sun Jul 2 17:03:23 2006 +0200

    Bug #6939: Disable RENDER acceleration by default on RN50.
    
    Based on patch from Weixing Zhang, but still allows enabling it with Option
    "RenderAccel".
    (cherry picked from 11bedb7c845fc6074383890d5525315aebe05f2c commit)

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index ffd41d2..68cb0dc 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3012,8 +3012,9 @@ static Bool RADEONPreInitChipType(ScrnIn
 		   "Option ShowCache enabled\n");
 
 #ifdef RENDER
-    info->RenderAccel = xf86ReturnOptValBool (info->Options,
-					      OPTION_RENDER_ACCEL, TRUE);
+    info->RenderAccel = xf86ReturnOptValBool(info->Options, OPTION_RENDER_ACCEL,
+					     info->Chipset != PCI_CHIP_RN50_515E &&
+					     info->Chipset != PCI_CHIP_RN50_5969);
 #endif
 
     return TRUE;
diff-tree b779109051f86b5b8af2359b2b940ac4567d77b9 (from 981e44d0b4fb17496f0474012f4dd40a67d58f7f)
Author: Weixing Zhang <anzhang at ati.com>
Date:   Sun Jul 2 16:55:25 2006 +0200

    Bug #6939: Disable 3D acceleration on RN50 by setting invalid ClientDriverName.
    (cherry picked from 4a0c22e32901a510c7aad070be25c31519c284e3 commit)

diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 7e5840c..7aef521 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -1374,6 +1374,11 @@ Bool RADEONDRIScreenInit(ScreenPtr pScre
     } else    
     if ( info->ChipFamily >= CHIP_FAMILY_R200 )
        pDRIInfo->clientDriverName	 = R200_DRIVER_NAME;
+    else if ((info->Chipset == PCI_CHIP_RN50_515E) || 
+             (info->Chipset == PCI_CHIP_RN50_5969)) {
+        /* RN50 doesn't support 3D, so setting clientDriverName to an invalid name "RN50" */
+        pDRIInfo->clientDriverName       = "RN50";          
+    }
     else 
        pDRIInfo->clientDriverName	 = RADEON_DRIVER_NAME;
 
diff-tree 981e44d0b4fb17496f0474012f4dd40a67d58f7f (from ce3f9bb467ce6f5e36531d7e6b59fef9e0eca1ec)
Author: Alex Williamson <alex.williamson at hp.com>
Date:   Mon Jul 3 13:09:47 2006 +0200

    Bug #6872: Disable digital output while reading ROM with Radeon 7000.
    
    This is a workaround for ATI Radeon 7000 erratum F1.
    (cherry picked from 6900ff3c5e574881b1470e2363b200e99ab8bf3e commit)

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index b14f777..ffd41d2 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -4462,12 +4462,31 @@ static Bool RADEONPreInitAccel(ScrnInfoP
 static Bool RADEONPreInitInt10(ScrnInfoPtr pScrn, xf86Int10InfoPtr *ppInt10)
 {
     RADEONInfoPtr  info = RADEONPTR(pScrn);
+    unsigned char *RADEONMMIO = info->MMIO;
+    CARD32 fp2_gen_ctl_save   = 0;
 
 #if !defined(__powerpc__)
     if (xf86LoadSubModule(pScrn, "int10")) {
 	xf86LoaderReqSymLists(int10Symbols, NULL);
+
+	/* The VGA BIOS on the RV100/QY cannot be read when the digital output
+	 * is enabled.  Clear and restore FP2_ON around int10 to avoid this.
+	 */
+	if (info->PciInfo->chipType == PCI_CHIP_RV100_QY) {
+	    fp2_gen_ctl_save = INREG(RADEON_FP2_GEN_CNTL);
+	    if (fp2_gen_ctl_save & RADEON_FP2_ON) {
+		xf86DrvMsg(pScrn->scrnIndex, X_INFO, "disabling digital out\n");
+		OUTREG(RADEON_FP2_GEN_CNTL, fp2_gen_ctl_save & ~RADEON_FP2_ON);
+	    }
+	}
+	
 	xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
 	*ppInt10 = xf86InitInt10(info->pEnt->index);
+
+	if (fp2_gen_ctl_save & RADEON_FP2_ON) {
+	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "re-enabling digital out\n");
+	    OUTREG(RADEON_FP2_GEN_CNTL, fp2_gen_ctl_save);	
+	}
     }
 #endif
     return TRUE;
diff-tree ce3f9bb467ce6f5e36531d7e6b59fef9e0eca1ec (from 6548cf78f6c18eb60e55ba530697f7048f9be078)
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Jun 26 20:34:34 2006 +1000

    radeon: force CP and VIP clocks on some r300 and rv100 chips.
    
    fglrx appears to do this on r300 and Jerome Glisse has spent most of his
    life tracking down what caused the 9800 to lockup. This is my attempt to
    fix this. Please report if it works for you.
    
    Signed-off-by: Dave Airlie <airlied at linux.ie>
    (cherry picked from 4b1904017caa976c138594a86e75feaf470e72b5 commit)

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 7180a87..b14f777 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -129,6 +129,7 @@ static void RADEONInitDispBandwidth(Scrn
 static void RADEONGetMergedFBOptions(ScrnInfoPtr pScrn);
 static int RADEONValidateMergeModes(ScrnInfoPtr pScrn);
 static void RADEONSetDynamicClock(ScrnInfoPtr pScrn, int mode);
+static void RADEONForceSomeClocks(ScrnInfoPtr pScrn);
 static void RADEONUpdatePanelSize(ScrnInfoPtr pScrn);
 static void RADEONSaveMemMapRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save);
 static void RADEONAdjustMemMapRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save);
@@ -5699,6 +5700,9 @@ _X_EXPORT Bool RADEONScreenInit(int scrn
         }
     }
 
+    if ((!info->IsSecondary) && (IS_R300_VARIANT || IS_RV100_VARIANT))
+      RADEONForceSomeClocks(pScrn);
+
     if (info->allowColorTiling && (pScrn->virtualX > info->MaxSurfaceWidth)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		   "Color tiling not supported with virtual x resolutions larger than %d, disabling\n",
@@ -9620,6 +9624,18 @@ RADEONGetMergedFBOptions(ScrnInfoPtr pSc
     }
 }
 
+static void RADEONForceSomeClocks(ScrnInfoPtr pScrn)
+{
+    /* It appears from r300 and rv100 may need some clocks forced-on */
+     RADEONInfoPtr info        = RADEONPTR(pScrn);
+     unsigned char *RADEONMMIO = info->MMIO;
+     CARD32 tmp;
+
+     tmp = INPLL(pScrn, RADEON_SCLK_CNTL);
+     tmp |= RADEON_SCLK_FORCE_CP | RADEON_SCLK_FORCE_VIP;
+     OUTPLL(pScrn, RADEON_SCLK_CNTL, tmp);
+}
+
 static void RADEONSetDynamicClock(ScrnInfoPtr pScrn, int mode)
 {
     RADEONInfoPtr  info       = RADEONPTR(pScrn);



More information about the xorg-commit mailing list