xserver-xorg-video-ati: Changes to 'debian-experimental'
ChangeLog | 356 +++++++++++++++++++++++++++++++++++++++++++++++
Makefile.am | 2
Makefile.in | 2
configure | 2
configure.ac | 2
debian/changelog | 7
man/radeon.man | 2
src/atividmem.c | 14 -
src/r128_dri.c | 6
src/r128_probe.c | 2
src/radeon.h | 45 ++++-
src/radeon_accel.c | 6
src/radeon_bios.c | 25 +--
src/radeon_commonfuncs.c | 4
src/radeon_crtc.c | 220 ++++++++++++++++++++---------
src/radeon_cursor.c | 49 ++++--
src/radeon_display.c | 289 +++++++++++++++++++++-----------------
src/radeon_dri.c | 18 --
src/radeon_driver.c | 43 +++--
src/radeon_exa.c | 20 +-
src/radeon_exa_render.c | 93 +++++++-----
src/radeon_output.c | 117 ++++++++++++---
src/radeon_probe.h | 1
src/radeon_reg.h | 1
24 files changed, 975 insertions(+), 351 deletions(-)
New commits:
commit 5d03d8bb56b4363eb8377c549a45119eae15e5f7
Author: Brice Goglin <bgoglin@debian.org>
Date: Wed Dec 19 08:44:46 2007 +0100
New upstream snapshot
diff --git a/ChangeLog b/ChangeLog
index 84de39e..99fef9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,359 @@
+commit ce4fa1cedec0cf56b9979dfaa12a8d3a7c643df4
+Author: Arkadiusz Miskiewicz <arekm@maven.pl>
+Date: Tue Dec 18 15:34:14 2007 -0500
+
+ RADEON: fix fd leak in lid detect code
+
+commit 20568f66f9a9a60a33bd9a69ccc14a891c656836
+Author: Arkadiusz Miskiewicz <arekm@maven.pl>
+Date: Tue Dec 18 15:32:10 2007 -0500
+
+ RADEON: more cleanups and warning fixes
+
+commit 1496194200adbcb044ec3977367a0908262e389c
+Author: Arkadiusz Miskiewicz <arekm@maven.pl>
+Date: Tue Dec 18 15:29:53 2007 -0500
+
+ RADEON: driver cleanups, warning fixes
+
+commit 44d07c4ccce9acb5bd21a17acb082e91f7225764
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Mon Dec 17 18:56:12 2007 -0500
+
+ RADEON: typo from last commit
+
+commit 4da3782239921eb377216d4de4a9cc5bb55e0e8a
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Mon Dec 17 18:51:31 2007 -0500
+
+ RADEON: add output enable masks
+
+ add output enable masks for outputs that drive
+ more than one connector. Make sure we don't turn off
+ an output that's driving another connector.
+
+commit 5c5d2d19b2b032a06dd333b4ecc029aac342fb93
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Mon Dec 17 18:15:55 2007 -0500
+
+ RADEON: whitespace clean-ups
+
+commit 9f1d8220315c8894a17f2cc328025dc682b0c6e0
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Mon Dec 17 18:04:05 2007 -0500
+
+ RADEON: more PLL fixes
+
+ - reduce the calculation accuracy
+ - certain LVDS panels seem to only like certain ref_divs
+ - add pll flags to handle special cases
+ - adjust the pll limits on legacy cards
+
+commit 4747c1f3cd4167b6a51d4864a297719ea48b9346
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Sun Dec 16 14:07:29 2007 -0500
+
+ RADEON: Make sure LVDS_EN bit is set when enabling LVDS
+
+commit b653e5a628bfa4dfb168e96f93f41eb910f409fb
+Author: Michel Dänzer <michel@tungstengraphics.com>
+Date: Sat Dec 15 00:50:10 2007 +0100
+
+ radeon: Default to 1x again with non-v3 AGP cards.
+
+ Seems more reliable in general than what was set up by firmware - fingers
+ crossed...
+
+commit 6229825fa5d6715569098afbb21a40f7a2e7e6be
+Author: Michel Dänzer <michel@tungstengraphics.com>
+Date: Sat Dec 15 00:48:26 2007 +0100
+
+ radeon: Warning fixes.
+
+ The lid detection code probably wouldn't work on other non-x86 platforms
+ though...
+
+commit 818ccf0fd4b5879171c5f20526d5a58638f8fde5
+Author: Fredrik Höglund <fredrik@kde.org>
+Date: Fri Dec 14 23:56:12 2007 +0100
+
+ RADEON: Fix the vertex coordinates for transformed pictures
+
+ This partially fixes transformed pictures on R100/R200 based
+ cards. The texture still doesn't appear to be clamped correctly,
+ but since that doesn't matter for rotations at perpendicular
+ angles, I'm committing this now so randr rotation and reflection
+ will work properly.
+
+commit 3cfbcf4cafbdfdb33411d16e51fb1f77cd0f93dd
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Fri Dec 14 17:11:00 2007 -0500
+
+ RADEON: Fix PLL set up on certain notebooks
+
+ Some LVDS panels require specific PLL dividers as
+ specified in the bios tables. Make sure to use them
+ if the output is LVDS.
+
+commit a84d446fd301d456bcea8f7abdc52e5a30776412
+Author: Alex Deucher <alex@botch2.(none)>
+Date: Fri Dec 14 02:17:14 2007 -0500
+
+ RADEON: select fb_div0 for LVDS on RV410 (x700) mobility
+
+ Fixes bug 8038
+ I wonder if desktop RV410 need a similar fix.
+ If your x700 laptop panel has problems after this let me know.
+
+commit 6ccf5b33d27218ae1c45ab93c122438ed536d8ba
+Author: Alex Deucher <alex@botch2.(none)>
+Date: Wed Dec 12 20:12:06 2007 -0500
+
+ RADEON: only enable vblanks if we want them
+
+ should fix bug 13610
+
+commit 1668f2056f56370f1b5681c13f1e14904e301216
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Wed Dec 12 19:39:08 2007 -0500
+
+ RADEON: use /proc/acpi to determine lid status
+
+ Linux only
+
+commit 33a39947f7f79533cd90007a17d57b20126642c6
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Wed Dec 12 18:50:18 2007 -0500
+
+ RADEON: fix cursors when using rotation
+
+ allocate separate cursor buffers for each crtc
+
+commit 9e5efdecd12092031a4aebce58747cb4a6f48f28
+Author: Arkadiusz Miskiewicz <arekm@maven.pl>
+Date: Tue Dec 11 23:53:03 2007 -0500
+
+ sparse fixes and cleanups from arekm
+
+commit f3d2ec3a5ae61215c792018320158750e7aa937c
+Author: Alex Deucher <alex@botch2.(none)>
+Date: Tue Dec 11 11:57:27 2007 -0500
+
+ RADEON: rewrite PLL computation
+
+ Algorithm adapted from BeOS radeon driver with some tweaks by me.
+ Actually calulate and use the reference divider rather than using the bios default.
+ Also, always calculate the PLL, rather than falling back to bios dividers.
+ This should fix bugs 12913, 13590, 13533, possibly others.
+
+commit 9b125312ab6edc585e4f5931a6a6de81e13b6acc
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Mon Dec 10 13:53:15 2007 -0500
+
+ RADEON: only update crtc values when RMX is active
+
+commit 3a161e1b5d80361e318ced8da5c19e797749d693
+Author: Alex Deucher <alex@botch2.(none)>
+Date: Mon Dec 10 00:57:26 2007 -0500
+
+ RADEON: bios PLL cleanup
+
+commit 5896ca4097d439f59f90f397939132c061c3c364
+Author: LisaWu <liswu@ati.com>
+Date: Fri Dec 7 09:45:05 2007 +0100
+
+ radeon: Use %u instead of %d for unsigned value.
+
+commit df44f8380268c27d3978c4e91d736f093322b8b8
+Author: Michel Dänzer <michel@tungstengraphics.com>
+Date: Fri Dec 7 09:41:47 2007 +0100
+
+ radeon: Use gettimeofday instead of xf86getsecs.
+
+commit 64ab1cdf343a9a69e7e9e64f0bba77c54a94e9d0
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Dec 6 15:51:12 2007 -0500
+
+ Add missing PHONY line for automatic ChangeLog generation
+
+commit 21ed435398e4a398dd8a0a5d7c1d4cc45e916332
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Tue Dec 4 17:08:58 2007 -0500
+
+ RADEON: add MacModel imac-g5-isight for iMac G5 iSight
+
+ Thanks to Étienne Bersac for helping to figure this out.
+
+commit 54bfd522405d9fdfb69d3a59e111ac3d63483dbb
+Author: Étienne Bersac <bersace03@laposte.net>
+Date: Tue Dec 4 14:22:42 2007 -0500
+
+ RADEON: fix typo
+
+commit 5022d006cfc06ca0395981526b2c2c94c6878567
+Author: Michel Dänzer <michel@tungstengraphics.com>
+Date: Sun Dec 2 17:27:33 2007 +0100
+
+ radeon: Further XVideo fixes.
+
+ * Make sure pitch constraints are always met for DMA upload blits.
+ * RGB24 is not affected by endianness.
+
+commit 6ed55b70b23dfdc7b41103ea59c1df2bda5e41e6
+Author: Kusanagi Kouichi <slash@ma.neweb.ne.jp>
+Date: Sun Dec 2 17:18:46 2007 +0100
+
+ radeon: Fix crash with XVideo 24bit RGB images.
+
+ See https://bugs.freedesktop.org/show_bug.cgi?id=13274 .
+
+commit a697b590899bb7704ec4d7ae9a9c3cbbfcaef382
+Author: Michel Dänzer <michel@tungstengraphics.com>
+Date: Sun Dec 2 17:11:20 2007 +0100
+
+ Fix build against xserver master.
+
+ (DE)ALLOCATE_LOCAL are gone.
+
+commit 00b4480aa2c5d7f751e34fc964f431b90b14c8d2
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Sat Dec 1 14:18:40 2007 -0500
+
+ RADEON: add options for force TV out as detected and to set TV standard
+
+ Also fix a typo in internal tv-out parsing
+
+commit 0175b79987ef4d7b0ce8238c3bdde989e504516a
+Author: Alex Deucher <alex@botch2.(none)>
+Date: Fri Nov 30 15:37:42 2007 -0500
+
+ RADEON: rework MacModel option
+
+ this brings in some previous research from Michel Dänzer,
+ Sjoerd Simons, and myself. Hopefully, the driver will pick
+ the correct MacModel in more cases. This also changes the
+ default connector table for desktop Macs to dual DVI rather
+ than DVI+VGA as that seems to be the case more often than not.
+ External TMDS chips are handled separately now as well.
+ Eventually we should add an option to allow the user to specify
+ what external TMDS chip they need, but we don't have enough info
+ yet, so we'll rely on OF to init the external chip in most cases
+ for now.
+
+commit 9840a0fd4fc8c980533fcd4a02c55cd0d5634b6d
+Author: Alex Deucher <alex@botch2.(none)>
+Date: Thu Nov 29 13:27:37 2007 -0500
+
+ RADEON: add MacModel "mini-internal" for minis with internal TMDS
+
+ Some macs (minis and powerbooks) use internal tmds, others use external tmds
+ and not just for dual-link TMDS, it shows up with single-link as well.
+ Unforunately, there doesn't seem to be any good way to figure it out.
+
+commit 6f080d00e6f4f84d5e0d6b4eff302bf42c230e81
+Author: Arkadiusz Miskiewicz <arekm@maven.pl>
+Date: Mon Nov 26 12:43:30 2007 -0500
+
+ RADEON: fix backlight control on some laptops
+
+ It seems the bios scratch regs are involved in backlight control
+ on some laptops. This patch fixes the problematic laptops and doesn't
+ seem to break the previous bios lid and output control fixes.
+
+commit dcf22aed87366f4625fb5042cb84fecccd9ceece
+Author: Alex Deucher <alex@botch2.(none)>
+Date: Mon Nov 26 11:10:03 2007 -0500
+
+ RADEON: only return status unknown for XPRESS chips
+
+ this seems to cause more issues than it attempted to fix
+ so limit it to XPRESS chips for now.
+
+commit 206e280f02324641b4fe5a1986e26adf0e021fd4
+Author: Alex Deucher <alex@botch2.(none)>
+Date: Mon Nov 26 09:39:27 2007 -0500
+
+ RADEON: fix typo in man page
+
+commit 197a62704742a4a19736c2637ac92d1dc5ab34ed
+Author: Adam Jackson <ajackson@redhat.com>
+Date: Thu Nov 22 20:26:23 2007 +1000
+
+ radeon: fix openoffice/render bug on r100 chips
+
+commit 64010fc4eae8359c01e430f64252931242c91435
+Author: Dave Airlie <airlied@linux.ie>
+Date: Thu Nov 22 20:25:31 2007 +1000
+
+ Revert "Disable RENDER acceleration by default on some RV200 chips."
+
+ This reverts commit 145da701bf4fb9c0ad9f95620b20914ae0126852.
+
+ pull in fix from ajax next commit
+
+commit 145da701bf4fb9c0ad9f95620b20914ae0126852
+Author: Stefan Dirsch <sndirsch@suse.de>
+Date: Thu Nov 22 08:38:09 2007 +0100
+
+ Disable RENDER acceleration by default on some RV200 chips.
+
+ Novell Bug #341699: Render acceleration is known to be broken
+ on at least "Radeon 7500 QW" and "Radeon Mobility M7 LW".
+
+commit e810c3ae9908cd57e95b1b091cded87cbfc12fdc
+Author: Roland Scheidegger <sroland@tungstengraphics.com>
+Date: Thu Nov 22 02:37:55 2007 +0100
+
+ really do not set up surface regs for depth buf on r100-class igps (bug #13080)
+
+ fix the if condition testing for these chips...
+
+commit c8872603454e6a4ffed9fc7d9adc2c364a429608
+Author: Dave Airlie <airlied@clockmaker.usersys.redhat.com>
+Date: Tue Nov 20 22:33:39 2007 +1000
+
+ radeon: restructure pci ids to avoid effort later
+
+ This uses a single file with all the pciids and parameters for radeon
+ family and setup in it. I don't run the perl script at build time to avoid
+ a perl dependency on build but adding pci ids should be done via the csv file
+ with openoffice or gnumeric if possible.
+
+commit 49055d8aff91ff12186feaf5343c8fd2f96bcba0
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Thu Nov 15 22:56:09 2007 -0500
+
+ RADEON: set proper defaults for tv dac BGADJ/DACADJ
+
+ we should get these values from the bios tables, but for now use
+ some reasonable defaults. This should fix the washed out color
+ problems on bugs 1082 and 12844.
+
+commit 821acf38b716ab87c3d07263d6e4a139fe54803f
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Thu Nov 15 22:28:42 2007 -0500
+
+ RADEON: Make sure we set the MT properly for connected status unknown
+
+commit a94123f33ec6584fbdfc4b9ecd543d1357de8814
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date: Thu Nov 15 22:19:54 2007 -0500
+
+ Revert "Portability fix from netbsd"
+
+ This reverts commit c9264aa53bf1470ad9104d1e7c4a8ce13c49c270.
+ This breaks damage support. See bug 13244
+
+commit e9d721c31372db045550f9562534b28f16121bb9
+Author: Roland Scheidegger <sroland@tungstengraphics.com>
+Date: Tue Nov 13 23:42:42 2007 +0100
+
+ ignore sometime bogus agp_mode bit from chip (bug #13190)
+
+ bit is wrong on at least X700 cards with rialto pcie-agp bridge chip,
+ should be safe to use just the bit from the bridge hopefully to make
+ agp setup work on these cards and not adversely affect others.
+
commit b865886d00907899297ae864358eb26d9980975d
Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
Date: Sun Nov 11 20:38:41 2007 -0500
diff --git a/Makefile.in b/Makefile.in
index a804cae..39bdeff 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -682,6 +682,8 @@ uninstall-am:
@BUILD_LINUXDOC_TRUE@README.r128: README.r128.sgml
@BUILD_LINUXDOC_TRUE@ $(MAKE_TEXT) README.r128.sgml && mv README.r128.txt README.r128
+.PHONY: ChangeLog
+
ChangeLog:
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
diff --git a/configure b/configure
index daa3f53..c7ec786 100755
--- a/configure
+++ b/configure
@@ -1531,7 +1531,7 @@ Optional Features:
--enable-dependency-tracking do not reject slow dependency extractors
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-dri Disable DRI support [default=auto]
- --disable-exa Disable EXA support [default], [enabled]
+ --disable-exa Disable EXA support [default=enabled]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
diff --git a/debian/changelog b/debian/changelog
index e63ffc6..b71a784 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-ati (1:6.7.197~git20071219.ce4fa1ce-1) experimental; urgency=low
+
+ * New upstream snapshot, containing commits up to ce4fa1ce.
+ + Default to 1x again with non-v3 AGP cards, closes: #444049.
+
+ -- Brice Goglin <bgoglin@debian.org> Wed, 19 Dec 2007 08:44:33 +0100
+
xserver-xorg-video-ati (1:6.7.196-2) experimental; urgency=low
* New upstream snapshot, containing commits up to 5022d006.
commit ce4fa1cedec0cf56b9979dfaa12a8d3a7c643df4
Author: Arkadiusz Miskiewicz <arekm@maven.pl>
Date: Tue Dec 18 15:34:14 2007 -0500
RADEON: fix fd leak in lid detect code
diff --git a/src/radeon_output.c b/src/radeon_output.c
index c60ece8..6454460 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -699,15 +699,18 @@ RADEONDetectLidStatus(ScrnInfoPtr pScrn)
while (fgets(lidline, sizeof lidline, f)) {
if (!strncmp(lidline, "state:", strlen ("state:"))) {
if (strstr(lidline, "open")) {
+ fclose(f);
ErrorF("proc lid open\n");
return MT_LCD;
}
else if (strstr(lidline, "closed")) {
+ fclose(f);
ErrorF("proc lid closed\n");
return MT_NONE;
}
}
}
+ fclose(f);
}
#endif
commit 20568f66f9a9a60a33bd9a69ccc14a891c656836
Author: Arkadiusz Miskiewicz <arekm@maven.pl>
Date: Tue Dec 18 15:32:10 2007 -0500
RADEON: more cleanups and warning fixes
diff --git a/src/atividmem.c b/src/atividmem.c
index 8910c73..986ac0f 100644
--- a/src/atividmem.c
+++ b/src/atividmem.c
@@ -103,14 +103,12 @@ ATIUnmapLinear
ATIPtr pATI
)
{
- pciVideoPtr pVideo = pATI->PCIInfo;
-
if (pATI->pMemory)
{
#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(iScreen, pATI->pMemory, pATI->LinearSize);
#else
- pci_device_unmap_range(pVideo, pATI->pMemory, pATI->LinearSize);
+ pci_device_unmap_range(pATI->PCIInfo, pATI->pMemory, pATI->LinearSize);
#endif
#if X_BYTE_ORDER != X_LITTLE_ENDIAN
@@ -120,7 +118,7 @@ ATIUnmapLinear
#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(iScreen, pATI->pMemoryLE, pATI->LinearSize);
#else
- pci_device_unmap_range(pVideo, pATI->pMemoryLE, pATI->LinearSize);
+ pci_device_unmap_range(pATI->PCIInfo, pATI->pMemoryLE, pATI->LinearSize);
#endif
}
@@ -143,14 +141,12 @@ ATIUnmapMMIO
ATIPtr pATI
)
{
- pciVideoPtr pVideo = pATI->PCIInfo;
-
if (pATI->pMMIO)
{
#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(iScreen, pATI->pMMIO, getpagesize());
#else
- pci_device_unmap_range(pVideo, pATI->pMMIO, getpagesize());
+ pci_device_unmap_range(pATI->PCIInfo, pATI->pMMIO, getpagesize());
#endif
}
@@ -169,14 +165,12 @@ ATIUnmapCursor
ATIPtr pATI
)
{
- pciVideoPtr pVideo = pATI->PCIInfo;
-
if (pATI->pCursorPage)
{
#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(iScreen, pATI->pCursorPage, getpagesize());
#else
- pci_device_unmap_range(pVideo, pATI->pCursorPage, getpagesize());
+ pci_device_unmap_range(pATI->PCIInfo, pATI->pCursorPage, getpagesize());
#endif
}
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index 41375da..07857dd 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -145,15 +145,13 @@ RADEONInitCommonRegisters(RADEONSavePtr save, RADEONInfoPtr info)
static void
RADEONInitSurfaceCntl(xf86CrtcPtr crtc, RADEONSavePtr save)
{
- ScrnInfoPtr pScrn = crtc->scrn;
-
save->surface_cntl = 0;
#if X_BYTE_ORDER == X_BIG_ENDIAN
/* We must set both apertures as they can be both used to map the entire
* video memory. -BenH.
*/
- switch (pScrn->bitsPerPixel) {
+ switch (crtc->scrn->bitsPerPixel) {
case 16:
save->surface_cntl |= RADEON_NONSURF_AP0_SWP_16BPP;
save->surface_cntl |= RADEON_NONSURF_AP1_SWP_16BPP;
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 9dd6eb8..ba1159c 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -232,7 +232,7 @@ radeon_crtc_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
ScrnInfoPtr pScrn = crtc->scrn;
RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
RADEONInfoPtr info = RADEONPTR(pScrn);
- unsigned char *RADEONMMIO = info->MMIO;
+ CURSOR_SWAPPING_DECL_MMIO
CARD32 *d = (CARD32 *)(pointer)(info->FB + radeon_crtc->cursor_offset + pScrn->fbOffset);
RADEONCTRACE(("RADEONLoadCursorARGB\n"));
commit 1496194200adbcb044ec3977367a0908262e389c
Author: Arkadiusz Miskiewicz <arekm@maven.pl>
Date: Tue Dec 18 15:29:53 2007 -0500
RADEON: driver cleanups, warning fixes
diff --git a/configure.ac b/configure.ac
index b3d46a5..1570e54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,7 +58,7 @@ AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri],
AC_ARG_ENABLE(exa,
AC_HELP_STRING([--disable-exa],
- [Disable EXA support [[default enabled]]]),
+ [Disable EXA support [[default=enabled]]]),
[EXA="$enableval"],
[EXA=yes])
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index 6028aff..ed7d1e9 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -136,8 +136,8 @@ void RADEONWaitForFifoFunction(ScrnInfoPtr pScrn, int entries)
}
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"FIFO timed out: %u entries, stat=0x%08x\n",
- INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK,
- INREG(RADEON_RBBM_STATUS));
+ (unsigned int)INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK,
+ (unsigned int)INREG(RADEON_RBBM_STATUS));
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"FIFO timed out, resetting engine...\n");
RADEONEngineReset(pScrn);
@@ -168,7 +168,7 @@ void RADEONEngineFlush(ScrnInfoPtr pScrn)
if (i == RADEON_TIMEOUT) {
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"DC flush timeout: %x\n",
- INREG(RADEON_RB3D_DSTCACHE_CTLSTAT));
+ (unsigned int)INREG(RADEON_RB3D_DSTCACHE_CTLSTAT));
}
}
diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
index 6a999af..a1802f8 100644
--- a/src/radeon_commonfuncs.c
+++ b/src/radeon_commonfuncs.c
@@ -174,8 +174,8 @@ void FUNC_NAME(RADEONWaitForIdle)(ScrnInfoPtr pScrn)
}
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"Idle timed out: %u entries, stat=0x%08x\n",
- INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK,
- INREG(RADEON_RBBM_STATUS));
+ (unsigned int)INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK,
+ (unsigned int)INREG(RADEON_RBBM_STATUS));
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Idle timed out, resetting engine...\n");
RADEONEngineReset(pScrn);
diff --git a/src/radeon_display.c b/src/radeon_display.c
index 6bbd315..ea31a82 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -743,7 +743,7 @@ void RADEONInitDispBandwidth2(ScrnInfoPtr pScrn, RADEONInfoPtr info, int pixel_b
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"GRPH_BUFFER_CNTL from %x to %x\n",
(unsigned int)info->SavedReg.grph_buffer_cntl,
- INREG(RADEON_GRPH_BUFFER_CNTL));
+ (unsigned int)INREG(RADEON_GRPH_BUFFER_CNTL));
if (mode2) {
stop_req = mode2->HDisplay * pixel_bytes2 / 16;
@@ -793,7 +793,7 @@ void RADEONInitDispBandwidth2(ScrnInfoPtr pScrn, RADEONInfoPtr info, int pixel_b
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"GRPH2_BUFFER_CNTL from %x to %x\n",
(unsigned int)info->SavedReg.grph2_buffer_cntl,
- INREG(RADEON_GRPH2_BUFFER_CNTL));
+ (unsigned int)INREG(RADEON_GRPH2_BUFFER_CNTL));
}
}
commit 44d07c4ccce9acb5bd21a17acb082e91f7225764
Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
Date: Mon Dec 17 18:56:12 2007 -0500
RADEON: typo from last commit
diff --git a/src/radeon_display.c b/src/radeon_display.c
index 95f6b09..6bbd315 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -405,6 +405,7 @@ void RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable)
}
} else if (radeon_output->DACType == DAC_TVDAC) {
info->output_crt2 &= ~(1 << o);
+ tv_dac_change = 1;
if (!info->output_crt2) {
if (info->ChipFamily == CHIP_FAMILY_R200) {
tmp = INREG(RADEON_FP2_GEN_CNTL);
@@ -416,7 +417,6 @@ void RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable)
tmp &= ~RADEON_CRTC2_CRT2_ON;
OUTREG(RADEON_CRTC2_GEN_CNTL, tmp);
save->crtc2_gen_cntl &= ~RADEON_CRTC2_CRT2_ON;
- tv_dac_change = 1;
}
}
}
@@ -462,11 +462,11 @@ void RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable)
}
} else if (radeon_output->MonType == MT_STV || radeon_output->MonType == MT_CTV) {
info->output_tv1 &= ~(1 << o);
+ tv_dac_change = 2;
if (!info->output_tv1) {
tmp = INREG(RADEON_TV_MASTER_CNTL);
tmp &= ~RADEON_TV_ON;
OUTREG(RADEON_TV_MASTER_CNTL, tmp);
- tv_dac_change = 2;
radeon_output->tv_on = FALSE;
}
}
commit 4da3782239921eb377216d4de4a9cc5bb55e0e8a
Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
Date: Mon Dec 17 18:51:31 2007 -0500
RADEON: add output enable masks
add output enable masks for outputs that drive
more than one connector. Make sure we don't turn off
an output that's driving another connector.
diff --git a/src/radeon.h b/src/radeon.h
index 67315a2..03db360 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -850,6 +850,14 @@ typedef struct {
#endif
RADEONExtTMDSChip ext_tmds_chip;
+ /* output enable masks for outputs shared across connectors */
+ int output_crt1;
+ int output_crt2;
+ int output_dfp1;
+ int output_dfp2;
+ int output_lcd1;
+ int output_tv1;
+
Rotation rotation;
void (*PointerMoved)(int, int, int);
CreateScreenResourcesProcPtr CreateScreenResources;
diff --git a/src/radeon_display.c b/src/radeon_display.c
index 9437ef4..95f6b09 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -322,19 +322,28 @@ void RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable)
unsigned char * RADEONMMIO = info->MMIO;
unsigned long tmp;
RADEONOutputPrivatePtr radeon_output;
- int tv_dac_change = 0;
+ int tv_dac_change = 0, o;
radeon_output = output->driver_private;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+
+ for (o = 0; o < xf86_config->num_output; o++) {
+ if (output == xf86_config->output[o]) {
+ break;
+ }
+ }
if (bEnable) {
ErrorF("enable montype: %d\n", radeon_output->MonType);
if (radeon_output->MonType == MT_CRT) {
if (radeon_output->DACType == DAC_PRIMARY) {
+ info->output_crt1 |= (1 << o);
tmp = INREG(RADEON_CRTC_EXT_CNTL);
tmp |= RADEON_CRTC_CRT_ON;
OUTREG(RADEON_CRTC_EXT_CNTL, tmp);
save->crtc_ext_cntl |= RADEON_CRTC_CRT_ON;
RADEONDacPowerSet(pScrn, bEnable, (radeon_output->DACType == DAC_PRIMARY));
} else if (radeon_output->DACType == DAC_TVDAC) {
+ info->output_crt2 |= (1 << o);
if (info->ChipFamily == CHIP_FAMILY_R200) {
tmp = INREG(RADEON_FP2_GEN_CNTL);
tmp |= (RADEON_FP2_ON | RADEON_FP2_DVO_EN);
@@ -350,11 +359,13 @@ void RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable)
}
} else if (radeon_output->MonType == MT_DFP) {
if (radeon_output->TMDSType == TMDS_INT) {
+ info->output_dfp1 |= (1 << o);
tmp = INREG(RADEON_FP_GEN_CNTL);
tmp |= (RADEON_FP_FPON | RADEON_FP_TMDS_EN);
OUTREG(RADEON_FP_GEN_CNTL, tmp);
save->fp_gen_cntl |= (RADEON_FP_FPON | RADEON_FP_TMDS_EN);
} else if (radeon_output->TMDSType == TMDS_EXT) {
+ info->output_dfp2 |= (1 << o);
tmp = INREG(RADEON_FP2_GEN_CNTL);
tmp &= ~RADEON_FP2_BLANK_EN;
tmp |= (RADEON_FP2_ON | RADEON_FP2_DVO_EN);
@@ -363,6 +374,7 @@ void RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable)
save->fp2_gen_cntl &= ~RADEON_FP2_BLANK_EN;
}
} else if (radeon_output->MonType == MT_LCD) {
+ info->output_lcd1 |= (1 << o);
tmp = INREG(RADEON_LVDS_GEN_CNTL);
tmp |= (RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
tmp &= ~(RADEON_LVDS_DISPLAY_DIS);
@@ -372,6 +384,7 @@ void RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable)
save->lvds_gen_cntl &= ~(RADEON_LVDS_DISPLAY_DIS);
} else if (radeon_output->MonType == MT_STV ||
radeon_output->MonType == MT_CTV) {
+ info->output_tv1 |= (1 << o);
tmp = INREG(RADEON_TV_MASTER_CNTL);
tmp |= RADEON_TV_ON;
OUTREG(RADEON_TV_MASTER_CNTL, tmp);
@@ -382,70 +395,88 @@ void RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable)
ErrorF("disable montype: %d\n", radeon_output->MonType);
if (radeon_output->MonType == MT_CRT) {
if (radeon_output->DACType == DAC_PRIMARY) {
- tmp = INREG(RADEON_CRTC_EXT_CNTL);
- tmp &= ~RADEON_CRTC_CRT_ON;
- OUTREG(RADEON_CRTC_EXT_CNTL, tmp);
- save->crtc_ext_cntl &= ~RADEON_CRTC_CRT_ON;
- RADEONDacPowerSet(pScrn, bEnable, (radeon_output->DACType == DAC_PRIMARY));
+ info->output_crt1 &= ~(1 << o);
+ if (!info->output_crt1) {
+ tmp = INREG(RADEON_CRTC_EXT_CNTL);
+ tmp &= ~RADEON_CRTC_CRT_ON;
+ OUTREG(RADEON_CRTC_EXT_CNTL, tmp);
+ save->crtc_ext_cntl &= ~RADEON_CRTC_CRT_ON;
+ RADEONDacPowerSet(pScrn, bEnable, (radeon_output->DACType == DAC_PRIMARY));
+ }
} else if (radeon_output->DACType == DAC_TVDAC) {
- if (info->ChipFamily == CHIP_FAMILY_R200) {
- tmp = INREG(RADEON_FP2_GEN_CNTL);
- tmp &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
- OUTREG(RADEON_FP2_GEN_CNTL, tmp);
- save->fp2_gen_cntl &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
- } else {
- tmp = INREG(RADEON_CRTC2_GEN_CNTL);
- tmp &= ~RADEON_CRTC2_CRT2_ON;
- OUTREG(RADEON_CRTC2_GEN_CNTL, tmp);
- save->crtc2_gen_cntl &= ~RADEON_CRTC2_CRT2_ON;
+ info->output_crt2 &= ~(1 << o);
+ if (!info->output_crt2) {
+ if (info->ChipFamily == CHIP_FAMILY_R200) {
+ tmp = INREG(RADEON_FP2_GEN_CNTL);
+ tmp &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
+ OUTREG(RADEON_FP2_GEN_CNTL, tmp);
+ save->fp2_gen_cntl &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
+ } else {
+ tmp = INREG(RADEON_CRTC2_GEN_CNTL);
+ tmp &= ~RADEON_CRTC2_CRT2_ON;
+ OUTREG(RADEON_CRTC2_GEN_CNTL, tmp);
+ save->crtc2_gen_cntl &= ~RADEON_CRTC2_CRT2_ON;
+ tv_dac_change = 1;
+ }
}
- tv_dac_change = 1;
}
} else if (radeon_output->MonType == MT_DFP) {
if (radeon_output->TMDSType == TMDS_INT) {
- tmp = INREG(RADEON_FP_GEN_CNTL);
- tmp &= ~(RADEON_FP_FPON | RADEON_FP_TMDS_EN);
- OUTREG(RADEON_FP_GEN_CNTL, tmp);
- save->fp_gen_cntl &= ~(RADEON_FP_FPON | RADEON_FP_TMDS_EN);
+ info->output_dfp1 &= ~(1 << o);
+ if (!info->output_dfp1) {
+ tmp = INREG(RADEON_FP_GEN_CNTL);
+ tmp &= ~(RADEON_FP_FPON | RADEON_FP_TMDS_EN);
+ OUTREG(RADEON_FP_GEN_CNTL, tmp);
+ save->fp_gen_cntl &= ~(RADEON_FP_FPON | RADEON_FP_TMDS_EN);
+ }
} else if (radeon_output->TMDSType == TMDS_EXT) {
- tmp = INREG(RADEON_FP2_GEN_CNTL);
- tmp |= RADEON_FP2_BLANK_EN;
- tmp &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
- OUTREG(RADEON_FP2_GEN_CNTL, tmp);
- save->fp2_gen_cntl &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
- save->fp2_gen_cntl |= RADEON_FP2_BLANK_EN;
+ info->output_dfp2 &= ~(1 << o);
+ if (!info->output_dfp2) {
+ tmp = INREG(RADEON_FP2_GEN_CNTL);
+ tmp |= RADEON_FP2_BLANK_EN;
+ tmp &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
+ OUTREG(RADEON_FP2_GEN_CNTL, tmp);
+ save->fp2_gen_cntl &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
+ save->fp2_gen_cntl |= RADEON_FP2_BLANK_EN;
+ }
}
} else if (radeon_output->MonType == MT_LCD) {
- unsigned long tmpPixclksCntl = INPLL(pScrn, RADEON_PIXCLKS_CNTL);
- if (info->IsMobility || info->IsIGP) {
- /* Asic bug, when turning off LVDS_ON, we have to make sure
- RADEON_PIXCLK_LVDS_ALWAYS_ON bit is off
- */
- OUTPLLP(pScrn, RADEON_PIXCLKS_CNTL, 0, ~RADEON_PIXCLK_LVDS_ALWAYS_ONb);
- }
- tmp = INREG(RADEON_LVDS_GEN_CNTL);
- tmp |= RADEON_LVDS_DISPLAY_DIS;
- tmp &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
- OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
- save->lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS;
- save->lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
- if (info->IsMobility || info->IsIGP) {
- OUTPLL(pScrn, RADEON_PIXCLKS_CNTL, tmpPixclksCntl);
+ info->output_lcd1 &= ~(1 << o);
+ if (!info->output_lcd1) {
+ unsigned long tmpPixclksCntl = INPLL(pScrn, RADEON_PIXCLKS_CNTL);
+ if (info->IsMobility || info->IsIGP) {
+ /* Asic bug, when turning off LVDS_ON, we have to make sure
+ RADEON_PIXCLK_LVDS_ALWAYS_ON bit is off
+ */
+ OUTPLLP(pScrn, RADEON_PIXCLKS_CNTL, 0, ~RADEON_PIXCLK_LVDS_ALWAYS_ONb);
+ }
+ tmp = INREG(RADEON_LVDS_GEN_CNTL);
+ tmp |= RADEON_LVDS_DISPLAY_DIS;
+ tmp &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
+ OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
+ save->lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS;
+ save->lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
+ if (info->IsMobility || info->IsIGP) {
+ OUTPLL(pScrn, RADEON_PIXCLKS_CNTL, tmpPixclksCntl);
+ }
}
} else if (radeon_output->MonType == MT_STV || radeon_output->MonType == MT_CTV) {
- tmp = INREG(RADEON_TV_MASTER_CNTL);
- tmp &= ~RADEON_TV_ON;
- OUTREG(RADEON_TV_MASTER_CNTL, tmp);
- tv_dac_change = 2;
- radeon_output->tv_on = FALSE;
+ info->output_tv1 &= ~(1 << o);
+ if (!info->output_tv1) {
+ tmp = INREG(RADEON_TV_MASTER_CNTL);
+ tmp &= ~RADEON_TV_ON;
+ OUTREG(RADEON_TV_MASTER_CNTL, tmp);
+ tv_dac_change = 2;
+ radeon_output->tv_on = FALSE;
+ }
}
}
if (tv_dac_change) {
if (bEnable)
- info->tv_dac_enable_mask |= tv_dac_change;
+ info->tv_dac_enable_mask |= tv_dac_change;
else
- info->tv_dac_enable_mask &= ~tv_dac_change;
+ info->tv_dac_enable_mask &= ~tv_dac_change;
if (bEnable && info->tv_dac_enable_mask)
RADEONDacPowerSet(pScrn, bEnable, (radeon_output->DACType == DAC_PRIMARY));
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 9e73c08..c60ece8 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -3207,6 +3207,14 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
}
}
+ /* clear the enable masks */
+ info->output_crt1 = 0;
+ info->output_crt2 = 0;
+ info->output_dfp1 = 0;
+ info->output_dfp2 = 0;
+ info->output_lcd1 = 0;
+ info->output_tv1 = 0;
+
for (i = 0 ; i < RADEON_MAX_BIOS_CONNECTOR; i++) {
if (info->BiosConnector[i].valid) {
RADEONOutputPrivatePtr radeon_output = xnfcalloc(sizeof(RADEONOutputPrivateRec), 1);
commit 5c5d2d19b2b032a06dd333b4ecc029aac342fb93
Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
Date: Mon Dec 17 18:15:55 2007 -0500
RADEON: whitespace clean-ups
diff --git a/src/radeon_display.c b/src/radeon_display.c
index 999d349..9437ef4 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -163,7 +163,7 @@ void RADEONGetTVDacAdjInfo(xf86OutputPtr output)
ScrnInfoPtr pScrn = output->scrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONOutputPrivatePtr radeon_output = output->driver_private;
-
+
/* Todo: get this setting from BIOS */
radeon_output->tv_dac_adj = default_tvdac_adj[info->ChipFamily];
if (info->IsMobility) { /* some mobility chips may different */
@@ -202,7 +202,7 @@ static void RADEONDacPowerSet(ScrnInfoPtr pScrn, Bool IsOn, Bool IsPrimaryDAC)
} else {
CARD32 tv_dac_cntl;
CARD32 fp2_gen_cntl;
-
+
switch(info->ChipFamily)
{
case CHIP_FAMILY_R420:
@@ -259,19 +259,19 @@ void RADEONDisableDisplays(ScrnInfoPtr pScrn) {
/* primary DAC */
tmp = INREG(RADEON_CRTC_EXT_CNTL);
- tmp &= ~RADEON_CRTC_CRT_ON;
+ tmp &= ~RADEON_CRTC_CRT_ON;
OUTREG(RADEON_CRTC_EXT_CNTL, tmp);
RADEONDacPowerSet(pScrn, FALSE, TRUE);
/* Secondary DAC */
if (info->ChipFamily == CHIP_FAMILY_R200) {
- tmp = INREG(RADEON_FP2_GEN_CNTL);
- tmp &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
- OUTREG(RADEON_FP2_GEN_CNTL, tmp);
+ tmp = INREG(RADEON_FP2_GEN_CNTL);
+ tmp &= ~(RADEON_FP2_ON | RADEON_FP2_DVO_EN);
+ OUTREG(RADEON_FP2_GEN_CNTL, tmp);
} else {
- tmp = INREG(RADEON_CRTC2_GEN_CNTL);
- tmp &= ~RADEON_CRTC2_CRT2_ON;
- OUTREG(RADEON_CRTC2_GEN_CNTL, tmp);
+ tmp = INREG(RADEON_CRTC2_GEN_CNTL);
+ tmp &= ~RADEON_CRTC2_CRT2_ON;
+ OUTREG(RADEON_CRTC2_GEN_CNTL, tmp);
}
RADEONDacPowerSet(pScrn, FALSE, FALSE);
@@ -327,95 +327,95 @@ void RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable)
if (bEnable) {
Reply to: