summaryrefslogtreecommitdiff
path: root/driver/xf86-video-radeonhd
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2009-01-28 14:43:57 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2009-01-28 14:43:57 +0000
commitaa7dc1036e879134155391044f02d88bc8fde0e0 (patch)
treef689831ed7b6488ff52b18d740d0ef46a3d51f1f /driver/xf86-video-radeonhd
parent41388eb0b61a41508e8aabd6c337671511de65bf (diff)
Update to xf86-video-radeonhd 1.2.4.
- Added HDMI support. - Added support for RV710, RV730 (DCE 3.2). - Added screen rotation support. - Added RandR 1.3 panning support. (not useful until xserver 1.6) - Many acceleration and build fixes. Tested on mbalmer@'s radeon 2400HD card.
Diffstat (limited to 'driver/xf86-video-radeonhd')
-rw-r--r--driver/xf86-video-radeonhd/ChangeLog635
-rw-r--r--driver/xf86-video-radeonhd/INSTALL142
-rw-r--r--driver/xf86-video-radeonhd/Makefile.am8
-rw-r--r--driver/xf86-video-radeonhd/Makefile.in14
-rw-r--r--driver/xf86-video-radeonhd/README13
-rw-r--r--driver/xf86-video-radeonhd/config.h.in6
-rw-r--r--driver/xf86-video-radeonhd/configure682
-rw-r--r--driver/xf86-video-radeonhd/configure.ac53
-rw-r--r--driver/xf86-video-radeonhd/man/Makefile.in8
-rw-r--r--driver/xf86-video-radeonhd/man/radeonhd.man90
-rw-r--r--driver/xf86-video-radeonhd/src/Imakefile8
-rw-r--r--driver/xf86-video-radeonhd/src/Makefile.am88
-rw-r--r--driver/xf86-video-radeonhd/src/Makefile.in463
-rw-r--r--driver/xf86-video-radeonhd/src/git_version.h6
-rw-r--r--driver/xf86-video-radeonhd/src/r5xx_exa.c4
-rw-r--r--driver/xf86-video-radeonhd/src/r5xx_xaa.c4
-rw-r--r--driver/xf86-video-radeonhd/src/rhd.h25
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_atombios.c324
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_atombios.h13
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_atomout.c352
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_atomout.h9
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_atompll.c12
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_audio.c407
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_audio.h119
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_biosscratch.c44
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_connector.c31
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_connector.h2
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_cs.c24
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_cs.h13
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_cursor.c74
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_cursor.h6
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_dig.c389
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_dri.c59
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_driver.c226
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_hdmi.c529
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_hdmi.h81
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_helper.c47
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_i2c.c36
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_i2c.h2
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_id.c73
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_lut.c80
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_lut.h7
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_lvtma.c113
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_mc.c2
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_modes.c1
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_modes.h1
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_output.h10
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_randr.c609
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_randr.h10
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_regs.h69
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_tmds.c42
-rw-r--r--driver/xf86-video-radeonhd/src/rhd_video.c28
-rw-r--r--driver/xf86-video-radeonhd/utils/conntest/Makefile.in6
-rw-r--r--driver/xf86-video-radeonhd/utils/conntest/git_version.h6
-rw-r--r--driver/xf86-video-radeonhd/utils/conntest/rhd_conntest.c20
-rw-r--r--driver/xf86-video-radeonhd/utils/conntest/rhd_dump.c2
56 files changed, 5202 insertions, 925 deletions
diff --git a/driver/xf86-video-radeonhd/ChangeLog b/driver/xf86-video-radeonhd/ChangeLog
index a7abdf770..ba3908369 100644
--- a/driver/xf86-video-radeonhd/ChangeLog
+++ b/driver/xf86-video-radeonhd/ChangeLog
@@ -1,3 +1,638 @@
+commit 4e8972638db59d007bc61eb1bef8adb99cc67000
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Fri Dec 12 15:10:29 2008 +0100
+
+ Bump to 1.2.4
+
+commit 2db9ee5ea0c66d99180432791d8098fedc73fa4a
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Fri Dec 12 15:09:18 2008 +0100
+
+ Add release information for 1.2.4
+
+commit 9cdbad323cb313c6c3c5aa97df5ee2b46e16dc97
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Fri Dec 12 15:04:45 2008 +0100
+
+ Nuke description of option "ShadowFB" (not existing any longer).
+
+ Use Option "AccelMethod" "ShadowFB" instead.
+
+commit 0679ce59ebf9e2ebb16d1d6c2286b275993519e4
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Fri Dec 12 15:00:34 2008 +0100
+
+ Small manpage updates.
+
+commit 7aae5f7f83691db97429fa4201fcafee2b36da5a
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Fri Dec 12 12:32:51 2008 +0100
+
+ FB mapping: Restore original PCI MapSize if IGP memory mapping failed.
+
+commit 6c91fed64b6abe1d381432be5c806e450b9ad597
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Thu Dec 11 13:05:57 2008 +0100
+
+ Workaround for drm header mismatches (DEPRECATED and __user on Fedora 10)
+
+commit 48def66ce9592926ed9b23530fb21a55ac253392
+Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
+Date: Sat Dec 6 01:28:41 2008 +0100
+
+ Document that Option "DRI" also affects Xv
+
+ Option "DRI" not only enables 3D acceleration, but also
+ (2D) Xv video acceleration. The video part was not
+ mentioned before.
+
+ Thanks to John Chivall for catching this:
+ https://bugzilla.redhat.com/show_bug.cgi?id=473819
+
+commit de7a4147acc3e82234dd225423b48a899a386a2c
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Fri Dec 5 21:20:28 2008 +0100
+
+ R5xx XAA: pass correct size to xf86InitFBManager.
+
+ Test code left over from dri bring-up. Back buffer is correctly allocated
+ from available memory there, so no danger from that. Solves a horrible
+ segfault on limited memory devices.
+
+commit 46df41699743d393a53faa44a21c131fefc2acba
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Thu Dec 4 18:31:34 2008 +0100
+
+ RandR 1.3 Panning support
+
+commit 907365c7af91daf8a34c187265eca5e1260a4386
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Fri Nov 28 18:06:46 2008 +0100
+
+ RandR 1.3 Panning support
+
+commit ae56abc1f6fb8a4f7eaef50d045f0932d47c446d
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Dec 3 13:50:29 2008 +0100
+
+ RandR: Improve heuristics to determine of an output is connected.
+
+ On a multi output connector DDC and HPD are per connector - not per
+ output.
+ Thus they don't allow to destinguish which of the outputs is connected.
+ If the output provides a sense function it can be used to determine the
+ connection state. If it doesn't - but the other output(s) on the same
+ connector do, they can be probed applying the inverse logic: if another
+ output is connected, this one most likely isn't.
+
+ Code for this existed already for outputs which provide HPD. We now
+ also use it for outputs which don't.
+
+commit ed532a702ff6beaea3c5ba09ae4ae7f125a2a564
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Tue Dec 2 11:07:47 2008 +0100
+
+ ID: Add connector table for HD 2400 "0x94c3:0x000:0x0000".
+
+commit 69eadbf2b60ad4bfe9fbb9effe2b2d0d7bc91002
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Nov 26 19:42:54 2008 +0100
+
+ ID: Supply fixed connector table for Radeon X1300 0x7187:0x1545:0x1930.
+
+commit 8edc0c698bc225a0581d4e17820f28efb4db97df
+Author: Christian Koenig <deathsimple@vodafone.de>
+Date: Wed Nov 26 00:00:42 2008 +0100
+
+ BugFix for RandR cursor interface
+
+ This commit fixes a small bug introduced with the new RandR cursor
+ interface. Since RHDxf86InitCursor isn't called with RandR cursors
+ the rhdPtr->CursorInfo variable is not set, the result is that
+ rhdRestoreCursor isn't called at VT switch/shutdown.
+
+commit 48f9d1affc440916ead14a5d80553143b36809fc
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Tue Nov 25 20:43:33 2008 +0100
+
+ DIG: Remove stray ErrorFs
+
+commit 078842c7ab9e33cfcfef34b539b7f8a0f256e965
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Nov 19 17:48:39 2008 +0100
+
+ ID: 0x7187:0x1458:0x215C has a DMS59 connector.
+
+commit dc81290f0d8247670838ed5ac17c8da7bc82794e
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Nov 19 16:43:36 2008 +0100
+
+ Rotation: document limitations in man page.
+
+commit d4c49758cd16f0a22e1d15a280e453dff767e5b3
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Nov 19 16:43:19 2008 +0100
+
+ Rotation: NULL callbacks to rotation functions if no HW acceleration is enabled.
+
+ This avoids rotation to show up in RandR when it's not supported.
+ Currently we don't support rotation when no accelration is available
+ as we'd have to needlessly copy between two buffers in local memory
+ in software.
+
+commit 66f4a3a670e3bd564e682c397442f6535fd104bd
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Nov 19 14:53:28 2008 +0100
+
+ Rotation: Don't allow to set a PANNING_AREA when rotated.
+
+ Supporting panning while rotated would require some changes in the
+ RandR code: presently the size of the scanout buffer is clamped to
+ H/VDisplay, this determines the area that's copied.
+
+commit 5b9ef245f9eda1a29318752f1f41bac8f9c78027
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Nov 19 14:50:49 2008 +0100
+
+ Rotation: Fix up Crtc base pointer.
+
+commit 23bc497c90d96ecf04af68bc340be1c56bc71564
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Mon Nov 3 14:32:50 2008 +0100
+
+ Rotation: Remove USE_XAA which had been left over from rebasing.
+
+commit 24ba47d9d3cc7a53e322256b8893ed63fe05c893
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Sat Sep 20 16:42:02 2008 +0200
+
+ RandR: Some minor cleanup.
+
+commit e304e561a22615a112fcd8c797312469c9ec12de
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Sep 17 12:56:01 2008 +0200
+
+ HW Cursor: Add RandR cursor interface.
+
+ This interface support screen rotation.
+
+commit c1827740190be07b5d8650317864eaad513b25cd
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Sep 17 12:13:22 2008 +0200
+
+ RandR: Add screen rotation.
+
+commit 41d4bf718b48a4774f56c41e198a455b48d607f8
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Tue Nov 18 15:55:42 2008 +0100
+
+ RandR: Initialise the LUT on a new CRTC.
+
+commit c2dfeafe7bcf330a2688f6715840188cf37a312b
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Sun Nov 16 19:06:09 2008 +0100
+
+ DRI: Bail DRILeave/EnterVT() when drmFD == -1.
+
+ drmFD is -1 when DRM initianlization has failed for a specific
+ server generation. Use this to decide if DRILeave/EnterVT() need
+ to be run.
+
+commit def3c1f5264bcdda682831891db3e1f1a2733953
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Sun Nov 16 18:48:36 2008 +0100
+
+ DIG: Add debug code.
+
+ This code for debugging
+ https://bugs.freedesktop.org/show_bug.cgi?id=18016
+ it will be removed afterwards.
+
+commit ad876362d24a0633b5f7d7f07d33d76610e74d5a
+Author: Jung-uk Kim <jkim@FreeBSD.org>
+Date: Sun Nov 16 13:48:21 2008 +0100
+
+ rhd_conntest: Make rhd_conntest work on FreeBSD.
+
+ pciutils on FreeBSD don't fill in the PCI BAR sizes. This patch
+ works around this.
+
+commit 10dc7797c7b6199117884c907fd1ed33a8ca345b
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Sun Nov 16 13:35:02 2008 +0100
+
+ ID: Add HPD_OFF flag for Foxconn A7GM-S (RS780) motherboard.
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=18393
+
+commit 4d65e4c6d96c725dafb5fa8a6fc5a252fee4c260
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Sun Nov 16 13:34:09 2008 +0100
+
+ DRI/CS: Set drmFD to -1 after closing the device.
+
+ The CS merge destroyed the heuristic by which we detect if DRI is active
+ or not by introducing its own heuristic. CS itself requests the fd of the
+ drm device and checks if it is < 0. Unfortunately drmFD is neither
+ initialized to -1 nor reset after closing the device.
+ Adresses 2nd issue in:
+ https://bugs.freedesktop.org/show_bug.cgi?id=18474
+
+commit 65f0192242fb27cba4630184438a31028d9aa4fa
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Sat Nov 15 20:17:07 2008 +0100
+
+ AtomBIOS/BacklightControl: Add destroy function for data structure and fixes.
+
+commit 53dd35cb766138c879c926a8374380174e876d35
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Tue Nov 11 21:10:34 2008 +0100
+
+ DRI: Exit RHDDRIScreenInit() with FALSE when init failed.
+
+ Don't use the state of RHDDRICloseScreen() which is used
+ to tear down allocations.
+ Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18474
+
+commit a2fa612cd7f86966af6494c78b751d6e9479b373
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Tue Nov 11 21:06:27 2008 +0100
+
+ RandR: Bracket block properly.
+
+commit fe4356cec47c8e724f7537c292687231259183f2
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Fri Nov 7 18:20:59 2008 +0100
+
+ DRI: SwapContext: Stop wanton XAA syncs.
+
+ With an XAA fix that is going to be put upstream soon, we now actually
+ sync up XAA. Our DRIEnterServer always set the sync flag, and i don't
+ immediately see a reason for this to be so.
+
+commit bb14c00cd9b6e56d2794f3e0cedfb0257e17eae7
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Thu Nov 6 11:05:14 2008 +0100
+
+ Add RV730/710 PCI Ids.
+
+commit ac56b4c85ae6dff69e452dfd6b36b17bfcae6981
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Thu Nov 6 11:10:59 2008 +0100
+
+ ASIC_Support: Add AtomBIOS support for RV730/710 chipsets.
+
+ Implemented in close cooperation with Cooper Yuan from ATI.
+
+commit 57f1106799c48023eebce23b1bdba272db56c2b3
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Tue Oct 28 14:43:51 2008 +0100
+
+ I2C: Add additional I2C lines for for DCE3.2 support.
+
+commit 30f4bf2b8a18e63c895767ccb406c148348081a6
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Tue Oct 28 14:39:53 2008 +0100
+
+ MC: RV770 code also supports generations beyond this.
+
+commit 680f05ac2b6804236467c5bad8378043d631e5f6
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Wed Nov 5 09:15:05 2008 +0100
+
+ AtomBIOS/Backlight Control: Fix AtomBIOS based BL control for hardcoded outputs.
+
+ If the hardware doesn't support the chipset native method of backlight
+ control we try to resort to the BL control provided by AtomBIOS as this
+ might(!) provide the hardware specific controls.
+ This code is currently commented out as due to the lack of testing
+ opportunities.
+
+commit d125c0fab4e91df80f15ae39445e85a360908ae3
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Mon Nov 3 22:30:14 2008 +0100
+
+ DIG: Add debug output for EncoderPower().
+
+commit 264a8b5fb113bf553d0199495e83a5b6e8df72d4
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Mon Nov 3 21:30:45 2008 +0100
+
+ DIG: Fix SEGFAULT with new coherent option.
+
+commit db72b6a5d630d90d03ef085af69a9376de8e658a
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Mon Nov 3 18:38:30 2008 +0100
+
+ Coherent: Update man page to match Christian Koenig's fixes to the option parser.
+
+commit 36657dc3d993147a9bd6a0213cd968e9b665e216
+Author: Christian Koenig <deathsimple@vodafone.de>
+Date: Sun Nov 2 17:33:38 2008 +0100
+
+ Use RhdParseBooleanOption for ignoreconnector config option
+
+commit 2e3590dabdaa14207880ddff578a56b257c7312f
+Author: Christian Koenig <deathsimple@vodafone.de>
+Date: Sun Nov 2 17:31:30 2008 +0100
+
+ Use RhdParseBooleanOption for HDMI config option
+
+commit 908fabd6af1dc765b9493778d8aac2d8437d4892
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Mon Nov 3 18:35:45 2008 +0100
+
+ DIG: Add RHD_OPTION_NOT_SET to dig outputs.
+
+commit 08fedbb600569e9a9d79db6d3982c08ef84365a9
+Author: Christian Koenig <deathsimple@vodafone.de>
+Date: Sun Nov 2 17:30:19 2008 +0100
+
+ Fix and improve RhdParseBooleanOption.
+
+ This commit fixes a small bug in the new RhdParseBooleanOption function,
+ which was causing a xserver crash with the coherent option set.
+ It also improves the matching capability of this function by adding an
+ match all case and a new return value indicating that a given name
+ wasn't found in the option.
+
+commit 3036b40fd7b6fdaadc14550a15b88cf94fc1892f
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Mon Nov 3 10:11:07 2008 +0100
+
+ Output/Coherent: Fix bug in parser, add man page.
+
+commit 75b4f1d2702fe024360ed1f6b585e19c73b90ca9
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Thu Oct 30 19:57:07 2008 +0100
+
+ Don't allocate framebuffer for cursor images if software cursor is used.
+
+commit f29a3d2f6bb4c7140cfe4021ad3b0b1111dcf0f4
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Sat Nov 1 16:48:02 2008 +0100
+
+ DIG: Don't disable encoders which are assigned to active connectors.
+
+ When probing the pre-startup configuration to determine which unused
+ encoders can be turned off we may find encoders mapped to an inactive
+ transmitter which is mapped to a different active transmitter now.
+ In this case don't touch this encoder.
+
+commit 72aaf9bde5e0ce9090b32e39b968a3f713931b30
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Fri Oct 31 22:05:26 2008 +0100
+
+ DRI: Keep rhdDri struct for server lifetime.
+
+ This structure is allocated in PreInit() thus freeing it on
+ CloseScreen() would provide the next server generation with
+ no DRI support.
+ [Readding commit 3629374339e7 that got accidentally removed
+ with CS merge]
+
+commit c3e4ef7f536b9dcb01fc065d7eb02979d50b6739
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Sat Nov 1 17:34:11 2008 +0100
+
+ MC: Consolidate rhdAllIdle() and RHDModePrepare().
+
+commit ec67c56cdb8b984318789fa2a636107a97b40969
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Sat Nov 1 17:10:39 2008 +0100
+
+ Move MC setup before DRI init. Fixes issues DRI issues on some systems.
+
+commit 8676c233fcabc623da4873b03b4771abdd0f6850
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Fri Oct 31 19:58:11 2008 +0100
+
+ DIG: Add debug output to inform about probed encoder mappings.
+
+commit 6e40d3b98c60a3b8ee216fbec20ecd4cf788eb9d
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Fri Oct 31 17:34:46 2008 +0100
+
+ Add config option for coherent settings on digital outputs.
+
+commit 6b76953c3fb3355386502b1efcb0901485d0078e
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Fri Oct 31 17:33:50 2008 +0100
+
+ Option: Add handling for option containing a string of boolean settings.
+
+commit 9ca2384d14612eab710450e5a527dcc345e4179c
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Fri Oct 31 17:31:41 2008 +0100
+
+ BIOSScratch: Treat DAC SENSED_NONE as CRTC output.
+
+ The BIOS scratch bit that gets set when no DAC load has been detected
+ is will default to CRTC to avoid having the condition that no output
+ type is set.
+
+commit 1292ab018d3b56832f92ed7ea1b4787a3079ef8b
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Fri Oct 31 13:03:35 2008 +0100
+
+ Option: Add handling for option containing a string of boolean settings.
+
+commit a36896dd0b44a26816ac0a401c0d9918a100d624
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Tue Oct 28 16:18:06 2008 +0100
+
+ AtomBIOS/Output: consolidated handling on UNIPHYA and UNIPHYB.
+
+commit e3c569620db7ad508a970e85afd183a6bb1d0771
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Sun Oct 26 11:02:31 2008 +0100
+
+ EXA: Move inlcusion of exa.h before xf86_ansic.h.
+
+commit c38be2432610f7739e11928ee3d8ebc05502927a
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Tue Oct 28 14:27:38 2008 +0100
+
+ DCE3.0: Properly map DCE3.0 DIG encoders.
+
+ The hard coded mapping between encoders and transmitters caused problems
+ especially on some mobile devices which were using both LVTMA and UNIPHY.
+ Furthermore DCE3.0 (and even more DCE3.2) provides a larger number of
+ transmitters than there are encoders available. If a card makes more
+ transmitters available than the ASIC provides encoders not all transmitters
+ can be used simulatniously.
+ This fix extends the output subsystem API by an opional output allocation
+ sceme. If a certain output subsystem needs to allocate limited internal
+ resources before being able to use an output it can do so when this newly
+ implemented allocation function is called.
+
+commit 9e81b2ccf3451dc20b13db251b4cffbd3d765c07
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Tue Oct 28 14:06:54 2008 +0100
+
+ ID: Add PCI ID 0x95C6.
+
+commit e589cc35b3dd4696a8578d640305eecfe31c1a4b
+Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
+Date: Tue Oct 28 13:52:45 2008 +0100
+
+ Update README and man page only if sed is OK
+
+ This checks whether the $SED used can actually substitute
+ tabs and newlines for strings.
+
+ Only if this check returns a positive result, do we attempt
+ to update README and man/radeonhd.man from src/rhd_id.c.
+
+ Tested on Fedora 9 with GNU sed and FreeBSD 7.0 with FreeBSD sed.
+
+ This commit reverts d88f685c.
+
+commit 7880b5a9bb6ecf3693bbffb2aea3a2ad300b26bb
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Tue Oct 28 13:43:24 2008 +0100
+
+ Manpage: Add Christian Koenig to the list of authors.
+
+commit d88f685c6a3b738c18752c504578a46604f62840
+Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
+Date: Tue Oct 28 12:21:43 2008 +0100
+
+ Fix README update on FreeBSD (sed substitution)
+
+ FreeBSD sed does not understand \t or \n in the substitute
+ string.
+
+ This commit fixes the updating of README as it only uses \t
+ which can easily be replaced by a tab character.
+
+ The man/radeonhd.man update uses \n which is more difficult
+ to handle and thus will be handled in a later commit.
+
+commit 01152def88154d60e2ee08bdf84a37332d1554e2
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Tue Oct 28 00:23:10 2008 +0100
+
+ Imake: Fix build for xvideo and hdmi audio.
+
+ Also make the failure message of Xv more useful. We fail both on chipset
+ version and lack of CP, but we used to only claim that the chipset was
+ to blame :)
+
+commit 1e26e7a79be74c9c35876d9fda756123ddf73821
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Mon Oct 27 17:52:16 2008 +0100
+
+ Autoconf: Fix RandR12 changes.
+
+ Now that RANDR_12_SUPPORT is in config.h, there is some code in
+ rhd_dri.c that builds now, and then some unnamed struct that got
+ typedeffed breaks the xf86Crtc.h include for us.
+
+commit 0ea65a3a2689b392d62f2cc105bf74f9333c7173
+Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
+Date: Mon Oct 27 17:31:37 2008 +0100
+
+ Reorder source file list alphabetically
+
+ The old completely unordered file just is too chaotic to work with.
+
+commit 3ac30d19e0b6da36ea17519b181ddf8cf2c96561
+Author: Christian Koenig <deathsimple@vodafone.de>
+Date: Mon Oct 27 16:08:59 2008 +0100
+
+ HDMI: Add HDMI support.
+
+ Currently tested and working with RV620, RV630, RV635, RV670, RV770
+ and RS780.
+
+commit 69d4dabe27aba0ed6aff52d210b045876ed36fce
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Mon Oct 27 15:47:28 2008 +0100
+
+ Autoconf: Fix build on Ubuntu Feisty Fawn.
+
+ * Check for glproto.pc still doesn't mean that GL/ headers are there
+ on ubuntuland.
+ * Ubuntu also ships the RandR1.2 protocol headers without shipping the
+ driverside headers in the sdk.
+
+commit 15f0b2a8d6b02806df4b5fa90072d887eab4c6ce
+Author: Julien Cristau <jcristau@debian.org>
+Date: Sun Oct 19 20:57:13 2008 +0200
+
+ [PATCH] Link with -lpciaccess and -ldrm as needed
+
+ The driver needs to be linked with libpciaccess if XSERVER_LIBPCIACCESS
+ is defined. Likewise, if DRI is enabled, we need -ldrm.
+
+commit b77f9a7796bae6cecba851d3f97401a82181bc2b
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Wed Oct 22 15:38:11 2008 +0200
+
+ autoconf: Add glproto as a dependency for DRI.
+
+ Thanks go to Julien Cristau :)
+
+commit dff3e28386c9f64e5969c53b882f4e9cade4a09d
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Wed Oct 22 15:27:24 2008 +0200
+
+ gitignore: Add some distcheck files.
+
+commit efaebb70294055f371cd328124b23a343cea6a68
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Wed Oct 15 14:44:35 2008 +0200
+
+ Cleanup SEGV_ON_ASSERT in HAVE_XF86_ANSIC_H case.
+
+commit 29cd73824e96225e0222a16130906a71018f2289
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Wed Oct 15 02:40:38 2008 +0200
+
+ R5xx3D: Disable XHas3DEngineState upon VT switch.
+
+ This reinitialises the 3d engine when needed after a VT switch.
+
+commit 0a9a206aba0263081661074ae72aa2bfd04aaa5a
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Wed Oct 15 00:26:18 2008 +0200
+
+ CS: Remove Mask member.
+
+ By treating all buffers as finite and not as wrappable ring-buffers,
+ we save quite a bit of CPU usage in the DRM CP case.
+
+commit 3f558efc2af17f979b6f354dbf745eba1a40ec56
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Tue Oct 14 12:40:24 2008 +0200
+
+ AtomBIOS: Make deviceID override table actually work.
+
+ This fixes problems on MAC Books which are the only user of
+ such a table. Spotted by Rudi Oertel.
+
+commit e7abdfc07e16c961767dbff72ddbb12cb5af9677
+Author: Luc Verhaegen <libv@skynet.be>
+Date: Mon Oct 13 22:28:34 2008 +0200
+
+ Xv: Fix build for big endian.
+
+ Trivial replacement of pScrn -> rhdPtr in R5xxXvCopyPlanar when setting
+ SURFACE control for big endian.
+
+commit 416eb95203fa223b5c9017986df302f1221b6a05
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Mon Oct 13 20:58:16 2008 +0200
+
+ Add HDPSWAP for Gigabyte GV-RX16P256DE-RH.
+
+commit 28233dcd2729c9339fd97e63df595aebb3bb0f5d
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Mon Oct 13 20:33:43 2008 +0200
+
+ Add Alex to authors list in radeon manpage.
+
commit 57aca005c1ede5495f326a98c411d049115cb845
Author: Luc Verhaegen <libv@skynet.be>
Date: Mon Oct 13 20:03:37 2008 +0200
diff --git a/driver/xf86-video-radeonhd/INSTALL b/driver/xf86-video-radeonhd/INSTALL
new file mode 100644
index 000000000..47607b518
--- /dev/null
+++ b/driver/xf86-video-radeonhd/INSTALL
@@ -0,0 +1,142 @@
+radeonhd - the X.org X11 driver for AMD GPG r5xx/r6xx chipsets
+Building and Installing
+==============================================================
+
+
+This INSTALL file contains the following sections:
+ * Installation
+ * Common problems during builds
+ * Getting and updating the radeonhd source code
+ * Feeding back source code
+
+
+
+Installation
+============
+
+With X.Org 7.0 and later:
+
+ $ ./autogen.sh
+ $ make
+ $ make install
+
+This will litter all kinds of compiled files throughout your source tree.
+
+With X.Org prior to 7.0:
+
+ $ xmkmf -a
+ $ make EXTRA_INCLUDES="-I/usr/include/xorg" all
+ $ make install
+
+This uses imake and is for compatibility with older systems.
+
+To avoid building in your source tree, do:
+
+ $ mkdir _b && cd _b
+ $ ../autogen.sh
+ $ make
+ $ make install
+
+Runs the build in _b/ - and if something is completely messed up, you can
+safely remove the _b/ directory and create a new one without affecting any
+source files.
+
+Hint: If you happen to have multiple branches in your git source tree, you
+ can have per-branch _b-BRANCH/ build trees and _i-BRANCH/ install
+ trees. ("... configure/autogen.sh ... --prefix=$PWD/_i-BRANCH")
+
+Note that none of these methods will install the rhd_conntest tool. The
+"xmkmf" method always requires a separate "make" run in utils/conntest. The
+other two will build rhd_conntest by default if its requirements are met.
+
+
+
+Common problems during builds
+=============================
+
+Problem:
+--------
+
+,----[ output of ./autogen.sh ]----
+|autoreconf: running: /usr/bin/autoconf
+|configure.ac:35: error: possibly undefined macro: XORG_DRIVER_CHECK_EXT
+| If this token and others are legitimate, please use m4_pattern_allow.
+| See the Autoconf documentation.
+|autoreconf: /usr/bin/autoconf failed with exit status: 1
+`----
+
+The same error can happen with missing macro definitions for
+XORG_MANPAGE_SECTIONS or XORG_RELEASE_VERSION.
+
+Solution:
+---------
+
+Your system lacks one or more of these files in /usr/share/aclocal:
+ xorg-macros.m4 xorg-server.m4 xorgversion.m4
+
+Make sure you have all required X.org development packages installed. These
+may be called xorg-dev, xorg-x11-server-sdk and xorg-x11-util-macros,
+xorg-build-macros, xutils-dev, xorg-util-macros, or something similar.
+
+If you're on a FreeBSD system, you probably need to install the
+devel/xorg-macros port/package.
+
+
+
+Getting and updating the radeonhd source code
+=============================================
+
+Released radeonhd tarballs can be downloaded from
+
+ ftp://ftp.freedesktop.org/pub/individual/driver/
+
+The name of the tarball will be xf86-video-radeonhd-<version>.tar.bz2
+
+
+The developer version of radeonhd is maintained in the git repository found at
+
+ git://anongit.freedesktop.org/git/xorg/driver/xf86-video-radeonhd
+
+You can find information on using git at the git website http://git.or.cz/
+and a short intro at
+
+ http://www.freedesktop.org/wiki/Infrastructure/git/Developers
+
+You can get a copy of the repository like this:
+
+ $ git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-radeonhd
+
+This will create a directory xf86-video-radeonhd in the current directory.
+
+If you have not made any local changes and want to update you source code
+with the newest stuff from the official radeonhd repository, you can run this:
+
+ $ git pull
+
+If you HAVE made local changes and committed them locally to your master
+branch (with "git commit -a"), you will be better off running
+
+ $ git fetch
+ $ git rebase origin
+
+If you're using more branches, or run into a conflict during rebasing, read
+the git docs.
+
+
+
+Feeding back source code
+========================
+
+You can easily create patches to send to the developers using git.
+
+ $ vi some_file.c
+ $ git status
+ $ git diff
+ $ git commit -a
+
+ $ git format-patch origin
+
+Then you can sift through the 0*.patch files and choose a few to send to
+the radeonhd mailing list.
+
+
diff --git a/driver/xf86-video-radeonhd/Makefile.am b/driver/xf86-video-radeonhd/Makefile.am
index db99d6769..d445acc34 100644
--- a/driver/xf86-video-radeonhd/Makefile.am
+++ b/driver/xf86-video-radeonhd/Makefile.am
@@ -22,15 +22,17 @@
# OTHER DEALINGS IN THE SOFTWARE.
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = man src
+# src before man: src/ may update sources in man/
+SUBDIRS = src man
-EXTRA_DIST = RadeonHD.tmpl Imakefile git_version.sh ChangeLog
+EXTRA_DIST = RadeonHD.tmpl Imakefile git_version.sh ChangeLog INSTALL
MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog
+# "git log" with the space should be available since git 1.3.0
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)
+ (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)
dist-hook: ChangeLog
diff --git a/driver/xf86-video-radeonhd/Makefile.in b/driver/xf86-video-radeonhd/Makefile.in
index dad4acee9..21a18220d 100644
--- a/driver/xf86-video-radeonhd/Makefile.in
+++ b/driver/xf86-video-radeonhd/Makefile.in
@@ -142,6 +142,8 @@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
HAVE_PCI_PCI_H_FALSE = @HAVE_PCI_PCI_H_FALSE@
HAVE_PCI_PCI_H_TRUE = @HAVE_PCI_PCI_H_TRUE@
+HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE = @HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE@
+HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE = @HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@
HAVE_XF86_ANSIC_H_FALSE = @HAVE_XF86_ANSIC_H_FALSE@
HAVE_XF86_ANSIC_H_TRUE = @HAVE_XF86_ANSIC_H_TRUE@
HAVE_ZLIB_FALSE = @HAVE_ZLIB_FALSE@
@@ -173,6 +175,8 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
+PCIACCESS_LIBS = @PCIACCESS_LIBS@
PCIUTILS_CFLAGS = @PCIUTILS_CFLAGS@
PCIUTILS_LIBS = @PCIUTILS_LIBS@
PEDANTIC_CFLAGS = @PEDANTIC_CFLAGS@
@@ -191,6 +195,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
+XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@
+XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
@@ -239,8 +245,9 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = man src
-EXTRA_DIST = RadeonHD.tmpl Imakefile git_version.sh ChangeLog
+# src before man: src/ may update sources in man/
+SUBDIRS = src man
+EXTRA_DIST = RadeonHD.tmpl Imakefile git_version.sh ChangeLog INSTALL
MAINTAINERCLEANFILES = ChangeLog
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -683,8 +690,9 @@ uninstall-info: uninstall-info-recursive
.PHONY: ChangeLog
+# "git log" with the space should be available since git 1.3.0
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)
+ (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)
dist-hook: ChangeLog
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/driver/xf86-video-radeonhd/README b/driver/xf86-video-radeonhd/README
index 80c0161d8..6f9d27fee 100644
--- a/driver/xf86-video-radeonhd/README
+++ b/driver/xf86-video-radeonhd/README
@@ -73,6 +73,11 @@ BEGIN_DEVICE_LIST
* RS740: RS740, RS740M
* RS780: Radeon HD 3100/3200/3300 Series
* RV770: Radeon HD 4800 Series; Everest, K2, Denali ATI FirePro
+ * R700: Radeon R700
+ * M98: Radeon M98 Mobility
+ * RV730: Radeon HD4670, HD4650
+ * M96: Radeon M96 Mobility
+ * RV710: Radeon HD4570, HD4350
END_DEVICE_LIST
@@ -82,6 +87,14 @@ Major Changes
Read ChangeLog for a complete list.
+- Version 1.2.4
+
+ - Added HDMI support.
+ - Added support for RV710, RV730 (DCE 3.2).
+ - Added screen rotation support.
+ - Added RandR 1.3 panning support.
+ - Many acceleration and build fixes.
+
- Version 1.2.3
- Added Command Submission infrastructure.
diff --git a/driver/xf86-video-radeonhd/config.h.in b/driver/xf86-video-radeonhd/config.h.in
index 65ae6240d..8153772df 100644
--- a/driver/xf86-video-radeonhd/config.h.in
+++ b/driver/xf86-video-radeonhd/config.h.in
@@ -18,6 +18,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* have RotateFreeShadow API */
+#undef HAVE_FREE_SHADOW
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -84,6 +87,9 @@
/* Patchlevel Version */
#undef PACKAGE_VERSION_PATCHLEVEL
+/* Build RandR 1.2 Support */
+#undef RANDR_12_SUPPORT
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
diff --git a/driver/xf86-video-radeonhd/configure b/driver/xf86-video-radeonhd/configure
index caf8dd546..e9abf0837 100644
--- a/driver/xf86-video-radeonhd/configure
+++ b/driver/xf86-video-radeonhd/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for xf86-video-radeonhd 1.2.3.
+# Generated by GNU Autoconf 2.59 for xf86-video-radeonhd 1.2.4.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/radeonhd>.
#
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='xf86-video-radeonhd'
PACKAGE_TARNAME='xf86-video-radeonhd'
-PACKAGE_VERSION='1.2.3'
-PACKAGE_STRING='xf86-video-radeonhd 1.2.3'
+PACKAGE_VERSION='1.2.4'
+PACKAGE_STRING='xf86-video-radeonhd 1.2.4'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/radeonhd'
ac_unique_file="Makefile.am"
@@ -465,7 +465,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG ac_pt_PKG_CONFIG XORG_CFLAGS XORG_LIBS PCIUTILS_CFLAGS PCIUTILS_LIBS HAVE_PCI_PCI_H_TRUE HAVE_PCI_PCI_H_FALSE USE_EXA_TRUE USE_EXA_FALSE DRI_CFLAGS DRI_LIBS USE_DRI_TRUE USE_DRI_FALSE HAVE_XF86_ANSIC_H_TRUE HAVE_XF86_ANSIC_H_FALSE ATOM_BIOS_TRUE ATOM_BIOS_FALSE ATOM_BIOS_PARSER_TRUE ATOM_BIOS_PARSER_FALSE HAVE_ZLIB_TRUE HAVE_ZLIB_FALSE WARN_CFLAGS PEDANTIC_CFLAGS ATOMBIOS_CFLAGS RANDR_VERSION moduledir DRIVER_NAME APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG ac_pt_PKG_CONFIG XORG_CFLAGS XORG_LIBS PCIUTILS_CFLAGS PCIUTILS_LIBS HAVE_PCI_PCI_H_TRUE HAVE_PCI_PCI_H_FALSE PCIACCESS_CFLAGS PCIACCESS_LIBS XSERVER_LIBPCIACCESS_TRUE XSERVER_LIBPCIACCESS_FALSE USE_EXA_TRUE USE_EXA_FALSE DRI_CFLAGS DRI_LIBS USE_DRI_TRUE USE_DRI_FALSE HAVE_XF86_ANSIC_H_TRUE HAVE_XF86_ANSIC_H_FALSE ATOM_BIOS_TRUE ATOM_BIOS_FALSE ATOM_BIOS_PARSER_TRUE ATOM_BIOS_PARSER_FALSE HAVE_ZLIB_TRUE HAVE_ZLIB_FALSE WARN_CFLAGS PEDANTIC_CFLAGS ATOMBIOS_CFLAGS RANDR_VERSION moduledir DRIVER_NAME APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -966,6 +966,14 @@ ac_env_PCIUTILS_LIBS_set=${PCIUTILS_LIBS+set}
ac_env_PCIUTILS_LIBS_value=$PCIUTILS_LIBS
ac_cv_env_PCIUTILS_LIBS_set=${PCIUTILS_LIBS+set}
ac_cv_env_PCIUTILS_LIBS_value=$PCIUTILS_LIBS
+ac_env_PCIACCESS_CFLAGS_set=${PCIACCESS_CFLAGS+set}
+ac_env_PCIACCESS_CFLAGS_value=$PCIACCESS_CFLAGS
+ac_cv_env_PCIACCESS_CFLAGS_set=${PCIACCESS_CFLAGS+set}
+ac_cv_env_PCIACCESS_CFLAGS_value=$PCIACCESS_CFLAGS
+ac_env_PCIACCESS_LIBS_set=${PCIACCESS_LIBS+set}
+ac_env_PCIACCESS_LIBS_value=$PCIACCESS_LIBS
+ac_cv_env_PCIACCESS_LIBS_set=${PCIACCESS_LIBS+set}
+ac_cv_env_PCIACCESS_LIBS_value=$PCIACCESS_LIBS
ac_env_DRI_CFLAGS_set=${DRI_CFLAGS+set}
ac_env_DRI_CFLAGS_value=$DRI_CFLAGS
ac_cv_env_DRI_CFLAGS_set=${DRI_CFLAGS+set}
@@ -982,7 +990,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xf86-video-radeonhd 1.2.3 to adapt to many kinds of systems.
+\`configure' configures xf86-video-radeonhd 1.2.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1048,7 +1056,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xf86-video-radeonhd 1.2.3:";;
+ short | recursive ) echo "Configuration of xf86-video-radeonhd 1.2.4:";;
esac
cat <<\_ACEOF
@@ -1106,6 +1114,10 @@ Some influential environment variables:
C compiler flags for PCIUTILS, overriding pkg-config
PCIUTILS_LIBS
linker flags for PCIUTILS, overriding pkg-config
+ PCIACCESS_CFLAGS
+ C compiler flags for PCIACCESS, overriding pkg-config
+ PCIACCESS_LIBS
+ linker flags for PCIACCESS, overriding pkg-config
DRI_CFLAGS C compiler flags for DRI, overriding pkg-config
DRI_LIBS linker flags for DRI, overriding pkg-config
@@ -1208,7 +1220,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-xf86-video-radeonhd configure 1.2.3
+xf86-video-radeonhd configure 1.2.4
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1222,7 +1234,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xf86-video-radeonhd $as_me 1.2.3, which was
+It was created by xf86-video-radeonhd $as_me 1.2.4, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1825,7 +1837,7 @@ fi
# Define the identity of the package.
PACKAGE='xf86-video-radeonhd'
- VERSION='1.2.3'
+ VERSION='1.2.4'
cat >>confdefs.h <<_ACEOF
@@ -3111,8 +3123,36 @@ else
fi
+
SED=${SED-sed}
+
+echo "$as_me:$LINENO: checking whether $SED can substitute tabs and newlines for text" >&5
+echo $ECHO_N "checking whether $SED can substitute tabs and newlines for text... $ECHO_C" >&6
+cat>sed-test.1<<EOF
+ y
+
+EOF
+echo x | sed 's/x/\ty\n/' > sed-test.2
+if cmp -s sed-test.1 sed-test.2; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if cmp -s sed-test.1 sed-test.2; then
+ HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE=
+ HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE='#'
+else
+ HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE='#'
+ HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE=
+fi
+
+rm -f sed-test.1 sed-test.2
+
CXX=no
F77=no
# Check whether --enable-shared or --disable-shared was given.
@@ -3723,7 +3763,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3726 "configure"' > conftest.$ac_ext
+ echo '#line 3766 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5333,7 +5373,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:5336:" \
+echo "$as_me:5376:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6682,11 +6722,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6685: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6725: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6689: \$? = $ac_status" >&5
+ echo "$as_me:6729: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6972,11 +7012,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6975: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7015: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6979: \$? = $ac_status" >&5
+ echo "$as_me:7019: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7076,11 +7116,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7079: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7119: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7083: \$? = $ac_status" >&5
+ echo "$as_me:7123: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9477,7 +9517,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9480 "configure"
+#line 9520 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9577,7 +9617,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9580 "configure"
+#line 9620 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11982,11 +12022,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11985: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12025: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11989: \$? = $ac_status" >&5
+ echo "$as_me:12029: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12086,11 +12126,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12089: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12129: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12093: \$? = $ac_status" >&5
+ echo "$as_me:12133: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13669,11 +13709,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13672: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13712: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13676: \$? = $ac_status" >&5
+ echo "$as_me:13716: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13773,11 +13813,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13776: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13816: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13780: \$? = $ac_status" >&5
+ echo "$as_me:13820: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15985,11 +16025,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15988: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16028: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15992: \$? = $ac_status" >&5
+ echo "$as_me:16032: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16275,11 +16315,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16278: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16318: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16282: \$? = $ac_status" >&5
+ echo "$as_me:16322: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16379,11 +16419,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16382: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16422: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16386: \$? = $ac_status" >&5
+ echo "$as_me:16426: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -19346,68 +19386,6 @@ echo "${ECHO_T}$_EXT_CHECK" >&6
REQUIRED_MODULES="$REQUIRED_MODULES xextproto"
fi
-
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include "xorg-server.h"
-#if !defined XSERVER_LIBPCIACCESS
-#error XSERVER_LIBPCIACCESS not defined
-#endif
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- _EXT_CHECK=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-_EXT_CHECK=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$SAVE_CFLAGS"
- echo "$as_me:$LINENO: checking if XSERVER_LIBPCIACCESS is defined" >&5
-echo $ECHO_N "checking if XSERVER_LIBPCIACCESS is defined... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $_EXT_CHECK" >&5
-echo "${ECHO_T}$_EXT_CHECK" >&6
- if test "$_EXT_CHECK" != no; then
- REQUIRED_MODULES="$REQUIRED_MODULES pciaccess"
- fi
-
# @@@@ We don't do DGA any more
# pkg-config packages checks
@@ -20046,6 +20024,194 @@ fi
CPPFLAGS="$SAVED_CPPFLAGS $XORG_CFLAGS"
CFLAGS="$SAVED_CFLAGS"
+echo "$as_me:$LINENO: checking whether XSERVER_LIBPCIACCESS is declared" >&5
+echo $ECHO_N "checking whether XSERVER_LIBPCIACCESS is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_XSERVER_LIBPCIACCESS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include "xorg-server.h"
+
+int
+main ()
+{
+#ifndef XSERVER_LIBPCIACCESS
+ char *p = (char *) XSERVER_LIBPCIACCESS;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_XSERVER_LIBPCIACCESS=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_XSERVER_LIBPCIACCESS=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_XSERVER_LIBPCIACCESS" >&5
+echo "${ECHO_T}$ac_cv_have_decl_XSERVER_LIBPCIACCESS" >&6
+if test $ac_cv_have_decl_XSERVER_LIBPCIACCESS = yes; then
+ XSERVER_LIBPCIACCESS=yes
+else
+ XSERVER_LIBPCIACCESS=no
+fi
+
+if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+
+pkg_failed=no
+echo "$as_me:$LINENO: checking for PCIACCESS" >&5
+echo $ECHO_N "checking for PCIACCESS... $ECHO_C" >&6
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$PCIACCESS_CFLAGS"; then
+ pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess\"") >&5
+ ($PKG_CONFIG --exists --print-errors "pciaccess") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$PCIACCESS_LIBS"; then
+ pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess\"") >&5
+ ($PKG_CONFIG --exists --print-errors "pciaccess") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pciaccess"`
+ else
+ PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pciaccess"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$PCIACCESS_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: Package requirements (pciaccess) were not met:
+
+$PCIACCESS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables PCIACCESS_CFLAGS
+and PCIACCESS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (pciaccess) were not met:
+
+$PCIACCESS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables PCIACCESS_CFLAGS
+and PCIACCESS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables PCIACCESS_CFLAGS
+and PCIACCESS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables PCIACCESS_CFLAGS
+and PCIACCESS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS
+ PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ :
+fi
+ XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
+fi
+
+
+if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+ XSERVER_LIBPCIACCESS_TRUE=
+ XSERVER_LIBPCIACCESS_FALSE='#'
+else
+ XSERVER_LIBPCIACCESS_TRUE='#'
+ XSERVER_LIBPCIACCESS_FALSE=
+fi
+
+
# basic exa check.
echo "$as_me:$LINENO: checking whether to enable EXA support" >&5
echo $ECHO_N "checking whether to enable EXA support... $ECHO_C" >&6
@@ -20274,6 +20440,75 @@ else
fi
+# Handle RandR1.2
+echo "$as_me:$LINENO: checking for xf86RandR12.h" >&5
+echo $ECHO_N "checking for xf86RandR12.h... $ECHO_C" >&6
+if test "${ac_cv_header_xf86RandR12_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <xf86.h>
+
+#include <xf86RandR12.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_xf86RandR12_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_xf86RandR12_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_xf86RandR12_h" >&5
+echo "${ECHO_T}$ac_cv_header_xf86RandR12_h" >&6
+if test $ac_cv_header_xf86RandR12_h = yes; then
+ have_randr12="yes"
+else
+ have_randr12="no"
+fi
+
+
+if test "x$have_randr12" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define RANDR_12_SUPPORT 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether to enable RandR1.2 support" >&5
+echo $ECHO_N "checking whether to enable RandR1.2 support... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $have_randr12" >&5
+echo "${ECHO_T}$have_randr12" >&6
+
# Handle DRI
CPPFLAGS="$SAVED_CPPFLAGS $XORG_CFLAGS"
CFLAGS="$SAVED_CFLAGS $XORG_CFLAGS"
@@ -20355,12 +20590,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_DRI_CFLAGS="$DRI_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.2 xf86driproto\"") >&5
- ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2 xf86driproto") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.2 xf86driproto glproto\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2 xf86driproto glproto") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_DRI_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.2 xf86driproto" 2>/dev/null`
+ pkg_cv_DRI_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.2 xf86driproto glproto" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -20373,12 +20608,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_DRI_LIBS="$DRI_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.2 xf86driproto\"") >&5
- ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2 xf86driproto") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.2 xf86driproto glproto\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2 xf86driproto glproto") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_DRI_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.2 xf86driproto" 2>/dev/null`
+ pkg_cv_DRI_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.2 xf86driproto glproto" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -20397,9 +20632,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- DRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdrm >= 2.2 xf86driproto"`
+ DRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdrm >= 2.2 xf86driproto glproto"`
else
- DRI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdrm >= 2.2 xf86driproto"`
+ DRI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdrm >= 2.2 xf86driproto glproto"`
fi
# Put the nasty error message in config.log where it belongs
echo "$DRI_PKG_ERRORS" >&5
@@ -20417,6 +20652,154 @@ echo "${ECHO_T}yes" >&6
:
fi
fi
+
+if test "x$USE_DRI" = xyes; then
+ if test "${ac_cv_header_GL_gl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for GL/gl.h" >&5
+echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
+if test "${ac_cv_header_GL_gl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
+echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
+echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <GL/gl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
+echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <GL/gl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------------------------------------------------------------ ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/radeonhd ##
+## ------------------------------------------------------------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for GL/gl.h" >&5
+echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
+if test "${ac_cv_header_GL_gl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_GL_gl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
+echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
+
+fi
+if test $ac_cv_header_GL_gl_h = yes; then
+ USE_DRI="yes"
+else
+ USE_DRI="no"
+fi
+
+
+fi
+
echo "$as_me:$LINENO: checking whether to enable DRI support" >&5
echo $ECHO_N "checking whether to enable DRI support... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $USE_DRI" >&5
@@ -20988,6 +21371,75 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking whether xf86RotateFreeShadow is declared" >&5
+echo $ECHO_N "checking whether xf86RotateFreeShadow is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_xf86RotateFreeShadow+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <xorg-server.h>
+ #include <windowstr.h>
+ #include <xf86Crtc.h>
+
+int
+main ()
+{
+#ifndef xf86RotateFreeShadow
+ char *p = (char *) xf86RotateFreeShadow;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_xf86RotateFreeShadow=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_xf86RotateFreeShadow=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_xf86RotateFreeShadow" >&5
+echo "${ECHO_T}$ac_cv_have_decl_xf86RotateFreeShadow" >&6
+if test $ac_cv_have_decl_xf86RotateFreeShadow = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREE_SHADOW 1
+_ACEOF
+
+fi
+
+
+
CFLAGS="$SAVED_CFLAGS"
# Check whether --enable-atombios or --disable-atombios was given.
@@ -21605,6 +22057,13 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE}" && test -z "${HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"HAVE_SED_WITH_REASONABLE_SUBSTITUTION\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_SED_WITH_REASONABLE_SUBSTITUTION\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -21619,6 +22078,13 @@ echo "$as_me: error: conditional \"HAVE_PCI_PCI_H\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${XSERVER_LIBPCIACCESS_TRUE}" && test -z "${XSERVER_LIBPCIACCESS_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"XSERVER_LIBPCIACCESS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"XSERVER_LIBPCIACCESS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${USE_EXA_TRUE}" && test -z "${USE_EXA_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"USE_EXA\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -21932,7 +22398,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by xf86-video-radeonhd $as_me 1.2.3, which was
+This file was extended by xf86-video-radeonhd $as_me 1.2.4, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21995,7 +22461,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-xf86-video-radeonhd config.status 1.2.3
+xf86-video-radeonhd config.status 1.2.4
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -22238,6 +22704,8 @@ s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
s,@SED@,$SED,;t t
+s,@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@,$HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE,;t t
+s,@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE@,$HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
@@ -22277,6 +22745,10 @@ s,@PCIUTILS_CFLAGS@,$PCIUTILS_CFLAGS,;t t
s,@PCIUTILS_LIBS@,$PCIUTILS_LIBS,;t t
s,@HAVE_PCI_PCI_H_TRUE@,$HAVE_PCI_PCI_H_TRUE,;t t
s,@HAVE_PCI_PCI_H_FALSE@,$HAVE_PCI_PCI_H_FALSE,;t t
+s,@PCIACCESS_CFLAGS@,$PCIACCESS_CFLAGS,;t t
+s,@PCIACCESS_LIBS@,$PCIACCESS_LIBS,;t t
+s,@XSERVER_LIBPCIACCESS_TRUE@,$XSERVER_LIBPCIACCESS_TRUE,;t t
+s,@XSERVER_LIBPCIACCESS_FALSE@,$XSERVER_LIBPCIACCESS_FALSE,;t t
s,@USE_EXA_TRUE@,$USE_EXA_TRUE,;t t
s,@USE_EXA_FALSE@,$USE_EXA_FALSE,;t t
s,@DRI_CFLAGS@,$DRI_CFLAGS,;t t
diff --git a/driver/xf86-video-radeonhd/configure.ac b/driver/xf86-video-radeonhd/configure.ac
index 7ad8829ae..85a552083 100644
--- a/driver/xf86-video-radeonhd/configure.ac
+++ b/driver/xf86-video-radeonhd/configure.ac
@@ -2,7 +2,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-radeonhd],
- 1.2.3,
+ 1.2.4,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/radeonhd],
xf86-video-radeonhd)
@@ -17,8 +17,25 @@ AM_MAINTAINER_MODE
# Program checks.
AC_DISABLE_STATIC
AC_PROG_CC
+
dnl Define SED var without requiring AC_PROG_SED (new in autoconf-2.59b)
m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [AC_SUBST([SED], [${SED-sed}])])
+
+AC_MSG_CHECKING([whether $SED can substitute tabs and newlines for text])
+dnl One tab, a letter and two newlines
+cat>sed-test.1<<EOF
+ y
+
+EOF
+echo x | sed 's/x/\ty\n/' > sed-test.2
+if cmp -s sed-test.1 sed-test.2; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+AM_CONDITIONAL([HAVE_SED_WITH_REASONABLE_SUBSTITUTION], [cmp -s sed-test.1 sed-test.2])
+rm -f sed-test.1 sed-test.2
+
CXX=no
F77=no
AC_PROG_LIBTOOL
@@ -53,7 +70,6 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
-XORG_DRIVER_CHECK_EXT(XSERVER_LIBPCIACCESS, pciaccess)
# @@@@ We don't do DGA any more
# pkg-config packages checks
@@ -85,6 +101,15 @@ AM_CONDITIONAL([HAVE_PCI_PCI_H], [test "x$have_pci_pci_h" = "xyes"])
CPPFLAGS="$SAVED_CPPFLAGS $XORG_CFLAGS"
CFLAGS="$SAVED_CFLAGS"
+AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
+ [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
+ [#include "xorg-server.h"])
+if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+ PKG_CHECK_MODULES([PCIACCESS], [pciaccess])
+ XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
+fi
+AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+
# basic exa check.
AC_MSG_CHECKING([whether to enable EXA support])
if test "x$EXA" = xyes; then
@@ -115,6 +140,15 @@ fi
AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes)
+# Handle RandR1.2
+AC_CHECK_HEADER(xf86RandR12.h, [have_randr12="yes"], [have_randr12="no"], [#include <xf86.h>])
+if test "x$have_randr12" = xyes; then
+ AC_DEFINE(RANDR_12_SUPPORT, 1, [Build RandR 1.2 Support])
+fi
+
+AC_MSG_CHECKING([whether to enable RandR1.2 support])
+AC_MSG_RESULT($have_randr12)
+
# Handle DRI
CPPFLAGS="$SAVED_CPPFLAGS $XORG_CFLAGS"
CFLAGS="$SAVED_CFLAGS $XORG_CFLAGS"
@@ -124,8 +158,13 @@ USE_DRI=no
if test "x$DRI" = xyes; then
USE_DRI="yes"
AC_CHECK_DECL(XF86DRI,, [USE_DRI=no], [#include <xorg-server.h>])
- PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto],, [USE_DRI=no])
+ PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto glproto],, [USE_DRI=no])
+fi
+
+if test "x$USE_DRI" = xyes; then
+ AC_CHECK_HEADER(GL/gl.h, [USE_DRI="yes"], [USE_DRI="no"])
fi
+
AC_MSG_CHECKING([whether to enable DRI support])
AC_MSG_RESULT($USE_DRI)
test "x$USE_DRI" = xyes && AC_DEFINE(USE_DRI, 1, [Build support for DRI])
@@ -173,6 +212,14 @@ if test "x$XF86CRTCFUNCS_HAS_SETMODEMAJOR" = xyes; then
AC_DEFINE(XF86CRTCFUNCS_HAS_SETMODEMAJOR, 1, [xf86CrtcFuncsRec has member set_mode_major])
fi
+AC_CHECK_DECL(xf86RotateFreeShadow,
+ [AC_DEFINE(HAVE_FREE_SHADOW, 1, [have RotateFreeShadow API])],
+ [],
+ [#include <xorg-server.h>
+ #include <windowstr.h>
+ #include <xf86Crtc.h>])
+
+
CFLAGS="$SAVED_CFLAGS"
AC_ARG_ENABLE(atombios, AC_HELP_STRING([--disable-atombios],
diff --git a/driver/xf86-video-radeonhd/man/Makefile.in b/driver/xf86-video-radeonhd/man/Makefile.in
index b27164d49..c47e112ca 100644
--- a/driver/xf86-video-radeonhd/man/Makefile.in
+++ b/driver/xf86-video-radeonhd/man/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.in,v 1.7 2008/11/01 18:14:36 matthieu Exp $
+# $Id: Makefile.in,v 1.8 2009/01/28 14:43:56 matthieu Exp $
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
@@ -132,6 +132,8 @@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
HAVE_PCI_PCI_H_FALSE = @HAVE_PCI_PCI_H_FALSE@
HAVE_PCI_PCI_H_TRUE = @HAVE_PCI_PCI_H_TRUE@
+HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE = @HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE@
+HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE = @HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@
HAVE_XF86_ANSIC_H_FALSE = @HAVE_XF86_ANSIC_H_FALSE@
HAVE_XF86_ANSIC_H_TRUE = @HAVE_XF86_ANSIC_H_TRUE@
HAVE_ZLIB_FALSE = @HAVE_ZLIB_FALSE@
@@ -163,6 +165,8 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
+PCIACCESS_LIBS = @PCIACCESS_LIBS@
PCIUTILS_CFLAGS = @PCIUTILS_CFLAGS@
PCIUTILS_LIBS = @PCIUTILS_LIBS@
PEDANTIC_CFLAGS = @PEDANTIC_CFLAGS@
@@ -181,6 +185,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
+XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@
+XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
diff --git a/driver/xf86-video-radeonhd/man/radeonhd.man b/driver/xf86-video-radeonhd/man/radeonhd.man
index 7b2a2b239..90cafce82 100644
--- a/driver/xf86-video-radeonhd/man/radeonhd.man
+++ b/driver/xf86-video-radeonhd/man/radeonhd.man
@@ -170,6 +170,21 @@ Radeon HD 3100/3200/3300 Series
.TP 8
.B RV770
Radeon HD 4800 Series; Everest, K2, Denali ATI FirePro
+.TP 8
+.B R700
+Radeon R700
+.TP 8
+.B M98
+Radeon M98 Mobility
+.TP 8
+.B RV730
+Radeon HD4670, HD4650
+.TP 8
+.B M96
+Radeon M96 Mobility
+.TP 8
+.B RV710
+Radeon HD4570, HD4350
.\" END_DEVICE_LIST marker - do not delete
.PD
.\"
@@ -211,11 +226,13 @@ The default is
.BR "depending on the chipset" ,
driver version, and state of acceleration techniques and tries to give the best
user experience.
+.br
+Rotation isn't supported for the AccelMethods \*qnone\*q and \*qshadowfb\*q.
.RE
.TP
.BI "Option \*qDRI\*q"
-Use this option to enable 3D acceleration using DRI (R5xx and RS6xx chips
-only for the moment).
+Use this option to enable 3D and Xv acceleration using DRI
+(R5xx and RS6xx chips only for the moment).
Currently, the default is
.BR off .
.TP
@@ -330,18 +347,6 @@ Use of this option is considered deprecated. The
option is considered to be more flexible.
.RE
.TP
-.BI "Option \*qShadowFB\*q \*q" boolean \*q
-Enable or disable shadow framebuffer support. This greatly improves the
-speed of unaccelerated drivers. The default depends on chipset and
-acceleration state.
-.PP
-.RS
-.B NOTE:
-Use of this option is considered deprecated. The
-.B AccelMethod
-option is considered to be more flexible.
-.RE
-.TP
.BI "Option \*qHPD\*q \*q" "auto|off|normal|swap" \*q
Change the use of the hot plug detection (HPD) pins. On R5xx the according
connector tables are often broken and have to be worked around.
@@ -393,6 +398,46 @@ this option is needed to get your card working correctly, please report to the
mailing list.
.RE
.TP
+.BI "Option \*qAudio\*q \*q" boolean \*q
+This option enables the audio hardware, wich is responsible for delivering audio data
+to the different HDMI capable conntectors and used to communicate with the audio
+driver of the operation system. The default is
+.BR off .
+.TP
+.BI "Option \*qHDMI\*q \*q" boolean \*q
+Possible values are "DVI-I 0", "DVI-I 1"..,"DVI-D 0","DVI-I 1",.., "all".
+This option enables HDMI-Audio and HDMI-Info packets on the specified connector.
+This is the only way enabling HDMI at the moment, since decoding E-EDID data to check if monitor supports HDMI is not implemented (yet).
+.TP
+.BI "Option \*qCoherent\*q \*q" string \*q
+There are two different ways to program the TMDS encoder in an output
+for best signal quality for the transmitter chip used inside a digital
+monitor. This option may be used to set the programming for each output
+individually. The string is a space separated list of
+.B <output_transmitter>=on|off.
+Possible values for
+.B <output_transmitter>
+are:
+.B TMDS_A,
+.B TMDS_B,
+.B UNIPHY_A,
+.B UNIPHY_B,
+.B AtomOutputTMDSA,
+.B AtomOutputLVTMA,
+.B AtomOutputKldskpLvtma,
+.B AtomOutputUniphyA,
+.B AtomOutputUniphyB.
+The log file should be consulted
+on which ones to use. The line:
+.B "Option \*qCoherent\*q \*qTMDS_A=off TMDS_B=on\*q"
+will set coherent mode to
+.B off
+for TMDS A and to
+.B on
+for TMDS B.
+The default for all outputs is
+.BR off .
+.TP
.BI "Option \*qTVMode\*q \*q" tv-mode \*q
The TV standard to use on the TV output.
.RS
@@ -432,9 +477,10 @@ The following properties can be queried with
.B xrandr --prop
and some of them can be set with
.BR "xrandr --output" " <output> " --set " <property> <value> ."
-Those marked with RR13 are probably merged into a RandR 1.3 standard.
-Properties marked Read-Only are provided by the driver for informational
-purpose only, those marked Static won't change during runtime.
+Those marked with RR13 will be merged into a RandR 1.3 standard, though
+substantially changed. Properties marked Read-Only are provided by the driver
+for informational purpose only, those marked Static won't change during
+runtime.
.TP
.BR RANDR_SIGNAL_FORMAT " Read-Only RR13"
.RS
@@ -569,6 +615,14 @@ application typically always resets the framebuffer size with every action,
.BR --fb " <width>" x <height>
has to be added on every invocation, unless there is an additional output
configured that is using this size as its resolution.
+.br
+This property cannot be changed when in a rotated mode.
+.PP
+.B NOTE:
+Use of this option is considered deprecated. The driver supports
+.B RandR 1.3
+panning, which is included in Xserver 1.6. It is considerable more flexible,
+and should support rotated pans.
.\"
.\"
.SH KNOWN BUGS
@@ -623,5 +677,5 @@ Query the bugtracker for radeonhd bugs
.\"
.\"
.SH AUTHORS
-Egbert Eich, Luc Verhaegen, Matthias Hopf, Hans Ulrich Niedermann, and others.
+Egbert Eich, Luc Verhaegen, Matthias Hopf, Hans Ulrich Niedermann, Christian Koenig, Alexander Deucher, and others.
.\" vim: syntax=nroff
diff --git a/driver/xf86-video-radeonhd/src/Imakefile b/driver/xf86-video-radeonhd/src/Imakefile
index 4aeb9d72d..a8533c5a8 100644
--- a/driver/xf86-video-radeonhd/src/Imakefile
+++ b/driver/xf86-video-radeonhd/src/Imakefile
@@ -50,6 +50,10 @@ rhd_atomcrtc.c \
rhd_cs.c \
r5xx_accel.c \
r5xx_xaa.c \
+rhd_video.c \
+radeon_textured_videofuncs.c \
+rhd_audio.c \
+rhd_hdmi.c \
$(ATOM_BIOS_PARSER_SRCS) \
git_version.h
@@ -84,6 +88,10 @@ rhd_atomcrtc.o \
rhd_cs.o \
r5xx_accel.o \
r5xx_xaa.o \
+rhd_video.o \
+radeon_textured_videofuncs.o \
+rhd_audio.o \
+rhd_hdmi.o \
$(ATOM_BIOS_PARSER_OBJS)
INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) \
diff --git a/driver/xf86-video-radeonhd/src/Makefile.am b/driver/xf86-video-radeonhd/src/Makefile.am
index 1230e6c29..be944a4f5 100644
--- a/driver/xf86-video-radeonhd/src/Makefile.am
+++ b/driver/xf86-video-radeonhd/src/Makefile.am
@@ -11,65 +11,74 @@ drivers_LTLIBRARIES = radeonhd_drv.la
radeonhd_drv_la_LDFLAGS = -module -avoid-version
radeonhd_drv_la_CFLAGS = $(AM_CFLAGS) @PEDANTIC_CFLAGS@
+radeonhd_drv_la_LIBADD =
+
+if XSERVER_LIBPCIACCESS
+radeonhd_drv_la_LIBADD += @PCIACCESS_LIBS@
+endif
radeonhd_drv_la_SOURCES = \
+ r5xx_3dregs.h \
+ r5xx_accel.c \
+ r5xx_accel.h \
+ r5xx_regs.h \
+ r5xx_xaa.c \
+ radeon_3d.c \
+ radeon_textured_videofuncs.c \
rhd_atombios.c \
- rhd_i2c.c \
- rhd_crtc.c \
+ rhd_atombios.h \
+ rhd_atomcrtc.c \
+ rhd_atomout.c \
+ rhd_atomout.h \
+ rhd_atompll.c \
+ rhd_audio.c \
+ rhd_audio.h \
+ rhd_biosscratch.c \
+ rhd_biosscratch.h \
+ rhd_card.h \
rhd_connector.c \
+ rhd_connector.h \
+ rhd_crtc.c \
+ rhd_crtc.h \
+ rhd_cs.c \
+ rhd_cs.h \
rhd_cursor.c \
+ rhd_cursor.h \
rhd_dac.c \
+ rhd_ddia.c \
+ rhd_dig.c \
rhd_driver.c \
rhd_edid.c \
+ rhd.h \
+ rhd_hdmi.c \
+ rhd_hdmi.h \
rhd_helper.c \
+ rhd_i2c.c \
+ rhd_i2c.h \
rhd_id.c \
rhd_lut.c \
+ rhd_lut.h \
rhd_lvtma.c \
- rhd_modes.c \
- rhd_monitor.c \
- rhd_output.c \
- rhd_pll.c \
- rhd_tmds.c \
- rhd_vga.c \
rhd_mc.c \
rhd_mc.h \
- rhd_shadow.c \
- rhd_randr.c \
- rhd_dig.c \
- rhd_ddia.c \
- rhd_atomout.c \
- rhd_atompll.c \
- rhd_atomcrtc.c \
- rhd_biosscratch.c \
- rhd_biosscratch.h \
- rhd_atombios.h \
- rhd_atomout.h \
- rhd.h \
- rhd_i2c.h \
- rhd_card.h \
- rhd_crtc.h \
- rhd_connector.h \
- rhd_cursor.h \
- rhd_lut.h \
+ rhd_modes.c \
rhd_modes.h \
+ rhd_monitor.c \
rhd_monitor.h \
+ rhd_output.c \
rhd_output.h \
+ rhd_pll.c \
rhd_pll.h \
+ rhd_randr.c \
rhd_randr.h \
rhd_regs.h \
- rhd_vga.h \
+ rhd_shadow.c \
rhd_shadow.h \
- rhd_cs.c \
- rhd_cs.h \
- r5xx_accel.c \
- r5xx_accel.h \
- r5xx_xaa.c \
- r5xx_regs.h \
- r5xx_3dregs.h \
- radeon_3d.c \
+ rhd_tmds.c \
+ rhd_vga.c \
+ rhd_vga.h \
rhd_video.c \
- rhd_video.h \
- radeon_textured_videofuncs.c
+ rhd_video.h
nodist_radeonhd_drv_la_SOURCES = \
git_version.h
@@ -80,6 +89,7 @@ endif
if USE_DRI
radeonhd_drv_la_SOURCES += rhd_dri.c rhd_dri.h radeon_dri.h radeon_drm.h
+radeonhd_drv_la_LIBADD += @DRI_LIBS@
endif
if ATOM_BIOS
@@ -118,11 +128,12 @@ libatom_la_SOURCES = \
AtomBios/includes/ObjectID.h \
AtomBios/includes/regsdef.h
-radeonhd_drv_la_LIBADD = libatom.la
+radeonhd_drv_la_LIBADD += libatom.la
endif
if MAINTAINER_MODE
+if HAVE_SED_WITH_REASONABLE_SUBSTITUTION
SRCMAN = $(top_srcdir)/man/radeonhd.man
CLEANFILES += radeonhd.man.new
radeonhd.man.new: rhd_id.c $(SRCMAN)
@@ -180,3 +191,4 @@ all-local: radeonhd.man.new README.new
exit 1; \
fi
endif
+endif
diff --git a/driver/xf86-video-radeonhd/src/Makefile.in b/driver/xf86-video-radeonhd/src/Makefile.in
index cd0503a7b..722eeabbf 100644
--- a/driver/xf86-video-radeonhd/src/Makefile.in
+++ b/driver/xf86-video-radeonhd/src/Makefile.in
@@ -43,15 +43,19 @@ build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/RadeonHD.am
-@USE_EXA_TRUE@am__append_1 = r5xx_exa.c radeon_exa_render.c
-@USE_DRI_TRUE@am__append_2 = rhd_dri.c rhd_dri.h radeon_dri.h radeon_drm.h
-@ATOM_BIOS_TRUE@am__append_3 = \
+@XSERVER_LIBPCIACCESS_TRUE@am__append_1 = @PCIACCESS_LIBS@
+@USE_EXA_TRUE@am__append_2 = r5xx_exa.c radeon_exa_render.c
+@USE_DRI_TRUE@am__append_3 = rhd_dri.c rhd_dri.h radeon_dri.h radeon_drm.h
+@USE_DRI_TRUE@am__append_4 = @DRI_LIBS@
+@ATOM_BIOS_TRUE@am__append_5 = \
@ATOM_BIOS_TRUE@ AtomBios/includes/atombios.h
-@ATOM_BIOS_PARSER_TRUE@am__append_4 = \
+@ATOM_BIOS_PARSER_TRUE@am__append_6 = \
@ATOM_BIOS_PARSER_TRUE@ rhd_atomwrapper.h
-@MAINTAINER_MODE_TRUE@am__append_5 = radeonhd.man.new README.new
+@ATOM_BIOS_PARSER_TRUE@am__append_7 = libatom.la
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@am__append_8 = radeonhd.man.new \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ README.new
subdir = src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@@ -87,46 +91,51 @@ am__libatom_la_SOURCES_DIST = rhd_atomwrapper.c rhd_atomwrapper.h \
@ATOM_BIOS_PARSER_TRUE@ libatom_la-hwserv_drv.lo
libatom_la_OBJECTS = $(am_libatom_la_OBJECTS)
@ATOM_BIOS_PARSER_TRUE@am_libatom_la_rpath =
-@ATOM_BIOS_PARSER_TRUE@radeonhd_drv_la_DEPENDENCIES = libatom.la
-am__radeonhd_drv_la_SOURCES_DIST = rhd_atombios.c rhd_i2c.c rhd_crtc.c \
- rhd_connector.c rhd_cursor.c rhd_dac.c rhd_driver.c rhd_edid.c \
- rhd_helper.c rhd_id.c rhd_lut.c rhd_lvtma.c rhd_modes.c \
- rhd_monitor.c rhd_output.c rhd_pll.c rhd_tmds.c rhd_vga.c \
- rhd_mc.c rhd_mc.h rhd_shadow.c rhd_randr.c rhd_dig.c \
- rhd_ddia.c rhd_atomout.c rhd_atompll.c rhd_atomcrtc.c \
- rhd_biosscratch.c rhd_biosscratch.h rhd_atombios.h \
- rhd_atomout.h rhd.h rhd_i2c.h rhd_card.h rhd_crtc.h \
- rhd_connector.h rhd_cursor.h rhd_lut.h rhd_modes.h \
- rhd_monitor.h rhd_output.h rhd_pll.h rhd_randr.h rhd_regs.h \
- rhd_vga.h rhd_shadow.h rhd_cs.c rhd_cs.h r5xx_accel.c \
- r5xx_accel.h r5xx_xaa.c r5xx_regs.h r5xx_3dregs.h radeon_3d.c \
- rhd_video.c rhd_video.h radeon_textured_videofuncs.c \
- r5xx_exa.c radeon_exa_render.c rhd_dri.c rhd_dri.h \
- radeon_dri.h radeon_drm.h AtomBios/includes/atombios.h \
- rhd_atomwrapper.h
+am__DEPENDENCIES_1 =
+@ATOM_BIOS_PARSER_TRUE@am__DEPENDENCIES_2 = libatom.la
+radeonhd_drv_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+am__radeonhd_drv_la_SOURCES_DIST = r5xx_3dregs.h r5xx_accel.c \
+ r5xx_accel.h r5xx_regs.h r5xx_xaa.c radeon_3d.c \
+ radeon_textured_videofuncs.c rhd_atombios.c rhd_atombios.h \
+ rhd_atomcrtc.c rhd_atomout.c rhd_atomout.h rhd_atompll.c \
+ rhd_audio.c rhd_audio.h rhd_biosscratch.c rhd_biosscratch.h \
+ rhd_card.h rhd_connector.c rhd_connector.h rhd_crtc.c \
+ rhd_crtc.h rhd_cs.c rhd_cs.h rhd_cursor.c rhd_cursor.h \
+ rhd_dac.c rhd_ddia.c rhd_dig.c rhd_driver.c rhd_edid.c rhd.h \
+ rhd_hdmi.c rhd_hdmi.h rhd_helper.c rhd_i2c.c rhd_i2c.h \
+ rhd_id.c rhd_lut.c rhd_lut.h rhd_lvtma.c rhd_mc.c rhd_mc.h \
+ rhd_modes.c rhd_modes.h rhd_monitor.c rhd_monitor.h \
+ rhd_output.c rhd_output.h rhd_pll.c rhd_pll.h rhd_randr.c \
+ rhd_randr.h rhd_regs.h rhd_shadow.c rhd_shadow.h rhd_tmds.c \
+ rhd_vga.c rhd_vga.h rhd_video.c rhd_video.h r5xx_exa.c \
+ radeon_exa_render.c rhd_dri.c rhd_dri.h radeon_dri.h \
+ radeon_drm.h AtomBios/includes/atombios.h rhd_atomwrapper.h
@USE_EXA_TRUE@am__objects_1 = radeonhd_drv_la-r5xx_exa.lo \
@USE_EXA_TRUE@ radeonhd_drv_la-radeon_exa_render.lo
@USE_DRI_TRUE@am__objects_2 = radeonhd_drv_la-rhd_dri.lo
am__objects_3 =
-am_radeonhd_drv_la_OBJECTS = radeonhd_drv_la-rhd_atombios.lo \
- radeonhd_drv_la-rhd_i2c.lo radeonhd_drv_la-rhd_crtc.lo \
- radeonhd_drv_la-rhd_connector.lo radeonhd_drv_la-rhd_cursor.lo \
- radeonhd_drv_la-rhd_dac.lo radeonhd_drv_la-rhd_driver.lo \
- radeonhd_drv_la-rhd_edid.lo radeonhd_drv_la-rhd_helper.lo \
+am_radeonhd_drv_la_OBJECTS = radeonhd_drv_la-r5xx_accel.lo \
+ radeonhd_drv_la-r5xx_xaa.lo radeonhd_drv_la-radeon_3d.lo \
+ radeonhd_drv_la-radeon_textured_videofuncs.lo \
+ radeonhd_drv_la-rhd_atombios.lo \
+ radeonhd_drv_la-rhd_atomcrtc.lo radeonhd_drv_la-rhd_atomout.lo \
+ radeonhd_drv_la-rhd_atompll.lo radeonhd_drv_la-rhd_audio.lo \
+ radeonhd_drv_la-rhd_biosscratch.lo \
+ radeonhd_drv_la-rhd_connector.lo radeonhd_drv_la-rhd_crtc.lo \
+ radeonhd_drv_la-rhd_cs.lo radeonhd_drv_la-rhd_cursor.lo \
+ radeonhd_drv_la-rhd_dac.lo radeonhd_drv_la-rhd_ddia.lo \
+ radeonhd_drv_la-rhd_dig.lo radeonhd_drv_la-rhd_driver.lo \
+ radeonhd_drv_la-rhd_edid.lo radeonhd_drv_la-rhd_hdmi.lo \
+ radeonhd_drv_la-rhd_helper.lo radeonhd_drv_la-rhd_i2c.lo \
radeonhd_drv_la-rhd_id.lo radeonhd_drv_la-rhd_lut.lo \
- radeonhd_drv_la-rhd_lvtma.lo radeonhd_drv_la-rhd_modes.lo \
- radeonhd_drv_la-rhd_monitor.lo radeonhd_drv_la-rhd_output.lo \
- radeonhd_drv_la-rhd_pll.lo radeonhd_drv_la-rhd_tmds.lo \
- radeonhd_drv_la-rhd_vga.lo radeonhd_drv_la-rhd_mc.lo \
- radeonhd_drv_la-rhd_shadow.lo radeonhd_drv_la-rhd_randr.lo \
- radeonhd_drv_la-rhd_dig.lo radeonhd_drv_la-rhd_ddia.lo \
- radeonhd_drv_la-rhd_atomout.lo radeonhd_drv_la-rhd_atompll.lo \
- radeonhd_drv_la-rhd_atomcrtc.lo \
- radeonhd_drv_la-rhd_biosscratch.lo radeonhd_drv_la-rhd_cs.lo \
- radeonhd_drv_la-r5xx_accel.lo radeonhd_drv_la-r5xx_xaa.lo \
- radeonhd_drv_la-radeon_3d.lo radeonhd_drv_la-rhd_video.lo \
- radeonhd_drv_la-radeon_textured_videofuncs.lo $(am__objects_1) \
- $(am__objects_2) $(am__objects_3) $(am__objects_3)
+ radeonhd_drv_la-rhd_lvtma.lo radeonhd_drv_la-rhd_mc.lo \
+ radeonhd_drv_la-rhd_modes.lo radeonhd_drv_la-rhd_monitor.lo \
+ radeonhd_drv_la-rhd_output.lo radeonhd_drv_la-rhd_pll.lo \
+ radeonhd_drv_la-rhd_randr.lo radeonhd_drv_la-rhd_shadow.lo \
+ radeonhd_drv_la-rhd_tmds.lo radeonhd_drv_la-rhd_vga.lo \
+ radeonhd_drv_la-rhd_video.lo $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3) $(am__objects_3)
nodist_radeonhd_drv_la_OBJECTS =
radeonhd_drv_la_OBJECTS = $(am_radeonhd_drv_la_OBJECTS) \
$(nodist_radeonhd_drv_la_OBJECTS)
@@ -196,6 +205,8 @@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
HAVE_PCI_PCI_H_FALSE = @HAVE_PCI_PCI_H_FALSE@
HAVE_PCI_PCI_H_TRUE = @HAVE_PCI_PCI_H_TRUE@
+HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE = @HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE@
+HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE = @HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@
HAVE_XF86_ANSIC_H_FALSE = @HAVE_XF86_ANSIC_H_FALSE@
HAVE_XF86_ANSIC_H_TRUE = @HAVE_XF86_ANSIC_H_TRUE@
HAVE_ZLIB_FALSE = @HAVE_ZLIB_FALSE@
@@ -227,6 +238,8 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
+PCIACCESS_LIBS = @PCIACCESS_LIBS@
PCIUTILS_CFLAGS = @PCIUTILS_CFLAGS@
PCIUTILS_LIBS = @PCIUTILS_LIBS@
PEDANTIC_CFLAGS = @PEDANTIC_CFLAGS@
@@ -245,6 +258,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
+XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@
+XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
@@ -299,7 +314,7 @@ target_alias = @target_alias@
# instead of foo_SOURCES prevents shipping git_version.h in dist tarballs,
# which may cause false GIT_FOO readings.
BUILT_SOURCES = git_version.stamp
-CLEANFILES = git_version.h $(am__append_5)
+CLEANFILES = git_version.h $(am__append_8)
GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh
EXTRA_DIST = Imakefile
AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @WARN_CFLAGS@
@@ -307,21 +322,23 @@ driversdir = ${moduledir}/drivers
drivers_LTLIBRARIES = radeonhd_drv.la
radeonhd_drv_la_LDFLAGS = -module -avoid-version
radeonhd_drv_la_CFLAGS = $(AM_CFLAGS) @PEDANTIC_CFLAGS@
-radeonhd_drv_la_SOURCES = rhd_atombios.c rhd_i2c.c rhd_crtc.c \
- rhd_connector.c rhd_cursor.c rhd_dac.c rhd_driver.c rhd_edid.c \
- rhd_helper.c rhd_id.c rhd_lut.c rhd_lvtma.c rhd_modes.c \
- rhd_monitor.c rhd_output.c rhd_pll.c rhd_tmds.c rhd_vga.c \
- rhd_mc.c rhd_mc.h rhd_shadow.c rhd_randr.c rhd_dig.c \
- rhd_ddia.c rhd_atomout.c rhd_atompll.c rhd_atomcrtc.c \
- rhd_biosscratch.c rhd_biosscratch.h rhd_atombios.h \
- rhd_atomout.h rhd.h rhd_i2c.h rhd_card.h rhd_crtc.h \
- rhd_connector.h rhd_cursor.h rhd_lut.h rhd_modes.h \
- rhd_monitor.h rhd_output.h rhd_pll.h rhd_randr.h rhd_regs.h \
- rhd_vga.h rhd_shadow.h rhd_cs.c rhd_cs.h r5xx_accel.c \
- r5xx_accel.h r5xx_xaa.c r5xx_regs.h r5xx_3dregs.h radeon_3d.c \
- rhd_video.c rhd_video.h radeon_textured_videofuncs.c \
- $(am__append_1) $(am__append_2) $(am__append_3) \
- $(am__append_4)
+radeonhd_drv_la_LIBADD = $(am__append_1) $(am__append_4) \
+ $(am__append_7)
+radeonhd_drv_la_SOURCES = r5xx_3dregs.h r5xx_accel.c r5xx_accel.h \
+ r5xx_regs.h r5xx_xaa.c radeon_3d.c \
+ radeon_textured_videofuncs.c rhd_atombios.c rhd_atombios.h \
+ rhd_atomcrtc.c rhd_atomout.c rhd_atomout.h rhd_atompll.c \
+ rhd_audio.c rhd_audio.h rhd_biosscratch.c rhd_biosscratch.h \
+ rhd_card.h rhd_connector.c rhd_connector.h rhd_crtc.c \
+ rhd_crtc.h rhd_cs.c rhd_cs.h rhd_cursor.c rhd_cursor.h \
+ rhd_dac.c rhd_ddia.c rhd_dig.c rhd_driver.c rhd_edid.c rhd.h \
+ rhd_hdmi.c rhd_hdmi.h rhd_helper.c rhd_i2c.c rhd_i2c.h \
+ rhd_id.c rhd_lut.c rhd_lut.h rhd_lvtma.c rhd_mc.c rhd_mc.h \
+ rhd_modes.c rhd_modes.h rhd_monitor.c rhd_monitor.h \
+ rhd_output.c rhd_output.h rhd_pll.c rhd_pll.h rhd_randr.c \
+ rhd_randr.h rhd_regs.h rhd_shadow.c rhd_shadow.h rhd_tmds.c \
+ rhd_vga.c rhd_vga.h rhd_video.c rhd_video.h $(am__append_2) \
+ $(am__append_3) $(am__append_5) $(am__append_6)
nodist_radeonhd_drv_la_SOURCES = \
git_version.h
@@ -346,9 +363,8 @@ nodist_radeonhd_drv_la_SOURCES = \
@ATOM_BIOS_PARSER_TRUE@ AtomBios/includes/ObjectID.h \
@ATOM_BIOS_PARSER_TRUE@ AtomBios/includes/regsdef.h
-@ATOM_BIOS_PARSER_TRUE@radeonhd_drv_la_LIBADD = libatom.la
-@MAINTAINER_MODE_TRUE@SRCMAN = $(top_srcdir)/man/radeonhd.man
-@MAINTAINER_MODE_TRUE@SRCREADME = $(top_srcdir)/README
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@SRCMAN = $(top_srcdir)/man/radeonhd.man
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@SRCREADME = $(top_srcdir)/README
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -444,6 +460,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_atomcrtc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_atomout.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_atompll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_audio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_biosscratch.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_connector.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_crtc.Plo@am__quote@
@@ -455,6 +472,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_dri.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_driver.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_edid.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_hdmi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_helper.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_i2c.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeonhd_drv_la-rhd_id.Plo@am__quote@
@@ -520,6 +538,34 @@ libatom_la-hwserv_drv.lo: AtomBios/hwserv_drv.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libatom_la_CFLAGS) $(CFLAGS) -c -o libatom_la-hwserv_drv.lo `test -f 'AtomBios/hwserv_drv.c' || echo '$(srcdir)/'`AtomBios/hwserv_drv.c
+radeonhd_drv_la-r5xx_accel.lo: r5xx_accel.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-r5xx_accel.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-r5xx_accel.Tpo" -c -o radeonhd_drv_la-r5xx_accel.lo `test -f 'r5xx_accel.c' || echo '$(srcdir)/'`r5xx_accel.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-r5xx_accel.Tpo" "$(DEPDIR)/radeonhd_drv_la-r5xx_accel.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-r5xx_accel.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r5xx_accel.c' object='radeonhd_drv_la-r5xx_accel.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-r5xx_accel.lo `test -f 'r5xx_accel.c' || echo '$(srcdir)/'`r5xx_accel.c
+
+radeonhd_drv_la-r5xx_xaa.lo: r5xx_xaa.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-r5xx_xaa.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-r5xx_xaa.Tpo" -c -o radeonhd_drv_la-r5xx_xaa.lo `test -f 'r5xx_xaa.c' || echo '$(srcdir)/'`r5xx_xaa.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-r5xx_xaa.Tpo" "$(DEPDIR)/radeonhd_drv_la-r5xx_xaa.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-r5xx_xaa.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r5xx_xaa.c' object='radeonhd_drv_la-r5xx_xaa.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-r5xx_xaa.lo `test -f 'r5xx_xaa.c' || echo '$(srcdir)/'`r5xx_xaa.c
+
+radeonhd_drv_la-radeon_3d.lo: radeon_3d.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-radeon_3d.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-radeon_3d.Tpo" -c -o radeonhd_drv_la-radeon_3d.lo `test -f 'radeon_3d.c' || echo '$(srcdir)/'`radeon_3d.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-radeon_3d.Tpo" "$(DEPDIR)/radeonhd_drv_la-radeon_3d.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-radeon_3d.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='radeon_3d.c' object='radeonhd_drv_la-radeon_3d.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-radeon_3d.lo `test -f 'radeon_3d.c' || echo '$(srcdir)/'`radeon_3d.c
+
+radeonhd_drv_la-radeon_textured_videofuncs.lo: radeon_textured_videofuncs.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-radeon_textured_videofuncs.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-radeon_textured_videofuncs.Tpo" -c -o radeonhd_drv_la-radeon_textured_videofuncs.lo `test -f 'radeon_textured_videofuncs.c' || echo '$(srcdir)/'`radeon_textured_videofuncs.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-radeon_textured_videofuncs.Tpo" "$(DEPDIR)/radeonhd_drv_la-radeon_textured_videofuncs.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-radeon_textured_videofuncs.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='radeon_textured_videofuncs.c' object='radeonhd_drv_la-radeon_textured_videofuncs.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-radeon_textured_videofuncs.lo `test -f 'radeon_textured_videofuncs.c' || echo '$(srcdir)/'`radeon_textured_videofuncs.c
+
radeonhd_drv_la-rhd_atombios.lo: rhd_atombios.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_atombios.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_atombios.Tpo" -c -o radeonhd_drv_la-rhd_atombios.lo `test -f 'rhd_atombios.c' || echo '$(srcdir)/'`rhd_atombios.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_atombios.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_atombios.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_atombios.Tpo"; exit 1; fi
@@ -527,19 +573,40 @@ radeonhd_drv_la-rhd_atombios.lo: rhd_atombios.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_atombios.lo `test -f 'rhd_atombios.c' || echo '$(srcdir)/'`rhd_atombios.c
-radeonhd_drv_la-rhd_i2c.lo: rhd_i2c.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_i2c.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_i2c.Tpo" -c -o radeonhd_drv_la-rhd_i2c.lo `test -f 'rhd_i2c.c' || echo '$(srcdir)/'`rhd_i2c.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_i2c.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_i2c.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_i2c.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_i2c.c' object='radeonhd_drv_la-rhd_i2c.lo' libtool=yes @AMDEPBACKSLASH@
+radeonhd_drv_la-rhd_atomcrtc.lo: rhd_atomcrtc.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_atomcrtc.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_atomcrtc.Tpo" -c -o radeonhd_drv_la-rhd_atomcrtc.lo `test -f 'rhd_atomcrtc.c' || echo '$(srcdir)/'`rhd_atomcrtc.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_atomcrtc.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_atomcrtc.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_atomcrtc.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_atomcrtc.c' object='radeonhd_drv_la-rhd_atomcrtc.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_i2c.lo `test -f 'rhd_i2c.c' || echo '$(srcdir)/'`rhd_i2c.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_atomcrtc.lo `test -f 'rhd_atomcrtc.c' || echo '$(srcdir)/'`rhd_atomcrtc.c
-radeonhd_drv_la-rhd_crtc.lo: rhd_crtc.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_crtc.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_crtc.Tpo" -c -o radeonhd_drv_la-rhd_crtc.lo `test -f 'rhd_crtc.c' || echo '$(srcdir)/'`rhd_crtc.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_crtc.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_crtc.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_crtc.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_crtc.c' object='radeonhd_drv_la-rhd_crtc.lo' libtool=yes @AMDEPBACKSLASH@
+radeonhd_drv_la-rhd_atomout.lo: rhd_atomout.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_atomout.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_atomout.Tpo" -c -o radeonhd_drv_la-rhd_atomout.lo `test -f 'rhd_atomout.c' || echo '$(srcdir)/'`rhd_atomout.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_atomout.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_atomout.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_atomout.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_atomout.c' object='radeonhd_drv_la-rhd_atomout.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_crtc.lo `test -f 'rhd_crtc.c' || echo '$(srcdir)/'`rhd_crtc.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_atomout.lo `test -f 'rhd_atomout.c' || echo '$(srcdir)/'`rhd_atomout.c
+
+radeonhd_drv_la-rhd_atompll.lo: rhd_atompll.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_atompll.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_atompll.Tpo" -c -o radeonhd_drv_la-rhd_atompll.lo `test -f 'rhd_atompll.c' || echo '$(srcdir)/'`rhd_atompll.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_atompll.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_atompll.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_atompll.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_atompll.c' object='radeonhd_drv_la-rhd_atompll.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_atompll.lo `test -f 'rhd_atompll.c' || echo '$(srcdir)/'`rhd_atompll.c
+
+radeonhd_drv_la-rhd_audio.lo: rhd_audio.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_audio.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_audio.Tpo" -c -o radeonhd_drv_la-rhd_audio.lo `test -f 'rhd_audio.c' || echo '$(srcdir)/'`rhd_audio.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_audio.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_audio.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_audio.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_audio.c' object='radeonhd_drv_la-rhd_audio.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_audio.lo `test -f 'rhd_audio.c' || echo '$(srcdir)/'`rhd_audio.c
+
+radeonhd_drv_la-rhd_biosscratch.lo: rhd_biosscratch.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_biosscratch.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_biosscratch.Tpo" -c -o radeonhd_drv_la-rhd_biosscratch.lo `test -f 'rhd_biosscratch.c' || echo '$(srcdir)/'`rhd_biosscratch.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_biosscratch.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_biosscratch.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_biosscratch.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_biosscratch.c' object='radeonhd_drv_la-rhd_biosscratch.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_biosscratch.lo `test -f 'rhd_biosscratch.c' || echo '$(srcdir)/'`rhd_biosscratch.c
radeonhd_drv_la-rhd_connector.lo: rhd_connector.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_connector.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_connector.Tpo" -c -o radeonhd_drv_la-rhd_connector.lo `test -f 'rhd_connector.c' || echo '$(srcdir)/'`rhd_connector.c; \
@@ -548,6 +615,20 @@ radeonhd_drv_la-rhd_connector.lo: rhd_connector.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_connector.lo `test -f 'rhd_connector.c' || echo '$(srcdir)/'`rhd_connector.c
+radeonhd_drv_la-rhd_crtc.lo: rhd_crtc.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_crtc.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_crtc.Tpo" -c -o radeonhd_drv_la-rhd_crtc.lo `test -f 'rhd_crtc.c' || echo '$(srcdir)/'`rhd_crtc.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_crtc.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_crtc.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_crtc.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_crtc.c' object='radeonhd_drv_la-rhd_crtc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_crtc.lo `test -f 'rhd_crtc.c' || echo '$(srcdir)/'`rhd_crtc.c
+
+radeonhd_drv_la-rhd_cs.lo: rhd_cs.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_cs.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_cs.Tpo" -c -o radeonhd_drv_la-rhd_cs.lo `test -f 'rhd_cs.c' || echo '$(srcdir)/'`rhd_cs.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_cs.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_cs.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_cs.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_cs.c' object='radeonhd_drv_la-rhd_cs.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_cs.lo `test -f 'rhd_cs.c' || echo '$(srcdir)/'`rhd_cs.c
+
radeonhd_drv_la-rhd_cursor.lo: rhd_cursor.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_cursor.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_cursor.Tpo" -c -o radeonhd_drv_la-rhd_cursor.lo `test -f 'rhd_cursor.c' || echo '$(srcdir)/'`rhd_cursor.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_cursor.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_cursor.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_cursor.Tpo"; exit 1; fi
@@ -562,6 +643,20 @@ radeonhd_drv_la-rhd_dac.lo: rhd_dac.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_dac.lo `test -f 'rhd_dac.c' || echo '$(srcdir)/'`rhd_dac.c
+radeonhd_drv_la-rhd_ddia.lo: rhd_ddia.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_ddia.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_ddia.Tpo" -c -o radeonhd_drv_la-rhd_ddia.lo `test -f 'rhd_ddia.c' || echo '$(srcdir)/'`rhd_ddia.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_ddia.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_ddia.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_ddia.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_ddia.c' object='radeonhd_drv_la-rhd_ddia.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_ddia.lo `test -f 'rhd_ddia.c' || echo '$(srcdir)/'`rhd_ddia.c
+
+radeonhd_drv_la-rhd_dig.lo: rhd_dig.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_dig.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_dig.Tpo" -c -o radeonhd_drv_la-rhd_dig.lo `test -f 'rhd_dig.c' || echo '$(srcdir)/'`rhd_dig.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_dig.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_dig.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_dig.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_dig.c' object='radeonhd_drv_la-rhd_dig.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_dig.lo `test -f 'rhd_dig.c' || echo '$(srcdir)/'`rhd_dig.c
+
radeonhd_drv_la-rhd_driver.lo: rhd_driver.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_driver.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_driver.Tpo" -c -o radeonhd_drv_la-rhd_driver.lo `test -f 'rhd_driver.c' || echo '$(srcdir)/'`rhd_driver.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_driver.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_driver.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_driver.Tpo"; exit 1; fi
@@ -576,6 +671,13 @@ radeonhd_drv_la-rhd_edid.lo: rhd_edid.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_edid.lo `test -f 'rhd_edid.c' || echo '$(srcdir)/'`rhd_edid.c
+radeonhd_drv_la-rhd_hdmi.lo: rhd_hdmi.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_hdmi.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_hdmi.Tpo" -c -o radeonhd_drv_la-rhd_hdmi.lo `test -f 'rhd_hdmi.c' || echo '$(srcdir)/'`rhd_hdmi.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_hdmi.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_hdmi.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_hdmi.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_hdmi.c' object='radeonhd_drv_la-rhd_hdmi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_hdmi.lo `test -f 'rhd_hdmi.c' || echo '$(srcdir)/'`rhd_hdmi.c
+
radeonhd_drv_la-rhd_helper.lo: rhd_helper.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_helper.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_helper.Tpo" -c -o radeonhd_drv_la-rhd_helper.lo `test -f 'rhd_helper.c' || echo '$(srcdir)/'`rhd_helper.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_helper.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_helper.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_helper.Tpo"; exit 1; fi
@@ -583,6 +685,13 @@ radeonhd_drv_la-rhd_helper.lo: rhd_helper.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_helper.lo `test -f 'rhd_helper.c' || echo '$(srcdir)/'`rhd_helper.c
+radeonhd_drv_la-rhd_i2c.lo: rhd_i2c.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_i2c.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_i2c.Tpo" -c -o radeonhd_drv_la-rhd_i2c.lo `test -f 'rhd_i2c.c' || echo '$(srcdir)/'`rhd_i2c.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_i2c.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_i2c.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_i2c.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_i2c.c' object='radeonhd_drv_la-rhd_i2c.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_i2c.lo `test -f 'rhd_i2c.c' || echo '$(srcdir)/'`rhd_i2c.c
+
radeonhd_drv_la-rhd_id.lo: rhd_id.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_id.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_id.Tpo" -c -o radeonhd_drv_la-rhd_id.lo `test -f 'rhd_id.c' || echo '$(srcdir)/'`rhd_id.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_id.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_id.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_id.Tpo"; exit 1; fi
@@ -604,6 +713,13 @@ radeonhd_drv_la-rhd_lvtma.lo: rhd_lvtma.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_lvtma.lo `test -f 'rhd_lvtma.c' || echo '$(srcdir)/'`rhd_lvtma.c
+radeonhd_drv_la-rhd_mc.lo: rhd_mc.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_mc.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_mc.Tpo" -c -o radeonhd_drv_la-rhd_mc.lo `test -f 'rhd_mc.c' || echo '$(srcdir)/'`rhd_mc.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_mc.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_mc.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_mc.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_mc.c' object='radeonhd_drv_la-rhd_mc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_mc.lo `test -f 'rhd_mc.c' || echo '$(srcdir)/'`rhd_mc.c
+
radeonhd_drv_la-rhd_modes.lo: rhd_modes.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_modes.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_modes.Tpo" -c -o radeonhd_drv_la-rhd_modes.lo `test -f 'rhd_modes.c' || echo '$(srcdir)/'`rhd_modes.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_modes.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_modes.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_modes.Tpo"; exit 1; fi
@@ -632,6 +748,20 @@ radeonhd_drv_la-rhd_pll.lo: rhd_pll.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_pll.lo `test -f 'rhd_pll.c' || echo '$(srcdir)/'`rhd_pll.c
+radeonhd_drv_la-rhd_randr.lo: rhd_randr.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_randr.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_randr.Tpo" -c -o radeonhd_drv_la-rhd_randr.lo `test -f 'rhd_randr.c' || echo '$(srcdir)/'`rhd_randr.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_randr.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_randr.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_randr.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_randr.c' object='radeonhd_drv_la-rhd_randr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_randr.lo `test -f 'rhd_randr.c' || echo '$(srcdir)/'`rhd_randr.c
+
+radeonhd_drv_la-rhd_shadow.lo: rhd_shadow.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_shadow.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_shadow.Tpo" -c -o radeonhd_drv_la-rhd_shadow.lo `test -f 'rhd_shadow.c' || echo '$(srcdir)/'`rhd_shadow.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_shadow.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_shadow.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_shadow.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_shadow.c' object='radeonhd_drv_la-rhd_shadow.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_shadow.lo `test -f 'rhd_shadow.c' || echo '$(srcdir)/'`rhd_shadow.c
+
radeonhd_drv_la-rhd_tmds.lo: rhd_tmds.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_tmds.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_tmds.Tpo" -c -o radeonhd_drv_la-rhd_tmds.lo `test -f 'rhd_tmds.c' || echo '$(srcdir)/'`rhd_tmds.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_tmds.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_tmds.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_tmds.Tpo"; exit 1; fi
@@ -646,97 +776,6 @@ radeonhd_drv_la-rhd_vga.lo: rhd_vga.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_vga.lo `test -f 'rhd_vga.c' || echo '$(srcdir)/'`rhd_vga.c
-radeonhd_drv_la-rhd_mc.lo: rhd_mc.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_mc.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_mc.Tpo" -c -o radeonhd_drv_la-rhd_mc.lo `test -f 'rhd_mc.c' || echo '$(srcdir)/'`rhd_mc.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_mc.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_mc.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_mc.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_mc.c' object='radeonhd_drv_la-rhd_mc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_mc.lo `test -f 'rhd_mc.c' || echo '$(srcdir)/'`rhd_mc.c
-
-radeonhd_drv_la-rhd_shadow.lo: rhd_shadow.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_shadow.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_shadow.Tpo" -c -o radeonhd_drv_la-rhd_shadow.lo `test -f 'rhd_shadow.c' || echo '$(srcdir)/'`rhd_shadow.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_shadow.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_shadow.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_shadow.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_shadow.c' object='radeonhd_drv_la-rhd_shadow.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_shadow.lo `test -f 'rhd_shadow.c' || echo '$(srcdir)/'`rhd_shadow.c
-
-radeonhd_drv_la-rhd_randr.lo: rhd_randr.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_randr.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_randr.Tpo" -c -o radeonhd_drv_la-rhd_randr.lo `test -f 'rhd_randr.c' || echo '$(srcdir)/'`rhd_randr.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_randr.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_randr.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_randr.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_randr.c' object='radeonhd_drv_la-rhd_randr.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_randr.lo `test -f 'rhd_randr.c' || echo '$(srcdir)/'`rhd_randr.c
-
-radeonhd_drv_la-rhd_dig.lo: rhd_dig.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_dig.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_dig.Tpo" -c -o radeonhd_drv_la-rhd_dig.lo `test -f 'rhd_dig.c' || echo '$(srcdir)/'`rhd_dig.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_dig.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_dig.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_dig.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_dig.c' object='radeonhd_drv_la-rhd_dig.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_dig.lo `test -f 'rhd_dig.c' || echo '$(srcdir)/'`rhd_dig.c
-
-radeonhd_drv_la-rhd_ddia.lo: rhd_ddia.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_ddia.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_ddia.Tpo" -c -o radeonhd_drv_la-rhd_ddia.lo `test -f 'rhd_ddia.c' || echo '$(srcdir)/'`rhd_ddia.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_ddia.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_ddia.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_ddia.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_ddia.c' object='radeonhd_drv_la-rhd_ddia.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_ddia.lo `test -f 'rhd_ddia.c' || echo '$(srcdir)/'`rhd_ddia.c
-
-radeonhd_drv_la-rhd_atomout.lo: rhd_atomout.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_atomout.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_atomout.Tpo" -c -o radeonhd_drv_la-rhd_atomout.lo `test -f 'rhd_atomout.c' || echo '$(srcdir)/'`rhd_atomout.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_atomout.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_atomout.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_atomout.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_atomout.c' object='radeonhd_drv_la-rhd_atomout.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_atomout.lo `test -f 'rhd_atomout.c' || echo '$(srcdir)/'`rhd_atomout.c
-
-radeonhd_drv_la-rhd_atompll.lo: rhd_atompll.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_atompll.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_atompll.Tpo" -c -o radeonhd_drv_la-rhd_atompll.lo `test -f 'rhd_atompll.c' || echo '$(srcdir)/'`rhd_atompll.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_atompll.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_atompll.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_atompll.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_atompll.c' object='radeonhd_drv_la-rhd_atompll.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_atompll.lo `test -f 'rhd_atompll.c' || echo '$(srcdir)/'`rhd_atompll.c
-
-radeonhd_drv_la-rhd_atomcrtc.lo: rhd_atomcrtc.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_atomcrtc.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_atomcrtc.Tpo" -c -o radeonhd_drv_la-rhd_atomcrtc.lo `test -f 'rhd_atomcrtc.c' || echo '$(srcdir)/'`rhd_atomcrtc.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_atomcrtc.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_atomcrtc.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_atomcrtc.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_atomcrtc.c' object='radeonhd_drv_la-rhd_atomcrtc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_atomcrtc.lo `test -f 'rhd_atomcrtc.c' || echo '$(srcdir)/'`rhd_atomcrtc.c
-
-radeonhd_drv_la-rhd_biosscratch.lo: rhd_biosscratch.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_biosscratch.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_biosscratch.Tpo" -c -o radeonhd_drv_la-rhd_biosscratch.lo `test -f 'rhd_biosscratch.c' || echo '$(srcdir)/'`rhd_biosscratch.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_biosscratch.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_biosscratch.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_biosscratch.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_biosscratch.c' object='radeonhd_drv_la-rhd_biosscratch.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_biosscratch.lo `test -f 'rhd_biosscratch.c' || echo '$(srcdir)/'`rhd_biosscratch.c
-
-radeonhd_drv_la-rhd_cs.lo: rhd_cs.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_cs.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_cs.Tpo" -c -o radeonhd_drv_la-rhd_cs.lo `test -f 'rhd_cs.c' || echo '$(srcdir)/'`rhd_cs.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_cs.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_cs.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_cs.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rhd_cs.c' object='radeonhd_drv_la-rhd_cs.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_cs.lo `test -f 'rhd_cs.c' || echo '$(srcdir)/'`rhd_cs.c
-
-radeonhd_drv_la-r5xx_accel.lo: r5xx_accel.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-r5xx_accel.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-r5xx_accel.Tpo" -c -o radeonhd_drv_la-r5xx_accel.lo `test -f 'r5xx_accel.c' || echo '$(srcdir)/'`r5xx_accel.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-r5xx_accel.Tpo" "$(DEPDIR)/radeonhd_drv_la-r5xx_accel.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-r5xx_accel.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r5xx_accel.c' object='radeonhd_drv_la-r5xx_accel.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-r5xx_accel.lo `test -f 'r5xx_accel.c' || echo '$(srcdir)/'`r5xx_accel.c
-
-radeonhd_drv_la-r5xx_xaa.lo: r5xx_xaa.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-r5xx_xaa.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-r5xx_xaa.Tpo" -c -o radeonhd_drv_la-r5xx_xaa.lo `test -f 'r5xx_xaa.c' || echo '$(srcdir)/'`r5xx_xaa.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-r5xx_xaa.Tpo" "$(DEPDIR)/radeonhd_drv_la-r5xx_xaa.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-r5xx_xaa.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r5xx_xaa.c' object='radeonhd_drv_la-r5xx_xaa.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-r5xx_xaa.lo `test -f 'r5xx_xaa.c' || echo '$(srcdir)/'`r5xx_xaa.c
-
-radeonhd_drv_la-radeon_3d.lo: radeon_3d.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-radeon_3d.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-radeon_3d.Tpo" -c -o radeonhd_drv_la-radeon_3d.lo `test -f 'radeon_3d.c' || echo '$(srcdir)/'`radeon_3d.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-radeon_3d.Tpo" "$(DEPDIR)/radeonhd_drv_la-radeon_3d.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-radeon_3d.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='radeon_3d.c' object='radeonhd_drv_la-radeon_3d.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-radeon_3d.lo `test -f 'radeon_3d.c' || echo '$(srcdir)/'`radeon_3d.c
-
radeonhd_drv_la-rhd_video.lo: rhd_video.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-rhd_video.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-rhd_video.Tpo" -c -o radeonhd_drv_la-rhd_video.lo `test -f 'rhd_video.c' || echo '$(srcdir)/'`rhd_video.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-rhd_video.Tpo" "$(DEPDIR)/radeonhd_drv_la-rhd_video.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-rhd_video.Tpo"; exit 1; fi
@@ -744,13 +783,6 @@ radeonhd_drv_la-rhd_video.lo: rhd_video.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-rhd_video.lo `test -f 'rhd_video.c' || echo '$(srcdir)/'`rhd_video.c
-radeonhd_drv_la-radeon_textured_videofuncs.lo: radeon_textured_videofuncs.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-radeon_textured_videofuncs.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-radeon_textured_videofuncs.Tpo" -c -o radeonhd_drv_la-radeon_textured_videofuncs.lo `test -f 'radeon_textured_videofuncs.c' || echo '$(srcdir)/'`radeon_textured_videofuncs.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-radeon_textured_videofuncs.Tpo" "$(DEPDIR)/radeonhd_drv_la-radeon_textured_videofuncs.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-radeon_textured_videofuncs.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='radeon_textured_videofuncs.c' object='radeonhd_drv_la-radeon_textured_videofuncs.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -c -o radeonhd_drv_la-radeon_textured_videofuncs.lo `test -f 'radeon_textured_videofuncs.c' || echo '$(srcdir)/'`radeon_textured_videofuncs.c
-
radeonhd_drv_la-r5xx_exa.lo: r5xx_exa.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(radeonhd_drv_la_CFLAGS) $(CFLAGS) -MT radeonhd_drv_la-r5xx_exa.lo -MD -MP -MF "$(DEPDIR)/radeonhd_drv_la-r5xx_exa.Tpo" -c -o radeonhd_drv_la-r5xx_exa.lo `test -f 'r5xx_exa.c' || echo '$(srcdir)/'`r5xx_exa.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/radeonhd_drv_la-r5xx_exa.Tpo" "$(DEPDIR)/radeonhd_drv_la-r5xx_exa.Plo"; else rm -f "$(DEPDIR)/radeonhd_drv_la-r5xx_exa.Tpo"; exit 1; fi
@@ -864,6 +896,7 @@ distdir: $(DISTFILES)
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE@all-local:
@MAINTAINER_MODE_FALSE@all-local:
all-am: Makefile $(LTLIBRARIES) all-local
installdirs:
@@ -984,57 +1017,57 @@ dist-hook: git_version.stamp
$(SED) -e 's|^#undef GIT_IS_DIST.*|#define GIT_IS_DIST 1|' \
"git_version.h" > "$(distdir)/git_version.h"; \
fi
-@MAINTAINER_MODE_TRUE@radeonhd.man.new: rhd_id.c $(SRCMAN)
-@MAINTAINER_MODE_TRUE@ echo "Generating radeon.man.new..."; \
-@MAINTAINER_MODE_TRUE@ ( $(SED) -n '1,/^\.\\" START_DEVICE_LIST marker - do not delete/p' "$(SRCMAN)"; \
-@MAINTAINER_MODE_TRUE@ $(SED) -e '1,/^[ ]*\/\* START_DEVICE_LIST marker - do not delete \*\/ *$$/d' \
-@MAINTAINER_MODE_TRUE@ -e '/^[ ]*\/\* END_DEVICE_LIST marker - do not delete \*\/ *$$/,$$d' \
-@MAINTAINER_MODE_TRUE@ -e '/^[ ]\{1,\}xf86Msg(X_NONE,/d' \
-@MAINTAINER_MODE_TRUE@ -e '/^[ ]\{1,\}\/\*/d' \
-@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*;\)\\n"$$/.TP 8\n.B \1\n\2/' \
-@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\\t\(.*\)\.\\n"\();\)\{0,1\}$$/\1/' \
-@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*\)\.\\n"\();\)\{0,1\}$$/.TP 8\n.B \1\n\2/' \
-@MAINTAINER_MODE_TRUE@ "$(srcdir)/rhd_id.c"; \
-@MAINTAINER_MODE_TRUE@ $(SED) -n '/^\.\\" END_DEVICE_LIST marker - do not delete/,$$p' "$(SRCMAN)" \
-@MAINTAINER_MODE_TRUE@ ) > radeonhd.man.new
-@MAINTAINER_MODE_TRUE@README.new: rhd_id.c $(top_srcdir)/README
-@MAINTAINER_MODE_TRUE@ echo "Generating README.new..."; \
-@MAINTAINER_MODE_TRUE@ ( $(SED) -n '1,/^BEGIN_DEVICE_LIST$$/p' "$(SRCREADME)"; \
-@MAINTAINER_MODE_TRUE@ $(SED) -e '1,/^[ ]*\/\* START_DEVICE_LIST marker - do not delete \*\/ *$$/d' \
-@MAINTAINER_MODE_TRUE@ -e '/^[ ]*\/\* END_DEVICE_LIST marker - do not delete \*\/ *$$/,$$d' \
-@MAINTAINER_MODE_TRUE@ -e '/^[ ]\{1,\}xf86Msg(X_NONE,/d' \
-@MAINTAINER_MODE_TRUE@ -e '/^[ ]\{1,\}\/\*/d' \
-@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*;\)\\n"$$/ * \1:\t\2/' \
-@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\\t\(.*\)\.\\n"\();\)\{0,1\}$$/ \t\1/' \
-@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*\)\.\\n"\();\)\{0,1\}$$/ * \1:\t\2/' \
-@MAINTAINER_MODE_TRUE@ "$(srcdir)/rhd_id.c"; \
-@MAINTAINER_MODE_TRUE@ $(SED) -n '/^END_DEVICE_LIST$$/,$$p' "$(SRCREADME)" \
-@MAINTAINER_MODE_TRUE@ ) > README.new
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@radeonhd.man.new: rhd_id.c $(SRCMAN)
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ echo "Generating radeon.man.new..."; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ ( $(SED) -n '1,/^\.\\" START_DEVICE_LIST marker - do not delete/p' "$(SRCMAN)"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ $(SED) -e '1,/^[ ]*\/\* START_DEVICE_LIST marker - do not delete \*\/ *$$/d' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e '/^[ ]*\/\* END_DEVICE_LIST marker - do not delete \*\/ *$$/,$$d' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e '/^[ ]\{1,\}xf86Msg(X_NONE,/d' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e '/^[ ]\{1,\}\/\*/d' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*;\)\\n"$$/.TP 8\n.B \1\n\2/' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\\t\(.*\)\.\\n"\();\)\{0,1\}$$/\1/' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*\)\.\\n"\();\)\{0,1\}$$/.TP 8\n.B \1\n\2/' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ "$(srcdir)/rhd_id.c"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ $(SED) -n '/^\.\\" END_DEVICE_LIST marker - do not delete/,$$p' "$(SRCMAN)" \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ ) > radeonhd.man.new
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@README.new: rhd_id.c $(top_srcdir)/README
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ echo "Generating README.new..."; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ ( $(SED) -n '1,/^BEGIN_DEVICE_LIST$$/p' "$(SRCREADME)"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ $(SED) -e '1,/^[ ]*\/\* START_DEVICE_LIST marker - do not delete \*\/ *$$/d' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e '/^[ ]*\/\* END_DEVICE_LIST marker - do not delete \*\/ *$$/,$$d' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e '/^[ ]\{1,\}xf86Msg(X_NONE,/d' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e '/^[ ]\{1,\}\/\*/d' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*;\)\\n"$$/ * \1:\t\2/' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\\t\(.*\)\.\\n"\();\)\{0,1\}$$/ \t\1/' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*\)\.\\n"\();\)\{0,1\}$$/ * \1:\t\2/' \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ "$(srcdir)/rhd_id.c"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ $(SED) -n '/^END_DEVICE_LIST$$/,$$p' "$(SRCREADME)" \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ ) > README.new
# Update man page and README from rhd_id.c RHDIdentify() output.
# The exit(1) makes sure the updates do not go unnoticed.
-@MAINTAINER_MODE_TRUE@all-local: radeonhd.man.new README.new
-@MAINTAINER_MODE_TRUE@ @changed=""; \
-@MAINTAINER_MODE_TRUE@ if diff -u "$(SRCMAN)" radeonhd.man.new; then \
-@MAINTAINER_MODE_TRUE@ echo "radeon(4) man page is current."; \
-@MAINTAINER_MODE_TRUE@ else \
-@MAINTAINER_MODE_TRUE@ changed="$$changed $(SRCMAN)"; \
-@MAINTAINER_MODE_TRUE@ mv -f radeonhd.man.new "$(SRCMAN)"; \
-@MAINTAINER_MODE_TRUE@ fi; \
-@MAINTAINER_MODE_TRUE@ if diff -u "$(SRCREADME)" README.new; then \
-@MAINTAINER_MODE_TRUE@ echo "README file is current."; \
-@MAINTAINER_MODE_TRUE@ else \
-@MAINTAINER_MODE_TRUE@ changed="$$changed $(SRCREADME)"; \
-@MAINTAINER_MODE_TRUE@ mv -f README.new "$(SRCREADME)"; \
-@MAINTAINER_MODE_TRUE@ fi; \
-@MAINTAINER_MODE_TRUE@ if test "x$$changed" = "x"; then :; else \
-@MAINTAINER_MODE_TRUE@ echo "WARNING: Due to changes to src/rhd_id.c, some files differ from the original ones."; \
-@MAINTAINER_MODE_TRUE@ echo " Please verify the changes to the following files"; \
-@MAINTAINER_MODE_TRUE@ for f in $$changed; do echo " $$f"; done; \
-@MAINTAINER_MODE_TRUE@ echo " and commit them together with your changes to"; \
-@MAINTAINER_MODE_TRUE@ echo " $(srcdir)/rhd_id.c"; \
-@MAINTAINER_MODE_TRUE@ exit 1; \
-@MAINTAINER_MODE_TRUE@ fi
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@all-local: radeonhd.man.new README.new
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ @changed=""; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ if diff -u "$(SRCMAN)" radeonhd.man.new; then \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ echo "radeon(4) man page is current."; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ else \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ changed="$$changed $(SRCMAN)"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ mv -f radeonhd.man.new "$(SRCMAN)"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ fi; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ if diff -u "$(SRCREADME)" README.new; then \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ echo "README file is current."; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ else \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ changed="$$changed $(SRCREADME)"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ mv -f README.new "$(SRCREADME)"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ fi; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ if test "x$$changed" = "x"; then :; else \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ echo "WARNING: Due to changes to src/rhd_id.c, some files differ from the original ones."; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ echo " Please verify the changes to the following files"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ for f in $$changed; do echo " $$f"; done; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ echo " and commit them together with your changes to"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ echo " $(srcdir)/rhd_id.c"; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ exit 1; \
+@HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@@MAINTAINER_MODE_TRUE@ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/driver/xf86-video-radeonhd/src/git_version.h b/driver/xf86-video-radeonhd/src/git_version.h
index 65e9f0be4..25508ac50 100644
--- a/driver/xf86-video-radeonhd/src/git_version.h
+++ b/driver/xf86-video-radeonhd/src/git_version.h
@@ -1,6 +1,6 @@
/*
* Basic versioning gathered from the git repository.
- * Automatically generated by ../git_version.sh.
+ * Automatically generated by ../../git_version.sh.
*/
#ifndef GIT_VERSION_H
@@ -14,13 +14,13 @@
/* git utilities found */
#undef GIT_NOT_FOUND
-#define GIT_VERSION "git version 1.5.2.4"
+#define GIT_VERSION "git version 1.5.6"
/* git repo found */
#define GIT_REPO 1
/* Git SHA ID of last commit */
-#define GIT_SHAID "9d131f90"
+#define GIT_SHAID "4e897263"
/* Branch this tree is on */
#define GIT_BRANCH "master"
diff --git a/driver/xf86-video-radeonhd/src/r5xx_exa.c b/driver/xf86-video-radeonhd/src/r5xx_exa.c
index 304da0653..848fcb954 100644
--- a/driver/xf86-video-radeonhd/src/r5xx_exa.c
+++ b/driver/xf86-video-radeonhd/src/r5xx_exa.c
@@ -42,6 +42,8 @@
#include "xf86.h"
+#include "exa.h"
+
#if HAVE_XF86_ANSIC_H
# include "xf86_ansic.h"
#else
@@ -53,8 +55,6 @@
#include "r5xx_accel.h"
#include "r5xx_regs.h"
-#include "exa.h"
-
extern struct R5xxRop R5xxRops[];
struct R5xxExaPrivate {
diff --git a/driver/xf86-video-radeonhd/src/r5xx_xaa.c b/driver/xf86-video-radeonhd/src/r5xx_xaa.c
index 1c352139d..bcfaca9aa 100644
--- a/driver/xf86-video-radeonhd/src/r5xx_xaa.c
+++ b/driver/xf86-video-radeonhd/src/r5xx_xaa.c
@@ -1032,10 +1032,6 @@ R5xxXAAFBInit(ScrnInfoPtr pScrn, ScreenPtr pScreen)
can only use 8191 lines anyway. */
if (tmp > 0x1FFF)
tmp = 0x1FFF;
- /* FIXME: currently always allocate for maximum (dri: backbuffer)
- * This probably breaks backbuffers, but allows for
- * easier back-to-front/front-to-back blits. See rhd_dri.c: backY/X */
- tmp = 0x1FFF;
AvailFBArea.x1 = 0;
AvailFBArea.y1 = 0;
diff --git a/driver/xf86-video-radeonhd/src/rhd.h b/driver/xf86-video-radeonhd/src/rhd.h
index c8d7818de..130877f65 100644
--- a/driver/xf86-video-radeonhd/src/rhd.h
+++ b/driver/xf86-video-radeonhd/src/rhd.h
@@ -90,6 +90,11 @@ enum RHD_CHIPSETS {
RHD_M86,
RHD_RS780,
RHD_RV770,
+ RHD_R700,
+ RHD_M98,
+ RHD_RV730,
+ RHD_M96,
+ RHD_RV710,
RHD_CHIP_END
};
@@ -171,7 +176,7 @@ typedef struct _rhdI2CRec *rhdI2CPtr;
typedef struct _atomBiosHandle *atomBiosHandlePtr;
typedef struct _rhdShadowRec *rhdShadowPtr;
-typedef struct _RHDopt {
+typedef struct RHDOpt {
Bool set;
union {
Bool bool;
@@ -222,6 +227,9 @@ typedef struct RHDRec {
RHDOpt tvModeName;
RHDOpt scaleTypeOpt;
RHDOpt unverifiedFeatures;
+ RHDOpt audio;
+ RHDOpt hdmi;
+ RHDOpt coherent;
enum RHD_HPD_USAGE hpdUsage;
unsigned int FbMapSize;
pointer FbBase; /* map base of fb */
@@ -229,6 +237,8 @@ typedef struct RHDRec {
unsigned int FbIntAddress; /* card internal address of FB */
unsigned int FbPCIAddress; /* physical address of FB */
+ Bool directRenderingEnabled;
+
/* Some simplistic memory handling */
#define ALIGN(x,align) (((x)+(align)-1)&~((align)-1))
#define RHD_FB_ALIGNMENT 0x1000
@@ -270,6 +280,7 @@ typedef struct RHDRec {
struct rhdVGA *VGA; /* VGA compatibility HW */
struct rhdCrtc *Crtc[2];
struct rhdPLL *PLLs[2]; /* Pixelclock PLLs */
+ struct rhdAudio *Audio;
struct rhdLUTStore *LUTStore;
struct rhdLUT *LUT[2];
@@ -312,6 +323,8 @@ typedef struct RHDRec {
/* AtomBIOS usage */
RHDOpt UseAtomBIOS;
CARD32 UseAtomFlags;
+
+ struct rhdOutput *DigEncoderOutput[2];
} RHDRec, *RHDPtr;
#define RHDPTR(p) ((RHDPtr)((p)->driverPrivate))
@@ -333,11 +346,18 @@ enum atomSubSystem {
atomUsageAny
};
+enum rhdOptStatus {
+ RHD_OPTION_NOT_SET,
+ RHD_OPTION_DEFAULT,
+ RHD_OPTION_OFF,
+ RHD_OPTION_ON
+};
+
/* rhd_driver.c */
/* Some handy functions that makes life so much more readable */
extern unsigned int RHDReadPCIBios(RHDPtr rhdPtr, unsigned char **prt);
extern Bool RHDScalePolicy(struct rhdMonitor *Monitor, struct rhdConnector *Connector);
-extern void RHDAllIdle(ScrnInfoPtr pScrn);
+extern void RHDPrepareMode(RHDPtr rhdPtr);
extern Bool RHDUseAtom(RHDPtr rhdPtr, enum RHD_CHIPSETS *BlackList, enum atomSubSystem subsys);
extern CARD32 _RHDRegRead(int scrnIndex, CARD16 offset);
@@ -372,6 +392,7 @@ void RhdGetOptValFreq(const OptionInfoRec *table, int token,
OptFreqUnits expectedUnits, RHDOptPtr optp, double def);
void RhdGetOptValString(const OptionInfoRec *table, int token,
RHDOptPtr optp, char *def);
+enum rhdOptStatus RhdParseBooleanOption(struct RHDOpt *Option, char *Name);
char *RhdAppendString(char *s1, const char *s2);
void RhdAssertFailed(const char *str,
const char *file, int line, const char *func) NORETURN;
diff --git a/driver/xf86-video-radeonhd/src/rhd_atombios.c b/driver/xf86-video-radeonhd/src/rhd_atombios.c
index 46569ecdd..208f86885 100644
--- a/driver/xf86-video-radeonhd/src/rhd_atombios.c
+++ b/driver/xf86-video-radeonhd/src/rhd_atombios.c
@@ -849,6 +849,10 @@ rhdAtomSetTVEncoder(atomBiosHandlePtr handle, Bool enable, int mode)
/*
*
*/
+#if (ATOM_TRANSMITTER_CONFIG_COHERENT != ATOM_TRANSMITTER_CONFIG_V2_COHERENT)
+# error
+#endif
+
Bool
rhdAtomDigTransmitterControl(atomBiosHandlePtr handle, enum atomTransmitter id,
enum atomTransmitterAction action, struct atomTransmitterConfig *config)
@@ -856,6 +860,7 @@ rhdAtomDigTransmitterControl(atomBiosHandlePtr handle, enum atomTransmitter id,
DIG_TRANSMITTER_CONTROL_PARAMETERS Transmitter;
AtomBiosArgRec data;
char *name = NULL;
+ struct atomCodeTableVersion version;
RHDFUNC(handle);
@@ -909,64 +914,128 @@ rhdAtomDigTransmitterControl(atomBiosHandlePtr handle, enum atomTransmitter id,
switch (id) {
case atomTransmitterDIG1:
case atomTransmitterUNIPHY:
+ case atomTransmitterUNIPHY1:
+ case atomTransmitterUNIPHY2:
case atomTransmitterPCIEPHY:
- switch (config->Link) {
- case atomTransLinkA:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKA;
- break;
- case atomTransLinkAB:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKA_B;
- break;
- case atomTransLinkB:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKB;
- break;
- case atomTransLinkBA:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKB_A;
- break;
- }
- switch (config->Encoder) {
- case atomEncoderDIG1:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER;
+ data.exec.index = GetIndexIntoMasterTable(COMMAND, UNIPHYTransmitterControl);
+ name = "UNIPHYTransmitterControl";
+
+ rhdAtomGetCommandTableRevisionSize(handle, data.exec.index, &version.cref, &version.fref, NULL);
+
+ if (version.fref > 1 || version.cref > 2)
+ return FALSE;
+
+ switch (version.cref) {
+ case 1:
+
+ switch (config->Link) {
+ case atomTransLinkA:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKA;
+ break;
+ case atomTransLinkAB:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKA_B;
+ break;
+ case atomTransLinkB:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKB;
+ break;
+ case atomTransLinkBA:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKB_A;
+ break;
+ }
+ switch (config->Encoder) {
+ case atomEncoderDIG1:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER;
+ break;
+ case atomEncoderDIG2:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER;
+ break;
+ default:
+ xf86DrvMsg(handle->scrnIndex, X_ERROR,
+ "%s called with invalid encoder %x for DIG transmitter\n",
+ __func__, config->Encoder);
+ return FALSE;
+ }
+ if (id == atomTransmitterPCIEPHY) {
+ switch (config->Lanes) {
+ case atomPCIELaneNONE:
+ Transmitter.ucConfig |= 0;
+ break;
+ case atomPCIELane0_3:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_3;
+ break;
+ case atomPCIELane0_7:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_7;
+ break;
+ case atomPCIELane4_7:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_4_7;
+ break;
+ case atomPCIELane8_11:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_11;
+ break;
+ case atomPCIELane8_15:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_15;
+ break;
+ case atomPCIELane12_15:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_12_15;
+ break;
+ }
+ /* According to ATI this is the only one used so far */
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL;
+ }
break;
+ case 2:
+ if (id == atomTransmitterPCIEPHY) {
+ xf86DrvMsg(handle->scrnIndex, X_ERROR,
+ "%s PCIPHY not valid for DCE 3.2\n",
+ __func__);
+ return FALSE;
+ }
+ switch (config->Link) {
+ case atomTransLinkA:
+ case atomTransLinkAB:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_V2_LINKA;
+ break;
+ case atomTransLinkB:
+ case atomTransLinkBA:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_V2_LINKB;
+ break;
+ default:
+ xf86DrvMsg(handle->scrnIndex, X_ERROR,
+ "%s called with invalid transmitter link selection %x for DIG transmitter\n",
+ __func__, config->Link);
+ return FALSE;
+ }
+ switch (config->Encoder) {
+ case atomEncoderDIG1:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_V2_DIG1_ENCODER;
+ break;
+ case atomEncoderDIG2:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_V2_DIG2_ENCODER;
+ break;
+ default:
+ xf86DrvMsg(handle->scrnIndex, X_ERROR,
+ "%s called with invalid encoder %x for DIG transmitter\n",
+ __func__, config->Encoder);
+ return FALSE;
+ }
+ switch (id) {
+ case atomTransmitterUNIPHY:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER1;
+ break;
+ case atomTransmitterUNIPHY1:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER2;
+ break;
+ case atomTransmitterUNIPHY2:
+ Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER3;
+ break;
+ default:
+ break;
+ }
- case atomEncoderDIG2:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER;
+ if (config->Mode == atomDP)
+ Transmitter.ucConfig |= ATOM_TRASMITTER_CONFIG_V2_DP_CONNECTOR;
break;
- default:
- xf86DrvMsg(handle->scrnIndex, X_ERROR,
- "%s called with invalid encoder %x for DIG transmitter\n",
- __func__, config->Encoder);
- return FALSE;
}
- if (id == atomTransmitterPCIEPHY) {
- switch (config->Lanes) {
- case atomPCIELaneNONE:
- Transmitter.ucConfig |= 0;
- break;
- case atomPCIELane0_3:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_3;
- break;
- case atomPCIELane0_7:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_7;
- break;
- case atomPCIELane4_7:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_4_7;
- break;
- case atomPCIELane8_11:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_11;
- break;
- case atomPCIELane8_15:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_15;
- break;
- case atomPCIELane12_15:
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_12_15;
- break;
- }
- /* According to ATI this is the only one used so far */
- Transmitter.ucConfig |= ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL;
- }
- data.exec.index = GetIndexIntoMasterTable(COMMAND, UNIPHYTransmitterControl);
- name = "UNIPHYTransmitterControl";
break;
@@ -1240,6 +1309,8 @@ AtomDACLoadDetection(atomBiosHandlePtr handle, enum atomDevice Device, enum atom
case atomLCD2:
case atomDFP2:
case atomDFP3:
+ case atomDFP4:
+ case atomDFP5:
case atomNone:
xf86DrvMsg(handle->scrnIndex, X_ERROR, "Unsupported device for load detection.\n");
return FALSE;
@@ -1506,6 +1577,7 @@ rhdAtomEncoderControl(atomBiosHandlePtr handle, enum atomEncoder EncoderId,
case atomEncoderExternal:
{
DIG_ENCODER_CONTROL_PARAMETERS *dig = &ps.dig;
+ struct atomCodeTableVersion version;
if (EncoderId == atomEncoderDIG1) {
name = "DIG1EncoderControl";
@@ -1517,35 +1589,87 @@ rhdAtomEncoderControl(atomBiosHandlePtr handle, enum atomEncoder EncoderId,
name = "ExternalEncoderControl";
data.exec.index = GetIndexIntoMasterTable(COMMAND, ExternalEncoderControl);
}
+ rhdAtomGetCommandTableRevisionSize(handle, data.exec.index, &version.cref, &version.fref, NULL);
+ if (version.fref > 1 || version.cref > 2)
+ return FALSE;
dig->ucConfig = 0;
- switch (Config->u.dig.Link) {
- case atomTransLinkA:
- dig->ucConfig |= ATOM_ENCODER_CONFIG_LINKA;
- break;
- case atomTransLinkAB:
- dig->ucConfig |= ATOM_ENCODER_CONFIG_LINKA_B;
- break;
- case atomTransLinkB:
- dig->ucConfig |= ATOM_ENCODER_CONFIG_LINKB;
+ switch (version.cref) {
+ case 1:
+ switch (Config->u.dig.Link) {
+ case atomTransLinkA:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_LINKA;
+ break;
+ case atomTransLinkAB:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_LINKA_B;
+ break;
+ case atomTransLinkB:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_LINKB;
+ break;
+ case atomTransLinkBA:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_LINKB_A;
+ break;
+ }
+
+ if (EncoderId != atomEncoderExternal) {
+ switch (Config->u.dig.Transmitter) {
+ case atomTransmitterUNIPHY:
+ case atomTransmitterPCIEPHY:
+ case atomTransmitterDIG1:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_UNIPHY;
+ break;
+ case atomTransmitterLVTMA:
+ case atomTransmitterDIG2:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_LVTMA;
+ break;
+ /*
+ * these are not DCE3.0 but we need them here as DIGxEncoderControl tables for
+ * DCE3.2 still report cref 1.
+ */
+ case atomTransmitterUNIPHY1:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_V2_TRANSMITTER2;
+ break;
+ case atomTransmitterUNIPHY2:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_V2_TRANSMITTER3;
+ break;
+ default:
+ xf86DrvMsg(handle->scrnIndex, X_ERROR, "%s: Invalid Transmitter for DCE3.0: %x\n",
+ __func__, Config->u.dig.Transmitter);
+ return FALSE;
+ }
+ }
break;
- case atomTransLinkBA:
- dig->ucConfig |= ATOM_ENCODER_CONFIG_LINKB_A;
+
+ case 2:
+ switch (Config->u.dig.Link) {
+ case atomTransLinkA:
+ case atomTransLinkAB:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_V2_LINKA;
+ break;
+ case atomTransLinkB:
+ case atomTransLinkBA:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_V2_LINKB;
+ break;
+ }
+ switch (Config->u.dig.Transmitter) {
+ case atomTransmitterUNIPHY:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_UNIPHY;
+ break;
+ case atomTransmitterUNIPHY1:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_V2_TRANSMITTER2;
+ break;
+ case atomTransmitterUNIPHY2:
+ dig->ucConfig |= ATOM_ENCODER_CONFIG_V2_TRANSMITTER3;
+ break;
+ default:
+ xf86DrvMsg(handle->scrnIndex, X_ERROR, "%s: Invalid Encoder for DCE3.2: %x\n",
+ __func__, Config->u.dig.Transmitter);
+ return FALSE;
+ }
break;
- }
- if (EncoderId != atomEncoderExternal) {
- switch (Config->u.dig.Transmitter) {
- case atomTransmitterUNIPHY:
- case atomTransmitterPCIEPHY:
- case atomTransmitterDIG1:
- dig->ucConfig |= ATOM_ENCODER_CONFIG_UNIPHY;
- break;
- case atomTransmitterLVTMA:
- case atomTransmitterDIG2:
- dig->ucConfig |= ATOM_ENCODER_CONFIG_LVTMA;
- break;
- }
+ default:
+ return FALSE;
}
switch (Config->u.dig.EncoderMode) {
@@ -1599,9 +1723,9 @@ rhdAtomEncoderControl(atomBiosHandlePtr handle, enum atomEncoder EncoderId,
case atomEncoderDVO:
name = "DVOEncoderControl";
data.exec.index = GetIndexIntoMasterTable(COMMAND, DVOEncoderControl);
- if (!rhdAtomGetCommandTableRevisionSize(handle, data.exec.index, &version, NULL, NULL))
+ if (!rhdAtomGetCommandTableRevisionSize(handle, data.exec.index, &version.cref, NULL, NULL))
return FALSE;
- switch (version) {
+ switch (version.cref) {
case 1:
case 2:
{
@@ -1619,6 +1743,8 @@ rhdAtomEncoderControl(atomBiosHandlePtr handle, enum atomEncoder EncoderId,
case atomDFP1:
case atomDFP2:
case atomDFP3:
+ case atomDFP4:
+ case atomDFP5:
dvo->ucDeviceType = ATOM_DEVICE_DFP1_INDEX;
break;
case atomTV1:
@@ -1714,6 +1840,8 @@ rhdAtomEncoderControl(atomBiosHandlePtr handle, enum atomEncoder EncoderId,
}
break;
}
+ case atomEncoderNone:
+ return FALSE;
}
data.exec.dataSpace = NULL;
@@ -2167,7 +2295,7 @@ rhdAtomBlankCRTC(atomBiosHandlePtr handle, enum atomCrtc id, struct atomCrtcBlan
xf86DrvMsg(handle->scrnIndex, X_INFO, "BlankCRTC Successful\n");
return TRUE;
}
- xf86DrvMsg(handle->scrnIndex, X_INFO, "SetCRTC_OverScan Failed\n");
+ xf86DrvMsg(handle->scrnIndex, X_INFO, "BlankCRTC Failed\n");
return FALSE;
}
@@ -2212,6 +2340,10 @@ atomGetDevice(atomBiosHandlePtr handle, enum atomDevice Device)
return ATOM_DEVICE_CV_INDEX;
case atomDFP3:
return ATOM_DEVICE_DFP3_INDEX;
+ case atomDFP4:
+ return ATOM_DEVICE_DFP4_INDEX;
+ case atomDFP5:
+ return ATOM_DEVICE_DFP5_INDEX;
case atomNone:
xf86DrvMsg(handle->scrnIndex, X_ERROR, "Invalid Device\n");
return ATOM_MAX_SUPPORTED_DEVICE;
@@ -2340,6 +2472,17 @@ rhdAtomSetPixelClock(atomBiosHandlePtr handle, enum atomPxclk PCLKId, struct ato
ps.pclk_v3.ucTransmitterId = ENCODER_OBJECT_ID_INTERNAL_UNIPHY;
NeedMode = TRUE;
break;
+ case atomOutputUniphyC:
+ case atomOutputUniphyD:
+ ps.pclk_v3.ucTransmitterId = ENCODER_OBJECT_ID_INTERNAL_UNIPHY1;
+ NeedMode = TRUE;
+ break;
+ case atomOutputUniphyE:
+ case atomOutputUniphyF:
+ ps.pclk_v3.ucTransmitterId = ENCODER_OBJECT_ID_INTERNAL_UNIPHY2;
+ NeedMode = TRUE;
+ break;
+
case atomOutputDacA:
ps.pclk_v3.ucTransmitterId = ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1;
break;
@@ -2497,6 +2640,12 @@ rhdAtomSelectCrtcSource(atomBiosHandlePtr handle, enum atomCrtc CrtcId,
case atomDFP3:
ps.crtc.ucDevice = ATOM_DEVICE_DFP3_INDEX;
break;
+ case atomDFP4:
+ ps.crtc.ucDevice = ATOM_DEVICE_DFP4_INDEX;
+ break;
+ case atomDFP5:
+ ps.crtc.ucDevice = ATOM_DEVICE_DFP5_INDEX;
+ break;
case atomNone:
return FALSE;
}
@@ -2537,6 +2686,7 @@ rhdAtomSelectCrtcSource(atomBiosHandlePtr handle, enum atomCrtc CrtcId,
case atomEncoderTMDS1:
case atomEncoderTMDS2:
case atomEncoderLVDS:
+ case atomEncoderNone:
return FALSE;
}
if (NeedMode) {
@@ -3741,7 +3891,9 @@ static const struct _rhd_encoders
{ "AN9801", { RHD_OUTPUT_NONE, RHD_OUTPUT_NONE }},
{ "DP501", { RHD_OUTPUT_NONE, RHD_OUTPUT_NONE }},
{ "UNIPHY", { RHD_OUTPUT_UNIPHYA, RHD_OUTPUT_UNIPHYB }},
- { "KLDSCP_LVTMA", { RHD_OUTPUT_KLDSKP_LVTMA, RHD_OUTPUT_NONE }}
+ { "KLDSCP_LVTMA", { RHD_OUTPUT_KLDSKP_LVTMA, RHD_OUTPUT_NONE }},
+ { "UNIPHY1", { RHD_OUTPUT_UNIPHYC, RHD_OUTPUT_UNIPHYD }},
+ { "UNIPHY2", { RHD_OUTPUT_UNIPHYE, RHD_OUTPUT_UNIPHYF }}
};
static const int n_rhd_encoders = sizeof (rhd_encoders) / sizeof(struct _rhd_encoders);
@@ -3784,11 +3936,13 @@ static const struct _rhd_devices
{" TV2", { RHD_OUTPUT_NONE, RHD_OUTPUT_NONE }, atomTV2 },
{" DFP2", { RHD_OUTPUT_LVTMA, RHD_OUTPUT_DVO }, atomDFP2 },
{" CV", { RHD_OUTPUT_NONE, RHD_OUTPUT_NONE }, atomCV },
- {" DFP3", { RHD_OUTPUT_LVTMA, RHD_OUTPUT_LVTMA }, atomDFP3 }
+ {" DFP3", { RHD_OUTPUT_LVTMA, RHD_OUTPUT_LVTMA }, atomDFP3 },
+ {" DFP4", { RHD_OUTPUT_NONE, RHD_OUTPUT_NONE }, atomDFP4 },
+ {" DFP5", { RHD_OUTPUT_NONE, RHD_OUTPUT_NONE }, atomDFP5 }
};
static const int n_rhd_devices = sizeof(rhd_devices) / sizeof(struct _rhd_devices);
-static const rhdDDC hwddc[] = { RHD_DDC_0, RHD_DDC_1, RHD_DDC_2, RHD_DDC_3 };
+static const rhdDDC hwddc[] = { RHD_DDC_0, RHD_DDC_1, RHD_DDC_2, RHD_DDC_3, RHD_DDC_4 };
static const int n_hwddc = sizeof(hwddc) / sizeof(rhdDDC);
static const rhdOutputType acc_dac[] = { RHD_OUTPUT_NONE, RHD_OUTPUT_DACA,
@@ -3811,11 +3965,11 @@ rhdAtomInterpretObjectID(atomBiosHandlePtr handle,
switch (*obj_type) {
case GRAPH_OBJECT_TYPE_CONNECTOR:
- if (!Limit(*obj_id, n_rhd_connector_objs, "obj_id"))
+ if (!Limit(*obj_id, n_rhd_connector_objs, "connector_obj"))
*name = rhd_connector_objs[*obj_id].name;
break;
case GRAPH_OBJECT_TYPE_ENCODER:
- if (!Limit(*obj_id, n_rhd_encoders, "obj_id"))
+ if (!Limit(*obj_id, n_rhd_encoders, "encoder_obj"))
*name = rhd_encoders[*obj_id].name;
break;
default:
diff --git a/driver/xf86-video-radeonhd/src/rhd_atombios.h b/driver/xf86-video-radeonhd/src/rhd_atombios.h
index 3d677d714..e960db3c7 100644
--- a/driver/xf86-video-radeonhd/src/rhd_atombios.h
+++ b/driver/xf86-video-radeonhd/src/rhd_atombios.h
@@ -174,7 +174,9 @@ enum atomDevice {
atomTV2, /* 7 */
atomDFP2, /* 8 */
atomCV, /* 9 */
- atomDFP3 /* a */
+ atomDFP3, /* a */
+ atomDFP4, /* b */
+ atomDFP5 /* c */
};
typedef struct AtomGoldenSettings
@@ -227,6 +229,8 @@ enum atomOutputLinks {
enum atomTransmitter {
atomTransmitterLVTMA,
atomTransmitterUNIPHY,
+ atomTransmitterUNIPHY1,
+ atomTransmitterUNIPHY2,
atomTransmitterPCIEPHY,
atomTransmitterDIG1,
atomTransmitterDIG2
@@ -245,6 +249,7 @@ enum atomTransmitterAction {
};
enum atomEncoder {
+ atomEncoderNone,
atomEncoderDACA,
atomEncoderDACB,
atomEncoderTV,
@@ -295,7 +300,11 @@ enum atomOutputType {
atomOutputDvo,
atomOutputKldskpLvtma,
atomOutputUniphyA,
- atomOutputUniphyB
+ atomOutputUniphyB,
+ atomOutputUniphyC,
+ atomOutputUniphyD,
+ atomOutputUniphyE,
+ atomOutputUniphyF
};
enum atomOutputAction {
diff --git a/driver/xf86-video-radeonhd/src/rhd_atomout.c b/driver/xf86-video-radeonhd/src/rhd_atomout.c
index 4ce7cb9f1..5d6a66a8d 100644
--- a/driver/xf86-video-radeonhd/src/rhd_atomout.c
+++ b/driver/xf86-video-radeonhd/src/rhd_atomout.c
@@ -45,6 +45,7 @@
#include "rhd_atombios.h"
#include "rhd_atomout.h"
#include "rhd_biosscratch.h"
+#include "rhd_hdmi.h"
#if defined (ATOM_BIOS) && defined (ATOM_BIOS_PARSER)
struct rhdAtomOutputPrivate {
@@ -77,6 +78,7 @@ struct rhdAtomOutputPrivate {
Bool Coherent;
DisplayModePtr Mode;
+ struct rhdHdmi *Hdmi;
int BlLevel;
};
@@ -120,6 +122,8 @@ rhdSetEncoderTransmitterConfig(struct rhdOutput *Output, int PixelClock)
case atomDFP2:
case atomLCD2:
case atomDFP3:
+ case atomDFP4:
+ case atomDFP5:
EncoderConfig->u.dvo.digital = TRUE;
/* @@@ no digital attributes, yet */
break;
@@ -203,6 +207,10 @@ rhdSetEncoderTransmitterConfig(struct rhdOutput *Output, int PixelClock)
case RHD_OUTPUT_KLDSKP_LVTMA:
case RHD_OUTPUT_UNIPHYA:
case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
if (Output->Connector && PixelClock > 0) {
if (Output->Connector->Type == RHD_CONNECTOR_DVI
#if 0
@@ -250,6 +258,10 @@ atomSetBacklightFromBIOSScratch(struct rhdOutput *Output)
case RHD_OUTPUT_KLDSKP_LVTMA:
case RHD_OUTPUT_UNIPHYA:
case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
rhdSetEncoderTransmitterConfig(Output, Private->PixelClock);
if (!rhdAtomDigTransmitterControl(rhdPtr->atomBIOS, Private->TransmitterId,
atomTransLcdBlBrightness, &Private->TransmitterConfig))
@@ -315,7 +327,11 @@ rhdAtomOutputSet(struct rhdOutput *Output, DisplayModePtr Mode)
switch (Output->Id) {
case RHD_OUTPUT_UNIPHYA:
case RHD_OUTPUT_UNIPHYB:
-#if 0
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
+#if 1
rhdAtomDigTransmitterControl(rhdPtr->atomBIOS, Private->TransmitterId, atomTransInit,
&Private->TransmitterConfig);
#endif
@@ -330,6 +346,7 @@ rhdAtomOutputSet(struct rhdOutput *Output, DisplayModePtr Mode)
rhdAtomSelectCrtcSource(rhdPtr->atomBIOS, Output->Crtc->Id ? atomCrtc2 : atomCrtc1, &CrtcSourceConfig);
data.Address = NULL;
RHDAtomBiosFunc(Output->scrnIndex, rhdPtr->atomBIOS, ATOM_SET_REGISTER_LIST_LOCATION, &data);
+ RHDHdmiSetMode(Private->Hdmi, Mode);
}
/*
@@ -342,9 +359,39 @@ rhdAtomOutputPower(struct rhdOutput *Output, int Power)
struct rhdAtomOutputPrivate *Private = (struct rhdAtomOutputPrivate *) Output->Private;
struct atomEncoderConfig *EncoderConfig = &Private->EncoderConfig;
union AtomBiosArg data;
+ Bool enableHDMI = FALSE;
RHDFUNC(Output);
+ if(Output->Connector != NULL) {
+ enableHDMI = RHDConnectorEnableHDMI(Output->Connector);
+ switch(Output->Id) {
+ case RHD_OUTPUT_TMDSA:
+ case RHD_OUTPUT_LVTMA:
+ if(enableHDMI && !Private->EncoderConfig.u.lvds2.Hdmi)
+ Private->EncoderConfig.u.lvds2.Hdmi = TRUE;
+ else if(!enableHDMI && Private->EncoderConfig.u.lvds2.Hdmi)
+ Private->EncoderConfig.u.lvds2.Hdmi = FALSE;
+ break;
+
+ case RHD_OUTPUT_UNIPHYA:
+ case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_KLDSKP_LVTMA:
+ if(enableHDMI && Private->TransmitterConfig.Mode == atomDVI) {
+ Private->TransmitterConfig.Mode = atomHDMI;
+ Private->EncoderConfig.u.dig.EncoderMode = atomHDMI;
+
+ } else if(!enableHDMI && Private->TransmitterConfig.Mode == atomHDMI) {
+ Private->TransmitterConfig.Mode = atomDVI;
+ Private->EncoderConfig.u.dig.EncoderMode = atomDVI;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
data.Address = &Private->Save;
RHDAtomBiosFunc(Output->scrnIndex, rhdPtr->atomBIOS, ATOM_SET_REGISTER_LIST_LOCATION, &data);
@@ -358,6 +405,10 @@ rhdAtomOutputPower(struct rhdOutput *Output, int Power)
case RHD_OUTPUT_KLDSKP_LVTMA:
case RHD_OUTPUT_UNIPHYA:
case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
if (!rhdAtomDigTransmitterControl(rhdPtr->atomBIOS, Private->TransmitterId,
atomTransEnable, &Private->TransmitterConfig)) {
ERROR_MSG("rhdAtomDigTransmitterControl(atomTransEnable)");
@@ -372,6 +423,7 @@ rhdAtomOutputPower(struct rhdOutput *Output, int Power)
ERROR_MSG("rhdAtomOutputControl(atomOutputEnable)");
break;
}
+ RHDHdmiEnable(Private->Hdmi, enableHDMI);
break;
case RHD_POWER_RESET:
RHDDebug(Output->scrnIndex, "RHD_POWER_RESET\n");
@@ -379,6 +431,10 @@ rhdAtomOutputPower(struct rhdOutput *Output, int Power)
case RHD_OUTPUT_KLDSKP_LVTMA:
case RHD_OUTPUT_UNIPHYA:
case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
if (!rhdAtomDigTransmitterControl(rhdPtr->atomBIOS, Private->TransmitterId,
atomTransDisableOutput, &Private->TransmitterConfig))
ERROR_MSG("rhdAtomDigTransmitterControl(atomTransDisableOutput)");
@@ -395,6 +451,12 @@ rhdAtomOutputPower(struct rhdOutput *Output, int Power)
case RHD_OUTPUT_KLDSKP_LVTMA:
case RHD_OUTPUT_UNIPHYA:
case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
+ if (Private->EncoderId == atomEncoderNone)
+ break;
if (!rhdAtomDigTransmitterControl(rhdPtr->atomBIOS, Private->TransmitterId,
atomTransDisableOutput, &Private->TransmitterConfig)) {
ERROR_MSG("rhdAtomDigTransmitterControl(atomTransDisableOutput)");
@@ -409,8 +471,10 @@ rhdAtomOutputPower(struct rhdOutput *Output, int Power)
ERROR_MSG("rhdAtomOutputControl(atomOutputDisable)");
break;
}
- if (!rhdAtomEncoderControl(rhdPtr->atomBIOS, Private->EncoderId, atomEncoderOff, &Private->EncoderConfig))
- ERROR_MSG("rhdAtomEncoderControl(atomEncoderOff)");
+ if (Private->EncoderId != atomEncoderNone)
+ if (!rhdAtomEncoderControl(rhdPtr->atomBIOS, Private->EncoderId, atomEncoderOff, &Private->EncoderConfig))
+ ERROR_MSG("rhdAtomEncoderControl(atomEncoderOff)");
+ RHDHdmiEnable(Private->Hdmi, FALSE);
break;
}
@@ -424,6 +488,8 @@ rhdAtomOutputPower(struct rhdOutput *Output, int Power)
static inline void
rhdAtomOutputSave(struct rhdOutput *Output)
{
+ struct rhdAtomOutputPrivate *Private = (struct rhdAtomOutputPrivate *) Output->Private;
+ RHDHdmiSave(Private->Hdmi);
}
/*
@@ -440,6 +506,7 @@ rhdAtomOutputRestore(struct rhdOutput *Output)
RHDAtomBiosFunc(Output->scrnIndex, rhdPtr->atomBIOS, ATOM_RESTORE_REGISTERS, &data);
if (Output->Connector && Output->Connector->Type == RHD_CONNECTOR_PANEL)
atomSetBacklightFromBIOSScratch(Output);
+ RHDHdmiRestore(Private->Hdmi);
}
/*
@@ -448,6 +515,7 @@ rhdAtomOutputRestore(struct rhdOutput *Output)
static ModeStatus
rhdAtomOutputModeValid(struct rhdOutput *Output, DisplayModePtr Mode)
{
+
RHDFUNC(Output);
if (Mode->Flags & V_INTERLACE)
@@ -456,7 +524,6 @@ rhdAtomOutputModeValid(struct rhdOutput *Output, DisplayModePtr Mode)
if (Mode->Clock < 25000)
return MODE_CLOCK_LOW;
-
if (Output->Connector->Type == RHD_CONNECTOR_DVI_SINGLE
#if 0
|| Output->Connector->Type == RHD_CONNECTOR_DP_DUAL
@@ -548,7 +615,6 @@ TMDSInfoRetrieve(RHDPtr rhdPtr, struct rhdAtomOutputPrivate *Private)
Private->TemporalDither = FALSE;
Private->SpatialDither = FALSE;
Private->GreyLevel = 0;
- Private->Coherent = FALSE;
Private->BlLevel = -1;
return TRUE;
@@ -648,11 +714,14 @@ atomTMDSPropertyControl(struct rhdOutput *Output,
static void
rhdAtomOutputDestroy(struct rhdOutput *Output)
{
+ struct rhdAtomOutputPrivate *Private = (struct rhdAtomOutputPrivate *) Output->Private;
RHDFUNC(Output);
- if (((struct rhdAtomOutputPrivate *)(Output->Private))->Save)
- xfree(((struct rhdAtomOutputPrivate *)(Output->Private))->Save);
- if (Output->Private)
- xfree(Output->Private);
+ if (Private->Save)
+ xfree(Private->Save);
+ RHDHdmiDestroy(Private->Hdmi);
+
+ if (Private)
+ xfree(Private);
Output->Private = NULL;
xfree(Output->Name);
}
@@ -660,6 +729,83 @@ rhdAtomOutputDestroy(struct rhdOutput *Output)
/*
*
*/
+static Bool
+RHDAtomOutputAllocFree(struct rhdOutput *Output, enum rhdOutputAllocation Alloc)
+{
+ struct rhdAtomOutputPrivate *Private = (struct rhdAtomOutputPrivate *) Output->Private;
+ struct atomTransmitterConfig *TransmitterConfig = &Private->TransmitterConfig;
+ RHDPtr rhdPtr = RHDPTRI(Output);
+ char *TransmitterName;
+
+ RHDFUNC(rhdPtr);
+
+ switch (Output->Id) {
+ case RHD_OUTPUT_KLDSKP_LVTMA:
+ TransmitterName = "KLDSKP_LVTMA";
+ break;
+ case RHD_OUTPUT_UNIPHYA:
+ TransmitterName = "KLDSKP_UNIPHYA";
+ break;
+ case RHD_OUTPUT_UNIPHYB:
+ TransmitterName = "KLDSKP_UNIPHYB";
+ break;
+ case RHD_OUTPUT_UNIPHYC:
+ TransmitterName = "KLDSKP_UNIPHYC";
+ break;
+ case RHD_OUTPUT_UNIPHYD:
+ TransmitterName = "KLDSKP_UNIPHYD";
+ break;
+ case RHD_OUTPUT_UNIPHYE:
+ TransmitterName = "KLDSKP_UNIPHYE";
+ break;
+ case RHD_OUTPUT_UNIPHYF:
+ TransmitterName = "KLDSKP_UNIPHYF";
+ break;
+ default:
+ return TRUE;
+ }
+
+ switch (Alloc) {
+ case RHD_OUTPUT_ALLOC:
+ /*
+ * LVTMA can only use DIG2. Thus exclude
+ * DIG1 for LVTMA and prefer it for the
+ * UNIPHYs.
+ */
+ if (Private->EncoderId != atomEncoderNone)
+ return TRUE;
+ if (Output->Id != RHD_OUTPUT_KLDSKP_LVTMA
+ && !rhdPtr->DigEncoderOutput[0]) {
+ rhdPtr->DigEncoderOutput[0] = Output;
+ TransmitterConfig->Encoder = Private->EncoderId = atomEncoderDIG1;
+ xf86DrvMsg(Output->scrnIndex, X_INFO, "Mapping DIG1 encoder to %s\n",TransmitterName);
+ return TRUE;
+ } else if (!rhdPtr->DigEncoderOutput[1]) {
+ rhdPtr->DigEncoderOutput[1] = Output;
+ TransmitterConfig->Encoder = Private->EncoderId = atomEncoderDIG2;
+ xf86DrvMsg(Output->scrnIndex, X_INFO, "Mapping DIG2 encoder to %s\n",TransmitterName);
+ return TRUE;
+ } else
+ return FALSE;
+ case RHD_OUTPUT_FREE:
+ TransmitterConfig->Encoder = Private->EncoderId = atomEncoderNone;
+ if (rhdPtr->DigEncoderOutput[0] == Output) {
+ rhdPtr->DigEncoderOutput[0] = NULL;
+ return TRUE;
+ } else if (rhdPtr->DigEncoderOutput[1] == Output) {
+ rhdPtr->DigEncoderOutput[1] = NULL;
+ return TRUE;
+ } else
+ return FALSE;
+ break;
+ default:
+ return FALSE;
+ }
+}
+
+/*
+ *
+ */
struct rhdOutput *
RHDAtomOutputInit(RHDPtr rhdPtr, rhdConnectorType ConnectorType,
rhdOutputType OutputType)
@@ -699,6 +845,18 @@ RHDAtomOutputInit(RHDPtr rhdPtr, rhdConnectorType ConnectorType,
case RHD_OUTPUT_UNIPHYB:
OutputName = "UniphyB";
break;
+ case RHD_OUTPUT_UNIPHYC:
+ OutputName = "UniphyC";
+ break;
+ case RHD_OUTPUT_UNIPHYD:
+ OutputName = "UniphyD";
+ break;
+ case RHD_OUTPUT_UNIPHYE:
+ OutputName = "UniphyE";
+ break;
+ case RHD_OUTPUT_UNIPHYF:
+ OutputName = "UniphyF";
+ break;
}
Output = xnfcalloc(sizeof(struct rhdOutput), 1);
@@ -725,11 +883,13 @@ RHDAtomOutputInit(RHDPtr rhdPtr, rhdConnectorType ConnectorType,
Output->Sense = RHDBIOSScratchDACSense;
Private->EncoderId = atomEncoderDACA;
Private->OutputControlId = atomDAC1Output;
+ Private->Hdmi = NULL;
break;
case RHD_OUTPUT_DACB:
Output->Sense = RHDBIOSScratchDACSense;
Private->EncoderId = atomEncoderDACB;
Private->OutputControlId = atomDAC2Output;
+ Private->Hdmi = NULL;
break;
case RHD_OUTPUT_TMDSA:
case RHD_OUTPUT_LVTMA:
@@ -755,6 +915,10 @@ RHDAtomOutputInit(RHDPtr rhdPtr, rhdConnectorType ConnectorType,
else
Private->DualLink = FALSE;
+ if (ConnectorType != RHD_CONNECTOR_PANEL)
+ Private->Hdmi = RHDHdmiInit(rhdPtr, Output);
+ else
+ Private->Hdmi = NULL;
Private->EncoderVersion = rhdAtomEncoderControlVersion(rhdPtr->atomBIOS, Private->EncoderId);
switch (Private->EncoderVersion.cref) {
@@ -825,9 +989,9 @@ RHDAtomOutputInit(RHDPtr rhdPtr, rhdConnectorType ConnectorType,
}
break;
case RHD_OUTPUT_KLDSKP_LVTMA:
- Private->EncoderId = atomEncoderDIG2;
Private->EncoderVersion = rhdAtomEncoderControlVersion(rhdPtr->atomBIOS,
Private->EncoderId);
+ Output->AllocFree = RHDAtomOutputAllocFree;
EncoderConfig->u.dig.Link = atomTransLinkA;
EncoderConfig->u.dig.Transmitter = Private->TransmitterId = atomTransmitterLVTMA;
@@ -838,76 +1002,77 @@ RHDAtomOutputInit(RHDPtr rhdPtr, rhdConnectorType ConnectorType,
if (ConnectorType == RHD_CONNECTOR_PANEL) {
TransmitterConfig->Mode = EncoderConfig->u.dig.EncoderMode = atomLVDS;
LVDSInfoRetrieve(rhdPtr, Private);
+ Private->Hdmi = NULL;
} else {
+ int from = X_CONFIG;
TransmitterConfig->Mode = EncoderConfig->u.dig.EncoderMode = atomDVI;
TMDSInfoRetrieve(rhdPtr, Private);
+ switch (RhdParseBooleanOption(&rhdPtr->coherent, Output->Name)) {
+ case RHD_OPTION_NOT_SET:
+ case RHD_OPTION_DEFAULT:
+ from = X_DEFAULT;
+ Private->Coherent = FALSE;
+ break;
+ case RHD_OPTION_ON:
+ Private->Coherent = TRUE;
+ break;
+ case RHD_OPTION_OFF:
+ Private->Coherent = FALSE;
+ break;
+ }
+ xf86DrvMsg(rhdPtr->scrnIndex,from,"Setting %s to %scoherent\n",Output->Name,Private->Coherent ? "" : "in");
+ Private->Hdmi = RHDHdmiInit(rhdPtr, Output);
}
break;
case RHD_OUTPUT_UNIPHYA:
- Private->EncoderId = atomEncoderDIG1;
- EncoderConfig->u.dig.Link = atomTransLinkA;
+ case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
+ Output->AllocFree = RHDAtomOutputAllocFree;
if (RHDIsIGP(rhdPtr->ChipSet))
EncoderConfig->u.dig.Transmitter = Private->TransmitterId = atomTransmitterPCIEPHY;
- else
- EncoderConfig->u.dig.Transmitter = Private->TransmitterId = atomTransmitterUNIPHY;
-
- TransmitterConfig = &Private->TransmitterConfig;
- TransmitterConfig->Link = atomTransLinkA;
- TransmitterConfig->Encoder = Private->EncoderId;
-
- if (RHDIsIGP(rhdPtr->ChipSet)) {
- AtomBiosArgRec data;
- data.val = 1;
- if (RHDAtomBiosFunc(rhdPtr->scrnIndex, rhdPtr->atomBIOS, ATOM_GET_PCIE_LANES,
- &data) == ATOM_SUCCESS)
- TransmitterConfig->Lanes = data.pcieLanes.Chassis;
- /* only do 'chassis' for now */
- else {
- xfree(Private);
- xfree(Output);
- return NULL;
+ else {
+ switch (OutputType) {
+ case RHD_OUTPUT_UNIPHYA:
+ case RHD_OUTPUT_UNIPHYB:
+ EncoderConfig->u.dig.Transmitter = Private->TransmitterId = atomTransmitterUNIPHY;
+ break;
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ EncoderConfig->u.dig.Transmitter = Private->TransmitterId = atomTransmitterUNIPHY1;
+ break;
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
+ EncoderConfig->u.dig.Transmitter = Private->TransmitterId = atomTransmitterUNIPHY2;
+ break;
+ default:
+ xfree(Private);
+ xfree(Output);
+ return NULL;
}
}
- if (ConnectorType == RHD_CONNECTOR_PANEL)
- LVDSInfoRetrieve(rhdPtr, Private);
- else
- TMDSInfoRetrieve(rhdPtr, Private);
-
- switch (ConnectorType) {
- case RHD_CONNECTOR_DVI:
- case RHD_CONNECTOR_DVI_SINGLE:
- TransmitterConfig->Mode = EncoderConfig->u.dig.EncoderMode = atomDVI;
- break;
-#if 0
- case RHD_CONNECTOR_DP:
- case RHD_CONNECTOR_DP_DUAL:
- TransmitterConfig->Mode = EncoderConfig->u.dig.EncoderMode = atomDP;
+ TransmitterConfig = &Private->TransmitterConfig;
+ TransmitterConfig->Encoder = Private->EncoderId = atomEncoderNone;
+ switch (OutputType) {
+ case RHD_OUTPUT_UNIPHYA:
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYE:
+ TransmitterConfig->Link = EncoderConfig->u.dig.Link = atomTransLinkA;
break;
- case RHD_CONNECTOR_HDMI_A:
- case RHD_CONNECTOR_HDMI_B:
- TransmitterConfig->Mode = EncoderConfig->u.dig.EncoderMode = atomHDMI;
+ case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYF:
+ TransmitterConfig->Link = EncoderConfig->u.dig.Link = atomTransLinkB;
break;
-#endif
default:
- xf86DrvMsg(rhdPtr->scrnIndex, X_ERROR, "%s: Unknown connector type\n",__func__);
- xfree(Output);
xfree(Private);
+ xfree(Output);
return NULL;
}
- break;
- case RHD_OUTPUT_UNIPHYB:
- Private->EncoderId = atomEncoderDIG2;
- EncoderConfig->u.dig.Link = atomTransLinkB;
- if (RHDIsIGP(rhdPtr->ChipSet))
- EncoderConfig->u.dig.Transmitter = Private->TransmitterId = atomTransmitterPCIEPHY;
- else
- EncoderConfig->u.dig.Transmitter = Private->TransmitterId = atomTransmitterUNIPHY;
-
- TransmitterConfig = &Private->TransmitterConfig;
- TransmitterConfig->Link = atomTransLinkB;
- TransmitterConfig->Encoder = Private->EncoderId;
if (RHDIsIGP(rhdPtr->ChipSet)) {
AtomBiosArgRec data;
@@ -923,10 +1088,19 @@ RHDAtomOutputInit(RHDPtr rhdPtr, rhdConnectorType ConnectorType,
}
}
+ if (ConnectorType == RHD_CONNECTOR_PANEL)
+ LVDSInfoRetrieve(rhdPtr, Private);
+ else
+ TMDSInfoRetrieve(rhdPtr, Private);
+
switch (ConnectorType) {
case RHD_CONNECTOR_DVI:
case RHD_CONNECTOR_DVI_SINGLE:
TransmitterConfig->Mode = EncoderConfig->u.dig.EncoderMode = atomDVI;
+ Private->Hdmi = RHDHdmiInit(rhdPtr, Output);
+ break;
+ case RHD_CONNECTOR_PANEL:
+ TransmitterConfig->Mode = EncoderConfig->u.dig.EncoderMode = atomLVDS;
break;
#if 0
case RHD_CONNECTOR_DP:
@@ -980,17 +1154,69 @@ RhdAtomSetupBacklightControlProperty(struct rhdOutput *Output,
Bool (**PropertyFunc)(struct rhdOutput *Output,
enum rhdPropertyAction Action,
enum rhdOutputProperty Property,
- union rhdPropertyData *val))
+ union rhdPropertyData *val), void **PrivatePtr)
{
RHDPtr rhdPtr = RHDPTRI(Output);
int BlLevel;
+ struct rhdAtomOutputPrivate *Private;
+ struct atomTransmitterConfig *TransmitterConfig;
RHDFUNC(Output);
+ Private = xnfcalloc(sizeof(struct rhdAtomOutputPrivate), 1);
+
+ switch (Output->Id) {
+ case RHD_OUTPUT_KLDSKP_LVTMA:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
+ /* We set up a those parameters although they may never be needed for BL control */
+ TransmitterConfig = &Private->TransmitterConfig;
+ switch (Output->Id) {
+ case RHD_OUTPUT_KLDSKP_LVTMA:
+ Private->TransmitterId = atomTransmitterLVTMA;
+ break;
+ case RHD_OUTPUT_UNIPHYE:
+ Private->TransmitterId = atomTransmitterUNIPHY2;
+ TransmitterConfig->Link = atomTransLinkA;
+ break;
+ case RHD_OUTPUT_UNIPHYF:
+ Private->TransmitterId = atomTransmitterUNIPHY2;
+ TransmitterConfig->Link = atomTransLinkB;
+ break;
+ default:
+ return 0; /* never get here */
+ }
+ TransmitterConfig = &Private->TransmitterConfig;
+ TransmitterConfig->Mode = atomLVDS;
+ if (rhdPtr->DigEncoderOutput[0] == Output)
+ TransmitterConfig->Encoder = Private->EncoderId = atomEncoderDIG1;
+ else if (rhdPtr->DigEncoderOutput[1] == Output)
+ TransmitterConfig->Encoder = Private->EncoderId = atomEncoderDIG2;
+ else
+ TransmitterConfig->Encoder = Private->EncoderId = atomEncoderNone;
+ LVDSInfoRetrieve(rhdPtr, Private);
+ Private->PixelClock = 0;
+ Private->Hdmi = NULL;
+ break;
+ case RHD_OUTPUT_LVTMA:
+ Private->OutputControlId = atomLCDOutput;
+ break;
+ default:
+ xfree(Private);
+ return 0;
+ }
*PropertyFunc = atomLVDSPropertyControl;
+ *PrivatePtr = Private;
RHDAtomBIOSScratchBlLevel(rhdPtr, rhdBIOSScratchBlGet, &BlLevel);
return BlLevel;
}
+void
+RhdAtomDestroyBacklightControlProperty(struct rhdOutput *Output, void *PrivatePtr)
+{
+ if (PrivatePtr)
+ xfree(PrivatePtr);
+}
+
#endif /* ATOM_BIOS && ATOM_BIOS_PARSER */
diff --git a/driver/xf86-video-radeonhd/src/rhd_atomout.h b/driver/xf86-video-radeonhd/src/rhd_atomout.h
index 01a230a5a..c2bef4af3 100644
--- a/driver/xf86-video-radeonhd/src/rhd_atomout.h
+++ b/driver/xf86-video-radeonhd/src/rhd_atomout.h
@@ -28,7 +28,10 @@
extern int RhdAtomSetupBacklightControlProperty(struct rhdOutput *Output,
Bool (**PropertyFunc)(struct rhdOutput *Output,
- enum rhdPropertyAction Action,
- enum rhdOutputProperty Property,
- union rhdPropertyData *val));
+ enum rhdPropertyAction Action,
+ enum rhdOutputProperty Property,
+ union rhdPropertyData *val),
+ void **PrivatePtr);
+extern void RhdAtomDestroyBacklightControlProperty(struct rhdOutput *Output, void *PrivatePtr);
+
#endif
diff --git a/driver/xf86-video-radeonhd/src/rhd_atompll.c b/driver/xf86-video-radeonhd/src/rhd_atompll.c
index 98ab4e577..1d459848b 100644
--- a/driver/xf86-video-radeonhd/src/rhd_atompll.c
+++ b/driver/xf86-video-radeonhd/src/rhd_atompll.c
@@ -117,6 +117,18 @@ getSetPixelClockParameters(struct rhdPLL *PLL, struct atomPixelClockConfig *Conf
case RHD_OUTPUT_UNIPHYB:
Config->u.v3.OutputType = atomOutputUniphyB;
break;
+ case RHD_OUTPUT_UNIPHYC:
+ Config->u.v3.OutputType = atomOutputUniphyC;
+ break;
+ case RHD_OUTPUT_UNIPHYD:
+ Config->u.v3.OutputType = atomOutputUniphyD;
+ break;
+ case RHD_OUTPUT_UNIPHYE:
+ Config->u.v3.OutputType = atomOutputUniphyE;
+ break;
+ case RHD_OUTPUT_UNIPHYF:
+ Config->u.v3.OutputType = atomOutputUniphyF;
+ break;
case RHD_OUTPUT_DVO:
Config->u.v3.OutputType = atomOutputDvo;
break;
diff --git a/driver/xf86-video-radeonhd/src/rhd_audio.c b/driver/xf86-video-radeonhd/src/rhd_audio.c
new file mode 100644
index 000000000..0709c7672
--- /dev/null
+++ b/driver/xf86-video-radeonhd/src/rhd_audio.c
@@ -0,0 +1,407 @@
+/*
+ * Copyright 2008 Christian König <deathsimple@vodafone.de>
+ * Copyright 2007 Luc Verhaegen <lverhaegen@novell.com>
+ * Copyright 2007 Matthias Hopf <mhopf@novell.com>
+ * Copyright 2007 Egbert Eich <eich@novell.com>
+ * Copyright 2007 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "xf86.h"
+
+#include "rhd.h"
+#include "rhd_connector.h"
+#include "rhd_output.h"
+#include "rhd_audio.h"
+#include "rhd_hdmi.h"
+#include "rhd_regs.h"
+
+#define AUDIO_TIMER_INTERVALL 100 /* 1/10 sekund should be enough */
+
+/*
+ * current number of channels
+ */
+static int
+AudioChannels(struct rhdAudio* Audio)
+{
+ return (RHDRegRead(Audio, AUDIO_RATE_BPS_CHANNEL) & 0x7) + 1;
+}
+
+/*
+ * current bits per sample
+ */
+static int
+AudioBitsPerSample(struct rhdAudio* Audio)
+{
+ CARD32 value = (RHDRegRead(Audio, AUDIO_RATE_BPS_CHANNEL) & 0xF0) >> 4;
+ switch(value)
+ {
+ case 0x0: return 8;
+ case 0x1: return 16;
+ case 0x2: return 20;
+ case 0x3: return 24;
+ case 0x4: return 32;
+ }
+
+ xf86DrvMsg(Audio->scrnIndex, X_WARNING, "%s: unknown bits per sample 0x%x "
+ "using 16 instead.\n", __func__, (int) value);
+
+ return 16;
+}
+
+/*
+ * current sampling rate in HZ
+ */
+static int
+AudioRate(struct rhdAudio* Audio)
+{
+ CARD32 value = RHDRegRead(Audio, AUDIO_RATE_BPS_CHANNEL);
+ CARD32 result;
+
+ if(value & 0x4000)
+ result = 44100;
+ else
+ result = 48000;
+
+ result *= ((value >> 11) & 0x7) + 1;
+ result /= ((value >> 8) & 0x7) + 1;
+
+ return result;
+}
+
+/*
+ * something playing ?
+ */
+static Bool
+AudioPlaying(struct rhdAudio* Audio)
+{
+ return (RHDRegRead(Audio, AUDIO_PLAYING) >> 4) & 1;
+}
+
+/*
+ * iec 60958 status bits
+ */
+static CARD8
+AudioStatusBits(struct rhdAudio* Audio)
+{
+ return RHDRegRead(Audio, AUDIO_STATUS_BITS) & 0xff;
+}
+
+/*
+ * iec 60958 category code
+ */
+static CARD8
+AudioCategoryCode(struct rhdAudio* Audio)
+{
+ return (RHDRegRead(Audio, AUDIO_STATUS_BITS) >> 8) & 0xff;
+}
+
+/*
+ * update all registered hdmi interfaces with current audio parameters
+ */
+static CARD32
+AudioUpdateHdmi(OsTimerPtr timer, CARD32 time, pointer ptr)
+{
+ struct rhdAudio *Audio = (struct rhdAudio*)ptr;
+ Bool playing = AudioPlaying(Audio);
+ int channels = AudioChannels(Audio);
+ int rate = AudioRate(Audio);
+ int bps = AudioBitsPerSample(Audio);
+ CARD8 status_bits = AudioStatusBits(Audio);
+ CARD8 category_code = AudioCategoryCode(Audio);
+
+ struct rhdHdmi* hdmi;
+
+ if(playing != Audio->SavedPlaying ||
+ channels != Audio->SavedChannels ||
+ rate != Audio->SavedRate ||
+ bps != Audio->SavedBitsPerSample ||
+ status_bits != Audio->SavedStatusBits ||
+ category_code != Audio->SavedCategoryCode) {
+
+ Audio->SavedPlaying = playing;
+ Audio->SavedChannels = channels;
+ Audio->SavedRate = rate;
+ Audio->SavedBitsPerSample = bps;
+ Audio->SavedStatusBits = status_bits;
+ Audio->SavedCategoryCode = category_code;
+
+ for(hdmi=Audio->Registered; hdmi != NULL; hdmi=hdmi->Next)
+ RHDHdmiUpdateAudioSettings(
+ hdmi, playing, channels,
+ rate, bps, status_bits,
+ category_code);
+ }
+
+ return AUDIO_TIMER_INTERVALL;
+}
+
+/*
+ * allocate and init the audio structure
+ */
+void
+RHDAudioInit(RHDPtr rhdPtr)
+{
+ RHDFUNC(rhdPtr);
+
+ if (rhdPtr->ChipSet >= RHD_R600) {
+ struct rhdAudio *Audio = (struct rhdAudio *) xnfcalloc(sizeof(struct rhdAudio), 1);
+
+ Audio->scrnIndex = rhdPtr->scrnIndex;
+ Audio->Registered = NULL;
+ Audio->Stored = FALSE;
+
+ rhdPtr->Audio = Audio;
+ } else
+ rhdPtr->Audio = NULL;
+}
+
+/*
+ * enable or disable the complete audio engine
+ */
+void
+RHDAudioSetEnable(RHDPtr rhdPtr, Bool Enable)
+{
+ struct rhdAudio *Audio = rhdPtr->Audio;
+
+ if (!Audio) return;
+ RHDFUNC(Audio);
+
+ RHDRegMask(Audio, AUDIO_ENABLE, Enable ? 0x80000000 : 0x0, 0x80000000);
+ if(Enable) {
+ /* the hardware generates an interrupt if audio starts/stops playing,
+ * but since drm doesn't support this interrupt, we check
+ * every AUDIO_TIMER_INTERVALL ms if something has changed
+ */
+ Audio->SavedChannels = -1;
+ Audio->SavedRate = -1;
+ Audio->SavedBitsPerSample = -1;
+ Audio->SavedStatusBits = 0;
+ Audio->SavedCategoryCode = 0;
+ Audio->Timer = TimerSet(NULL, 0, AUDIO_TIMER_INTERVALL, AudioUpdateHdmi, Audio);
+
+ /* 48kHz and 16/20 bits per sample are always supported */
+ RHDAudioSetSupported(rhdPtr, TRUE,
+ AUDIO_RATE_48000_HZ|
+ AUDIO_BPS_16|AUDIO_BPS_20,
+ AUDIO_CODEC_PCM
+ );
+ } else {
+ TimerFree(Audio->Timer);
+ Audio->Timer = NULL;
+ }
+}
+
+/*
+ * programm the audio clock and timing registers
+ */
+void
+RHDAudioSetClock(RHDPtr rhdPtr, struct rhdOutput* Output, CARD32 Clock)
+{
+ struct rhdAudio *Audio = rhdPtr->Audio;
+ int Rate = 48000;
+
+ if (!Audio) return;
+ RHDFUNC(Audio);
+
+ xf86DrvMsg(Audio->scrnIndex, X_INFO, "%s: using %s as clock source with %d khz\n",
+ __func__, Output->Name, (int)Clock);
+
+ switch(Output->Id) {
+ case RHD_OUTPUT_TMDSA:
+ case RHD_OUTPUT_LVTMA:
+ RHDRegMask(Audio, AUDIO_TIMING, 0, 0x301);
+ break;
+
+ case RHD_OUTPUT_UNIPHYA:
+ case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_KLDSKP_LVTMA:
+ RHDRegMask(Audio, AUDIO_TIMING, 0x100, 0x301);
+ break;
+
+ default:
+ break;
+ }
+
+ switch(Output->Id) {
+ case RHD_OUTPUT_TMDSA:
+ case RHD_OUTPUT_UNIPHYA:
+ RHDRegWrite(Audio, AUDIO_PLL1_MUL, Rate*50);
+ RHDRegWrite(Audio, AUDIO_PLL1_DIV, Clock*100);
+ RHDRegWrite(Audio, AUDIO_CLK_SRCSEL, 0);
+ break;
+
+ case RHD_OUTPUT_LVTMA:
+ case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_KLDSKP_LVTMA:
+ RHDRegWrite(Audio, AUDIO_PLL2_MUL, Rate*50);
+ RHDRegWrite(Audio, AUDIO_PLL2_DIV, Clock*100);
+ RHDRegWrite(Audio, AUDIO_CLK_SRCSEL, 1);
+ break;
+
+ default:
+ xf86DrvMsg(Audio->scrnIndex, X_ERROR, "%s: unsupported output type\n", __func__);
+ break;
+ }
+}
+
+/*
+ * set the supported audio rates, bits per sample and codecs
+ */
+void
+RHDAudioSetSupported(RHDPtr rhdPtr, Bool clear, CARD32 config, CARD32 codec)
+{
+ struct rhdAudio *Audio = rhdPtr->Audio;
+ if (!Audio) return;
+
+ RHDFUNC(Audio);
+ xf86DrvMsg(Audio->scrnIndex, X_INFO, "%s: config 0x%x codec 0x%x\n",
+ __func__, (int) config, (int) codec);
+
+ if(config & 0xFFE0F000)
+ xf86DrvMsg(Audio->scrnIndex, X_WARNING, "%s: reserved config bits set 0x%x\n",
+ __func__, (int) config);
+
+ if(codec & 0xFFFFFFF8)
+ xf86DrvMsg(Audio->scrnIndex, X_WARNING, "%s: reserved codec bits set 0x%x\n",
+ __func__, (int) codec);
+
+ if(clear) {
+ RHDRegWrite(Audio, AUDIO_SUPPORTED_SIZE_RATE, config);
+ RHDRegWrite(Audio, AUDIO_SUPPORTED_CODEC, codec);
+ } else {
+ RHDRegMask(Audio, AUDIO_SUPPORTED_SIZE_RATE, config, config);
+ RHDRegMask(Audio, AUDIO_SUPPORTED_CODEC, codec, codec);
+ }
+}
+
+/*
+ * register and hdmi interface for getting updates when audio parameters change
+ */
+void
+RHDAudioRegisterHdmi(RHDPtr rhdPtr, struct rhdHdmi* rhdHdmi)
+{
+ struct rhdAudio *Audio = rhdPtr->Audio;
+ if (!Audio) return;
+ RHDFUNC(Audio);
+
+ if(!rhdHdmi)
+ return;
+
+ rhdHdmi->Next = Audio->Registered;
+ Audio->Registered = rhdHdmi;
+}
+
+
+/*
+ * unregister the hdmi interface
+ */
+void RHDAudioUnregisterHdmi(RHDPtr rhdPtr, struct rhdHdmi* rhdHdmi)
+{
+ struct rhdAudio *Audio = rhdPtr->Audio;
+ struct rhdHdmi** hdmiPtr;
+ if (!Audio) return;
+ RHDFUNC(Audio);
+
+ for(hdmiPtr=&Audio->Registered; hdmiPtr!=NULL;hdmiPtr=&(*hdmiPtr)->Next)
+ if(*hdmiPtr == rhdHdmi) {
+ *hdmiPtr = rhdHdmi->Next;
+ rhdHdmi->Next = NULL;
+ return;
+ }
+}
+
+/*
+ * save the current config of audio engine
+ */
+void
+RHDAudioSave(RHDPtr rhdPtr)
+{
+ struct rhdAudio *Audio = rhdPtr->Audio;
+ if (!Audio) return;
+
+ RHDFUNC(Audio);
+
+ Audio->StoreEnabled = RHDRegRead(Audio, AUDIO_ENABLE);
+ Audio->StoreTiming = RHDRegRead(Audio, AUDIO_TIMING);
+
+ Audio->StoreSupportedSizeRate = RHDRegRead(Audio, AUDIO_SUPPORTED_SIZE_RATE);
+ Audio->StoreSupportedCodec = RHDRegRead(Audio, AUDIO_SUPPORTED_CODEC);
+
+ Audio->StorePll1Mul = RHDRegRead(Audio, AUDIO_PLL1_MUL);
+ Audio->StorePll1Div = RHDRegRead(Audio, AUDIO_PLL1_DIV);
+ Audio->StorePll2Mul = RHDRegRead(Audio, AUDIO_PLL2_MUL);
+ Audio->StorePll2Div = RHDRegRead(Audio, AUDIO_PLL2_DIV);
+ Audio->StoreClockSrcSel = RHDRegRead(Audio, AUDIO_CLK_SRCSEL);
+
+ Audio->Stored = TRUE;
+}
+
+/*
+ * restore the saved config of audio engine
+ */
+void
+RHDAudioRestore(RHDPtr rhdPtr)
+{
+ struct rhdAudio *Audio = rhdPtr->Audio;
+ if (!Audio) return;
+
+ RHDFUNC(Audio);
+
+ if (!Audio->Stored) {
+ xf86DrvMsg(Audio->scrnIndex, X_ERROR, "%s: trying to restore "
+ "uninitialized values.\n", __func__);
+ return;
+ }
+
+ /* shoutdown the audio engine before doing anything else */
+ RHDAudioSetEnable(rhdPtr, FALSE);
+
+ RHDRegWrite(Audio, AUDIO_TIMING, Audio->StoreTiming);
+ RHDRegWrite(Audio, AUDIO_SUPPORTED_SIZE_RATE, Audio->StoreSupportedSizeRate);
+ RHDRegWrite(Audio, AUDIO_SUPPORTED_CODEC, Audio->StoreSupportedCodec);
+
+ RHDRegWrite(Audio, AUDIO_PLL1_MUL, Audio->StorePll1Mul);
+ RHDRegWrite(Audio, AUDIO_PLL1_DIV, Audio->StorePll1Div);
+ RHDRegWrite(Audio, AUDIO_PLL2_MUL, Audio->StorePll2Mul);
+ RHDRegWrite(Audio, AUDIO_PLL2_DIV, Audio->StorePll2Div);
+ RHDRegWrite(Audio, AUDIO_CLK_SRCSEL, Audio->StoreClockSrcSel);
+ RHDRegWrite(Audio, AUDIO_ENABLE, Audio->StoreEnabled);
+}
+
+/*
+ * release the allocated memory
+ */
+void
+RHDAudioDestroy(RHDPtr rhdPtr)
+{
+ RHDFUNC(rhdPtr);
+
+ if (!rhdPtr->Audio) return;
+
+ if(rhdPtr->Audio->Timer)
+ TimerFree(rhdPtr->Audio->Timer);
+
+ xfree(rhdPtr->Audio);
+}
diff --git a/driver/xf86-video-radeonhd/src/rhd_audio.h b/driver/xf86-video-radeonhd/src/rhd_audio.h
new file mode 100644
index 000000000..a5f1314eb
--- /dev/null
+++ b/driver/xf86-video-radeonhd/src/rhd_audio.h
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2008 Christian König <deathsimple@vodafone.de>
+ * Copyright 2007 Luc Verhaegen <lverhaegen@novell.com>
+ * Copyright 2007 Matthias Hopf <mhopf@novell.com>
+ * Copyright 2007 Egbert Eich <eich@novell.com>
+ * Copyright 2007 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _RHD_AUDIO_H
+#define _RHD_AUDIO_H
+
+struct rhdAudio {
+
+ int scrnIndex;
+
+ struct rhdHdmi* Registered;
+ OsTimerPtr Timer;
+
+ Bool SavedPlaying;
+ int SavedChannels;
+ int SavedRate;
+ int SavedBitsPerSample;
+ CARD8 SavedStatusBits;
+ CARD8 SavedCategoryCode;
+
+ Bool Stored;
+
+ CARD32 StoreEnabled;
+ CARD32 StoreTiming;
+ CARD32 StoreSupportedSizeRate;
+ CARD32 StoreSupportedCodec;
+
+ CARD32 StorePll1Mul;
+ CARD32 StorePll1Div;
+ CARD32 StorePll2Mul;
+ CARD32 StorePll2Div;
+ CARD32 StoreClockSrcSel;
+};
+
+/*
+ * used for config value of RHDAudioSetSupported
+ */
+enum {
+ AUDIO_RATE_8000_HZ = 0x00000001,
+ AUDIO_RATE_11025_HZ = 0x00000002,
+ AUDIO_RATE_16000_HZ = 0x00000004,
+ AUDIO_RATE_22050_HZ = 0x00000008,
+ AUDIO_RATE_32000_HZ = 0x00000010,
+ AUDIO_RATE_44100_HZ = 0x00000020,
+ AUDIO_RATE_48000_HZ = 0x00000040,
+ AUDIO_RATE_88200_HZ = 0x00000080,
+ AUDIO_RATE_96000_HZ = 0x00000100,
+ AUDIO_RATE_176400_HZ = 0x00000200,
+ AUDIO_RATE_192000_HZ = 0x00000400,
+ AUDIO_RATE_384000_HZ = 0x00000800,
+
+ AUDIO_BPS_8 = 0x00010000,
+ AUDIO_BPS_16 = 0x00020000,
+ AUDIO_BPS_20 = 0x00040000,
+ AUDIO_BPS_24 = 0x00080000,
+ AUDIO_BPS_32 = 0x00100000
+};
+
+/*
+ * used for codec value of RHDAudioSetSupported
+ */
+enum {
+ AUDIO_CODEC_PCM = 0x00000001,
+ AUDIO_CODEC_FLOAT32 = 0x00000002,
+ AUDIO_CODEC_AC3 = 0x00000004
+};
+
+/*
+ * used for status bist value in RHDAudioUpdateHdmi
+ */
+enum {
+ AUDIO_STATUS_DIG_ENABLE = 0x01,
+ AUDIO_STATUS_V = 0x02,
+ AUDIO_STATUS_VCFG = 0x04,
+ AUDIO_STATUS_EMPHASIS = 0x08,
+ AUDIO_STATUS_COPYRIGHT = 0x10,
+ AUDIO_STATUS_NONAUDIO = 0x20,
+ AUDIO_STATUS_PROFESSIONAL = 0x40,
+ AUDIO_STATUS_LEVEL = 0x80
+};
+
+void RHDAudioInit(RHDPtr rhdPtr);
+
+void RHDAudioSetSupported(RHDPtr rhdPtr, Bool clear, CARD32 config, CARD32 codec);
+void RHDAudioSetEnable(RHDPtr rhdPtr, Bool Enable);
+void RHDAudioSetClock(RHDPtr rhdPtr, struct rhdOutput* Output, CARD32 Clock);
+
+void RHDAudioRegisterHdmi(RHDPtr rhdPtr, struct rhdHdmi* rhdHdmi);
+void RHDAudioUnregisterHdmi(RHDPtr rhdPtr, struct rhdHdmi* rhdHdmi);
+
+void RHDAudioSave(RHDPtr rhdPtr);
+void RHDAudioRestore(RHDPtr rhdPtr);
+
+void RHDAudioDestroy(RHDPtr rhdPtr);
+
+#endif /* _RHD_AUDIO_H */
diff --git a/driver/xf86-video-radeonhd/src/rhd_biosscratch.c b/driver/xf86-video-radeonhd/src/rhd_biosscratch.c
index ed9e9c933..fd09fb61a 100644
--- a/driver/xf86-video-radeonhd/src/rhd_biosscratch.c
+++ b/driver/xf86-video-radeonhd/src/rhd_biosscratch.c
@@ -110,6 +110,8 @@ rhdAtomBIOSScratchDACSenseResults(struct rhdOutput *Output, enum atomDAC DAC, en
case atomDFP1:
case atomDFP2:
case atomDFP3:
+ case atomDFP4:
+ case atomDFP5:
TV = FALSE;
break;
case atomTV1:
@@ -261,6 +263,12 @@ rhdAtomBIOSScratchUpdateAttachedState(RHDPtr rhdPtr, enum atomDevice dev, Bool a
case atomDFP3:
Mask = ATOM_S0_DFP3;
break;
+ case atomDFP4:
+ Mask = ATOM_S0_DFP4;
+ break;
+ case atomDFP5:
+ Mask = ATOM_S0_DFP5;
+ break;
default:
return;
}
@@ -322,6 +330,12 @@ rhdAtomBIOSScratchUpdateOnState(RHDPtr rhdPtr, enum atomDevice dev, Bool on)
case atomDFP3:
Mask = ATOM_S3_DFP3_ACTIVE;
break;
+ case atomDFP4:
+ Mask = ATOM_S3_DFP4_ACTIVE;
+ break;
+ case atomDFP5:
+ Mask = ATOM_S3_DFP5_ACTIVE;
+ break;
case atomNone:
return;
}
@@ -396,6 +410,12 @@ rhdAtomBIOSScratchSetAcceleratorModeForDevice(RHDPtr rhdPtr,
case atomDFP3:
Mask = ATOM_S6_ACC_REQ_DFP3;
break;
+ case atomDFP4:
+ Mask = ATOM_S6_ACC_REQ_DFP4;
+ break;
+ case atomDFP5:
+ Mask = ATOM_S6_ACC_REQ_DFP5;
+ break;
case atomNone:
return;
}
@@ -452,6 +472,12 @@ rhdAtomBIOSScratchSetCrtcState(RHDPtr rhdPtr, enum atomDevice dev, enum atomCrtc
case atomDFP3:
Mask = ATOM_S3_DFP3_CRTC_ACTIVE;
break;
+ case atomDFP4:
+ Mask = ATOM_S3_DFP4_CRTC_ACTIVE;
+ break;
+ case atomDFP5:
+ Mask = ATOM_S3_DFP5_CRTC_ACTIVE;
+ break;
case atomNone:
return;
}
@@ -509,6 +535,12 @@ RHDAtomBIOSScratchPMState(RHDPtr rhdPtr, struct rhdOutput *Output, int PowerMana
case atomDFP3:
Mask = ATOM_S2_DFP3_DPMS_STATE;
break;
+ case atomDFP4:
+ Mask = ATOM_S2_DFP4_DPMS_STATE;
+ break;
+ case atomDFP5:
+ Mask = ATOM_S2_DFP5_DPMS_STATE;
+ break;
case atomNone:
return;
}
@@ -584,7 +616,8 @@ rhdBIOSScratchSetDeviceForOutput(struct rhdOutput *Output)
switch (Output->OutputDriverPrivate->OutputDevices[i].DeviceId) {
case atomCrtc1:
case atomCrtc2:
- if (Output->SensedType == RHD_SENSED_VGA)
+ if (Output->SensedType == RHD_SENSED_VGA
+ || Output->SensedType == RHD_SENSED_NONE) /* if nothing was sensed default to VGA */
break;
i++;
continue;
@@ -638,8 +671,7 @@ rhdBIOSScratchUpdateBIOSScratchForOutput(struct rhdOutput *Output)
Device = rhdBIOSScratchSetDeviceForOutput(Output);
if (Device == atomNone && rhdPtr->Card->ConnectorInfo[0].Type != RHD_CONNECTOR_NONE) {
- xf86DrvMsg(Output->scrnIndex, X_WARNING,
- "%s: AtomBIOS DeviceID unknown\n", __func__);
+ xf86DrvMsg(Output->scrnIndex, X_WARNING, "%s: AtomBIOS DeviceID unknown\n",__func__);
return Device;
}
@@ -851,6 +883,12 @@ RHDGetDeviceOnCrtc(RHDPtr rhdPtr, enum atomCrtc Crtc)
else if (BIOS_3 & ATOM_S3_DFP3_ACTIVE
&& ((BIOS_3 ^ Mask) & ATOM_S3_DFP3_CRTC_ACTIVE))
return atomDFP3;
+ else if (BIOS_3 & ATOM_S3_DFP4_ACTIVE
+ && ((BIOS_3 ^ Mask) & ATOM_S3_DFP4_CRTC_ACTIVE))
+ return atomDFP4;
+ else if (BIOS_3 & ATOM_S3_DFP5_ACTIVE
+ && ((BIOS_3 ^ Mask) & ATOM_S3_DFP5_CRTC_ACTIVE))
+ return atomDFP5;
else
return atomNone;
}
diff --git a/driver/xf86-video-radeonhd/src/rhd_connector.c b/driver/xf86-video-radeonhd/src/rhd_connector.c
index 461a61918..d05eaf209 100644
--- a/driver/xf86-video-radeonhd/src/rhd_connector.c
+++ b/driver/xf86-video-radeonhd/src/rhd_connector.c
@@ -445,7 +445,7 @@ RhdPrintConnectorInfo(int scrnIndex, struct rhdConnectorInfo *cp)
"RHD_CONNECTOR_TV", "RHD_CONNECTOR_PCIE" };
const char *ddc_name[] =
- { "RHD_DDC_0", "RHD_DDC_1", "RHD_DDC_2", "RHD_DDC_3" };
+ { "RHD_DDC_0", "RHD_DDC_1", "RHD_DDC_2", "RHD_DDC_3", "RHD_DDC_4" };
const char *hpd_name_normal[] =
{ "RHD_HPD_NONE", "RHD_HPD_0", "RHD_HPD_1", "RHD_HPD_2", "RHD_HPD_3" };
@@ -457,7 +457,8 @@ RhdPrintConnectorInfo(int scrnIndex, struct rhdConnectorInfo *cp)
const char *output_name[] =
{ "RHD_OUTPUT_NONE", "RHD_OUTPUT_DACA", "RHD_OUTPUT_DACB", "RHD_OUTPUT_TMDSA",
"RHD_OUTPUT_LVTMA", "RHD_OUTPUT_DVO", "RHD_OUTPUT_KLDSKP_LVTMA",
- "RHD_OUTPUT_UNIPHYA", "RHD_OUTPUT_UNIPHYB" };
+ "RHD_OUTPUT_UNIPHYA", "RHD_OUTPUT_UNIPHYB", "RHD_OUTPUT_UNIPHYC", "RHD_OUTPUT_UNIPHYD",
+ "RHD_OUTPUT_UNIPHYE", "RHD_OUTPUT_UNIPHYF" };
const char **hpd_name;
switch (rhdPtr->hpdUsage) {
@@ -484,3 +485,29 @@ RhdPrintConnectorInfo(int scrnIndex, struct rhdConnectorInfo *cp)
output_name[cp[n].Output[1]]);
}
}
+
+/*
+ * Should we enable HDMI on this connector?
+ */
+Bool RHDConnectorEnableHDMI(struct rhdConnector *Connector)
+{
+ RHDPtr rhdPtr = RHDPTRI(Connector);
+ RHDFUNC(rhdPtr);
+
+ /* check if user forced HDMI on this connector */
+ switch(RhdParseBooleanOption(&rhdPtr->hdmi, Connector->Name)) {
+ case RHD_OPTION_ON:
+ case RHD_OPTION_DEFAULT:
+ xf86DrvMsg(rhdPtr->scrnIndex, X_INFO, "Enabling HDMI on %s because of config option\n", Connector->Name);
+ return TRUE;
+ case RHD_OPTION_OFF:
+ xf86DrvMsg(rhdPtr->scrnIndex, X_INFO, "Disabling HDMI on %s because of config option\n", Connector->Name);
+ return FALSE;
+ case RHD_OPTION_NOT_SET:
+ /* ask connected monitor if it supports HDMI */
+ /* TODO: Not implemented yet! */
+ return FALSE;
+ }
+
+ return FALSE;
+}
diff --git a/driver/xf86-video-radeonhd/src/rhd_connector.h b/driver/xf86-video-radeonhd/src/rhd_connector.h
index be3b9de84..23967bac7 100644
--- a/driver/xf86-video-radeonhd/src/rhd_connector.h
+++ b/driver/xf86-video-radeonhd/src/rhd_connector.h
@@ -44,6 +44,7 @@ typedef enum _rhdDDC {
RHD_DDC_1,
RHD_DDC_2,
RHD_DDC_3,
+ RHD_DDC_4,
RHD_DDC_MAX,
RHD_DDC_NONE = 0xFF,
RHD_DDC_GPIO = RHD_DDC_NONE
@@ -85,5 +86,6 @@ Bool RHDConnectorsInit(RHDPtr rhdPtr, struct rhdCard *Card);
void RHDHPDSave(RHDPtr rhdPtr);
void RHDHPDRestore(RHDPtr rhdPtr);
void RHDConnectorsDestroy(RHDPtr rhdPtr);
+Bool RHDConnectorEnableHDMI(struct rhdConnector *Connector);
#endif /* _RHD_CONNECTOR_H */
diff --git a/driver/xf86-video-radeonhd/src/rhd_cs.c b/driver/xf86-video-radeonhd/src/rhd_cs.c
index d2c6de390..256c1ae32 100644
--- a/driver/xf86-video-radeonhd/src/rhd_cs.c
+++ b/driver/xf86-video-radeonhd/src/rhd_cs.c
@@ -57,7 +57,7 @@ static void
CSMMIORBBMStuff(struct RhdCS *CS)
{
CARD8 *MMIOBase = RHDPTRI(CS)->MMIOBase;
- CARD32 BufferEntries = ((CS->Wptr + CS->Size - CS->Flushed) & CS->Mask) / 2;
+ CARD32 BufferEntries = (CS->Wptr - CS->Flushed) / 2;
CARD32 RBBMEntries = CSMMIORegRead(R5XX_RBBM_STATUS) & R5XX_RBBM_FIFOCNT_MASK;
int i, Entries;
@@ -68,8 +68,8 @@ CSMMIORBBMStuff(struct RhdCS *CS)
for (i = 0; i < Entries; i++) {
CSMMIORegWrite((CS->Buffer[CS->Flushed] & 0x3FFF) << 2,
- CS->Buffer[(CS->Flushed + 1) & CS->Mask]);
- CS->Flushed = (CS->Flushed + 2) & CS->Mask;
+ CS->Buffer[CS->Flushed + 1]);
+ CS->Flushed += 2;
#ifdef RHD_CS_DEBUG
CS->Grabbed -= 2;
#endif
@@ -127,10 +127,13 @@ CSMMIOGrab(struct RhdCS *CS, CARD32 Count)
#endif
for (i = 0; i < CS_LOOP_COUNT; i++) {
- if (CS->Wptr == CS->Flushed) /* 16kB should be big enough */
+ if ((CS->Size - CS->Wptr) >= Count)
return;
- if (((CS->Wptr + CS->Size - CS->Flushed) & CS->Mask) >= Count)
+ if (CS->Flushed == CS->Wptr) {
+ CS->Wptr = 0;
+ CS->Flushed = 0;
return;
+ }
CSMMIORBBMStuff(CS);
}
@@ -165,7 +168,6 @@ CSMMIOInit(struct RhdCS *CS)
/* allocate a 64kB buffer here as well */
CS->Size = (64 << 10) / 4;
CS->Buffer = xnfcalloc(1, 4 * CS->Size);
- CS->Mask = CS->Size - 1; /* easy wrap around */
CS->Grab = CSMMIOGrab;
CS->Flush = CSMMIOFlush;
@@ -188,6 +190,11 @@ CSMMIOInit(struct RhdCS *CS)
*/
#include "xf86drm.h"
+/* Workaround for header mismatches */
+#ifndef DEPRECATED
+# define DEPRECATED __attribute__ ((deprecated))
+# define __user
+#endif
#include "radeon_drm.h"
#define R5XX_IDLE_RETRY 16 /* Fall out of idle loops after this count */
@@ -423,7 +430,6 @@ CSDRMCPInit(struct RhdCS *CS)
CS->Type = RHD_CS_CPDMA;
CS->Size = (64 << 10) / 4;
- CS->Mask = 0xFFFFFFFF;
CS->Grab = DRMCPGrab;
CS->Flush = DRMCPFlush;
@@ -461,7 +467,7 @@ RHDCSGrabDebug(struct RhdCS *CS, CARD32 Count, const char *func)
xf86DrvMsg(CS->scrnIndex, X_ERROR,
"%s: Grabbing while CS is not started!\n", func);
- if (CS->Wptr != ((CS->Flushed + CS->Grabbed) & CS->Mask))
+ if (CS->Wptr != (CS->Flushed + CS->Grabbed))
xf86DrvMsg(CS->scrnIndex, X_ERROR,
"%s: Wptr != Flushed + Grabbed (%d vs %d + %d) (%s -> %s)\n",
func, (unsigned int) CS->Wptr, (unsigned int) CS->Flushed,
@@ -487,7 +493,7 @@ RHDCSFlush(struct RhdCS *CS)
return;
}
- if (CS->Wptr != ((CS->Flushed + CS->Grabbed) & CS->Mask))
+ if (CS->Wptr != (CS->Flushed + CS->Grabbed))
xf86DrvMsg(CS->scrnIndex, X_ERROR,
"%s: Wptr != Flushed + Grabbed (%d vs %d + %d) (From %s)\n",
__func__, (unsigned int) CS->Wptr, (unsigned int) CS->Flushed,
diff --git a/driver/xf86-video-radeonhd/src/rhd_cs.h b/driver/xf86-video-radeonhd/src/rhd_cs.h
index f9bc6164f..7cf628f2b 100644
--- a/driver/xf86-video-radeonhd/src/rhd_cs.h
+++ b/driver/xf86-video-radeonhd/src/rhd_cs.h
@@ -62,7 +62,6 @@ struct RhdCS {
CARD32 Flushed;
CARD32 Wptr;
CARD32 Size;
- CARD32 Mask;
#ifdef RHD_CS_DEBUG
CARD32 Grabbed;
@@ -136,17 +135,11 @@ void RHDCSGrabDebug(struct RhdCS *CS, CARD32 Count, const char *func);
#define RHDCSGrab(CS, Count) _RHDCSGrab((CS), (Count))
#endif
-#define RHDCSWrite(CS, Value) \
-do { \
- (CS)->Buffer[(CS)->Wptr] = (Value); \
- (CS)->Wptr = ((CS)->Wptr + 1) & (CS)->Mask; \
-} while (0)
-
+#define RHDCSWrite(CS, Value) (CS)->Buffer[(CS)->Wptr++] = (Value)
#define RHDCSRegWrite(CS, Reg, Value) \
do { \
- (CS)->Buffer[(CS)->Wptr] = CP_PACKET0((Reg), 1); \
- (CS)->Buffer[((CS)->Wptr + 1) & (CS)->Mask] = (Value); \
- (CS)->Wptr = ((CS)->Wptr + 2) & (CS)->Mask; \
+ (CS)->Buffer[(CS)->Wptr++] = CP_PACKET0((Reg), 1); \
+ (CS)->Buffer[(CS)->Wptr++] = (Value); \
} while (0)
#define RHDCSAdvance(CS) \
diff --git a/driver/xf86-video-radeonhd/src/rhd_cursor.c b/driver/xf86-video-radeonhd/src/rhd_cursor.c
index f4b91d480..c967bbfa6 100644
--- a/driver/xf86-video-radeonhd/src/rhd_cursor.c
+++ b/driver/xf86-video-radeonhd/src/rhd_cursor.c
@@ -399,7 +399,6 @@ rhdSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
}
}
-
static void
rhdLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
{
@@ -507,7 +506,8 @@ RHDCursorsInit(RHDPtr rhdPtr)
Cursor->RegOffset = i * 0x0800;
/* grab our cursor FB */
- Cursor->Base = RHDAllocFb(rhdPtr, size, "Cursor Image");
+ if (!rhdPtr->swCursor.val.bool)
+ Cursor->Base = RHDAllocFb(rhdPtr, size, "Cursor Image");
ASSERT(Cursor->Base != -1);
rhdPtr->Crtc[i]->Cursor = Cursor; /* HW is fixed anyway */
@@ -573,3 +573,73 @@ RHDxf86InitCursor(ScreenPtr pScreen)
return TRUE;
}
+/*
+ * Cursor Funcs as used by RandR
+ */
+void
+rhdCrtcShowCursor(struct rhdCrtc *Crtc)
+{
+ struct rhdCursor *Cursor = Crtc->Cursor;
+
+ lockCursor (Cursor, TRUE);
+ displayCursor(Crtc);
+ lockCursor (Cursor, FALSE);
+}
+
+/*
+ *
+ */
+void
+rhdCrtcHideCursor(struct rhdCrtc *Crtc)
+{
+ struct rhdCursor *Cursor = Crtc->Cursor;
+
+ lockCursor (Cursor, TRUE);
+ enableCursor(Cursor, FALSE);
+ lockCursor (Cursor, FALSE);
+}
+
+/*
+ *
+ */
+void
+rhdCrtcSetCursorPosition(struct rhdCrtc *Crtc, int x, int y)
+{
+ struct rhdCursor *Cursor = Crtc->Cursor;
+ Cursor->X = x;
+ Cursor->Y = y;
+
+ lockCursor (Cursor, TRUE);
+ displayCursor(Crtc);
+ lockCursor (Cursor, FALSE);
+}
+
+/*
+ *
+ */
+void
+rhdCrtcSetCursorColors(struct rhdCrtc *Crtc, int bg, int fg)
+{
+ RHDPtr rhdPtr = RHDPTRI(Crtc);
+
+ rhdPtr->CursorColor0 = bg | 0xff000000;
+ rhdPtr->CursorColor1 = fg | 0xff000000;
+}
+
+/*
+ *
+ */
+void
+rhdCrtcLoadCursorARGB(struct rhdCrtc *Crtc, CARD32 *Image)
+{
+ struct rhdCursor *Cursor = Crtc->Cursor;
+
+ Cursor->Width = MAX_CURSOR_WIDTH;
+ Cursor->Height = MAX_CURSOR_HEIGHT;
+
+ lockCursor (Cursor, TRUE);
+ uploadCursorImage(Cursor, Image);
+ setCursorImage (Cursor);
+ lockCursor (Cursor, FALSE);
+}
+
diff --git a/driver/xf86-video-radeonhd/src/rhd_cursor.h b/driver/xf86-video-radeonhd/src/rhd_cursor.h
index 683968d59..42a566eab 100644
--- a/driver/xf86-video-radeonhd/src/rhd_cursor.h
+++ b/driver/xf86-video-radeonhd/src/rhd_cursor.h
@@ -63,4 +63,10 @@ void rhdReloadCursor(ScrnInfoPtr pScrn);
void rhdSaveCursor(ScrnInfoPtr pScrn);
void rhdRestoreCursor(ScrnInfoPtr pScrn);
+void rhdCrtcShowCursor(struct rhdCrtc *Crtc); /* */
+void rhdCrtcHideCursor(struct rhdCrtc *Crtc); /* */
+void rhdCrtcLoadCursorARGB(struct rhdCrtc *Crtc, CARD32 *Image); /* */
+void rhdCrtcSetCursorColors(struct rhdCrtc *Crtc, int bg, int fg);
+void rhdCrtcSetCursorPosition(struct rhdCrtc *Crtc, int x, int y);
+
#endif
diff --git a/driver/xf86-video-radeonhd/src/rhd_dig.c b/driver/xf86-video-radeonhd/src/rhd_dig.c
index a970ce93b..3fe247a8d 100644
--- a/driver/xf86-video-radeonhd/src/rhd_dig.c
+++ b/driver/xf86-video-radeonhd/src/rhd_dig.c
@@ -41,6 +41,7 @@
#include "rhd_connector.h"
#include "rhd_output.h"
#include "rhd_regs.h"
+#include "rhd_hdmi.h"
#ifdef ATOM_BIOS
#include "rhd_atombios.h"
#include "rhd_atomout.h"
@@ -64,7 +65,11 @@ struct transmitter {
void (*Destroy) (struct rhdOutput *Output);
Bool (*Property) (struct rhdOutput *Output,
enum rhdPropertyAction Action, enum rhdOutputProperty Property, union rhdPropertyData *val);
-
+#ifdef NOT_YET
+ Bool (*WrappedPropertyCallback) (struct rhdOutput *Output,
+ enum rhdPropertyAction Action, enum rhdOutputProperty Property, union rhdPropertyData *val);
+ void *PropertyPrivate;
+#endif
void *Private;
};
@@ -93,6 +98,7 @@ enum encoderMode {
};
enum encoderID {
+ ENCODER_NONE,
ENCODER_DIG1,
ENCODER_DIG2
};
@@ -106,6 +112,7 @@ struct DIGPrivate
Bool Coherent;
Bool RunDualLink;
DisplayModePtr Mode;
+ struct rhdHdmi *Hdmi;
/* LVDS */
Bool FPDI;
@@ -749,6 +756,17 @@ ATOMTransmitterModeValid(struct rhdOutput *Output, DisplayModePtr Mode)
/*
*
*/
+void
+rhdPrintDigDebug(RHDPtr rhdPtr, const char *name)
+{
+ xf86DrvMsgVerb(rhdPtr->scrnIndex, X_INFO, 7, "%s: DIGn_CNTL: n=1: 0x%x n=2: 0x%x\n",
+ name, RHDRegRead(rhdPtr, RV620_DIG1_CNTL),
+ RHDRegRead(rhdPtr, DIG2_OFFSET + RV620_DIG1_CNTL));
+}
+
+/*
+ *
+ */
static void
ATOMTransmitterSet(struct rhdOutput *Output, struct rhdCrtc *Crtc, DisplayModePtr Mode)
{
@@ -763,6 +781,8 @@ ATOMTransmitterSet(struct rhdOutput *Output, struct rhdCrtc *Crtc, DisplayModePt
atc->Coherent = Private->Coherent;
atc->PixelClock = Mode->SynthClock;
+ rhdPrintDigDebug(rhdPtr,__func__);
+
if (Private->RunDualLink) {
atc->Mode = atomDualLink;
@@ -785,6 +805,45 @@ ATOMTransmitterSet(struct rhdOutput *Output, struct rhdCrtc *Crtc, DisplayModePt
rhdAtomDigTransmitterControl(rhdPtr->atomBIOS, transPrivate->atomTransmitterID,
atomTransSetup, atc);
+ rhdPrintDigDebug(rhdPtr,__func__);
+}
+
+/*
+ *
+ */
+static CARD32
+digProbeEncoder(struct rhdOutput *Output)
+{
+ if (Output->Id == RHD_OUTPUT_KLDSKP_LVTMA) {
+ return ENCODER_DIG2;
+ } else {
+ Bool swap = (RHDRegRead(Output, RV620_DCIO_LINK_STEER_CNTL)
+ & RV62_LINK_STEER_SWAP) == RV62_LINK_STEER_SWAP;
+
+ switch (Output->Id) {
+ case RHD_OUTPUT_UNIPHYA:
+ if (swap) {
+ RHDDebug(Output->scrnIndex, "%s: detected ENCODER_DIG2 for UNIPHYA\n",__func__);
+ return ENCODER_DIG2;
+ } else {
+ RHDDebug(Output->scrnIndex, "%s: detected ENCODER_DIG1 for UNIPHYA\n",__func__);
+ return ENCODER_DIG1;
+ }
+ break;
+ case RHD_OUTPUT_UNIPHYB:
+ if (swap) {
+ RHDDebug(Output->scrnIndex, "%s: detected ENCODER_DIG1 for UNIPHYB\n",__func__);
+ return ENCODER_DIG1;
+ } else {
+ RHDDebug(Output->scrnIndex, "%s: detected ENCODER_DIG2 for UNIPHYB\n",__func__);
+ return ENCODER_DIG2;
+ }
+ break;
+ default:
+ return ENCODER_NONE; /* should not get here */
+ }
+ }
+ return ENCODER_NONE;
}
/*
@@ -801,6 +860,8 @@ ATOMTransmitterPower(struct rhdOutput *Output, int Power)
RHDFUNC(Output);
+ rhdPrintDigDebug(rhdPtr,__func__);
+
if (Private->RunDualLink)
atc->LinkCnt = atomDualLink;
else
@@ -808,6 +869,27 @@ ATOMTransmitterPower(struct rhdOutput *Output, int Power)
atc->Coherent = Private->Coherent;
+ if (atc->Encoder == atomEncoderNone) {
+ switch (digProbeEncoder(Output)) {
+ case ENCODER_DIG1:
+ if (rhdPtr->DigEncoderOutput[0]) {
+ RHDDebug(Output->scrnIndex,"%s: DIG1 for %s already taken\n",__func__,Output->Name);
+ return;
+ }
+ atc->Encoder = atomEncoderDIG1;
+ break;
+ case ENCODER_DIG2:
+ if (rhdPtr->DigEncoderOutput[1]) {
+ RHDDebug(Output->scrnIndex,"%s: DIG2 for %s already taken\n",__func__,Output->Name);
+ return;
+ }
+ atc->Encoder = atomEncoderDIG2;
+ break;
+ default:
+ return;
+ }
+ }
+
switch (Power) {
case RHD_POWER_ON:
rhdAtomDigTransmitterControl(rhdPtr->atomBIOS, transPrivate->atomTransmitterID,
@@ -829,6 +911,7 @@ ATOMTransmitterPower(struct rhdOutput *Output, int Power)
atomTransDisable, atc);
break;
}
+ rhdPrintDigDebug(rhdPtr,__func__);
}
/*
@@ -875,6 +958,8 @@ struct DIGEncoder
{
Bool Stored;
+ CARD32 StoredOff;
+
CARD32 StoredRegExt1DiffPostDivCntl;
CARD32 StoredRegExt2DiffPostDivCntl;
CARD32 StoredDIGClockPattern;
@@ -909,10 +994,13 @@ static void
LVDSEncoder(struct rhdOutput *Output)
{
struct DIGPrivate *Private = (struct DIGPrivate *)Output->Private;
- CARD32 off = (Private->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
+ CARD32 off;
RHDFUNC(Output);
+ ASSERT(Private->EncoderID != ENCODER_NONE);
+
+ off = (Private->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
/* Clock pattern ? */
RHDRegMask(Output, off + RV620_DIG1_CLOCK_PATTERN, 0x0063, 0xFFFF);
/* set panel type: 18/24 bit mode */
@@ -931,10 +1019,12 @@ static void
TMDSEncoder(struct rhdOutput *Output)
{
struct DIGPrivate *Private = (struct DIGPrivate *)Output->Private;
- CARD32 off = (Private->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
+ CARD32 off;
RHDFUNC(Output);
+ ASSERT(Private->EncoderID != ENCODER_NONE);
+ off = (Private->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
/* clock pattern ? */
RHDRegMask(Output, off + RV620_DIG1_CLOCK_PATTERN, 0x001F, 0xFFFF);
/* color format RGB - normal color format 24bpp, Twin-Single 30bpp or Dual 48bpp*/
@@ -951,33 +1041,50 @@ static void
EncoderSet(struct rhdOutput *Output, struct rhdCrtc *Crtc, DisplayModePtr Mode)
{
struct DIGPrivate *Private = (struct DIGPrivate *)Output->Private;
- CARD32 off = (Private->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
+ RHDPtr rhdPtr = RHDPTRI(Output);
+ CARD32 off;
RHDFUNC(Output);
+
+ ASSERT(Private->EncoderID != ENCODER_NONE);
+ off = (Private->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
+
+ rhdPrintDigDebug(rhdPtr,__func__);
+
+ RHDRegMask(Output, off + RV620_DIG1_CNTL, Output->Crtc->Id,
+ RV62_DIG_SOURCE_SELECT);
+
if (Output->Id == RHD_OUTPUT_UNIPHYA) {
/* select LinkA ?? */
- RHDRegMask(Output, RV620_DCIO_LINK_STEER_CNTL, 0,
+ RHDRegMask(Output, RV620_DCIO_LINK_STEER_CNTL,
((Private->EncoderID == ENCODER_DIG2)
? RV62_LINK_STEER_SWAP
- : 0)); /* swap if DIG2 */
+ : 0), RV62_LINK_STEER_SWAP); /* swap if DIG2 */
if (!Private->RunDualLink) {
- RHDRegMask(Output, off + RV620_DIG1_CNTL, 0, RV62_DIG_SWAP | RV62_DIG_DUAL_LINK_ENABLE);
+ RHDRegMask(Output, off + RV620_DIG1_CNTL,
+ 0,
+ RV62_DIG_SWAP |RV62_DIG_DUAL_LINK_ENABLE);
} else {
RHDRegMask(Output, off + RV620_DIG1_CNTL,
- ((Private->EncoderID == ENCODER_DIG2)
- ? RV62_DIG_SWAP
- : 0) | RV62_DIG_DUAL_LINK_ENABLE,
- RV62_DIG_SWAP | RV62_DIG_DUAL_LINK_ENABLE );
+ RV62_DIG_DUAL_LINK_ENABLE,
+ RV62_DIG_SWAP | RV62_DIG_DUAL_LINK_ENABLE);
}
} else if (Output->Id == RHD_OUTPUT_UNIPHYB) {
- RHDRegMask(Output, off + RV620_DIG1_CNTL, 0, RV62_DIG_SWAP | RV62_DIG_DUAL_LINK_ENABLE);
/* select LinkB ?? */
RHDRegMask(Output, RV620_DCIO_LINK_STEER_CNTL,
((Private->EncoderID == ENCODER_DIG2)
? 0
: RV62_LINK_STEER_SWAP), RV62_LINK_STEER_SWAP);
+ if (!Private->RunDualLink)
+ RHDRegMask(Output, off + RV620_DIG1_CNTL,
+ 0,
+ RV62_DIG_SWAP | RV62_DIG_DUAL_LINK_ENABLE);
+ else
+ RHDRegMask(Output, off + RV620_DIG1_CNTL,
+ RV62_DIG_SWAP | RV62_DIG_DUAL_LINK_ENABLE,
+ RV62_DIG_SWAP | RV62_DIG_DUAL_LINK_ENABLE);
} else { /* LVTMA */
- RHDRegMask(Output, RV620_EXT2_DIFF_POST_DIV_CNTL, 0, 0x1 << RV62_EXT2_DIFF_DRIVER_ENABLE_SHIFT);
+ RHDRegMask(Output, RV620_EXT2_DIFF_POST_DIV_CNTL, 0, RV62_EXT2_DIFF_DRIVER_ENABLE);
}
if (Private->EncoderMode == LVDS)
@@ -998,6 +1105,7 @@ EncoderSet(struct rhdOutput *Output, struct rhdCrtc *Crtc, DisplayModePtr Mode)
| RV62_DIG_DUAL_LINK_ENABLE
| RV62_DIG_STEREOSYNC_SELECT
| RV62_DIG_SOURCE_SELECT);
+ rhdPrintDigDebug(rhdPtr,__func__);
}
/*
@@ -1007,38 +1115,74 @@ static void
EncoderPower(struct rhdOutput *Output, int Power)
{
struct DIGPrivate *Private = (struct DIGPrivate *)Output->Private;
- CARD32 off = (Private->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
+ CARD32 off;
+ enum encoderID EncoderID = Private->EncoderID;
+ RHDPtr rhdPtr = RHDPTRI(Output);
RHDFUNC(Output);
+
+ if (EncoderID == ENCODER_NONE) {
+ EncoderID = digProbeEncoder(Output);
+ switch (EncoderID) {
+ case ENCODER_DIG1:
+ if (rhdPtr->DigEncoderOutput[0]) {
+ RHDDebug(Output->scrnIndex,"%s: DIG1 for %s already taken\n",__func__,Output->Name);
+ return;
+ }
+ break;
+ case ENCODER_DIG2:
+ if (rhdPtr->DigEncoderOutput[1]) {
+ RHDDebug(Output->scrnIndex,"%s: DIG2 for %s already taken\n",__func__,Output->Name);
+ return;
+ }
+ break;
+ default:
+ return;
+ }
+ }
+
+ off = (EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
+
/* clock src is pixel PLL */
RHDRegMask(Output, RV620_DCCG_SYMCLK_CNTL, 0x0,
- 0x3 << ((Private->EncoderID == ENCODER_DIG2)
+ 0x3 << ((EncoderID == ENCODER_DIG2)
? RV62_SYMCLKB_SRC_SHIFT
: RV62_SYMCLKA_SRC_SHIFT));
+ rhdPrintDigDebug(rhdPtr,__func__);
switch (Power) {
case RHD_POWER_ON:
+ RHDDebug(Output->scrnIndex,"%s(RHD_POWER_ON, %i)\n",__func__,
+ EncoderID);
/* enable DIG */
RHDRegMask(Output, off + RV620_DIG1_CNTL, 0x10, 0x10);
- RHDRegMask(Output, (Private->EncoderID == ENCODER_DIG2)
+ RHDRegMask(Output, (EncoderID == ENCODER_DIG2)
? RV620_DCCG_PCLK_DIGB_CNTL
: RV620_DCCG_PCLK_DIGA_CNTL,
RV62_PCLK_DIGA_ON, RV62_PCLK_DIGA_ON); /* @@@ */
+ rhdPrintDigDebug(rhdPtr,__func__);
return;
case RHD_POWER_RESET:
case RHD_POWER_SHUTDOWN:
default:
+ RHDDebug(Output->scrnIndex,"%s(RHD_POWER_SHUTDOWN, %i)\n",__func__,
+ EncoderID);
/* disable differential clock driver */
- if (Private->EncoderID == ENCODER_DIG1)
- RHDRegMask(Output, RV620_EXT1_DIFF_POST_DIV_CNTL, 0, RV62_EXT1_DIFF_DRIVER_ENABLE);
+ if (EncoderID == ENCODER_DIG1)
+ RHDRegMask(Output, RV620_EXT1_DIFF_POST_DIV_CNTL,
+ 0,
+ RV62_EXT1_DIFF_DRIVER_ENABLE);
else
- RHDRegMask(Output, RV620_EXT2_DIFF_POST_DIV_CNTL, 0, 0x1 << RV62_EXT2_DIFF_DRIVER_ENABLE_SHIFT);
+ RHDRegMask(Output, RV620_EXT2_DIFF_POST_DIV_CNTL,
+ 0,
+ RV62_EXT2_DIFF_DRIVER_ENABLE);
/* disable DIG */
RHDRegMask(Output, off + RV620_DIG1_CNTL, 0x0, 0x10);
- RHDRegMask(Output, (Private->EncoderID == ENCODER_DIG2)
+ RHDRegMask(Output, (EncoderID == ENCODER_DIG2)
? RV620_DCCG_PCLK_DIGB_CNTL
: RV620_DCCG_PCLK_DIGA_CNTL,
0, RV62_PCLK_DIGA_ON); /* @@@ */
+ rhdPrintDigDebug(rhdPtr,__func__);
return;
}
}
@@ -1051,10 +1195,15 @@ EncoderSave(struct rhdOutput *Output)
{
struct DIGPrivate *digPrivate = (struct DIGPrivate *)Output->Private;
struct DIGEncoder *Private = (struct DIGEncoder *)(digPrivate->Encoder.Private);
- CARD32 off = (digPrivate->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
+ CARD32 off;
+ enum encoderID EncoderID;
RHDFUNC(Output);
+ EncoderID = digProbeEncoder(Output);
+ off = (EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
+ Private->StoredOff = off;
+
Private->StoredRegExt1DiffPostDivCntl = RHDRegRead(Output, off + RV620_EXT1_DIFF_POST_DIV_CNTL);
Private->StoredRegExt2DiffPostDivCntl = RHDRegRead(Output, off + RV620_EXT2_DIFF_POST_DIV_CNTL);
Private->StoredDIGClockPattern = RHDRegRead(Output, off + RV620_DIG1_CLOCK_PATTERN);
@@ -1063,13 +1212,11 @@ EncoderSave(struct rhdOutput *Output)
Private->StoredTMDSCntl = RHDRegRead(Output, off + RV620_TMDS1_CNTL);
Private->StoredDCIOLinkSteerCntl = RHDRegRead(Output, RV620_DCIO_LINK_STEER_CNTL);
Private->StoredDCCGPclkDigCntl = RHDRegRead(Output,
- (digPrivate->EncoderID
- == ENCODER_DIG2)
+ (off == DIG2_OFFSET)
? RV620_DCCG_PCLK_DIGB_CNTL
: RV620_DCCG_PCLK_DIGA_CNTL);
Private->StoredDCCGSymclkCntl = RHDRegRead(Output, RV620_DCCG_SYMCLK_CNTL);
Private->StoredBlModCntl = RHDRegRead(Output, RV620_LVTMA_BL_MOD_CNTL);
-
Private->Stored = TRUE;
}
@@ -1081,7 +1228,7 @@ EncoderRestore(struct rhdOutput *Output)
{
struct DIGPrivate *digPrivate = (struct DIGPrivate *)Output->Private;
struct DIGEncoder *Private = (struct DIGEncoder *)(digPrivate->Encoder.Private);
- CARD32 off = (digPrivate->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
+ CARD32 off;
RHDFUNC(Output);
@@ -1090,6 +1237,7 @@ EncoderRestore(struct rhdOutput *Output)
"%s: No registers stored.\n", __func__);
return;
}
+ off = Private->StoredOff;
RHDRegWrite(Output, off + RV620_EXT1_DIFF_POST_DIV_CNTL, Private->StoredRegExt1DiffPostDivCntl);
RHDRegWrite(Output, off + RV620_EXT2_DIFF_POST_DIV_CNTL, Private->StoredRegExt2DiffPostDivCntl);
@@ -1099,7 +1247,7 @@ EncoderRestore(struct rhdOutput *Output)
RHDRegWrite(Output, off + RV620_DIG1_CLOCK_PATTERN, Private->StoredDIGClockPattern);
RHDRegWrite(Output, off + RV620_LVDS1_DATA_CNTL, Private->StoredLVDSDataCntl);
RHDRegWrite(Output, off + RV620_TMDS1_CNTL, Private->StoredTMDSCntl);
- RHDRegWrite(Output, (digPrivate->EncoderID == ENCODER_DIG2)
+ RHDRegWrite(Output, (off == DIG2_OFFSET)
? RV620_DCCG_PCLK_DIGB_CNTL
: RV620_DCCG_PCLK_DIGA_CNTL,
Private->StoredDCCGPclkDigCntl);
@@ -1249,14 +1397,25 @@ DigPower(struct rhdOutput *Output, int Power)
struct DIGPrivate *Private = (struct DIGPrivate *)Output->Private;
struct transmitter *Transmitter = &Private->Transmitter;
struct encoder *Encoder = &Private->Encoder;
+ Bool enableHDMI;
RHDDebug(Output->scrnIndex, "%s(%s,%s)\n",__func__,Output->Name,
rhdPowerString[Power]);
+ if(Output->Connector != NULL) {
+ /* check if attached monitor supports HDMI */
+ enableHDMI = RHDConnectorEnableHDMI(Output->Connector);
+ if (enableHDMI && Private->EncoderMode == TMDS_DVI)
+ Private->EncoderMode = TMDS_HDMI;
+ else if (!enableHDMI && Private->EncoderMode == TMDS_HDMI)
+ Private->EncoderMode = TMDS_DVI;
+ }
+
switch (Power) {
case RHD_POWER_ON:
Encoder->Power(Output, Power);
Transmitter->Power(Output, Power);
+ RHDHdmiEnable(Private->Hdmi, Private->EncoderMode == TMDS_HDMI);
return;
case RHD_POWER_RESET:
Transmitter->Power(Output, Power);
@@ -1266,6 +1425,7 @@ DigPower(struct rhdOutput *Output, int Power)
default:
Transmitter->Power(Output, Power);
Encoder->Power(Output, Power);
+ RHDHdmiEnable(Private->Hdmi, FALSE);
return;
}
}
@@ -1319,6 +1479,7 @@ DigMode(struct rhdOutput *Output, DisplayModePtr Mode)
Encoder->Mode(Output, Crtc, Mode);
Transmitter->Mode(Output, Crtc, Mode);
+ RHDHdmiSetMode(Private->Hdmi, Mode);
}
/*
@@ -1335,6 +1496,7 @@ DigSave(struct rhdOutput *Output)
Encoder->Save(Output);
Transmitter->Save(Output);
+ RHDHdmiSave(Private->Hdmi);
}
/*
@@ -1351,6 +1513,7 @@ DigRestore(struct rhdOutput *Output)
Encoder->Restore(Output);
Transmitter->Restore(Output);
+ RHDHdmiRestore(Private->Hdmi);
}
/*
@@ -1367,7 +1530,11 @@ DigDestroy(struct rhdOutput *Output)
Encoder->Destroy(Output);
Transmitter->Destroy(Output);
-
+ RHDHdmiDestroy(Private->Hdmi);
+#ifdef NOT_YET
+ if (Transmitter->PropertyPrivate)
+ RhdAtomDestroyBacklightControlProperty(Output, Transmitter->PropertyPrivate);
+#endif
xfree(Private);
Output->Private = NULL;
}
@@ -1375,6 +1542,141 @@ DigDestroy(struct rhdOutput *Output)
/*
*
*/
+static Bool
+DigAllocFree(struct rhdOutput *Output, enum rhdOutputAllocation Alloc)
+{
+ struct DIGPrivate *Private = (struct DIGPrivate *)Output->Private;
+ RHDPtr rhdPtr = RHDPTRI(Output);
+ char *TransmitterName;
+
+ RHDFUNC(rhdPtr);
+
+ switch (Output->Id) {
+ case RHD_OUTPUT_KLDSKP_LVTMA:
+ TransmitterName = "KLDSKP_LVTMA";
+ break;
+ case RHD_OUTPUT_UNIPHYA:
+ TransmitterName = "UNIPHYA";
+ break;
+ case RHD_OUTPUT_UNIPHYB:
+ TransmitterName = "UNIPHYB";
+ break;
+ default:
+ return FALSE;
+ }
+ switch (Alloc) {
+ case RHD_OUTPUT_ALLOC:
+
+ if (Private->EncoderID != ENCODER_NONE)
+ return TRUE;
+
+ /*
+ * LVTMA can only use DIG2. Thus exclude
+ * DIG1 for LVTMA and prefer it for the
+ * UNIPHYs.
+ */
+ if (Output->Id == RHD_OUTPUT_KLDSKP_LVTMA) {
+ if (!rhdPtr->DigEncoderOutput[1]) {
+ rhdPtr->DigEncoderOutput[1] = Output;
+ Private->EncoderID = ENCODER_DIG2;
+ xf86DrvMsg(Output->scrnIndex, X_INFO,
+ "Mapping DIG2 encoder to %s\n",TransmitterName);
+ return TRUE;
+ } else
+ return FALSE;
+ } else {
+ struct ATOMTransmitterPrivate *transPrivate =
+ (struct ATOMTransmitterPrivate *)Private->Transmitter.Private;
+ struct atomTransmitterConfig *atc = &transPrivate->atomTransmitterConfig;
+ if (!rhdPtr->DigEncoderOutput[0]) {
+ rhdPtr->DigEncoderOutput[0] = Output;
+ Private->EncoderID = ENCODER_DIG1;
+ atc->Encoder = atomEncoderDIG1;
+ xf86DrvMsg(Output->scrnIndex, X_INFO,
+ "Mapping DIG1 encoder to %s\n",TransmitterName);
+ return TRUE;
+ } else if (!rhdPtr->DigEncoderOutput[1]) {
+ rhdPtr->DigEncoderOutput[1] = Output;
+ Private->EncoderID = ENCODER_DIG2;
+ atc->Encoder = atomEncoderDIG2;
+ xf86DrvMsg(Output->scrnIndex, X_INFO,
+ "Mapping DIG2 encoder to %s\n",TransmitterName);
+ return TRUE;
+ } else
+ return FALSE;
+ }
+
+ case RHD_OUTPUT_FREE:
+ Private->EncoderID = ENCODER_NONE;
+ if (rhdPtr->DigEncoderOutput[0] == Output) {
+ rhdPtr->DigEncoderOutput[0] = NULL;
+ return TRUE;
+ } else if (rhdPtr->DigEncoderOutput[1] == Output) {
+ rhdPtr->DigEncoderOutput[1] = NULL;
+ return TRUE;
+ } else
+ return FALSE;
+ break;
+ default:
+ return FALSE;
+ }
+}
+
+/*
+ *
+ */
+static Bool
+rhdDIGSetCoherent(RHDPtr rhdPtr,struct rhdOutput *Output)
+{
+ Bool coherent = FALSE;
+ int from = X_CONFIG;
+
+ switch (RhdParseBooleanOption(&rhdPtr->coherent, Output->Name)) {
+ case RHD_OPTION_NOT_SET:
+ case RHD_OPTION_DEFAULT:
+ from = X_DEFAULT;
+ coherent = FALSE;
+ break;
+ case RHD_OPTION_ON:
+ coherent = TRUE;
+ break;
+ case RHD_OPTION_OFF:
+ coherent = FALSE;
+ break;
+ }
+ xf86DrvMsg(rhdPtr->scrnIndex,from,"Setting %s to %scoherent\n",
+ Output->Name,coherent ? "" : "in");
+
+ return coherent;
+}
+
+/*
+ *
+ */
+#ifdef NOT_YET
+static Bool
+digTransmitterPropertyWrapper(struct rhdOutput *Output,
+ enum rhdPropertyAction Action,
+ enum rhdOutputProperty Property,
+ union rhdPropertyData *val)
+{
+ struct DIGPrivate *Private = (struct DIGPrivate *)Output->Private;
+ void *storePrivate = Output->Private;
+ Bool (*func)(struct rhdOutput *,enum rhdPropertyAction, enum rhdOutputProperty,
+ union rhdPropertyData *) = Private->Transmitter.WrappedPropertyCallback;
+ Bool ret;
+
+ Output->Private = Private->Transmitter.PropertyPrivate;
+ ret = func(Output, Action, Property, val);
+ Output->Private = storePrivate;
+
+ return ret;
+}
+#endif
+
+/*
+ *
+ */
struct rhdOutput *
RHDDIGInit(RHDPtr rhdPtr, enum rhdOutputType outputType, CARD8 ConnectorType)
{
@@ -1397,17 +1699,17 @@ RHDDIGInit(RHDPtr rhdPtr, enum rhdOutputType outputType, CARD8 ConnectorType)
Output->Restore = DigRestore;
Output->Destroy = DigDestroy;
Output->Property = DigPropertyControl;
+ Output->AllocFree = DigAllocFree;
Private = xnfcalloc(sizeof(struct DIGPrivate), 1);
Output->Private = Private;
- Private->Coherent = FALSE;
+ Private->EncoderID = ENCODER_NONE;
switch (outputType) {
case RHD_OUTPUT_UNIPHYA:
#if defined (ATOM_BIOS) && defined (ATOM_BIOS_PARSER)
Output->Name = "UNIPHY_A";
- Private->EncoderID = ENCODER_DIG1;
Private->Transmitter.Private =
(struct ATOMTransmitterPrivate *)xnfcalloc(sizeof (struct ATOMTransmitterPrivate), 1);
@@ -1423,9 +1725,9 @@ RHDDIGInit(RHDPtr rhdPtr, enum rhdOutputType outputType, CARD8 ConnectorType)
struct ATOMTransmitterPrivate *transPrivate =
(struct ATOMTransmitterPrivate *)Private->Transmitter.Private;
struct atomTransmitterConfig *atc = &transPrivate->atomTransmitterConfig;
- atc->Coherent = Private->Coherent;
- atc->Encoder = atomEncoderDIG1;
+ atc->Coherent = Private->Coherent = rhdDIGSetCoherent(rhdPtr, Output);
atc->Link = atomTransLinkA;
+ atc->Encoder = atomEncoderNone;
if (RHDIsIGP(rhdPtr->ChipSet)) {
AtomBiosArgRec data;
data.val = 1;
@@ -1453,7 +1755,6 @@ RHDDIGInit(RHDPtr rhdPtr, enum rhdOutputType outputType, CARD8 ConnectorType)
case RHD_OUTPUT_UNIPHYB:
#if defined (ATOM_BIOS) && defined (ATOM_BIOS_PARSER)
Output->Name = "UNIPHY_B";
- Private->EncoderID = ENCODER_DIG2;
Private->Transmitter.Private =
(struct atomTransmitterPrivate *)xnfcalloc(sizeof (struct ATOMTransmitterPrivate), 1);
@@ -1469,9 +1770,9 @@ RHDDIGInit(RHDPtr rhdPtr, enum rhdOutputType outputType, CARD8 ConnectorType)
struct ATOMTransmitterPrivate *transPrivate =
(struct ATOMTransmitterPrivate *)Private->Transmitter.Private;
struct atomTransmitterConfig *atc = &transPrivate->atomTransmitterConfig;
- atc->Coherent = Private->Coherent;
- atc->Encoder = atomEncoderDIG2;
+ atc->Coherent = Private->Coherent = rhdDIGSetCoherent(rhdPtr, Output);
atc->Link = atomTransLinkB;
+ atc->Encoder = atomEncoderNone;
if (RHDIsIGP(rhdPtr->ChipSet)) {
AtomBiosArgRec data;
data.val = 2;
@@ -1498,10 +1799,9 @@ RHDDIGInit(RHDPtr rhdPtr, enum rhdOutputType outputType, CARD8 ConnectorType)
case RHD_OUTPUT_KLDSKP_LVTMA:
Output->Name = "UNIPHY_KLDSKP_LVTMA";
- Private->EncoderID = ENCODER_DIG2;
+ Private->Coherent = rhdDIGSetCoherent(rhdPtr, Output);
Private->Transmitter.Private =
(struct LVTMATransmitterPrivate *)xnfcalloc(sizeof (struct LVTMATransmitterPrivate), 1);
-
Private->Transmitter.Sense = NULL;
Private->Transmitter.ModeValid = LVTMATransmitterModeValid;
if (ConnectorType != RHD_CONNECTOR_PANEL) {
@@ -1528,6 +1828,7 @@ RHDDIGInit(RHDPtr rhdPtr, enum rhdOutputType outputType, CARD8 ConnectorType)
return NULL;
}
+
Encoder = (struct DIGEncoder *)(xnfcalloc(sizeof (struct DIGEncoder),1));
Private->Encoder.Private = Encoder;
Private->Encoder.ModeValid = EncoderModeValid;
@@ -1542,17 +1843,27 @@ RHDDIGInit(RHDPtr rhdPtr, enum rhdOutputType outputType, CARD8 ConnectorType)
Private->EncoderMode = LVDS;
GetLVDSInfo(rhdPtr, Private);
#ifdef ATOM_BIOS
- if (Private->BlLevel < 0)
- Private->BlLevel = RhdAtomSetupBacklightControlProperty(Output, &Private->Transmitter.Property);
+#ifdef NOT_YET
+ if (Private->BlLevel < 0) {
+ Private->BlLevel = RhdAtomSetupBacklightControlProperty(Output,
+ &Private->Transmitter.WrappedPropertyCallback,
+ &Private->Transmitter.PropertyPrivate);
+ if (Private->Transmitter.PropertyPrivate)
+ Private->Transmitter.Property = digTransmitterPropertyWrapper;
+ }
+#endif
#endif
+ Private->Hdmi = NULL;
break;
case RHD_CONNECTOR_DVI:
Private->RunDualLink = FALSE; /* will be set later acc to pxclk */
Private->EncoderMode = TMDS_DVI;
+ Private->Hdmi = RHDHdmiInit(rhdPtr, Output);
break;
case RHD_CONNECTOR_DVI_SINGLE:
Private->RunDualLink = FALSE;
- Private->EncoderMode = TMDS_DVI; /* currently also HDMI */
+ Private->EncoderMode = TMDS_DVI; /* changed later to HDMI if aplicateable */
+ Private->Hdmi = RHDHdmiInit(rhdPtr, Output);
break;
}
diff --git a/driver/xf86-video-radeonhd/src/rhd_dri.c b/driver/xf86-video-radeonhd/src/rhd_dri.c
index 12cb0f8a7..0ef678025 100644
--- a/driver/xf86-video-radeonhd/src/rhd_dri.c
+++ b/driver/xf86-video-radeonhd/src/rhd_dri.c
@@ -57,6 +57,11 @@
/* GLX/DRI/DRM definitions */
#define _XF86DRI_SERVER_
#include "dri.h"
+/* Workaround for header mismatches */
+#ifndef DEPRECATED
+# define DEPRECATED __attribute__ ((deprecated))
+# define __user
+#endif
#include "radeon_drm.h"
#include "GL/glxint.h"
#include "GL/glxtokens.h"
@@ -82,6 +87,7 @@
#include "radeon_dri.h"
#ifdef RANDR_12_SUPPORT // FIXME check / move to rhd_randr.c
+# include "xf86i2c.h" /* this is complete BS, stop using unnamed structs! */
# include "xf86Crtc.h"
#endif
@@ -380,8 +386,6 @@ static void RHDEnterServer(ScreenPtr pScreen)
if (rhdPtr->EXAInfo)
exaMarkSync(pScrn->pScreen);
#endif
- if (rhdPtr->XAAInfo)
- SET_SYNC_FLAG(rhdPtr->XAAInfo);
pSAREAPriv = (drm_radeon_sarea_t *)DRIGetSAREAPrivate(pScreen);
if (pSAREAPriv->ctx_owner != (signed) DRIGetContext(pScreen)) {
@@ -1109,6 +1113,8 @@ Bool RHDDRIPreInit(ScrnInfoPtr pScrn)
RHDFUNC(rhdPtr);
+ rhdPtr->directRenderingEnabled = FALSE;
+
if (!rhdPtr->useDRI.val.bool) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering turned off by"
" default. Use Option \"DRI\" to enable.\n");
@@ -1152,6 +1158,8 @@ Bool RHDDRIPreInit(ScrnInfoPtr pScrn)
rhdDRI->ringSize = RHD_DEFAULT_RING_SIZE;
rhdDRI->bufSize = RHD_DEFAULT_BUFFER_SIZE;
+ rhdDRI->drmFD = -1;
+
rhdDRI->gartLocation = 0;
#if 0
@@ -1244,7 +1252,6 @@ Bool RHDDRIAllocateBuffers(ScrnInfoPtr pScrn)
rhdPtr->FbFreeStart = old_freeoffset;
rhdPtr->FbFreeSize = old_freesize;
- /* return RHDDRICloseScreen(pScrn->pScreen); */
/* so far we are called from PreInit(): if we fail we free the DRI struct */
xfree(rhdPtr->dri);
rhdPtr->dri = NULL;
@@ -1347,12 +1354,15 @@ Bool RHDDRIScreenInit(ScreenPtr pScreen)
* in the SAREA header */
if (sizeof(XF86DRISAREARec)+sizeof(drm_radeon_sarea_t) > SAREA_MAX) {
ErrorF("Data does not fit in SAREA\n");
- return RHDDRICloseScreen(pScreen);
+ RHDDRICloseScreen(pScreen);
+ return FALSE;
}
pDRIInfo->SAREASize = SAREA_MAX;
- if (!(pRADEONDRI = (RADEONDRIPtr)xcalloc(sizeof(RADEONDRIRec),1)))
- return RHDDRICloseScreen(pScreen);
+ if (!(pRADEONDRI = (RADEONDRIPtr)xcalloc(sizeof(RADEONDRIRec),1))) {
+ RHDDRICloseScreen(pScreen);
+ return FALSE;
+ }
pDRIInfo->devPrivate = pRADEONDRI;
pDRIInfo->devPrivateSize = sizeof(RADEONDRIRec);
@@ -1375,7 +1385,8 @@ Bool RHDDRIScreenInit(ScreenPtr pScreen)
if (!DRIScreenInit(pScreen, pDRIInfo, &rhdDRI->drmFD)) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[dri] DRIScreenInit failed. Disabling DRI.\n");
- return RHDDRICloseScreen(pScreen);
+ RHDDRICloseScreen(pScreen);
+ return FALSE;
}
/* Initialize AGP */
@@ -1386,7 +1397,8 @@ Bool RHDDRIScreenInit(ScreenPtr pScreen)
xf86DrvMsg(pScreen->myNum, X_INFO,
"[agp] You may want to make sure the agpgart kernel "
"module\nis loaded before the radeon kernel module.\n");
- return RHDDRICloseScreen(pScreen);
+ RHDDRICloseScreen(pScreen);
+ return FALSE;
}
/* Initialize PCI */
@@ -1394,17 +1406,22 @@ Bool RHDDRIScreenInit(ScreenPtr pScreen)
!RHDDRIPciInit(rhdDRI, pScreen)) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[pci] PCI failed to initialize. Disabling the DRI.\n" );
- return RHDDRICloseScreen(pScreen);
+ RHDDRICloseScreen(pScreen);
+ return FALSE;
}
/* DRIScreenInit doesn't add all the common mappings. Add additional
* mappings here. */
- if (!RHDDRIMapInit(rhdPtr, pScreen))
- return RHDDRICloseScreen(pScreen);
+ if (!RHDDRIMapInit(rhdPtr, pScreen)) {
+ RHDDRICloseScreen(pScreen);
+ return FALSE;
+ }
/* FIXME: When are these mappings unmapped? */
- if (!RHDInitVisualConfigs(pScreen))
- return RHDDRICloseScreen(pScreen);
+ if (!RHDInitVisualConfigs(pScreen)) {
+ RHDDRICloseScreen(pScreen);
+ return FALSE;
+ }
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] Visual configs initialized\n");
@@ -1412,7 +1429,8 @@ Bool RHDDRIScreenInit(ScreenPtr pScreen)
if (RHDDRISetParam(pScrn, RADEON_SETPARAM_NEW_MEMMAP, 1) < 0) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"[drm] failed to enable new memory map\n");
- return RHDDRICloseScreen(pScreen);
+ RHDDRICloseScreen(pScreen);
+ return FALSE;
}
return TRUE;
@@ -1576,6 +1594,9 @@ void RHDDRIEnterVT(ScreenPtr pScreen)
RHDFUNC(rhdPtr);
+ if (rhdDRI->drmFD == -1)
+ return;
+
if (rhdPtr->cardType == RHD_CARD_AGP) {
if (!RHDSetAgpMode(rhdDRI, pScreen))
return;
@@ -1608,6 +1629,9 @@ void RHDDRILeaveVT(ScreenPtr pScreen)
RHDFUNC(rhdPtr);
+ if (rhdDRI->drmFD == -1)
+ return;
+
RHDDRISetVBlankInterrupt (pScrn, FALSE);
DRILock(pScrn->pScreen, 0);
@@ -1697,6 +1721,7 @@ Bool RHDDRICloseScreen(ScreenPtr pScreen)
/* De-allocate all DRI resources */
DRICloseScreen(pScreen);
+ rhdDRI->drmFD = -1;
/* De-allocate all DRI data structures */
if (rhdDRI->pDRIInfo) {
@@ -1716,10 +1741,9 @@ Bool RHDDRICloseScreen(ScreenPtr pScreen)
rhdDRI->pVisualConfigsPriv = NULL;
}
- xfree(rhdDRI);
- rhdPtr->dri = NULL;
+ rhdPtr->directRenderingEnabled = FALSE;
- return FALSE;
+ return TRUE;
}
@@ -1940,3 +1964,4 @@ RHDDRMIndirectBufferDiscard(int scrnIndex, CARD8 *Buffer)
"%s: Unable to retrieve the indirect Buffer at address %p!\n",
__func__, Buffer);
}
+
diff --git a/driver/xf86-video-radeonhd/src/rhd_driver.c b/driver/xf86-video-radeonhd/src/rhd_driver.c
index af4201384..05bd35a0c 100644
--- a/driver/xf86-video-radeonhd/src/rhd_driver.c
+++ b/driver/xf86-video-radeonhd/src/rhd_driver.c
@@ -116,6 +116,7 @@
#include "rhd_card.h"
#include "rhd_randr.h"
#include "rhd_cs.h"
+#include "rhd_audio.h"
#include "r5xx_accel.h"
#include "rhd_video.h"
@@ -156,7 +157,7 @@ static void rhdRestore(RHDPtr rhdPtr);
static Bool rhdModeLayoutSelect(RHDPtr rhdPtr);
static void rhdModeLayoutPrint(RHDPtr rhdPtr);
static void rhdModeDPISet(ScrnInfoPtr pScrn);
-static void rhdPrepareMode(RHDPtr rhdPtr);
+static void rhdAllIdle(RHDPtr rhdPtr);
static void rhdModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
static void rhdSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
static Bool rhdMapMMIO(RHDPtr rhdPtr);
@@ -247,7 +248,10 @@ typedef enum {
OPTION_USE_ATOMBIOS,
OPTION_ATOMBIOS, /* only for testing, don't document in man page! */
#endif
- OPTION_UNVERIFIED_FEAT
+ OPTION_UNVERIFIED_FEAT,
+ OPTION_AUDIO,
+ OPTION_HDMI,
+ OPTION_COHERENT
} RHDOpts;
static const OptionInfoRec RHDOptions[] = {
@@ -274,6 +278,9 @@ static const OptionInfoRec RHDOptions[] = {
{ OPTION_ATOMBIOS, "AtomBIOS", OPTV_ANYSTR, {0}, FALSE },
#endif
{ OPTION_UNVERIFIED_FEAT, "UnverifiedFeatures", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_AUDIO, "Audio", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_HDMI, "HDMI", OPTV_ANYSTR, {0}, FALSE },
+ { OPTION_COHERENT, "COHERENT", OPTV_ANYSTR, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -345,6 +352,7 @@ RHDFreeRec(ScrnInfoPtr pScrn)
RHDMCDestroy(rhdPtr);
RHDVGADestroy(rhdPtr);
RHDPLLsDestroy(rhdPtr);
+ RHDAudioDestroy(rhdPtr);
RHDLUTsDestroy(rhdPtr);
RHDOutputsDestroy(rhdPtr);
RHDConnectorsDestroy(rhdPtr);
@@ -785,6 +793,7 @@ RHDPreInit(ScrnInfoPtr pScrn, int flags)
RHDAtomCrtcsInit(rhdPtr);
if (!RHDPLLsInit(rhdPtr))
RHDAtomPLLsInit(rhdPtr);
+ RHDAudioInit(rhdPtr);
RHDLUTsInit(rhdPtr);
RHDCursorsInit(rhdPtr); /* do this irrespective of hw/sw cursor setting */
@@ -793,41 +802,42 @@ RHDPreInit(ScrnInfoPtr pScrn, int flags)
"Card information has invalid connector information\n");
goto error1;
}
-#ifdef ATOM_BIOS
- if (rhdPtr->Card
- && rhdPtr->Card->ConnectorInfo[0].Type != RHD_CONNECTOR_NONE
- && (rhdPtr->Card->DeviceInfo[0][0] != atomNone
- || rhdPtr->Card->DeviceInfo[0][1] != atomNone)) {
- int i, k = 0;
+ {
struct rhdAtomOutputDeviceList *OutputDeviceList = NULL;
-
- for (i = 0; i < RHD_CONNECTORS_MAX; i++) {
- int j;
- if (rhdPtr->Card->ConnectorInfo[i].Type == RHD_CONNECTOR_NONE)
- break;
- for (j = 0; j < MAX_OUTPUTS_PER_CONNECTOR; j++) {
- if (rhdPtr->Card->ConnectorInfo[i].Output[j] != RHD_OUTPUT_NONE) {
- if (!(OutputDeviceList = (struct rhdAtomOutputDeviceList *)xrealloc(
- OutputDeviceList, sizeof (struct rhdAtomOutputDeviceList) * (k + 1))))
- break;
- OutputDeviceList[k].ConnectorType = rhdPtr->Card->ConnectorInfo[i].Type;
- OutputDeviceList[k].DeviceId = rhdPtr->Card->DeviceInfo[i][j];
- OutputDeviceList[k].OutputType = rhdPtr->Card->ConnectorInfo[i].Output[j];
- RHDDebug(rhdPtr->scrnIndex, "OutputDevice: C: 0x%2.2x O: 0x%2.2x DevID: 0x%2.2x\n",
- OutputDeviceList[k].ConnectorType, OutputDeviceList[k].OutputType,
- OutputDeviceList[k].DeviceId);
- k++;
+#ifdef ATOM_BIOS
+ if (rhdPtr->Card
+ && rhdPtr->Card->ConnectorInfo[0].Type != RHD_CONNECTOR_NONE
+ && (rhdPtr->Card->DeviceInfo[0][0] != atomNone
+ || rhdPtr->Card->DeviceInfo[0][1] != atomNone)) {
+ int i, k = 0;
+
+ for (i = 0; i < RHD_CONNECTORS_MAX; i++) {
+ int j;
+ if (rhdPtr->Card->ConnectorInfo[i].Type == RHD_CONNECTOR_NONE)
+ break;
+ for (j = 0; j < MAX_OUTPUTS_PER_CONNECTOR; j++) {
+ if (rhdPtr->Card->ConnectorInfo[i].Output[j] != RHD_OUTPUT_NONE) {
+ if (!(OutputDeviceList = (struct rhdAtomOutputDeviceList *)xrealloc(
+ OutputDeviceList, sizeof (struct rhdAtomOutputDeviceList) * (k + 1))))
+ break;
+ OutputDeviceList[k].ConnectorType = rhdPtr->Card->ConnectorInfo[i].Type;
+ OutputDeviceList[k].DeviceId = rhdPtr->Card->DeviceInfo[i][j];
+ OutputDeviceList[k].OutputType = rhdPtr->Card->ConnectorInfo[i].Output[j];
+ RHDDebug(rhdPtr->scrnIndex, "OutputDevice: C: 0x%2.2x O: 0x%2.2x DevID: 0x%2.2x\n",
+ OutputDeviceList[k].ConnectorType, OutputDeviceList[k].OutputType,
+ OutputDeviceList[k].DeviceId);
+ k++;
+ }
}
}
- }
- } else {
- struct rhdAtomOutputDeviceList *OutputDeviceList = NULL;
- AtomBiosArgRec data;
+ } else {
+ AtomBiosArgRec data;
- data.chipset = rhdPtr->ChipSet;
- if (RHDAtomBiosFunc(rhdPtr->scrnIndex, rhdPtr->atomBIOS,
- ATOMBIOS_GET_OUTPUT_DEVICE_LIST, &data) == ATOM_SUCCESS)
- OutputDeviceList = data.OutputDeviceList;
+ data.chipset = rhdPtr->ChipSet;
+ if (RHDAtomBiosFunc(rhdPtr->scrnIndex, rhdPtr->atomBIOS,
+ ATOMBIOS_GET_OUTPUT_DEVICE_LIST, &data) == ATOM_SUCCESS)
+ OutputDeviceList = data.OutputDeviceList;
+ }
if (OutputDeviceList) {
struct rhdOutput *Output;
@@ -836,8 +846,9 @@ RHDPreInit(ScrnInfoPtr pScrn, int flags)
RHDAtomSetupOutputDriverPrivate(OutputDeviceList, Output);
xfree(OutputDeviceList);
}
- }
#endif
+ }
+
/*
* Set this here as we might need it for the validation of a fixed mode in
* rhdModeLayoutSelect(). Later it is used for Virtual selection and mode
@@ -1053,14 +1064,6 @@ RHDScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (!miSetPixmapDepths())
return FALSE;
-#ifdef USE_DRI
- /* Setup DRI after visuals have been established, but before fbScreenInit is
- * called. fbScreenInit will eventually call the driver's InitGLXVisuals
- * call back. */
- if (rhdPtr->dri)
- DriScreenInited = RHDDRIScreenInit(pScreen);
-#endif
-
/* Setup memory to which we draw; either shadow (RAM) or scanout (FB) */
if (rhdPtr->AccelMethod == RHD_ACCEL_SHADOWFB) {
if (!RHDShadowScreenInit(pScreen)) {
@@ -1070,6 +1073,21 @@ RHDScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
}
+ /* disable all memory accesses for MC setup */
+ RHDVGADisable(rhdPtr);
+ rhdAllIdle(rhdPtr);
+
+ /* now set up the MC - has to be done before DRI init */
+ RHDMCSetup(rhdPtr);
+
+#ifdef USE_DRI
+ /* Setup DRI after visuals have been established, but before fbScreenInit is
+ * called. fbScreenInit will eventually call the driver's InitGLXVisuals
+ * call back. */
+ if (rhdPtr->dri)
+ DriScreenInited = RHDDRIScreenInit(pScreen);
+#endif
+
/* shadowfb is allowed to fail gracefully too */
if ((rhdPtr->AccelMethod != RHD_ACCEL_SHADOWFB) &&
!fbScreenInit(pScreen, (CARD8 *) rhdPtr->FbBase + rhdPtr->FbScanoutStart,
@@ -1080,6 +1098,7 @@ RHDScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
return FALSE;
}
+ /* must be done after fbScreenInit() */
if (pScrn->depth > 8) {
/* Fixup RGB ordering */
visual = pScreen->visuals + pScreen->numVisuals;
@@ -1102,7 +1121,7 @@ RHDScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
#ifdef USE_DRI
if (DriScreenInited)
- RHDDRIFinishScreenInit(pScreen);
+ rhdPtr->directRenderingEnabled = RHDDRIFinishScreenInit(pScreen);
#endif
/* Initialize command submission backend */
@@ -1159,6 +1178,7 @@ RHDScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
RHDAtomBIOSScratchSetAccelratorMode(rhdPtr, TRUE);
#endif
+ RHDPrepareMode(rhdPtr);
/* now init the new mode */
if (rhdPtr->randr)
RHDRandrModeInit(pScrn);
@@ -1168,15 +1188,23 @@ RHDScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* fix viewport */
RHDAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+ /* enable/disable audio */
+ RHDAudioSetEnable(rhdPtr, rhdPtr->audio.val.bool);
+
/* Initialise cursor functions */
miDCInitialize (pScreen, xf86GetPointerScreenFuncs());
/* Inititalize HW cursor */
- if (!rhdPtr->swCursor.val.bool)
- if (!RHDxf86InitCursor(pScreen))
+ if (!rhdPtr->swCursor.val.bool) {
+ Bool ret;
+ if (rhdPtr->randr == NULL)
+ ret = RHDxf86InitCursor(pScreen);
+ else
+ ret = RHDRRInitCursor(pScreen);
+ if (!ret)
xf86DrvMsg(scrnIndex, X_ERROR,
"Hardware cursor initialization failed\n");
-
+ }
/* default colormap */
if(!miCreateDefColormap(pScreen))
return FALSE;
@@ -1212,22 +1240,17 @@ RHDScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
return TRUE;
}
-void
-RHDAllIdle(ScrnInfoPtr pScrn)
+static void
+rhdAllIdle(RHDPtr rhdPtr)
{
- RHDPtr rhdPtr = RHDPTR(pScrn);
int i;
- struct rhdCrtc *Crtc;
/* stop scanout */
- for (i = 0; i < 2; i++) {
- Crtc = rhdPtr->Crtc[i];
- if (pScrn->scrnIndex == Crtc->scrnIndex)
- Crtc->Power(Crtc, RHD_POWER_RESET);
- }
+ for (i = 0; i < 2; i++)
+ rhdPtr->Crtc[i]->Power(rhdPtr->Crtc[i], RHD_POWER_RESET);
if (!RHDMCIdle(rhdPtr, 1000))
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "MC not idle\n");
+ xf86DrvMsg(rhdPtr->scrnIndex, X_WARNING, "MC not idle\n");
}
@@ -1287,7 +1310,7 @@ RHDCloseScreen(int scrnIndex, ScreenPtr pScreen)
RHDCSStop(rhdPtr->CS);
if (pScrn->vtSema)
- RHDAllIdle(pScrn);
+ rhdAllIdle(rhdPtr);
#ifdef USE_DRI
if (rhdPtr->dri)
@@ -1322,6 +1345,13 @@ RHDEnterVT(int scrnIndex, int flags)
rhdSave(rhdPtr);
+ /* disable all memory accesses for MC setup */
+ RHDVGADisable(rhdPtr);
+ rhdAllIdle(rhdPtr);
+
+ /* now set up the MC - has to be done before DRI init */
+ RHDMCSetup(rhdPtr);
+
#ifdef ATOM_BIOS
/* Set accelerator mode in the BIOSScratch registers */
RHDAtomBIOSScratchSetAccelratorMode(rhdPtr, TRUE);
@@ -1340,15 +1370,24 @@ RHDEnterVT(int scrnIndex, int flags)
RHDAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+ /* enable/disable audio */
+ RHDAudioSetEnable(rhdPtr, rhdPtr->audio.val.bool);
+
#ifdef USE_DRI
if (rhdPtr->dri)
RHDDRIEnterVT(pScrn->pScreen);
#endif
if (rhdPtr->CS) {
- if ((rhdPtr->ChipSet < RHD_R600) && rhdPtr->TwoDPrivate) {
- R5xx2DSetup(pScrn);
- R5xx2DIdle(pScrn);
+ if (rhdPtr->ChipSet < RHD_R600) {
+ if (rhdPtr->TwoDPrivate) {
+ R5xx2DSetup(pScrn);
+ R5xx2DIdle(pScrn);
+ }
+
+ if (rhdPtr->ThreeDPrivate)
+ ((struct R5xx3D *) rhdPtr->ThreeDPrivate)->XHas3DEngineState =
+ FALSE;
}
RHDCSStart(rhdPtr->CS);
@@ -1382,7 +1421,10 @@ RHDLeaveVT(int scrnIndex, int flags)
if (rhdPtr->CS)
RHDCSStop(rhdPtr->CS);
- RHDAllIdle(pScrn);
+ rhdAllIdle(rhdPtr);
+
+ if (rhdPtr->randr)
+ RHDRRFreeShadow(pScrn);
rhdRestore(rhdPtr);
}
@@ -1400,7 +1442,7 @@ RHDSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
if (rhdPtr->randr)
RHDRandrSwitchMode(pScrn, mode);
else {
- rhdPrepareMode(rhdPtr);
+ RHDPrepareMode(rhdPtr);
rhdSetMode(xf86Screens[scrnIndex], mode);
}
@@ -1730,6 +1772,8 @@ rhdMapFB(RHDPtr rhdPtr)
}
}
if (SetIGPMemory) {
+ CARD32 FbMapSizePCI = rhdPtr->FbMapSize;
+
xf86DrvMsg(rhdPtr->scrnIndex, option, "Mapping IGP memory @ 0x%8.8x\n",rhdPtr->FbPhysAddress);
rhdPtr->FbMapSize = pScrn->videoRam * 1024;
#ifdef XSERVER_LIBPCIACCESS
@@ -1748,6 +1792,9 @@ rhdMapFB(RHDPtr rhdPtr)
rhdPtr->FbPhysAddress,
rhdPtr->FbMapSize);
#endif
+ /* If mapping was unsuccessful restore old size */
+ if (!rhdPtr->FbBase)
+ rhdPtr->FbMapSize = FbMapSizePCI;
} else {
xf86DrvMsg(rhdPtr->scrnIndex, option, "Not Mapping IGP memory\n");
}
@@ -1918,7 +1965,7 @@ rhdModeLayoutSelect(RHDPtr rhdPtr)
struct rhdOutput *Output;
struct rhdConnector *Connector;
Bool Found = FALSE;
- char *ignore = NULL;
+ RHDOpt ignore;
Bool ConnectorIsDMS59 = FALSE;
int i = 0;
@@ -1939,7 +1986,7 @@ rhdModeLayoutSelect(RHDPtr rhdPtr)
}
/* quick and dirty option so that some output choice exists */
- ignore = xf86GetOptValString(rhdPtr->Options, OPTION_IGNORECONNECTOR);
+ RhdGetOptValString (rhdPtr->Options, OPTION_IGNORECONNECTOR, &ignore, "");
/* handle cards with DMS-59 connectors appropriately. The DMS-59 to VGA
adapter does not raise HPD at all, so we need a fallback there. */
@@ -1957,10 +2004,15 @@ rhdModeLayoutSelect(RHDPtr rhdPtr)
if (!Connector)
continue;
- if (ignore && !strcasecmp(Connector->Name, ignore)) {
- xf86DrvMsg(rhdPtr->scrnIndex, X_INFO,
- "Skipping connector \"%s\"\n", ignore);
- continue;
+ switch(RhdParseBooleanOption(&ignore, Connector->Name)) {
+ case RHD_OPTION_ON:
+ case RHD_OPTION_DEFAULT:
+ xf86DrvMsg(rhdPtr->scrnIndex, X_INFO,
+ "Skipping connector \"%s\"\n", Connector->Name);
+ continue;
+ case RHD_OPTION_OFF:
+ case RHD_OPTION_NOT_SET:
+ break;
}
if (Connector->HPDCheck) {
@@ -1990,7 +2042,7 @@ rhdModeLayoutSelect(RHDPtr rhdPtr)
xf86DrvMsg(rhdPtr->scrnIndex, X_WARNING, "Unable to attach a"
" monitor to connector \"%s\"\n", Connector->Name);
Output->Active = FALSE;
- } else {
+ } else if (!Output->AllocFree || Output->AllocFree(Output, RHD_OUTPUT_ALLOC)){
Connector->Monitor = Monitor;
Output->Active = TRUE;
@@ -2230,17 +2282,16 @@ rhdModeLayoutPrint(RHDPtr rhdPtr)
/*
*
*/
-static void
-rhdPrepareMode(RHDPtr rhdPtr)
+void
+RHDPrepareMode(RHDPtr rhdPtr)
{
RHDFUNC(rhdPtr);
+ /* Stop crap from being shown: gets reenabled through SaveScreen */
+ rhdPtr->Crtc[0]->Blank(rhdPtr->Crtc[0], TRUE);
+ rhdPtr->Crtc[1]->Blank(rhdPtr->Crtc[1], TRUE);
/* no active outputs == no mess */
RHDOutputsPower(rhdPtr, RHD_POWER_RESET);
-
- /* Disable CRTCs to stop noise from appearing. */
- rhdPtr->Crtc[0]->Power(rhdPtr->Crtc[0], RHD_POWER_RESET);
- rhdPtr->Crtc[1]->Power(rhdPtr->Crtc[1], RHD_POWER_RESET);
}
/*
@@ -2254,18 +2305,6 @@ rhdModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
RHDFUNC(rhdPtr);
pScrn->vtSema = TRUE;
- /* Stop crap from being shown: gets reenabled through SaveScreen */
- rhdPtr->Crtc[0]->Blank(rhdPtr->Crtc[0], TRUE);
- rhdPtr->Crtc[1]->Blank(rhdPtr->Crtc[1], TRUE);
-
- rhdPrepareMode(rhdPtr);
-
- /* now disable our VGA Mode */
- RHDVGADisable(rhdPtr);
-
- /* now set up the MC */
- RHDMCSetup(rhdPtr);
-
rhdSetMode(pScrn, mode);
}
@@ -2344,6 +2383,7 @@ rhdSave(RHDPtr rhdPtr)
rhdPtr->BIOSScratch = RHDSaveBiosScratchRegisters(rhdPtr);
#endif
RHDPLLsSave(rhdPtr);
+ RHDAudioSave(rhdPtr);
RHDLUTsSave(rhdPtr);
RHDCrtcSave(rhdPtr->Crtc[0]);
@@ -2363,10 +2403,10 @@ rhdRestore(RHDPtr rhdPtr)
RHDRestoreMC(rhdPtr);
- if (rhdPtr->CursorInfo)
- rhdRestoreCursor(pScrn);
+ rhdRestoreCursor(pScrn);
RHDPLLsRestore(rhdPtr);
+ RHDAudioRestore(rhdPtr);
RHDLUTsRestore(rhdPtr);
RHDVGARestore(rhdPtr);
@@ -2742,7 +2782,12 @@ rhdProcessOptions(ScrnInfoPtr pScrn)
&rhdPtr->unverifiedFeatures, FALSE);
RhdGetOptValBool (rhdPtr->Options, OPTION_USE_ATOMBIOS,
&rhdPtr->UseAtomBIOS, FALSE);
-
+ RhdGetOptValBool (rhdPtr->Options, OPTION_AUDIO,
+ &rhdPtr->audio, TRUE);
+ RhdGetOptValString (rhdPtr->Options, OPTION_HDMI,
+ &rhdPtr->hdmi, "none");
+ RhdGetOptValString(rhdPtr->Options, OPTION_COHERENT,
+ &rhdPtr->coherent, NULL);
#ifdef ATOM_BIOS
rhdParseAtomBIOSUsage(pScrn);
#endif
@@ -2766,6 +2811,7 @@ rhdProcessOptions(ScrnInfoPtr pScrn)
" Please report your findings to radeonhd@opensuse.org\n");
}
+
/*
* rhdDoReadPCIBios(): do the actual reading, return size and copy in ptr
*/
diff --git a/driver/xf86-video-radeonhd/src/rhd_hdmi.c b/driver/xf86-video-radeonhd/src/rhd_hdmi.c
new file mode 100644
index 000000000..e342ef46b
--- /dev/null
+++ b/driver/xf86-video-radeonhd/src/rhd_hdmi.c
@@ -0,0 +1,529 @@
+/*
+ * Copyright 2008 Christian König <deathsimple@vodafone.de>
+ * Copyright 2007 Luc Verhaegen <lverhaegen@novell.com>
+ * Copyright 2007 Matthias Hopf <mhopf@novell.com>
+ * Copyright 2007 Egbert Eich <eich@novell.com>
+ * Copyright 2007 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "xf86.h"
+
+#include "rhd.h"
+#include "rhd_audio.h"
+#include "rhd_connector.h"
+#include "rhd_output.h"
+#include "rhd_hdmi.h"
+#include "rhd_regs.h"
+
+enum HdmiColorFormat {
+ RGB = 0,
+ YCC_422 = 1,
+ YCC_444 = 2
+};
+
+struct {
+ CARD32 Clock;
+
+ int N_32kHz;
+ int CTS_32kHz;
+
+ int N_44_1kHz;
+ int CTS_44_1kHz;
+
+ int N_48kHz;
+ int CTS_48kHz;
+
+} AudioClockRegeneration[] = {
+ /* 32kHz 44.1kHz 48kHz */
+ /* Clock N CTS N CTS N CTS */
+ { 25174, 4576, 28125, 7007, 31250, 6864, 28125 }, /* 25,20/1.001 MHz */
+ { 25200, 4096, 25200, 6272, 28000, 6144, 25200 }, /* 25.20 MHz */
+ { 27000, 4096, 27000, 6272, 30000, 6144, 27000 }, /* 27.00 MHz */
+ { 27027, 4096, 27027, 6272, 30030, 6144, 27027 }, /* 27.00*1.001 MHz */
+ { 54000, 4096, 54000, 6272, 60000, 6144, 54000 }, /* 54.00 MHz */
+ { 54054, 4096, 54054, 6272, 60060, 6144, 54054 }, /* 54.00*1.001 MHz */
+ { 74175, 11648, 210937, 17836, 234375, 11648, 140625 }, /* 74.25/1.001 MHz */
+ { 74250, 4096, 74250, 6272, 82500, 6144, 74250 }, /* 74.25 MHz */
+ { 148351, 11648, 421875, 8918, 234375, 5824, 140625 }, /* 148.50/1.001 MHz */
+ { 148500, 4096, 148500, 6272, 165000, 6144, 148500 }, /* 148.50 MHz */
+ { 0, 4096, 0, 6272, 0, 6144, 0 } /* Other */
+};
+
+/*
+ * calculate CTS value if it's not found in the table
+ */
+static void
+HdmiCalcCTS(struct rhdHdmi *hdmi, CARD32 Clock, int* CTS, int N, int freq)
+{
+ if(*CTS == 0) *CTS = (long long)Clock*1000*N/(128*freq);
+ xf86DrvMsg(hdmi->scrnIndex, X_INFO, "Using ACR timing N=%d CTS=%d for frequency %d\n",N,*CTS,freq);
+}
+
+/*
+ * update the N and CTS parameters for a given clock rate
+ */
+static void
+HdmiAudioClockRegeneration(struct rhdHdmi *hdmi, CARD32 Clock)
+{
+ int CTS;
+ int N;
+ int i;
+ for(i=0; AudioClockRegeneration[i].Clock != Clock && AudioClockRegeneration[i].Clock != 0; i++);
+
+ CTS = AudioClockRegeneration[i].CTS_32kHz;
+ N = AudioClockRegeneration[i].N_32kHz;
+ HdmiCalcCTS(hdmi, Clock, &CTS, N, 32000);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_32kHz_CTS, CTS << 12);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_32kHz_N, N);
+
+ CTS = AudioClockRegeneration[i].CTS_44_1kHz;
+ N = AudioClockRegeneration[i].N_44_1kHz;
+ HdmiCalcCTS(hdmi, Clock, &CTS, N, 44100);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_44_1kHz_CTS, CTS << 12);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_44_1kHz_N, N);
+
+ CTS = AudioClockRegeneration[i].CTS_48kHz;
+ N = AudioClockRegeneration[i].N_48kHz;
+ HdmiCalcCTS(hdmi, Clock, &CTS, N, 48000);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_48kHz_CTS, CTS << 12);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_48kHz_N, N);
+}
+
+/*
+ * calculate the crc for a given info frame
+ */
+static void
+HdmiInfoFrameChecksum(CARD8 packetType, CARD8 versionNumber, CARD8 length, CARD8* frame)
+{
+ int i;
+ frame[0] = packetType + versionNumber + length;
+ for(i=1;i<=length;i++)
+ frame[0] += frame[i];
+ frame[0] = 0x100 - frame[0];
+}
+
+/*
+ * build a HDMI Video Info Frame
+ */
+static void
+HdmiVideoInfoFrame(
+ struct rhdHdmi *hdmi,
+ enum HdmiColorFormat ColorFormat,
+ Bool ActiveInformationPresent,
+ CARD8 ActiveFormatAspectRatio,
+ CARD8 ScanInformation,
+ CARD8 Colorimetry,
+ CARD8 ExColorimetry,
+ CARD8 Quantization,
+ Bool ITC,
+ CARD8 PictureAspectRatio,
+ CARD8 VideoFormatIdentification,
+ CARD8 PixelRepetition,
+ CARD8 NonUniformPictureScaling,
+ CARD8 BarInfoDataValid,
+ CARD16 TopBar,
+ CARD16 BottomBar,
+ CARD16 LeftBar,
+ CARD16 RightBar
+)
+{
+ CARD8 frame[14];
+
+ frame[0x0] = 0;
+ frame[0x1] =
+ (ScanInformation & 0x3) |
+ ((BarInfoDataValid & 0x3) << 2) |
+ ((ActiveInformationPresent & 0x1) << 4) |
+ ((ColorFormat & 0x3) << 5);
+ frame[0x2] =
+ (ActiveFormatAspectRatio & 0xF) |
+ ((PictureAspectRatio & 0x3) << 4) |
+ ((Colorimetry & 0x3) << 6);
+ frame[0x3] =
+ (NonUniformPictureScaling & 0x3) |
+ ((Quantization & 0x3) << 2) |
+ ((ExColorimetry & 0x7) << 4) |
+ ((ITC & 0x1) << 7);
+ frame[0x4] = (VideoFormatIdentification & 0x7F);
+ frame[0x5] = (PixelRepetition & 0xF);
+ frame[0x6] = (TopBar & 0xFF);
+ frame[0x7] = (TopBar >> 8);
+ frame[0x8] = (BottomBar & 0xFF);
+ frame[0x9] = (BottomBar >> 8);
+ frame[0xA] = (LeftBar & 0xFF);
+ frame[0xB] = (LeftBar >> 8);
+ frame[0xC] = (RightBar & 0xFF);
+ frame[0xD] = (RightBar >> 8);
+
+ HdmiInfoFrameChecksum(0x82, 0x02, 0x0D, frame);
+
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_0,
+ frame[0x0] | (frame[0x1] << 8) | (frame[0x2] << 16) | (frame[0x3] << 24));
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_1,
+ frame[0x4] | (frame[0x5] << 8) | (frame[0x6] << 16) | (frame[0x7] << 24));
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_2,
+ frame[0x8] | (frame[0x9] << 8) | (frame[0xA] << 16) | (frame[0xB] << 24));
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_3,
+ frame[0xC] | (frame[0xD] << 8));
+}
+
+/*
+ * build a Audio Info Frame
+ */
+static void
+HdmiAudioInfoFrame(
+ struct rhdHdmi *hdmi,
+ CARD8 ChannelCount,
+ CARD8 CodingType,
+ CARD8 SampleSize,
+ CARD8 SampleFrequency,
+ CARD8 Format,
+ CARD8 ChannelAllocation,
+ CARD8 LevelShift,
+ Bool DownmixInhibit
+)
+{
+ CARD8 frame[11];
+
+ frame[0x0] = 0;
+ frame[0x1] = (ChannelCount & 0x7) | ((CodingType & 0xF) << 4);
+ frame[0x2] = (SampleSize & 0x3) | ((SampleFrequency & 0x7) << 2);
+ frame[0x3] = Format;
+ frame[0x4] = ChannelAllocation;
+ frame[0x5] = ((LevelShift & 0xF) << 3) | ((DownmixInhibit & 0x1) << 7);
+ frame[0x6] = 0;
+ frame[0x7] = 0;
+ frame[0x8] = 0;
+ frame[0x9] = 0;
+ frame[0xA] = 0;
+
+ HdmiInfoFrameChecksum(0x84, 0x01, 0x0A, frame);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_AUDIOINFOFRAME_0,
+ frame[0x0] | (frame[0x1] << 8) | (frame[0x2] << 16) | (frame[0x3] << 24));
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_AUDIOINFOFRAME_1,
+ frame[0x4] | (frame[0x5] << 8) | (frame[0x6] << 16) | (frame[0x8] << 24));
+}
+
+/*
+ * it's unknown what these bits do excatly, but it's indeed quite usefull for debugging
+ */
+static void
+HdmiAudioDebugWorkaround(struct rhdHdmi* hdmi, Bool Enable)
+{
+ if(Enable) {
+ RHDRegMask(hdmi, hdmi->Offset+HDMI_CNTL, 0x1000, 0x1000);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_AUDIO_DEBUG, 0xffffff);
+ } else {
+ RHDRegMask(hdmi, hdmi->Offset+HDMI_CNTL, 0, 0x1000);
+ }
+}
+
+/*
+ * allocate/initialize the HDMI structure
+ * and register with audio engine
+ * output selects which engine is used
+ */
+struct rhdHdmi*
+RHDHdmiInit(RHDPtr rhdPtr, struct rhdOutput* Output)
+{
+ struct rhdHdmi *hdmi;
+ RHDFUNC(rhdPtr);
+
+ if(rhdPtr->ChipSet >= RHD_R600) {
+ hdmi = (struct rhdHdmi *) xnfcalloc(sizeof(struct rhdHdmi), 1);
+ hdmi->scrnIndex = rhdPtr->scrnIndex;
+ hdmi->Output = Output;
+ switch(Output->Id) {
+ case RHD_OUTPUT_TMDSA:
+ hdmi->Offset = HDMI_TMDS;
+ break;
+
+ case RHD_OUTPUT_LVTMA:
+ hdmi->Offset = HDMI_LVTMA;
+ break;
+
+ case RHD_OUTPUT_UNIPHYA:
+ hdmi->Offset = HDMI_TMDS;
+ break;
+
+ case RHD_OUTPUT_KLDSKP_LVTMA:
+ hdmi->Offset = HDMI_DIG;
+ break;
+
+ /*case RHD_OUTPUT_UNIPHYB: */
+
+ default:
+ xf86DrvMsg(hdmi->scrnIndex, X_ERROR, "%s: unknown HDMI output type\n", __func__);
+ xfree(hdmi);
+ return NULL;
+ break;
+ }
+ hdmi->Stored = FALSE;
+ RHDAudioRegisterHdmi(rhdPtr, hdmi);
+ return hdmi;
+ } else
+ return NULL;
+}
+
+/*
+ * update the info frames with the data from the current display mode
+ */
+void
+RHDHdmiSetMode(struct rhdHdmi *hdmi, DisplayModePtr Mode)
+{
+ if(!hdmi) return;
+ RHDFUNC(hdmi);
+
+ RHDAudioSetClock(RHDPTRI(hdmi), hdmi->Output, Mode->Clock);
+
+ HdmiAudioDebugWorkaround(hdmi, FALSE);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_UNKNOWN_0, 0x1000);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_UNKNOWN_1, 0x0);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_UNKNOWN_2, 0x1000);
+
+ HdmiAudioClockRegeneration(hdmi, Mode->Clock);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOCNTL, 0x13);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VERSION, 0x202);
+
+ HdmiVideoInfoFrame(hdmi, RGB, FALSE, 0, 0, 0,
+ 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+
+ /* audio packets per line, does anyone know how to calc this ? */
+ RHDRegMask(hdmi, hdmi->Offset+HDMI_CNTL, 0x020000, 0x1F0000);
+
+ /* update? reset? don't realy know */
+ RHDRegMask(hdmi, hdmi->Offset+HDMI_CNTL, 0x14000000, 0x14000000);
+}
+
+/*
+ * update settings whith current parameters from audio engine
+ */
+void
+RHDHdmiUpdateAudioSettings(
+ struct rhdHdmi* hdmi,
+ Bool playing,
+ int channels,
+ int rate,
+ int bps,
+ CARD8 status_bits,
+ CARD8 category_code
+)
+{
+ CARD32 iec;
+
+ if(!hdmi) return;
+ RHDFUNC(hdmi);
+
+ xf86DrvMsg(hdmi->scrnIndex, X_INFO, "%s: %s with "
+ "%d channels, %d Hz sampling rate, %d bits per sample,\n",
+ __func__, playing ? "playing" : "stoped", channels, rate, bps);
+ xf86DrvMsg(hdmi->scrnIndex, X_INFO, "%s: "
+ "0x%02x IEC60958 status bits and 0x%02x category code\n",
+ __func__, (int)status_bits, (int)category_code);
+
+ /* start delivering audio frames */
+ RHDRegMask(hdmi, hdmi->Offset+HDMI_CNTL, playing ? 1 : 0, 0x1);
+
+ iec = 0;
+ if(status_bits & AUDIO_STATUS_PROFESSIONAL) iec |= 1 << 0;
+ if(status_bits & AUDIO_STATUS_NONAUDIO) iec |= 1 << 1;
+ if(status_bits & AUDIO_STATUS_COPYRIGHT) iec |= 1 << 2;
+ if(status_bits & AUDIO_STATUS_EMPHASIS) iec |= 1 << 3;
+
+ iec |= category_code << 8;
+
+ switch(rate)
+ {
+ case 32000: iec |= 0x3 << 24; break;
+ case 44100: iec |= 0x0 << 24; break;
+ case 88200: iec |= 0x8 << 24; break;
+ case 176400: iec |= 0xc << 24; break;
+ case 48000: iec |= 0x2 << 24; break;
+ case 96000: iec |= 0xa << 24; break;
+ case 192000: iec |= 0xe << 24; break;
+ }
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_IEC60958_1, iec);
+
+ iec = 0;
+ switch(bps)
+ {
+ case 16: iec |= 0x2; break;
+ case 20: iec |= 0x3; break;
+ case 24: iec |= 0xb; break;
+ }
+ if(status_bits & AUDIO_STATUS_V) iec |= 0x5 << 16;
+
+ RHDRegMask(hdmi, hdmi->Offset+HDMI_IEC60958_2, iec, 0x5000f);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_AUDIOCNTL, 0x31);
+ HdmiAudioInfoFrame(hdmi, channels-1, 0, 0, 0, 0, 0, 0, FALSE);
+
+ RHDRegMask(hdmi, hdmi->Offset+HDMI_CNTL, 0x400000, 0x400000);
+}
+
+/*
+ * enable/disable the HDMI engine
+ */
+void
+RHDHdmiEnable(struct rhdHdmi *hdmi, Bool Enable)
+{
+ if(!hdmi) return;
+ RHDFUNC(hdmi);
+
+ /* some version of atombios ignore the enable HDMI flag
+ * so enabling/disabling HDMI was moved here for TMDSA and LVTMA */
+ switch(hdmi->Output->Id) {
+ case RHD_OUTPUT_TMDSA:
+ RHDRegMask(hdmi, TMDSA_CNTL, Enable ? 0x4 : 0x0, 0x4);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_ENABLE, Enable ? 0x101 : 0x0);
+ break;
+
+ case RHD_OUTPUT_LVTMA:
+ RHDRegMask(hdmi, LVTMA_CNTL, Enable ? 0x4 : 0x0, 0x4);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_ENABLE, Enable ? 0x105 : 0x0);
+ break;
+
+ case RHD_OUTPUT_UNIPHYA:
+ case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_KLDSKP_LVTMA:
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_ENABLE, Enable ? 0x110 : 0x0);
+ break;
+
+ default:
+ xf86DrvMsg(hdmi->scrnIndex, X_ERROR, "%s: unknown HDMI output type\n", __func__);
+ break;
+ }
+}
+
+/*
+ * save the current config of HDMI engine
+ */
+void
+RHDHdmiSave(struct rhdHdmi *hdmi)
+{
+ if(!hdmi) return;
+ RHDFUNC(hdmi);
+
+ hdmi->StoreEnable = RHDRegRead(hdmi, hdmi->Offset+HDMI_ENABLE);
+ hdmi->StoreControl = RHDRegRead(hdmi, hdmi->Offset+HDMI_CNTL);
+ hdmi->StoredAudioDebugWorkaround = RHDRegRead(hdmi, hdmi->Offset+HDMI_AUDIO_DEBUG);
+
+ hdmi->StoredFrameVersion = RHDRegRead(hdmi, hdmi->Offset+HDMI_VERSION);
+
+ hdmi->StoredVideoControl = RHDRegRead(hdmi, hdmi->Offset+HDMI_VIDEOCNTL);
+ hdmi->StoreVideoInfoFrame[0x0] = RHDRegRead(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_0);
+ hdmi->StoreVideoInfoFrame[0x1] = RHDRegRead(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_1);
+ hdmi->StoreVideoInfoFrame[0x2] = RHDRegRead(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_2);
+ hdmi->StoreVideoInfoFrame[0x3] = RHDRegRead(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_3);
+
+ hdmi->StoredAudioControl = RHDRegRead(hdmi, hdmi->Offset+HDMI_AUDIOCNTL);
+ hdmi->StoreAudioInfoFrame[0x0] = RHDRegRead(hdmi, hdmi->Offset+HDMI_AUDIOINFOFRAME_0);
+ hdmi->StoreAudioInfoFrame[0x1] = RHDRegRead(hdmi, hdmi->Offset+HDMI_AUDIOINFOFRAME_1);
+
+ hdmi->Store_32kHz_N = RHDRegRead(hdmi, hdmi->Offset+HDMI_32kHz_N);
+ hdmi->Store_32kHz_CTS = RHDRegRead(hdmi, hdmi->Offset+HDMI_32kHz_CTS);
+
+ hdmi->Store_44_1kHz_N = RHDRegRead(hdmi, hdmi->Offset+HDMI_44_1kHz_N);
+ hdmi->Store_44_1kHz_CTS = RHDRegRead(hdmi, hdmi->Offset+HDMI_44_1kHz_CTS);
+
+ hdmi->Store_48kHz_N = RHDRegRead(hdmi, hdmi->Offset+HDMI_48kHz_N);
+ hdmi->Store_48kHz_CTS = RHDRegRead(hdmi, hdmi->Offset+HDMI_48kHz_CTS);
+
+ hdmi->StoreIEC60958[0] = RHDRegRead(hdmi, hdmi->Offset+HDMI_IEC60958_1);
+ hdmi->StoreIEC60958[1] = RHDRegRead(hdmi, hdmi->Offset+HDMI_IEC60958_2);
+
+ hdmi->StoreUnknown[0x0] = RHDRegRead(hdmi, hdmi->Offset+HDMI_UNKNOWN_0);
+ hdmi->StoreUnknown[0x1] = RHDRegRead(hdmi, hdmi->Offset+HDMI_UNKNOWN_1);
+ hdmi->StoreUnknown[0x2] = RHDRegRead(hdmi, hdmi->Offset+HDMI_UNKNOWN_2);
+
+ hdmi->Stored = TRUE;
+}
+
+/*
+ * restore the saved config of HDMI engine
+ */
+void
+RHDHdmiRestore(struct rhdHdmi *hdmi)
+{
+ if(!hdmi) return;
+ RHDFUNC(hdmi);
+
+ if (!hdmi->Stored) {
+ xf86DrvMsg(hdmi->scrnIndex, X_ERROR, "%s: trying to restore "
+ "uninitialized values.\n", __func__);
+ return;
+ }
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_ENABLE, hdmi->StoreEnable);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_CNTL, hdmi->StoreControl);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_AUDIO_DEBUG, hdmi->StoredAudioDebugWorkaround);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VERSION, hdmi->StoredFrameVersion);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOCNTL, hdmi->StoredVideoControl);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_0, hdmi->StoreVideoInfoFrame[0x0]);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_1, hdmi->StoreVideoInfoFrame[0x1]);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_2, hdmi->StoreVideoInfoFrame[0x2]);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_VIDEOINFOFRAME_3, hdmi->StoreVideoInfoFrame[0x3]);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_AUDIOCNTL, hdmi->StoredAudioControl);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_AUDIOINFOFRAME_0, hdmi->StoreAudioInfoFrame[0x0]);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_AUDIOINFOFRAME_1, hdmi->StoreAudioInfoFrame[0x1]);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_32kHz_N, hdmi->Store_32kHz_N);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_32kHz_CTS, hdmi->Store_32kHz_CTS);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_44_1kHz_N, hdmi->Store_44_1kHz_N);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_44_1kHz_CTS, hdmi->Store_44_1kHz_CTS);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_48kHz_N, hdmi->Store_48kHz_N);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_48kHz_CTS, hdmi->Store_48kHz_CTS);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_IEC60958_1, hdmi->StoreIEC60958[0]);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_IEC60958_2, hdmi->StoreIEC60958[1]);
+
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_UNKNOWN_0, hdmi->StoreUnknown[0x0]);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_UNKNOWN_1, hdmi->StoreUnknown[0x1]);
+ RHDRegWrite(hdmi, hdmi->Offset+HDMI_UNKNOWN_2, hdmi->StoreUnknown[0x2]);
+}
+
+/*
+ * unregister with audio engine and release memory
+ */
+void
+RHDHdmiDestroy(struct rhdHdmi *hdmi)
+{
+ if(!hdmi) return;
+ RHDFUNC(hdmi);
+
+ RHDAudioUnregisterHdmi(RHDPTRI(hdmi), hdmi);
+
+ xfree(hdmi);
+}
diff --git a/driver/xf86-video-radeonhd/src/rhd_hdmi.h b/driver/xf86-video-radeonhd/src/rhd_hdmi.h
new file mode 100644
index 000000000..7518a1372
--- /dev/null
+++ b/driver/xf86-video-radeonhd/src/rhd_hdmi.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2008 Christian König <deathsimple@vodafone.de>
+ * Copyright 2007 Luc Verhaegen <lverhaegen@novell.com>
+ * Copyright 2007 Matthias Hopf <mhopf@novell.com>
+ * Copyright 2007 Egbert Eich <eich@novell.com>
+ * Copyright 2007 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _RHD_HDMI_H
+#define _RHD_HDMI_H
+
+struct rhdHdmi {
+ struct rhdHdmi* Next;
+
+ int scrnIndex;
+
+ struct rhdOutput* Output;
+ CARD16 Offset;
+
+ Bool Stored;
+ CARD32 StoreEnable;
+ CARD32 StoreControl;
+ CARD32 StoreUnknown[0x3];
+ CARD32 StoredAudioDebugWorkaround;
+
+ CARD32 StoredFrameVersion;
+ CARD32 StoredVideoControl;
+ CARD32 StoreVideoInfoFrame[0x4];
+ CARD32 StoredAudioControl;
+ CARD32 StoreAudioInfoFrame[0x2];
+
+ CARD32 Store_32kHz_N;
+ CARD32 Store_32kHz_CTS;
+
+ CARD32 Store_44_1kHz_N;
+ CARD32 Store_44_1kHz_CTS;
+
+ CARD32 Store_48kHz_N;
+ CARD32 Store_48kHz_CTS;
+
+ CARD32 StoreIEC60958[2];
+};
+
+struct rhdHdmi* RHDHdmiInit(RHDPtr rhdPtr, struct rhdOutput* Output);
+
+void RHDHdmiSetMode(struct rhdHdmi* rhdHdmi, DisplayModePtr Mode);
+void RHDHdmiEnable(struct rhdHdmi* rhdHdmi, Bool Enable);
+void RHDHdmiUpdateAudioSettings(
+ struct rhdHdmi* rhdHdmi,
+ Bool playing,
+ int channels,
+ int rate,
+ int bps,
+ CARD8 status_bits,
+ CARD8 catgory_code
+);
+
+void RHDHdmiSave(struct rhdHdmi* rhdHdmi);
+void RHDHdmiRestore(struct rhdHdmi* rhdHdmi);
+
+void RHDHdmiDestroy(struct rhdHdmi* rhdHdmi);
+
+#endif /* _RHD_HDMI_H */
diff --git a/driver/xf86-video-radeonhd/src/rhd_helper.c b/driver/xf86-video-radeonhd/src/rhd_helper.c
index a7b564dc2..84f5cd47e 100644
--- a/driver/xf86-video-radeonhd/src/rhd_helper.c
+++ b/driver/xf86-video-radeonhd/src/rhd_helper.c
@@ -42,7 +42,6 @@
#endif
#if SEGV_ON_ASSERT
-# include <sys/types.h>
# include <signal.h>
#endif
@@ -115,6 +114,52 @@ RhdGetOptValString(const OptionInfoRec *table, int token,
optp->set = TRUE;
}
+/*
+ *
+ */
+enum rhdOptStatus
+RhdParseBooleanOption(struct RHDOpt *Option, char *Name)
+{
+ char* c;
+ char* str = strdup(Name);
+
+ /* first fixup the name to match the randr names */
+ for (c = str; *c; c++)
+ if (isspace(*c))
+ *c='_';
+
+ if (Option->set) {
+ char *ptr = Option->val.string;
+ while (*ptr != '\0') {
+ while (isspace(*ptr))
+ ptr++;
+ if (*ptr == '\0')
+ break;
+
+ if (!strncasecmp(str,ptr,strlen(str)) || !strncasecmp("all",ptr,3)) {
+ if(!strncasecmp("all",ptr,3))
+ ptr += 3;
+ else
+ ptr += strlen(str);
+ xfree(str);
+
+ if (isspace(*ptr) || *ptr == '=') {
+ ptr++;
+ }
+ if (!strncasecmp("off",ptr,3) || !strncasecmp("0",ptr,1) || !strncasecmp("no",ptr,2)) {
+ return RHD_OPTION_OFF;
+ } else if (!strncasecmp("on",ptr,2) || !strncasecmp("1",ptr,1) || !strncasecmp("yes",ptr,3)) {
+ return RHD_OPTION_ON;
+ } else
+ return RHD_OPTION_DEFAULT;
+ } else
+ while (*ptr != '\0' && !isspace(*ptr))
+ ptr++;
+ }
+ }
+ xfree(str);
+ return RHD_OPTION_NOT_SET;
+}
void
RhdDebugDump(int scrnIndex, unsigned char *start, int size)
diff --git a/driver/xf86-video-radeonhd/src/rhd_i2c.c b/driver/xf86-video-radeonhd/src/rhd_i2c.c
index 57a4dc466..ee09ab34f 100644
--- a/driver/xf86-video-radeonhd/src/rhd_i2c.c
+++ b/driver/xf86-video-radeonhd/src/rhd_i2c.c
@@ -45,6 +45,8 @@
#include "rhd_atombios.h"
#endif
+#define MAX_I2C_LINES 6
+
#define RHD_I2C_STATUS_LOOPS 5000
enum rhdDDClines {
@@ -54,12 +56,16 @@ enum rhdDDClines {
rhdDdc4data = 6, /* arbirarily choosen */
rhdVIP_DOUT_scl = 0x41,
rhdDvoData12 = 0x28,
+ rhdDdc5data = 0x48,
+ rhdDdc6data = 0x4a,
rhdDdc1clk = 1,
rhdDdc2clk = 3,
rhdDdc3clk = 5,
rhdDdc4clk = 7, /* arbirarily choosen */
rhdVIP_DOUTvipclk = 0x42,
rhdDvoData13 = 0x29,
+ rhdDdc5clk = 0x49,
+ rhdDdc6clk = 0x4b,
rhdDdcUnknown
};
@@ -309,6 +315,22 @@ getDDCLineFromGPIO(int scrnIndex, CARD32 gpio, int shift)
return rhdDvoData12; /* ddc6 data */
}
break;
+ case 0x1fc4:
+ switch (shift) {
+ case 0:
+ return rhdDdc5clk;
+ case 8:
+ return rhdDdc5data;
+ }
+ break;
+ case 0x1fe8: /* ddc6 */
+ switch (shift) {
+ case 0:
+ return rhdDdc6clk; /* ddc6 clk */
+ case 8:
+ return rhdDdc6data; /* ddc6 data */
+ }
+ break;
}
xf86DrvMsg(scrnIndex, X_WARNING,
@@ -1110,7 +1132,7 @@ rhdTearDownI2C(I2CBusPtr *I2C)
* broken in older server versions.
* So we cannot use it. How bad!
*/
- for (i = 0; i < I2C_LINES; i++) {
+ for (i = 0; i < MAX_I2C_LINES; i++) {
char *name;
if (!I2C[i])
break;
@@ -1203,10 +1225,12 @@ rhdInitI2C(int scrnIndex)
numLines = 3;
else if (rhdPtr->ChipSet < RHD_R600)
numLines = 4;
+ else if (rhdPtr->ChipSet < RHD_RV730)
+ numLines = 4;
else
- numLines = I2C_LINES;
+ numLines = MAX_I2C_LINES;
- if (!(I2CList = xcalloc(I2C_LINES, sizeof(I2CBusPtr)))) {
+ if (!(I2CList = xcalloc(MAX_I2C_LINES, sizeof(I2CBusPtr)))) {
xf86DrvMsg(scrnIndex, X_ERROR,
"%s: Out of memory.\n",__func__);
}
@@ -1396,7 +1420,7 @@ RHDI2CFunc(int scrnIndex, I2CBusPtr *I2CList, RHDi2cFunc func,
return RHD_I2C_SUCCESS;
}
if (func == RHD_I2C_DDC) {
- if (datap->i >= I2C_LINES || !I2CList[datap->i])
+ if (datap->i >= MAX_I2C_LINES || !I2CList[datap->i])
return RHD_I2C_NOLINE;
datap->monitor = xf86DoEDID_DDC2(scrnIndex, I2CList[datap->i]);
@@ -1404,7 +1428,7 @@ RHDI2CFunc(int scrnIndex, I2CBusPtr *I2CList, RHDi2cFunc func,
}
if (func == RHD_I2C_PROBE_ADDR_LINE) {
- if (datap->target.line >= I2C_LINES || !I2CList[datap->target.line])
+ if (datap->target.line >= MAX_I2C_LINES || !I2CList[datap->target.line])
return RHD_I2C_NOLINE;
return rhdI2CProbeAddress(scrnIndex, I2CList[datap->target.line], datap->target.slave);
}
@@ -1412,7 +1436,7 @@ RHDI2CFunc(int scrnIndex, I2CBusPtr *I2CList, RHDi2cFunc func,
return rhdI2CProbeAddress(scrnIndex, datap->probe.i2cBusPtr, datap->probe.slave);
}
if (func == RHD_I2C_GETBUS) {
- if (datap->i >= I2C_LINES || !I2CList[datap->i])
+ if (datap->i >= MAX_I2C_LINES || !I2CList[datap->i])
return RHD_I2C_NOLINE;
datap->i2cBusPtr = I2CList[datap->i];
diff --git a/driver/xf86-video-radeonhd/src/rhd_i2c.h b/driver/xf86-video-radeonhd/src/rhd_i2c.h
index 75b9e88a9..3e6dc3bd1 100644
--- a/driver/xf86-video-radeonhd/src/rhd_i2c.h
+++ b/driver/xf86-video-radeonhd/src/rhd_i2c.h
@@ -28,8 +28,6 @@
#include "xf86DDC.h"
#include "rhd.h"
-#define I2C_LINES 5
-
typedef enum {
RHD_I2C_INIT,
RHD_I2C_DDC,
diff --git a/driver/xf86-video-radeonhd/src/rhd_id.c b/driver/xf86-video-radeonhd/src/rhd_id.c
index dac3d9be9..875c35836 100644
--- a/driver/xf86-video-radeonhd/src/rhd_id.c
+++ b/driver/xf86-video-radeonhd/src/rhd_id.c
@@ -83,6 +83,8 @@ SymTabRec RHDChipsets[] = {
{ RHD_M86, "M86" },
{ RHD_RS780, "RS780" },
{ RHD_RV770, "RV770" },
+ { RHD_RV730, "RV730" },
+ { RHD_RV710, "RV710" },
{ -1, NULL }
};
@@ -219,6 +221,34 @@ const PCI_ID_LIST = {
RHD_DEVICE_MATCH( 0x940A, RHD_R600 ), /* FireGL V8650 */
RHD_DEVICE_MATCH( 0x940B, RHD_R600 ), /* FireGL V8600 */
RHD_DEVICE_MATCH( 0x940F, RHD_R600 ), /* FireGL V7600 */
+ RHD_DEVICE_MATCH( 0x9440, RHD_RV770 ), /* ATI Radeon 4800 Series */
+ RHD_DEVICE_MATCH( 0x9441, RHD_RV770 ), /* ATI Radeon 4870 X2 */
+ RHD_DEVICE_MATCH( 0x9442, RHD_RV770 ), /* ATI Radeon 4800 Series */
+// RHD_DEVICE_MATCH( 0x9443, RHD_R700 ), /* ATI Radeon 4800 Series */
+ RHD_DEVICE_MATCH( 0x9444, RHD_RV770 ), /* Everest ATI FirePro Graphics Accelerator */
+ RHD_DEVICE_MATCH( 0x9446, RHD_RV770 ), /* K2 ATI FirePro Graphics Accelerator */
+// RHD_DEVICE_MATCH( 0x9447, RHD_R700 ), /* K2 ATI FirePro Graphics Accelerator */
+ RHD_DEVICE_MATCH( 0x944A, RHD_M98 ), /* M98 */
+ RHD_DEVICE_MATCH( 0x944B, RHD_M98 ), /* M98 */
+ RHD_DEVICE_MATCH( 0x944E, RHD_RV770 ), /* RV770 */
+// RHD_DEVICE_MATCH( 0x944F, RHD_R700 ), /* R700 */
+ RHD_DEVICE_MATCH( 0x9456, RHD_RV770 ), /* Denali ATI FirePro Graphics Accelerator */
+ RHD_DEVICE_MATCH( 0x945A, RHD_M98 ), /* M98 */
+ RHD_DEVICE_MATCH( 0x945B, RHD_M98 ), /* M98 */
+ RHD_DEVICE_MATCH( 0x946A, RHD_M98 ), /* M98 */
+ RHD_DEVICE_MATCH( 0x946B, RHD_M98 ), /* M98 */
+ RHD_DEVICE_MATCH( 0x947A, RHD_M98 ), /* M98 */
+ RHD_DEVICE_MATCH( 0x947B, RHD_M98 ), /* M96 */
+ RHD_DEVICE_MATCH( 0x9480, RHD_M96 ), /* M98 */
+ RHD_DEVICE_MATCH( 0x9487, RHD_RV730 ), /* RV730 */
+ RHD_DEVICE_MATCH( 0x9488, RHD_M96 ), /* M96 */
+ RHD_DEVICE_MATCH( 0x9489, RHD_M96 ), /* M96M GL */
+ RHD_DEVICE_MATCH( 0x948F, RHD_RV730 ), /* RV730 */
+ RHD_DEVICE_MATCH( 0x9487, RHD_RV730 ), /* RV730 */
+ RHD_DEVICE_MATCH( 0x9490, RHD_RV730 ), /* RV730 */
+ RHD_DEVICE_MATCH( 0x9498, RHD_RV730 ), /* RV730 */
+ RHD_DEVICE_MATCH( 0x949E, RHD_RV730 ), /* RV730 */
+ RHD_DEVICE_MATCH( 0x949F, RHD_RV730 ), /* RV730 */
RHD_DEVICE_MATCH( 0x94C0, RHD_RV610 ), /* RV610 */
RHD_DEVICE_MATCH( 0x94C1, RHD_RV610 ), /* Radeon HD 2400 XT */
RHD_DEVICE_MATCH( 0x94C3, RHD_RV610 ), /* Radeon HD 2400 Pro */
@@ -243,6 +273,11 @@ const PCI_ID_LIST = {
RHD_DEVICE_MATCH( 0x9515, RHD_RV670 ), /* ATI Radeon HD 3850 AGP */
RHD_DEVICE_MATCH( 0x9517, RHD_RV670 ), /* ATI Radeon HD 3960 */
RHD_DEVICE_MATCH( 0x9519, RHD_RV670 ), /* FireStream 9170 */
+ RHD_DEVICE_MATCH( 0x9540, RHD_RV710 ), /* */
+ RHD_DEVICE_MATCH( 0x9541, RHD_RV710 ), /* */
+ RHD_DEVICE_MATCH( 0x9542, RHD_RV710 ), /* */
+ RHD_DEVICE_MATCH( 0x954E, RHD_RV710 ), /* */
+ RHD_DEVICE_MATCH( 0x954f, RHD_RV710 ), /* */
RHD_DEVICE_MATCH( 0x9580, RHD_RV630 ), /* RV630 */
RHD_DEVICE_MATCH( 0x9581, RHD_M76 ), /* Mobility Radeon HD 2600 */
RHD_DEVICE_MATCH( 0x9583, RHD_M76 ), /* Mobility Radeon HD 2600 XT */
@@ -269,6 +304,7 @@ const PCI_ID_LIST = {
RHD_DEVICE_MATCH( 0x95C2, RHD_M82 ), /* ATI Mobility Radeon HD 3430 (M82) */
RHD_DEVICE_MATCH( 0x95C4, RHD_M82 ), /* Mobility Radeon HD 3400 Series (M82) */
RHD_DEVICE_MATCH( 0x95C5, RHD_RV620 ), /* ATI Radeon HD 3450 */
+ RHD_DEVICE_MATCH( 0x95C6, RHD_RV620 ), /* ATI Radeon HD 3450 */
RHD_DEVICE_MATCH( 0x95C7, RHD_RV620 ), /* ATI Radeon HD 3430 */
RHD_DEVICE_MATCH( 0x95CC, RHD_RV620 ), /* Fire PRO Professional Graphics ASIC */
RHD_DEVICE_MATCH( 0x95CD, RHD_RV620 ), /* ATI FireMV 2450 */
@@ -279,13 +315,6 @@ const PCI_ID_LIST = {
RHD_DEVICE_MATCH( 0x9612, RHD_RS780 ), /* ATI Radeon HD 3200 Graphics */
RHD_DEVICE_MATCH( 0x9613, RHD_RS780 ), /* ATI Radeon 3100 Graphics */
RHD_DEVICE_MATCH( 0x9614, RHD_RS780 ), /* ATI Radeon HD 3300 Graphics */
- RHD_DEVICE_MATCH( 0x9440, RHD_RV770 ), /* ATI Radeon 4800 Series */
- RHD_DEVICE_MATCH( 0x9441, RHD_RV770 ), /* ATI Radeon 4870 X2 */
- RHD_DEVICE_MATCH( 0x9442, RHD_RV770 ), /* ATI Radeon 4800 Series */
- RHD_DEVICE_MATCH( 0x9444, RHD_RV770 ), /* Everest ATI FirePro Graphics Accelerator */
- RHD_DEVICE_MATCH( 0x9446, RHD_RV770 ), /* K2 ATI FirePro Graphics Accelerator */
- RHD_DEVICE_MATCH( 0x944E, RHD_RV770 ), /* RV770 */
- RHD_DEVICE_MATCH( 0x9456, RHD_RV770 ), /* Denali ATI FirePro Graphics Accelerator */
LIST_END
};
@@ -349,6 +378,12 @@ RHDIdentify(int flags)
"\tRS740 : RS740, RS740M.\n"
"\tRS780 : Radeon HD 3100/3200/3300 Series.\n"
"\tRV770 : Radeon HD 4800 Series; Everest, K2, Denali ATI FirePro.\n");
+ xf86Msg(X_NONE,
+ "\tR700 : Radeon R700.\n"
+ "\tM98 : Radeon M98 Mobility.\n"
+ "\tRV730 : Radeon HD4670, HD4650.\n"
+ "\tM96 : Radeon M96 Mobility.\n"
+ "\tRV710 : Radeon HD4570, HD4350.\n");
/* END_DEVICE_LIST marker - do not delete */
xf86Msg(X_NONE, "\n");
@@ -383,6 +418,25 @@ RHDIsIGP(enum RHD_CHIPSETS chipset)
# define DEVINFO_EMPTY { { atomNone, atomNone } }
#endif
+/* Radeon RV610 0x94C3 0x0000 0x0000 */
+#define VGA_B1_TV_B_DVI_AA00 \
+{{ RHD_CONNECTOR_DVI_SINGLE, "VGA CRT2", RHD_DDC_1, RHD_HPD_NONE, \
+ { RHD_OUTPUT_NONE, RHD_OUTPUT_DACB }}, \
+ {RHD_CONNECTOR_TV, "7PIN_DIN TV1 CV", RHD_DDC_0, RHD_HPD_NONE, \
+ { RHD_OUTPUT_DACB, RHD_OUTPUT_NONE }}, \
+ {RHD_CONNECTOR_DVI_SINGLE, "SINGLE_LINK_DVI CRT1 DFP2", RHD_DDC_0, RHD_HPD_0, \
+ {RHD_OUTPUT_LVTMA, RHD_OUTPUT_DACA }}}
+
+
+/* Radeon X1300 0x7187:0x1545:0x1930 */
+#define VGA_A0_TV_B_DVI_B11 \
+ { { RHD_CONNECTOR_VGA, "VGA CRT1", RHD_DDC_0, RHD_HPD_NONE, \
+ { RHD_OUTPUT_DACA, RHD_OUTPUT_NONE }}, \
+ { RHD_CONNECTOR_TV, "SVIDEO TV1", RHD_DDC_NONE, RHD_HPD_NONE, \
+ { RHD_OUTPUT_DACB, RHD_OUTPUT_NONE }}, \
+ { RHD_CONNECTOR_DVI, "DVI-D DFP3", RHD_DDC_1, RHD_HPD_1, \
+ { RHD_OUTPUT_LVTMA, RHD_OUTPUT_NONE }}}
+
/* Sapphire X1550 reports 2x DVI-I but has only 1 VGA and 1 DVI */
#define VGA_A0_DVI_BB11 \
{ {RHD_CONNECTOR_VGA, "VGA", RHD_DDC_0, RHD_HPD_NONE, \
@@ -630,6 +684,8 @@ rhdCards[] =
/* 0x7186 : M64 : Mobility Radeon X1450 */
/* 0x7187 : RV516 : Radeon X1300/X1550 */
{ 0x7187, 0x174B, 0x3000, "RV516 : Radeon X1300/X1550", RHD_CARD_FLAG_HPDSWAP, ID_CONNECTORINFO_EMPTY, DEVINFO_EMPTY },
+ { 0x7187, 0x1458, 0x215C, "RV516 : Radeon X1300/X1550", RHD_CARD_FLAG_DMS59, ID_CONNECTORINFO_EMPTY, DEVINFO_EMPTY },
+ { 0x7187, 0x1545, 0x1930, "RV516 : Radeon X1300", RHD_CARD_FLAG_NONE, VGA_A0_TV_B_DVI_B11, DEVINFO_EMPTY },
/* 0x7188 : M64 : Mobility Radeon X2300 */
/* 0x718A : M64 : Mobility Radeon X2300 */
/* 0x718B : M62 : Mobility Radeon X1350 */
@@ -644,6 +700,7 @@ rhdCards[] =
/* 0x71C1 : RV535 : Radeon X1650 */
{ 0x71C1, 0x174B, 0x0840, "Sapphire X1650 Pro", RHD_CARD_FLAG_NONE, DVI_AA00_DVI_BB11, DEVINFO_EMPTY },
/* 0x71C2 : RV530 : Radeon X1600 */
+ { 0x71C2, 0x1458, 0x2146, "Gigabyte GV-RX16P256DE-RH", RHD_CARD_FLAG_HPDSWAP, ID_CONNECTORINFO_EMPTY, DEVINFO_EMPTY },
{ 0x71C2, 0x17EE, 0x71C0, "Connect3D Radeon X1600 Pro", RHD_CARD_FLAG_NONE, VGA_B1_DVI_AA00, DEVINFO_EMPTY },
/* 0x71C3 : RV535 : Radeon X1600 */
/* 0x71C4 : M56 : Mobility FireGL V5200 */
@@ -733,6 +790,7 @@ rhdCards[] =
{ 0x94C1, 0x1002, 0x0D02, "ATI Radeon HD 2400 XT", RHD_CARD_FLAG_DMS59, ID_CONNECTORINFO_EMPTY, DEVINFO_EMPTY },
{ 0x94C1, 0x1028, 0x0D02, "Dell Radeon HD 2400 XT", RHD_CARD_FLAG_DMS59, ID_CONNECTORINFO_EMPTY, DEVINFO_EMPTY },
{ 0x94C1, 0x174B, 0xE390, "Sapphire HD 2400 XT", RHD_CARD_FLAG_NONE, VGA_B1_DVI_AB00, DEVINFO_EMPTY },
+ { 0x94C3, 0x0000, 0x0000, "ATI Radeon 2400 HD GENERIC", RHD_CARD_FLAG_NONE, VGA_B1_TV_B_DVI_AA00, DEVINFO_EMPTY },
/* 0x94C3 : RV610 : Radeon HD 2400 Pro */
{ 0x94C3, 0x1545, 0x3210, "ATI Radeon 2400HD Pro", RHD_CARD_FLAG_HPDSWAP, ID_CONNECTORINFO_EMPTY, DEVINFO_EMPTY },
{ 0x94C3, 0x174B, 0xE370, "Sapphire HD 2400 Pro", RHD_CARD_FLAG_NONE, VGA_A0_DVI_BB10, DEVINFO_EMPTY },
@@ -764,6 +822,7 @@ rhdCards[] =
/* 0x958C : RV630 : ATI FireGL V5600 */
/* 0x958D : RV630 : ATI FireGL V3600 */
/* 0x958E : RV630 : ATI Radeon HD 2600 LE */
+ { 0x9610, 0x105B, 0x0E0F, "Foxconn A7GM-S (RS780)", RHD_CARD_FLAG_HPDOFF, ID_CONNECTORINFO_EMPTY, DEVINFO_EMPTY },
{ 0, 0, 0, NULL, 0, ID_CONNECTORINFO_EMPTY, DEVINFO_EMPTY } /* KEEP THIS: End marker. */
};
diff --git a/driver/xf86-video-radeonhd/src/rhd_lut.c b/driver/xf86-video-radeonhd/src/rhd_lut.c
index b4199c05c..448127b89 100644
--- a/driver/xf86-video-radeonhd/src/rhd_lut.c
+++ b/driver/xf86-video-radeonhd/src/rhd_lut.c
@@ -1,8 +1,7 @@
/*
- * Copyright 2007 Luc Verhaegen <lverhaegen@novell.com>
- * Copyright 2007 Matthias Hopf <mhopf@novell.com>
- * Copyright 2007 Egbert Eich <eich@novell.com>
- * Copyright 2007 Advanced Micro Devices, Inc.
+ * Copyright 2007-2008 Luc Verhaegen <lverhaegen@novell.com>
+ * Copyright 2007-2008 Matthias Hopf <mhopf@novell.com>
+ * Copyright 2007-2008 Egbert Eich <eich@novell.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -45,7 +44,7 @@ LUTxSave(struct rhdLUT *LUT)
CARD16 RegOff;
int i;
RHDFUNC(LUT);
-
+
if (LUT->Id == RHD_LUT_A)
RegOff = RHD_REGOFFSET_LUTA;
else
@@ -127,6 +126,8 @@ LUTxSet(struct rhdLUT *LUT, int numColors, int *indices, LOCO *colors)
CARD16 RegOff;
int i, index;
+ LUT->Initialised = TRUE; /* thank you RandR */
+
if (LUT->Id == RHD_LUT_A)
RegOff = RHD_REGOFFSET_LUTA;
else
@@ -299,3 +300,72 @@ RHDLUTsDestroy(RHDPtr rhdPtr)
xfree(rhdPtr->LUT[1]);
xfree(rhdPtr->LUTStore);
}
+
+/*
+ * Workaround for missing RandR functionality. Initialise this
+ * LUT with the content of the other LUT.
+ */
+void
+RHDLUTCopyForRR(struct rhdLUT *LUT)
+{
+ int indices[0x100];
+ LOCO colors[0x100];
+ CARD32 entry;
+ int i;
+
+ RHDDebug(LUT->scrnIndex, "%s: %s\n", __func__, LUT->Name);
+
+ RHDRegWrite(LUT, DC_LUT_RW_MODE, 0); /* Table */
+
+ if (LUT->Id == RHD_LUT_A)
+ RHDRegWrite(LUT, DC_LUT_READ_PIPE_SELECT, 1);
+ else
+ RHDRegWrite(LUT, DC_LUT_READ_PIPE_SELECT, 0);
+
+ switch (xf86Screens[LUT->scrnIndex]->depth) {
+ case 8:
+ case 24:
+ case 32:
+ RHDRegWrite(LUT, DC_LUT_RW_INDEX, 0);
+
+ for (i = 0; i < 0x100; i++) {
+ indices[i] = i;
+
+ entry = RHDRegRead(LUT, DC_LUT_30_COLOR);
+
+ colors[i].red = (entry >> 22) & 0xFF;
+ colors[i].green = (entry >> 12) & 0xFF;
+ colors[i].blue = (entry >> 2) & 0xFF;
+ }
+ LUT->Set(LUT, 0x100, indices, colors);
+ break;
+ case 16:
+ for (i = 0; i < 0x40; i++) {
+ indices[i] = i;
+
+ RHDRegWrite(LUT, DC_LUT_RW_INDEX, 4 * i);
+
+ entry = RHDRegRead(LUT, DC_LUT_30_COLOR);
+
+ colors[i / 2].red = (entry >> 24) & 0xFF;
+ colors[i].green = (entry >> 14) & 0xFF;
+ colors[i / 2].blue = (entry >> 4) & 0xFF;
+ }
+ LUT->Set(LUT, 0x40, indices, colors);
+ break;
+ case 15:
+ for (i = 0; i < 0x20; i++) {
+ indices[i] = i;
+
+ RHDRegWrite(LUT, DC_LUT_RW_INDEX, 8 * i);
+
+ entry = RHDRegRead(LUT, DC_LUT_30_COLOR);
+
+ colors[i].red = (entry >> 25) & 0xFF;
+ colors[i].green = (entry >> 15) & 0xFF;
+ colors[i].blue = (entry >> 5) & 0xFF;
+ }
+ LUT->Set(LUT, 0x20, indices, colors);
+ break;
+ }
+}
diff --git a/driver/xf86-video-radeonhd/src/rhd_lut.h b/driver/xf86-video-radeonhd/src/rhd_lut.h
index 10a02e94a..84c8bf796 100644
--- a/driver/xf86-video-radeonhd/src/rhd_lut.h
+++ b/driver/xf86-video-radeonhd/src/rhd_lut.h
@@ -38,6 +38,10 @@ struct rhdLUT {
void (*Restore) (struct rhdLUT *LUT);
void (*Set) (struct rhdLUT *LUT, int numColors, int *indices, LOCO *colors);
+ /* because RandR does not specifically initialise a gamma ramp when
+ setting up a CRTC */
+ Bool Initialised;
+
Bool Stored;
CARD32 StoreControl;
@@ -58,4 +62,7 @@ void RHDLUTsSave(RHDPtr rhdPtr);
void RHDLUTsRestore(RHDPtr rhdPtr);
void RHDLUTsDestroy(RHDPtr rhdPtr);
+/* For missing RandR functionality */
+void RHDLUTCopyForRR(struct rhdLUT *LUT);
+
#endif /* _RHD_LUT_H */
diff --git a/driver/xf86-video-radeonhd/src/rhd_lvtma.c b/driver/xf86-video-radeonhd/src/rhd_lvtma.c
index 0dfa2964f..77eba62cd 100644
--- a/driver/xf86-video-radeonhd/src/rhd_lvtma.c
+++ b/driver/xf86-video-radeonhd/src/rhd_lvtma.c
@@ -47,6 +47,7 @@
#include "rhd_connector.h"
#include "rhd_output.h"
#include "rhd_regs.h"
+#include "rhd_hdmi.h"
#ifdef ATOM_BIOS
#include "rhd_atombios.h"
#include "rhd_atomout.h"
@@ -137,6 +138,12 @@ struct LVDSPrivate {
CARD32 StoreMacroControl;
CARD32 StoreTXControl;
CARD32 StoreBlModCntl;
+#ifdef NOT_YET
+ /* to hook in AtomBIOS property callback */
+ Bool (*WrappedPropertyCallback) (struct rhdOutput *Output,
+ enum rhdPropertyAction Action, enum rhdOutputProperty Property, union rhdPropertyData *val);
+ void *PropertyPrivate;
+#endif
};
/*
@@ -693,6 +700,28 @@ LVDSInfoRetrieve(RHDPtr rhdPtr)
/*
*
+ */
+static void
+LVDSDestroy(struct rhdOutput *Output)
+{
+
+ struct LVDSPrivate *Private = (struct LVDSPrivate *) Output->Private;
+
+ RHDFUNC(Output);
+
+ if (!Private)
+ return;
+
+#ifdef NOT_YET
+ if (Private->PropertyPrivate)
+ RhdAtomDestroyBacklightControlProperty(Output, Private->PropertyPrivate);
+#endif
+ xfree(Private);
+ Output->Private = NULL;
+}
+
+/*
+ *
* Handling for LVTMA block as TMDS.
*
*/
@@ -701,6 +730,8 @@ struct rhdTMDSBPrivate {
Bool Coherent;
DisplayModePtr Mode;
+ struct rhdHdmi *Hdmi;
+
Bool Stored;
CARD32 StoreControl;
@@ -756,7 +787,7 @@ RS600VoltageControl(struct rhdOutput *Output, DisplayModePtr Mode)
struct rhdTMDSBPrivate *Private = (struct rhdTMDSBPrivate *) Output->Private;
RHDFUNC(Output);
-#ifdef NOT_YET
+#ifdef NOTYET
if (Output->Connector == RHD_CONNECTOR_HDMI || Output->Connector == RHD_CONNECTOR_HDMI_DUAL) {
int clock = Mode->SynthClock;
@@ -796,7 +827,7 @@ RS690VoltageControl(struct rhdOutput *Output, DisplayModePtr Mode)
CARD32 rev = (RHDRegRead(Output, CONFIG_CNTL) && RS69_CFG_ATI_REV_ID_MASK) >> RS69_CFG_ATI_REV_ID_SHIFT;
if (rev < 3) {
-#ifdef NOT_YET
+#ifdef NOTYET
if (Output->Connector == RHD_CONNECTOR_HDMI || Output->Connector == RHD_CONNECTOR_HDMI_DUAL) {
if (Mode->SynthClock > 75000) {
RHDRegWrite(Output, LVTMA_R600_MACRO_CONTROL, 0xa001632f);
@@ -833,7 +864,7 @@ RS690VoltageControl(struct rhdOutput *Output, DisplayModePtr Mode)
}
}
} else {
-#ifdef NOT_YET
+#ifdef NOTYET
if (Output->Connector == RHD_CONNECTOR_HDMI || Output->Connector == RHD_CONNECTOR_HDMI_DUAL) {
if (Mode->SynthClock <= 75000) {
RHDRegWrite(Output, LVTMA_R600_MACRO_CONTROL, 0x0002612f);
@@ -1116,6 +1147,8 @@ TMDSBSet(struct rhdOutput *Output, DisplayModePtr Mode)
RHDRegMask(Output, LVTMA_DATA_SYNCHRONIZATION, 0x00000100, 0x00000100);
usleep(2);
RHDRegMask(Output, LVTMA_DATA_SYNCHRONIZATION, 0, 0x00000001);
+
+ RHDHdmiSetMode(Private->Hdmi, Mode);
}
/*
@@ -1134,7 +1167,7 @@ TMDSBPower(struct rhdOutput *Output, int Power)
switch (Power) {
case RHD_POWER_ON:
- RHDRegMask(Output, LVTMA_CNTL, 0x00000001, 0x00000001);
+ RHDRegMask(Output, LVTMA_CNTL, 0x1, 0x00000001);
if (Private->RunsDualLink)
RHDRegMask(Output, LVTMA_TRANSMITTER_ENABLE, 0x00003E3E,0x00003E3E);
@@ -1144,6 +1177,10 @@ TMDSBPower(struct rhdOutput *Output, int Power)
RHDRegMask(Output, LVTMA_TRANSMITTER_CONTROL, 0x00000001, 0x00000001);
usleep(2);
RHDRegMask(Output, LVTMA_TRANSMITTER_CONTROL, 0, 0x00000002);
+ if(Output->Connector != NULL && RHDConnectorEnableHDMI(Output->Connector))
+ RHDHdmiEnable(Private->Hdmi, TRUE);
+ else
+ RHDHdmiEnable(Private->Hdmi, FALSE);
return;
case RHD_POWER_RESET:
RHDRegMask(Output, LVTMA_TRANSMITTER_ENABLE, 0, 0x00003E3E);
@@ -1155,6 +1192,7 @@ TMDSBPower(struct rhdOutput *Output, int Power)
RHDRegMask(Output, LVTMA_TRANSMITTER_CONTROL, 0, 0x00000001);
RHDRegMask(Output, LVTMA_TRANSMITTER_ENABLE, 0, 0x00003E3E);
RHDRegMask(Output, LVTMA_CNTL, 0, 0x00000001);
+ RHDHdmiEnable(Private->Hdmi, FALSE);
return;
}
}
@@ -1189,6 +1227,8 @@ TMDSBSave(struct rhdOutput *Output)
Private->StoreRv600PreEmphasis = RHDRegRead(Output, LVTMA_PREEMPHASIS_CONTROL);
}
+ RHDHdmiSave(Private->Hdmi);
+
Private->Stored = TRUE;
}
@@ -1227,6 +1267,8 @@ TMDSBRestore(struct rhdOutput *Output)
RHDRegWrite(Output, LVTMA_TRANSMITTER_ADJUST, Private->StoreRv600TXAdjust);
RHDRegWrite(Output, LVTMA_PREEMPHASIS_CONTROL, Private->StoreRv600PreEmphasis);
}
+
+ RHDHdmiRestore(Private->Hdmi);
}
@@ -1234,17 +1276,41 @@ TMDSBRestore(struct rhdOutput *Output)
*
*/
static void
-LVTMADestroy(struct rhdOutput *Output)
+TMDSBDestroy(struct rhdOutput *Output)
{
+ struct rhdTMDSBPrivate *Private = (struct rhdTMDSBPrivate *) Output->Private;
RHDFUNC(Output);
- if (!Output->Private)
+ if (!Private)
return;
- xfree(Output->Private);
+ RHDHdmiDestroy(Private->Hdmi);
+
+ xfree(Private);
Output->Private = NULL;
}
+#ifdef NOT_YET
+static Bool
+LVDSPropertyWrapper(struct rhdOutput *Output,
+ enum rhdPropertyAction Action,
+ enum rhdOutputProperty Property,
+ union rhdPropertyData *val)
+{
+ struct LVDSPrivate *Private = (struct LVDSPrivate *) Output->Private;
+ void *storePrivate = Output->Private;
+ Bool (*func)(struct rhdOutput *,enum rhdPropertyAction, enum rhdOutputProperty,
+ union rhdPropertyData *) = Private->WrappedPropertyCallback;
+ Bool ret;
+
+ Output->Private = Private->PropertyPrivate;
+ ret = func(Output, Action, Property, val);
+ Output->Private = storePrivate;
+
+ return ret;
+}
+#endif
+
/*
*
*/
@@ -1252,7 +1318,6 @@ struct rhdOutput *
RHDLVTMAInit(RHDPtr rhdPtr, CARD8 Type)
{
struct rhdOutput *Output;
-
RHDFUNC(rhdPtr);
/* Stop weird connector types */
@@ -1270,7 +1335,6 @@ RHDLVTMAInit(RHDPtr rhdPtr, CARD8 Type)
Output->Id = RHD_OUTPUT_LVTMA;
Output->Sense = NULL; /* not implemented in hw */
- Output->Destroy = LVTMADestroy;
if (Type == RHD_CONNECTOR_PANEL) {
struct LVDSPrivate *Private;
@@ -1283,11 +1347,15 @@ RHDLVTMAInit(RHDPtr rhdPtr, CARD8 Type)
Output->Save = LVDSSave;
Output->Restore = LVDSRestore;
Output->Property = LVDSPropertyControl;
+ Output->Destroy = LVDSDestroy;
Output->Private = Private = LVDSInfoRetrieve(rhdPtr);
-#if 0
- if (Private->BlLevel < 0)
- Private->BlLevel = RhdAtomSetupBacklightControlProperty(Output, &Output->Property);
- else
+#ifdef NOT_YET
+ if (Private->BlLevel < 0) {
+ Private->BlLevel = RhdAtomSetupBacklightControlProperty(Output, &Private->WrappedPropertyCallback,
+ &Private->PropertyPrivate);
+ if (Private->PropertyPrivate)
+ Output->Property = LVDSPropertyWrapper;
+ } else
#else
if (Private->BlLevel >= 0)
#endif
@@ -1295,6 +1363,7 @@ RHDLVTMAInit(RHDPtr rhdPtr, CARD8 Type)
} else {
struct rhdTMDSBPrivate *Private = xnfcalloc(sizeof(struct rhdTMDSBPrivate), 1);
+ int from;
Output->Name = "TMDS B";
@@ -1304,11 +1373,27 @@ RHDLVTMAInit(RHDPtr rhdPtr, CARD8 Type)
Output->Save = TMDSBSave;
Output->Restore = TMDSBRestore;
Output->Property = TMDSBPropertyControl;
+ Output->Destroy = TMDSBDestroy;
+ Private->Hdmi = RHDHdmiInit(rhdPtr, Output);
Output->Private = Private;
Private->RunsDualLink = FALSE;
- Private->Coherent = FALSE;
+ from = X_CONFIG;
+ switch (RhdParseBooleanOption(&rhdPtr->coherent, Output->Name)) {
+ case RHD_OPTION_NOT_SET:
+ case RHD_OPTION_DEFAULT:
+ from = X_DEFAULT;
+ Private->Coherent = FALSE;
+ break;
+ case RHD_OPTION_ON:
+ Private->Coherent = TRUE;
+ break;
+ case RHD_OPTION_OFF:
+ Private->Coherent = FALSE;
+ break;
+ }
+ xf86DrvMsg(rhdPtr->scrnIndex,from,"Setting %s to %scoherent\n",Output->Name,Private->Coherent ? "" : "in");
}
return Output;
diff --git a/driver/xf86-video-radeonhd/src/rhd_mc.c b/driver/xf86-video-radeonhd/src/rhd_mc.c
index eebebdfc8..d15bd3c8d 100644
--- a/driver/xf86-video-radeonhd/src/rhd_mc.c
+++ b/driver/xf86-video-radeonhd/src/rhd_mc.c
@@ -826,7 +826,7 @@ RHDMCInit(RHDPtr rhdPtr)
MC->GetFBLocation = rs780GetFBLocation;
}
#endif
- else if (rhdPtr->ChipSet == RHD_RV770) {
+ else if (rhdPtr->ChipSet >= RHD_RV770) {
MC->SaveMC = r7xxSaveMC;
MC->RestoreMC = r7xxRestoreMC;
MC->SetupMC = r7xxSetupMC;
diff --git a/driver/xf86-video-radeonhd/src/rhd_modes.c b/driver/xf86-video-radeonhd/src/rhd_modes.c
index 4686e16e6..46e9ff9d5 100644
--- a/driver/xf86-video-radeonhd/src/rhd_modes.c
+++ b/driver/xf86-video-radeonhd/src/rhd_modes.c
@@ -977,6 +977,7 @@ struct {
{ MODE_MINHEIGHT, "Height too low."},
{ MODE_FIXED, "Mode not compatible with fixed mode."},
{ MODE_SCALE, "Mode cannot be scaled to fixed mode."},
+ { MODE_NO_ENCODER, "No encoder available for this output."},
{ 0, NULL}
};
diff --git a/driver/xf86-video-radeonhd/src/rhd_modes.h b/driver/xf86-video-radeonhd/src/rhd_modes.h
index 7cab9cf9a..4ff628209 100644
--- a/driver/xf86-video-radeonhd/src/rhd_modes.h
+++ b/driver/xf86-video-radeonhd/src/rhd_modes.h
@@ -50,6 +50,7 @@
#define MODE_MINHEIGHT 0x10 + RHD_MODE_STATUS
#define MODE_FIXED 0x11 + RHD_MODE_STATUS
#define MODE_SCALE 0x12 + RHD_MODE_STATUS
+#define MODE_NO_ENCODER 0x13 + RHD_MODE_STATUS
/*
* In case this isn't in xf86str.h yet.
diff --git a/driver/xf86-video-radeonhd/src/rhd_output.h b/driver/xf86-video-radeonhd/src/rhd_output.h
index acdd9d877..ffd152b2f 100644
--- a/driver/xf86-video-radeonhd/src/rhd_output.h
+++ b/driver/xf86-video-radeonhd/src/rhd_output.h
@@ -38,6 +38,10 @@ typedef enum rhdOutputType {
RHD_OUTPUT_KLDSKP_LVTMA,
RHD_OUTPUT_UNIPHYA,
RHD_OUTPUT_UNIPHYB,
+ RHD_OUTPUT_UNIPHYC,
+ RHD_OUTPUT_UNIPHYD,
+ RHD_OUTPUT_UNIPHYE,
+ RHD_OUTPUT_UNIPHYF,
RHD_OUTPUT_TMDSB = RHD_OUTPUT_NONE,
RHD_OUTPUT_LVDS = RHD_OUTPUT_NONE,
RHD_OUTPUT_LVTMB = RHD_OUTPUT_NONE
@@ -57,6 +61,11 @@ enum rhdOutputProperty {
RHD_OUTPUT_COHERENT
};
+enum rhdOutputAllocation {
+ RHD_OUTPUT_ALLOC,
+ RHD_OUTPUT_FREE
+};
+
char *rhdPowerString[4];
/*
@@ -89,6 +98,7 @@ struct rhdOutput {
void (*Destroy) (struct rhdOutput *Output);
Bool (*Property) (struct rhdOutput *Output,
enum rhdPropertyAction Action, enum rhdOutputProperty Property, union rhdPropertyData *val);
+ Bool (*AllocFree) (struct rhdOutput *Output, enum rhdOutputAllocation Alloc);
/* Driver Private data */
rhdOutputDriverPrivate *OutputDriverPrivate;
/* Output Private data */
diff --git a/driver/xf86-video-radeonhd/src/rhd_randr.c b/driver/xf86-video-radeonhd/src/rhd_randr.c
index 58f3dd780..75c605697 100644
--- a/driver/xf86-video-radeonhd/src/rhd_randr.c
+++ b/driver/xf86-video-radeonhd/src/rhd_randr.c
@@ -32,19 +32,18 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+
/* Xserver interface */
#include "xf86.h"
-#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 2) || RANDR_MAJOR >= 2
-# define RANDR_12_SUPPORT
-#endif
-
#ifdef RANDR_12_SUPPORT
/* Xserver interface */
# include "randrstr.h"
# include "xf86i2c.h" /* Missing in old versions of xf86Crtc.h */
# include "xf86Crtc.h"
# include "xf86RandR12.h"
+# include "xaa.h"
+# include "exa.h"
# define DPMS_SERVER
# include "X11/extensions/dpms.h"
# include "X11/Xatom.h"
@@ -72,6 +71,8 @@
# include "rhd_mc.h"
# include "rhd_card.h"
# include "rhd_i2c.h"
+# include "rhd_audio.h"
+
/*
* Driver internal
*/
@@ -99,8 +100,17 @@ typedef struct _rhdRandrOutput {
DisplayModePtr ScaledToMode;
struct rhdCrtc *Crtc;
struct rhdConnector *AllConnectors[MAX_CONNECTORS_PER_RR_OUTPUT];
+ Bool OutputActive;
} rhdRandrOutputRec, *rhdRandrOutputPtr;
+struct rhdRandrCrtc {
+ struct rhdCrtc *rhdCrtc;
+ union {
+ FBLinearPtr MemXAA;
+ ExaOffscreenArea *MemEXA;
+ } u;
+};
+
#define ATOM_SIGNAL_FORMAT "RANDR_SIGNAL_FORMAT"
#define ATOM_CONNECTOR_TYPE "RANDR_CONNECTOR_TYPE"
#define ATOM_CONNECTOR_NUMBER "RANDR_CONNECTOR_NUMBER"
@@ -134,6 +144,10 @@ rhdGetSignalFormat(rhdRandrOutputPtr ro)
case RHD_OUTPUT_LVDS:
case RHD_OUTPUT_UNIPHYA:
case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
#if RHD_OUTPUT_LVTMB != RHD_OUTPUT_LVDS
case RHD_OUTPUT_LVTMB:
#endif
@@ -176,8 +190,10 @@ rhdGetConnectorType(rhdRandrOutputPtr ro)
/* Set crtc pos according to mouse pos and panning information */
static void
-rhdUpdateCrtcPos(struct rhdCrtc *Crtc, int x, int y)
+rhdUpdateCrtcPos(RHDPtr rhdPtr, struct rhdCrtc *Crtc, int x, int y)
{
+ int i;
+
if (Crtc->MaxX > 0) {
int cx = Crtc->X, cy = Crtc->Y;
int w = Crtc->CurrentMode->HDisplay;
@@ -192,6 +208,13 @@ rhdUpdateCrtcPos(struct rhdCrtc *Crtc, int x, int y)
cy = y < Crtc->MaxY ? y-h+1 : Crtc->MaxY-h;
if (cx != Crtc->X || cy != Crtc->Y)
Crtc->FrameSet(Crtc, cx, cy);
+ for (i = 0; i < 2; i++) {
+ xf86CrtcPtr crtc = (xf86CrtcPtr) rhdPtr->randr->RandrCrtc[i];
+ if (Crtc == ((struct rhdRandrCrtc *)crtc->driver_private)->rhdCrtc) {
+ crtc->x = cx;
+ crtc->y = cy;
+ }
+ }
}
}
@@ -202,15 +225,16 @@ RHDDebugRandrState (RHDPtr rhdPtr, const char *msg)
int i;
xf86OutputPtr *ro;
RHDDebug(rhdPtr->scrnIndex, "State at %s:\n", msg);
+
for (i = 0; i < 2; i++) {
- xf86CrtcPtr rc = rhdPtr->randr->RandrCrtc[i];
- struct rhdCrtc *c = (struct rhdCrtc *) rc->driver_private;
+ xf86CrtcPtr crtc = rhdPtr->randr->RandrCrtc[i];
+ struct rhdCrtc *c = ((struct rhdRandrCrtc *)crtc->driver_private)->rhdCrtc;
RHDDebugCont(" RRCrtc #%d [rhd %s]: active %d [%d] "
"mode %s (%dx%d) +%d+%d\n",
- i, c->Name, rc->enabled, c->Active,
- rc->mode.name ? rc->mode.name : "unnamed",
- rc->mode.HDisplay, rc->mode.VDisplay,
- rc->x, rc->y);
+ i, c->Name, crtc->enabled, c->Active,
+ crtc->mode.name ? crtc->mode.name : "unnamed",
+ crtc->mode.HDisplay, crtc->mode.VDisplay,
+ crtc->x, crtc->y);
}
for (ro = rhdPtr->randr->RandrOutput; *ro; ro++) {
rhdRandrOutputPtr o = (rhdRandrOutputPtr) (*ro)->driver_private;
@@ -218,7 +242,7 @@ RHDDebugRandrState (RHDPtr rhdPtr, const char *msg)
RHDDebugCont(" RROut %s [Out %s Conn %s] Crtc %s [%s] "
"[%sactive] %s\n",
(*ro)->name, o->Output->Name, o->Connector->Name,
- (*ro)->crtc ? ((struct rhdCrtc *)(*ro)->crtc->driver_private)->Name : "null",
+ (*ro)->crtc ? ((struct rhdRandrCrtc *)((*ro)->crtc->driver_private))->rhdCrtc->Name : "null",
o->Output->Crtc ? o->Output->Crtc->Name : "null",
o->Output->Active ? "" : "in",
(*ro)->status == XF86OutputStatusConnected ? "connected" :
@@ -257,33 +281,33 @@ rhdRRXF86CrtcResize(ScrnInfoPtr pScrn, int width, int height)
/* Turns the crtc on/off, or sets intermediate power levels if available. */
static void
-rhdRRCrtcDpms(xf86CrtcPtr crtc, int mode)
+rhdRRCrtcDpms(xf86CrtcPtr Crtc, int mode)
{
- RHDPtr rhdPtr = RHDPTR(crtc->scrn);
- struct rhdCrtc *Crtc = (struct rhdCrtc *) crtc->driver_private;
+ RHDPtr rhdPtr = RHDPTR(Crtc->scrn);
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)(Crtc->driver_private))->rhdCrtc;
- RHDDebug(Crtc->scrnIndex, "%s: %s: %s\n", __func__, Crtc->Name,
+ RHDDebug(rhdCrtc->scrnIndex, "%s: %s: %s\n", __func__, rhdCrtc->Name,
mode==DPMSModeOn ? "On" : mode==DPMSModeOff ? "Off" : "Other");
switch (mode) {
case DPMSModeOn:
- if (Crtc->PLL)
- Crtc->PLL->Power(Crtc->PLL, RHD_POWER_ON);
- Crtc->Power(Crtc, RHD_POWER_ON);
- Crtc->Active = TRUE;
+ if (rhdCrtc->PLL)
+ rhdCrtc->PLL->Power(rhdCrtc->PLL, RHD_POWER_ON);
+ rhdCrtc->Power(rhdCrtc, RHD_POWER_ON);
+ rhdCrtc->Active = TRUE;
break;
case DPMSModeSuspend:
case DPMSModeStandby:
- Crtc->Power(Crtc, RHD_POWER_RESET);
- if (Crtc->PLL)
- Crtc->PLL->Power(Crtc->PLL, RHD_POWER_RESET);
- Crtc->Active = FALSE;
+ rhdCrtc->Power(rhdCrtc, RHD_POWER_RESET);
+ if (rhdCrtc->PLL)
+ rhdCrtc->PLL->Power(rhdCrtc->PLL, RHD_POWER_RESET);
+ rhdCrtc->Active = FALSE;
break;
case DPMSModeOff:
- Crtc->Power(Crtc, RHD_POWER_SHUTDOWN);
- if (Crtc->PLL)
- Crtc->PLL->Power(Crtc->PLL, RHD_POWER_SHUTDOWN);
- Crtc->Active = FALSE;
+ rhdCrtc->Power(rhdCrtc, RHD_POWER_SHUTDOWN);
+ if (rhdCrtc->PLL)
+ rhdCrtc->PLL->Power(rhdCrtc->PLL, RHD_POWER_SHUTDOWN);
+ rhdCrtc->Active = FALSE;
break;
default:
ASSERT(!"Unknown DPMS mode");
@@ -330,20 +354,20 @@ rhdRRCrtcPrepare(xf86CrtcPtr crtc)
{
RHDPtr rhdPtr = RHDPTR(crtc->scrn);
ScrnInfoPtr pScrn = xf86Screens[rhdPtr->scrnIndex];
- struct rhdCrtc *Crtc = (struct rhdCrtc *) crtc->driver_private;
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)(crtc->driver_private))->rhdCrtc;
RHDFUNC(rhdPtr);
- setupCrtc(rhdPtr, Crtc);
+ setupCrtc(rhdPtr, rhdCrtc);
pScrn->vtSema = TRUE;
/* Disable CRTCs to stop noise from appearing. */
- Crtc->Power(Crtc, RHD_POWER_RESET);
+ rhdCrtc->Power(rhdCrtc, RHD_POWER_RESET);
/* Verify panning area */
- if (Crtc->MaxX > Crtc->Width)
- Crtc->MaxX = Crtc->Width;
- if (Crtc->MaxY > Crtc->Height)
- Crtc->MaxY = Crtc->Height;
+ if (rhdCrtc->MaxX > rhdCrtc->Width)
+ rhdCrtc->MaxX = rhdCrtc->Width;
+ if (rhdCrtc->MaxY > rhdCrtc->Height)
+ rhdCrtc->MaxY = rhdCrtc->Height;
}
static void
@@ -353,8 +377,9 @@ rhdRRCrtcModeSet(xf86CrtcPtr crtc,
{
RHDPtr rhdPtr = RHDPTR(crtc->scrn);
ScrnInfoPtr pScrn = xf86Screens[rhdPtr->scrnIndex];
- struct rhdCrtc *Crtc = (struct rhdCrtc *) crtc->driver_private;
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc*) (crtc->driver_private))->rhdCrtc;
xf86CrtcConfigPtr xf86CrtcConfig = XF86_CRTC_CONFIG_PTR(crtc->scrn);
+ CARD32 ScanOutOffset;
int i;
/* RandR may give us a mode without a name... (xf86RandRModeConvert) */
@@ -362,7 +387,7 @@ rhdRRCrtcModeSet(xf86CrtcPtr crtc,
Mode->name = xstrdup(crtc->mode.name);
RHDDebug(rhdPtr->scrnIndex, "%s: %s : %s at %d/%d\n", __func__,
- Crtc->Name, Mode->name, x, y);
+ rhdCrtc->Name, Mode->name, x, y);
/*
* for AtomBIOS SetPixelClock we need information about the outputs.
@@ -371,46 +396,68 @@ rhdRRCrtcModeSet(xf86CrtcPtr crtc,
for (i = 0; i < xf86CrtcConfig->num_output; i++) {
if (xf86CrtcConfig->output[i]->crtc == crtc) {
rhdRandrOutputPtr rout = xf86CrtcConfig->output[i]->driver_private;
- rout->Output->Crtc = Crtc;
+ rout->Output->Crtc = rhdCrtc;
}
}
if (rhdPtr->verbosity >= 3) {
xf86DrvMsg(rhdPtr->scrnIndex, X_INFO, "On Crtc %i Setting %3.1f Hz Mode: ",
- Crtc->Id, Mode->VRefresh);
+ rhdCrtc->Id, Mode->VRefresh);
RHDPrintModeline(Mode);
if (OrigMode->VDisplay != Mode->VDisplay || OrigMode->HDisplay != Mode->HDisplay) {
xf86DrvMsg(-1, X_NONE, "Scaled from: ");
RHDPrintModeline(OrigMode);
}
}
-
/* Set up mode */
- Crtc->FBSet(Crtc, pScrn->displayWidth, pScrn->virtualX, pScrn->virtualY,
- pScrn->depth, rhdPtr->FbScanoutStart);
- Crtc->ModeSet(Crtc, Mode);
+ if (crtc->rotatedData != NULL) {
+ ScanOutOffset = (unsigned long) crtc->rotatedData - (unsigned long)rhdPtr->FbBase;
+ x = y = 0;
+ } else {
+ ScanOutOffset = rhdPtr->FbScanoutStart;
+ }
+ rhdCrtc->FBSet(rhdCrtc, pScrn->displayWidth, pScrn->virtualX, pScrn->virtualY,
+ pScrn->depth, ScanOutOffset);
+ rhdCrtc->ModeSet(rhdCrtc, Mode);
if (OrigMode->VDisplay != Mode->VDisplay || OrigMode->HDisplay != Mode->HDisplay)
- Crtc->ScaleSet(Crtc, Crtc->ScaleType, OrigMode, Mode);
+ rhdCrtc->ScaleSet(rhdCrtc, rhdCrtc->ScaleType, OrigMode, Mode);
else
- Crtc->ScaleSet(Crtc, RHD_CRTC_SCALE_TYPE_NONE, Mode, NULL);
+ rhdCrtc->ScaleSet(rhdCrtc, RHD_CRTC_SCALE_TYPE_NONE, Mode, NULL);
+
+ rhdCrtc->FrameSet(rhdCrtc, x, y);
+ rhdUpdateCrtcPos(rhdPtr, rhdCrtc, rhdCrtc->Cursor->X, rhdCrtc->Cursor->Y);
+ RHDPLLSet(rhdCrtc->PLL, Mode->Clock); /* This also powers up PLL */
+ rhdCrtc->LUTSelect(rhdCrtc, rhdCrtc->LUT);
- Crtc->FrameSet(Crtc, x, y);
- rhdUpdateCrtcPos(Crtc, Crtc->Cursor->X, Crtc->Cursor->Y);
- RHDPLLSet(Crtc->PLL, Mode->Clock); /* This also powers up PLL */
- Crtc->LUTSelect(Crtc, Crtc->LUT);
+ /*
+ * RandR is able to bring up new Crtcs, but can't be bothered to set up
+ * a cmap on them.
+ *
+ * The pScreen check tells us whether we are still in PreInit. If we are
+ * still in PreInit, the xserver will still do the right thing and call
+ * LoadPalette accordingly after the modeset. VT switch will also do the
+ * right thing still, but at that time no new CRTC gets initialised, so
+ * LUT->Initialised is either set, or the current function isn't called.
+ */
+ if (!rhdCrtc->LUT->Initialised && pScrn->pScreen)
+ RHDLUTCopyForRR(rhdCrtc->LUT);
}
+
static void
rhdRRCrtcCommit(xf86CrtcPtr crtc)
{
RHDPtr rhdPtr = RHDPTR(crtc->scrn);
- struct rhdCrtc *Crtc = (struct rhdCrtc *) crtc->driver_private;
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)(crtc->driver_private))->rhdCrtc;
RHDFUNC(rhdPtr);
- Crtc->Active = TRUE;
- Crtc->Power(Crtc, RHD_POWER_ON);
+ rhdCrtc->Active = TRUE;
+ rhdCrtc->Power(rhdCrtc, RHD_POWER_ON);
- RHDDebugRandrState(rhdPtr, Crtc->Name);
+ if (crtc->scrn->pScreen != NULL)
+ xf86_reload_cursors(crtc->scrn->pScreen);
+
+ RHDDebugRandrState(rhdPtr, rhdCrtc->Name);
}
/*
@@ -425,12 +472,12 @@ static void
rhdRRCrtcGammaSet(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
int size)
{
- struct rhdCrtc *Crtc = (struct rhdCrtc *) crtc->driver_private;
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)(crtc->driver_private))->rhdCrtc;
int indices[0x100]; /* would RandR use a size larger than 256? */
LOCO colors[0x100];
int i;
- RHDDebug(Crtc->scrnIndex, "%s: %s.\n", __func__, Crtc->Name);
+ RHDDebug(rhdCrtc->scrnIndex, "%s: %s.\n", __func__, rhdCrtc->Name);
/* thanks so very much */
for (i = 0; i < size; i++) {
@@ -440,7 +487,7 @@ rhdRRCrtcGammaSet(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
colors[i].blue = blue[i];
}
- Crtc->LUT->Set(Crtc->LUT, size, indices, colors);
+ rhdCrtc->LUT->Set(rhdCrtc->LUT, size, indices, colors);
}
/* Dummy, because not tested for NULL */
@@ -452,31 +499,13 @@ rhdRRCrtcModeFixupDUMMY(xf86CrtcPtr crtc,
return TRUE;
}
-#if 0 /* Needed if we want to support rotation w/o own hardware support */
- void *
- crtc->funcs->shadow_allocate (xf86CrtcPtr crtc, int width, int height)
-
-This function allocates frame buffer space for a shadow frame buffer. When
-allocated, the crtc must scan from the shadow instead of the main frame
-buffer. This is used for rotation. The address returned is passed to the
-shadow_create function. This function should return NULL on failure.
-
- PixmapPtr
- crtc->funcs->shadow_create (xf86CrtcPtr crtc, void *data,
- int width, int height)
-
-This function creates a pixmap object that will be used as a shadow of the
-main frame buffer for CRTCs which are rotated or reflected. 'data' is the
-value returned by shadow_allocate.
-
- void
- crtc->funcs->shadow_destroy (xf86CrtcPtr crtc, PixmapPtr pPixmap,
- void *data)
+static void
+rhdRRCrtcSetOrigin(xf86CrtcPtr crtc, int x, int y)
+{
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc*) (crtc->driver_private))->rhdCrtc;
-Destroys any associated shadow objects. If pPixmap is NULL, then a pixmap
-was not created, but 'data' may still be non-NULL indicating that the shadow
-had been allocated.
-#endif
+ rhdCrtc->FrameSet(rhdCrtc, x, y);
+}
/*
@@ -613,8 +642,7 @@ rhdRROutputDpms(xf86OutputPtr out,
RHDPtr rhdPtr = RHDPTR(out->scrn);
rhdRandrOutputPtr rout = (rhdRandrOutputPtr) out->driver_private;
xf86OutputPtr *ro;
- struct rhdCrtc *Crtc = out->crtc ?
- (struct rhdCrtc *) out->crtc->driver_private : NULL;
+ struct rhdCrtc *rhdCrtc = out->crtc ? ((struct rhdRandrCrtc *)(out->crtc->driver_private))->rhdCrtc : NULL;
const char *outUsedBy = NULL;
RHDDebug(rhdPtr->scrnIndex, "%s: Output %s : %s\n", __func__, rout->Name,
@@ -629,9 +657,9 @@ rhdRROutputDpms(xf86OutputPtr out,
case DPMSModeOn:
rout->Output->Power(rout->Output, RHD_POWER_ON);
rout->Output->Active = TRUE;
- ASSERT(Crtc);
- ASSERT(Crtc == rout->Output->Crtc);
- rout->Crtc = Crtc;
+ ASSERT(rhdCrtc);
+ ASSERT(rhdCrtc == rout->Output->Crtc);
+ rout->Crtc = rhdCrtc;
break;
case DPMSModeSuspend:
case DPMSModeStandby:
@@ -685,6 +713,7 @@ rhdRROutputModeValid(xf86OutputPtr out,
int Status;
RHDFUNC(rhdPtr);
+
/* RandR may give us a mode without a name... (xf86RandRModeConvert)
* xf86DuplicateMode should fill it up, though */
if (!Mode->name)
@@ -767,6 +796,36 @@ rhdRRSanitizeMode(DisplayModePtr Mode)
}
}
+/*
+ *
+ */
+static void
+rhdRRFreeOutputs( RHDPtr rhdPtr)
+{
+ xf86OutputPtr *ro;
+ struct rhdOutput *Output;
+ /*
+ * modesUpdated indicates if we are entering here for a first time after a
+ * OutputsModeValid(). In this case a new mode setting round starts, thus
+ * we need to free all outputs so that all inactive outputs are freed.
+ * We later on allocate each output.
+ */
+ for (Output = rhdPtr->Outputs; Output; Output = Output->Next) {
+ if (Output->AllocFree) {
+ for (ro = rhdPtr->randr->RandrOutput; *ro; ro++) {
+ rhdRandrOutputPtr o = (rhdRandrOutputPtr) (*ro)->driver_private;
+ if (o->Output == Output) {
+ if (!(*ro)->crtc) {
+ Output->AllocFree(Output, RHD_OUTPUT_FREE);
+ RHDDebug(rhdPtr->scrnIndex, "%s: Freeing Output: %s\n",__func__,
+ Output->Name);
+ }
+ }
+ }
+ }
+ }
+}
+
/* The crtc is only known on fixup time. Now it's actually to late to reject a
* mode and give a reasonable answer why (return is bool), but we'll better not
* set a mode than scrap our hardware */
@@ -777,20 +836,22 @@ rhdRROutputModeFixup(xf86OutputPtr out,
{
RHDPtr rhdPtr = RHDPTR(out->scrn);
rhdRandrOutputPtr rout = (rhdRandrOutputPtr) out->driver_private;
- struct rhdCrtc *Crtc = NULL;
+ struct rhdCrtc *rhdCrtc = NULL;
int Status;
DisplayModePtr DisplayedMode;
Bool Scaled = FALSE;
RHDFUNC(rhdPtr);
ASSERT(out->crtc);
- Crtc = (struct rhdCrtc *) out->crtc->driver_private;
+ rhdCrtc = ((struct rhdRandrCrtc *)(out->crtc->driver_private))->rhdCrtc;
+
+ rhdRRFreeOutputs(rhdPtr);
xfree(Mode->name);
if (rout->ScaledToMode) {
DisplayModePtr tmp = RHDModeCopy(rout->ScaledToMode);
/* validate against CRTC. */
- if ((Status = RHDValidateScaledToMode(Crtc, tmp))!= MODE_OK) {
+ if ((Status = RHDValidateScaledToMode(rhdCrtc, tmp))!= MODE_OK) {
RHDDebug(rhdPtr->scrnIndex, "%s: %s ScaledToMode INVALID: [0x%x] %s\n", __func__,
tmp->name, Status, RHDModeStatusToString(Status));
xfree(tmp);
@@ -805,7 +866,7 @@ rhdRROutputModeFixup(xf86OutputPtr out,
/* sanitize OrigMode */
rhdRRSanitizeMode(OrigMode);
DisplayedMode = OrigMode;
- Crtc->ScaledToMode = Mode;
+ rhdCrtc->ScaledToMode = Mode;
Scaled = TRUE;
} else {
/* !@#$ xf86RandRModeConvert doesn't initialize Mode with 0
@@ -822,16 +883,22 @@ rhdRROutputModeFixup(xf86OutputPtr out,
ASSERT(rout->Connector);
ASSERT(rout->Output);
- setupCrtc(rhdPtr, Crtc);
+ setupCrtc(rhdPtr, rhdCrtc);
/* Monitor is handled by RandR */
- Status = RHDRRModeFixup(out->scrn, DisplayedMode, Crtc, rout->Connector,
- rout->Output, NULL, Scaled);
+ if (!rout->Output->AllocFree || rout->Output->AllocFree(rout->Output, RHD_OUTPUT_ALLOC)) {
+ Status = RHDRRModeFixup(out->scrn, DisplayedMode, rhdCrtc, rout->Connector,
+ rout->Output, NULL, Scaled);
+ } else
+ Status = MODE_NO_ENCODER;
+
if (Status != MODE_OK) {
+ rout->OutputActive = FALSE;
RHDDebug(rhdPtr->scrnIndex, "%s: %s FAILED: [0x%x] %s\n", __func__,
Mode->name, Status, RHDModeStatusToString(Status));
return FALSE;
}
+ rout->OutputActive = TRUE;
return TRUE;
}
@@ -860,7 +927,7 @@ rhdRROutputModeSet(xf86OutputPtr out,
{
RHDPtr rhdPtr = RHDPTR(out->scrn);
rhdRandrOutputPtr rout = (rhdRandrOutputPtr) out->driver_private;
- struct rhdCrtc *Crtc = (struct rhdCrtc *) out->crtc->driver_private;
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)(out->crtc->driver_private))->rhdCrtc;
RHDFUNC(rhdPtr);
@@ -870,18 +937,18 @@ rhdRROutputModeSet(xf86OutputPtr out,
RHDDebug(rhdPtr->scrnIndex, "%s: Output %s : %s to %s\n", __func__,
rout->Name, Mode->name,
- Crtc->Name);
+ rhdCrtc->Name);
/* RandR might want to set up several outputs (RandR speech) with different
* crtcs, while the outputs differ in fact only by the connector and thus
* cannot be used by different crtcs */
- if (rout->Crtc && rout->Crtc != Crtc)
+ if (rout->Crtc && rout->Crtc != rhdCrtc)
xf86DrvMsg(rhdPtr->scrnIndex, X_ERROR,
"RandR: Output %s has already CRTC attached - "
"assuming ouput/connector clash\n", rout->Name);
/* Set up mode */
- rout->Crtc = Crtc;
- ASSERT(Crtc == rout->Output->Crtc);
+ rout->Crtc = rhdCrtc;
+ ASSERT(rhdCrtc == rout->Output->Crtc);
rout->Output->Mode(rout->Output, Mode);
}
static void
@@ -891,10 +958,10 @@ rhdRROutputCommit(xf86OutputPtr out)
rhdRandrOutputPtr rout = (rhdRandrOutputPtr) out->driver_private;
const char *val;
char buf[32];
- struct rhdCrtc *Crtc = (struct rhdCrtc *) out->crtc->driver_private;
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)(out->crtc->driver_private))->rhdCrtc;
RHDFUNC(rhdPtr);
- ASSERT(Crtc == rout->Output->Crtc);
+ ASSERT(rhdCrtc == rout->Output->Crtc);
rout->Output->Active = TRUE;
rout->Output->Connector = rout->Connector; /* @@@ */
@@ -906,9 +973,9 @@ rhdRROutputCommit(xf86OutputPtr out)
XA_STRING, 8, PropModeReplace,
strlen(val), (char *) val, TRUE, FALSE);
/* Should be a crtc property */
- if (Crtc->MaxX > Crtc->MinX && Crtc->MaxY > Crtc->MinY)
- sprintf(buf, "%dx%d+%d+%d", Crtc->MaxX - Crtc->MinX,
- Crtc->MaxY - Crtc->MinY, Crtc->MinX, Crtc->MinY);
+ if (rhdCrtc->MaxX > rhdCrtc->MinX && rhdCrtc->MaxY > rhdCrtc->MinY)
+ sprintf(buf, "%dx%d+%d+%d", rhdCrtc->MaxX - rhdCrtc->MinX,
+ rhdCrtc->MaxY - rhdCrtc->MinY, rhdCrtc->MinX, rhdCrtc->MinY);
else
buf[0] = 0;
RRChangeOutputProperty(out->randr_output, atomPanningArea,
@@ -918,13 +985,40 @@ rhdRROutputCommit(xf86OutputPtr out)
RHDDebugRandrState(rhdPtr, rout->Name);
}
+/*
+ * This function looks for other outputs on the connector rout is connected to.
+ * If one of those outputs can be sensed and is sensed the function will return
+ * one of those.
+ */
+static rhdRandrOutputPtr
+rhdRROtherOutputOnConnectorHelper(RHDPtr rhdPtr, rhdRandrOutputPtr rout)
+{
+ xf86OutputPtr *ro;
+
+ for (ro = rhdPtr->randr->RandrOutput; *ro; ro++) {
+ rhdRandrOutputPtr o =
+ (rhdRandrOutputPtr) (*ro)->driver_private;
+ if (o != rout &&
+ o->Connector == rout->Connector &&
+ o->Output->Sense) {
+ /* Yes, this looks wrong, but is correct */
+ enum rhdSensedOutput SensedType =
+ o->Output->Sense(o->Output, o->Connector);
+ if (SensedType != RHD_SENSED_NONE) {
+ RHDOutputPrintSensedType(o->Output);
+ return o;
+ }
+ }
+ }
+ return NULL;
+}
+
/* Probe for a connected output. */
static xf86OutputStatus
rhdRROutputDetect(xf86OutputPtr output)
{
RHDPtr rhdPtr = RHDPTR(output->scrn);
rhdRandrOutputPtr rout = (rhdRandrOutputPtr) output->driver_private;
- xf86OutputPtr *ro;
RHDDebug(rhdPtr->scrnIndex, "%s: Output %s\n", __func__, rout->Name);
@@ -956,22 +1050,8 @@ rhdRROutputDetect(xf86OutputPtr output)
* Check if there is another output attached to this connector
* and use Sense() on that one to verify whether something
* is attached to this one */
-
- for (ro = rhdPtr->randr->RandrOutput; *ro; ro++) {
- rhdRandrOutputPtr o =
- (rhdRandrOutputPtr) (*ro)->driver_private;
- if (o != rout &&
- o->Connector == rout->Connector &&
- o->Output->Sense) {
- /* Yes, this looks wrong, but is correct */
- enum rhdSensedOutput SensedType =
- o->Output->Sense(o->Output, o->Connector);
- if (SensedType != RHD_SENSED_NONE) {
- RHDOutputPrintSensedType(o->Output);
- return XF86OutputStatusDisconnected;
- }
- }
- }
+ if (rhdRROtherOutputOnConnectorHelper(rhdPtr, rout))
+ return XF86OutputStatusDisconnected;
rout->Output->Connector = rout->Connector; /* @@@ */
return XF86OutputStatusConnected;
}
@@ -1018,12 +1098,21 @@ rhdRROutputDetect(xf86OutputPtr output)
i2cRec.probe.i2cBusPtr = rout->Connector->DDC;
if (RHDI2CFunc(rhdPtr->scrnIndex, rhdPtr->I2C,RHD_I2C_PROBE_ADDR,&i2cRec)
== RHD_I2C_SUCCESS) {
- RHDDebug(rout->Output->scrnIndex, "DDC Probing for Output %s returned connected\n",rout->Output->Name);
+ rhdRandrOutputPtr rout_tmp;
+ RHDDebug(rout->Output->scrnIndex, "DDC Probing for Output %s returned connected\n",
+ rout->Output->Name);
+ if ((rout_tmp = rhdRROtherOutputOnConnectorHelper(rhdPtr, rout))) {
+ RHDDebug(rout->Output->scrnIndex, "Output %s on same connector already connected\n",
+ rout_tmp->Output->Name);
+ return XF86OutputStatusDisconnected;
+ }
rout->Output->Connector = rout->Connector; /* @@@ */
return XF86OutputStatusConnected;
- } else
- RHDDebug(rout->Output->scrnIndex, "DDC Probing for Output %s returned disconnected\n",rout->Output->Name);
+ } else {
+ RHDDebug(rout->Output->scrnIndex, "DDC Probing for Output %s returned disconnected\n",
+ rout->Output->Name);
return XF86OutputStatusDisconnected;
+ }
}
rout->Output->Connector = rout->Connector; /* @@@ */
return XF86OutputStatusUnknown;
@@ -1052,7 +1141,6 @@ rhdRROutputGetModes(xf86OutputPtr output)
{
RHDPtr rhdPtr = RHDPTR(output->scrn);
rhdRandrOutputPtr rout = (rhdRandrOutputPtr) output->driver_private;
- xf86MonPtr edid_mon = NULL;
struct rhdOutput *o;
RHDDebug(rhdPtr->scrnIndex, "%s: Output %s\n", __func__, rout->Name);
@@ -1094,7 +1182,12 @@ rhdRROutputGetModes(xf86OutputPtr output)
rout->Output->Id == RHD_OUTPUT_LVTMA ||
rout->Output->Id == RHD_OUTPUT_KLDSKP_LVTMA ||
rout->Output->Id == RHD_OUTPUT_UNIPHYA ||
- rout->Output->Id == RHD_OUTPUT_UNIPHYB)
+ rout->Output->Id == RHD_OUTPUT_UNIPHYB ||
+ rout->Output->Id == RHD_OUTPUT_UNIPHYC ||
+ rout->Output->Id == RHD_OUTPUT_UNIPHYD ||
+ rout->Output->Id == RHD_OUTPUT_UNIPHYE ||
+ rout->Output->Id == RHD_OUTPUT_UNIPHYF
+ )
rout->Connector->Monitor->ReducedAllowed = TRUE;
/* Allow user overrides */
if (rhdPtr->forceReduced.set)
@@ -1144,8 +1237,20 @@ rhdRROutputSetProperty(xf86OutputPtr out, Atom property,
if (property == atomPanningArea) {
int w = 0, h = 0, x = 0, y = 0;
struct rhdCrtc *Crtc = rout->Output->Crtc;
+ int i;
+
if (!Crtc)
return FALSE;
+ for (i = 0; i < 2; i++) {
+ xf86CrtcPtr crtc = (xf86CrtcPtr) rhdPtr->randr->RandrCrtc[i];
+ if (Crtc == ((struct rhdRandrCrtc *)crtc->driver_private)->rhdCrtc) {
+ /* Don't allow panning while rotated */
+ if (crtc->rotation != RR_Rotate_0)
+ return FALSE;
+ else
+ break;
+ }
+ }
if (value->type != XA_STRING || value->format != 8)
return FALSE;
switch (sscanf(value->data, "%dx%d+%d+%d", &w, &h, &x, &y)) {
@@ -1159,7 +1264,7 @@ rhdRROutputSetProperty(xf86OutputPtr out, Atom property,
Crtc->MinY = y;
Crtc->MaxX = x + w;
Crtc->MaxY = y + h;
- rhdUpdateCrtcPos(Crtc, Crtc->Cursor->X, Crtc->Cursor->Y);
+ rhdUpdateCrtcPos(rhdPtr, Crtc, Crtc->Cursor->X, Crtc->Cursor->Y);
RHDDebug(rhdPtr->scrnIndex, "%s: PanningArea %d/%d - %d/%d\n",
x, y, x+w, y+h);
return TRUE;
@@ -1195,6 +1300,118 @@ rhdRROutputSetProperty(xf86OutputPtr out, Atom property,
return FALSE; /* Others are not mutable */
}
+/*
+ *
+ */
+static void *
+rhdRRCrtcShadowAllocate(xf86CrtcPtr crtc, int Width, int Height)
+{
+ ScrnInfoPtr pScrn = crtc->scrn;
+ RHDPtr rhdPtr = RHDPTR(crtc->scrn);
+ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+ struct rhdRandrCrtc *rhdRRCrtc = (struct rhdRandrCrtc*) crtc->driver_private;
+ int OctPerPixel = pScrn->bitsPerPixel >> 3;
+ int Size = (pScrn->displayWidth * OctPerPixel) * Height;
+
+ if (rhdPtr->AccelMethod == RHD_ACCEL_SHADOWFB
+ || rhdPtr->AccelMethod == RHD_ACCEL_NONE)
+ return NULL;
+
+#ifdef USE_EXA
+ if (rhdPtr->AccelMethod == RHD_ACCEL_EXA) {
+
+ ASSERT(rhdRRCrtc->u.MemEXA == NULL);
+
+ rhdRRCrtc->u.MemEXA = exaOffscreenAlloc(pScreen, Size, 4096,
+ TRUE, NULL, NULL);
+ if (rhdRRCrtc->u.MemEXA == NULL) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Unable to allocate shadow memory for rotated CRTC\n");
+ return NULL;
+ }
+ return ((char *)rhdPtr->FbBase
+ + rhdRRCrtc->u.MemEXA->offset);
+ }
+
+#endif /* USE_EXA */
+ if (rhdPtr->AccelMethod == RHD_ACCEL_XAA) {
+ int Align = (4096 + OctPerPixel - 1) / OctPerPixel;
+ Size = (Size + OctPerPixel - 1) / OctPerPixel;
+
+ ASSERT(rhdRRCrtc->u.MemXAA == NULL);
+
+ rhdRRCrtc->u.MemXAA =
+ xf86AllocateOffscreenLinear(pScreen, Size, Align, /* @@@ */
+ NULL, NULL, NULL);
+ if (rhdRRCrtc->u.MemXAA == NULL) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Unable to allocate shadow memory for rotated CRTC\n");
+ return NULL;
+ }
+
+ return ((char *)rhdPtr->FbBase
+ + rhdPtr->FbScanoutStart
+ + rhdRRCrtc->u.MemXAA->offset * OctPerPixel);
+ }
+
+ return NULL;
+}
+
+/*
+ *
+ */
+static PixmapPtr
+rhdRRCrtcShadowCreate(xf86CrtcPtr Crtc, void *Data, int Width, int Height)
+{
+ ScrnInfoPtr pScrn = Crtc->scrn;
+ PixmapPtr RPixmap;
+
+ if (!Data)
+ Data = rhdRRCrtcShadowAllocate(Crtc, Width, Height);
+
+ RPixmap = GetScratchPixmapHeader(pScrn->pScreen,
+ Width, Height,
+ pScrn->depth,
+ pScrn->bitsPerPixel,
+ pScrn->displayWidth * pScrn->bitsPerPixel >> 3,
+ Data);
+
+ if (RPixmap == NULL)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Unable to allocate shadow pixmap for rotated CRTC\n");
+
+ return RPixmap;
+}
+
+/*
+ *
+ */
+static void
+rhdRRCrtcShadowDestroy(xf86CrtcPtr crtc, PixmapPtr RPixmap, void *Data)
+{
+
+ ScrnInfoPtr pScrn = crtc->scrn;
+ RHDPtr rhdPtr = RHDPTR(crtc->scrn);
+ struct rhdRandrCrtc *rhdRRCrtc = (struct rhdRandrCrtc*) crtc->driver_private;
+
+ if (RPixmap)
+ FreeScratchPixmapHeader(RPixmap);
+
+ if (Data) {
+#ifdef USE_EXA
+ if (rhdPtr->AccelMethod == RHD_ACCEL_EXA) {
+ exaOffscreenFree(pScrn->pScreen, rhdRRCrtc->u.MemEXA);
+ rhdRRCrtc->u.MemEXA = NULL;
+ }
+
+#endif /* USE_EXA */
+ if (rhdPtr->AccelMethod == RHD_ACCEL_XAA) {
+ xf86FreeOffscreenLinear(rhdRRCrtc->u.MemXAA);
+ rhdRRCrtc->u.MemXAA = NULL;
+ }
+ }
+}
+
#ifdef RANDR_13_INTERFACE
static Bool
@@ -1241,6 +1458,83 @@ rhdRROutputGetProperty(xf86OutputPtr out, Atom property)
#endif
/*
+ *
+ */
+Bool
+RHDRRInitCursor(ScreenPtr pScreen)
+{
+ RHDFUNCI(pScreen->myNum);
+
+ /* still need to alloc fb mem for cursors */
+ return xf86_cursors_init(pScreen, MAX_CURSOR_WIDTH, MAX_CURSOR_HEIGHT,
+ HARDWARE_CURSOR_TRUECOLOR_AT_8BPP
+ | HARDWARE_CURSOR_UPDATE_UNHIDDEN
+ | HARDWARE_CURSOR_AND_SOURCE_WITH_MASK
+ | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1
+ | HARDWARE_CURSOR_ARGB);
+}
+
+/*
+ *
+ */
+static void
+rhdRRShowCursor(xf86CrtcPtr crtc)
+{
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)crtc->driver_private)->rhdCrtc;
+ rhdCrtcShowCursor(rhdCrtc);
+}
+
+/*
+ *
+ */
+static void
+rhdRRHideCursor(xf86CrtcPtr crtc)
+{
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)crtc->driver_private)->rhdCrtc;
+ rhdCrtcHideCursor(rhdCrtc);
+}
+
+/*
+ *
+ */
+static void
+rhdRRLoadCursorARGB(xf86CrtcPtr crtc, CARD32 *Image)
+{
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)crtc->driver_private)->rhdCrtc;
+ rhdCrtcLoadCursorARGB(rhdCrtc, Image);
+}
+
+/*
+ *
+ */
+static void
+rhdRRSetCursorColors(xf86CrtcPtr crtc, int bg, int fg)
+{
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)crtc->driver_private)->rhdCrtc;
+ rhdCrtcSetCursorColors(rhdCrtc, bg, fg);
+}
+
+/*
+ *
+ */
+static void
+rhdRRSetCursorPosition(xf86CrtcPtr crtc, int x, int y)
+{
+ struct rhdCrtc *rhdCrtc = ((struct rhdRandrCrtc *)crtc->driver_private)->rhdCrtc;
+ /*
+ * Given cursor pos is always relative to frame - make absolute
+ * NOTE: This is hardware specific, it doesn't really fit here,
+ * but it's the only place where the relevant information is
+ * available.
+ */
+ if (!crtc->rotatedData) {
+ x += crtc->x;
+ y += crtc->y;
+ }
+ rhdCrtcSetCursorPosition(rhdCrtc, x, y);
+}
+
+/*
* Xorg Interface
*/
@@ -1248,24 +1542,52 @@ static const xf86CrtcConfigFuncsRec rhdRRCrtcConfigFuncs = {
rhdRRXF86CrtcResize
};
-static const xf86CrtcFuncsRec rhdRRCrtcFuncs = {
+static xf86CrtcFuncsRec rhdRRCrtcFuncs = {
rhdRRCrtcDpms,
NULL, NULL, /* Save,Restore */
rhdRRCrtcLock, rhdRRCrtcUnlock,
rhdRRCrtcModeFixupDUMMY,
rhdRRCrtcPrepare, rhdRRCrtcModeSet, rhdRRCrtcCommit,
rhdRRCrtcGammaSet,
- /* rhdRRCrtcShadowAllocate,rhdRRCrtcShadowCreate,rhdRRCrtcShadowDestroy */
- NULL, NULL, NULL,
+ rhdRRCrtcShadowAllocate, rhdRRCrtcShadowCreate, rhdRRCrtcShadowDestroy,
+ rhdRRSetCursorColors, rhdRRSetCursorPosition, rhdRRShowCursor, rhdRRHideCursor,
+ NULL, rhdRRLoadCursorARGB, NULL
/* SetCursorColors,SetCursorPosition,ShowCursor,HideCursor,
* LoadCursorImage,LoadCursorArgb,CrtcDestroy */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL
#ifdef XF86CRTCFUNCS_HAS_SETMODEMAJOR
/* set_mode_major */
, NULL
#endif
+#if XF86_CRTC_VERSION >= 2
+ /* set_origin */
+ , rhdRRCrtcSetOrigin
+#endif
};
+/*
+ *
+ */
+void
+RHDRRFreeShadow(ScrnInfoPtr pScrn)
+{
+#ifndef HAVE_FREE_SHADOW
+ int i;
+ xf86CrtcConfigPtr CrtcConfig = XF86_CRTC_CONFIG_PTR(pScrn);
+
+ for (i = 0; i < CrtcConfig->num_crtc; i++) {
+ xf86CrtcPtr Crtc = CrtcConfig->crtc[i];
+ if (Crtc->rotatedPixmap || Crtc->rotatedData) {
+ Crtc->funcs->shadow_destroy(Crtc, Crtc->rotatedPixmap,
+ Crtc->rotatedData);
+ Crtc->rotatedPixmap = NULL;
+ Crtc->rotatedData = NULL;
+ }
+ }
+#else
+ xf86RotateFreeShadow(pScrn);
+#endif
+}
+
static const xf86OutputFuncsRec rhdRROutputFuncs = {
rhdRROutputCreateResources, rhdRROutputDpms,
NULL, NULL, /* Save,Restore */
@@ -1328,6 +1650,10 @@ consolidateRandrOutputNames(rhdRandrOutputPtr *rop, int num)
case RHD_OUTPUT_KLDSKP_LVTMA:
case RHD_OUTPUT_UNIPHYA:
case RHD_OUTPUT_UNIPHYB:
+ case RHD_OUTPUT_UNIPHYC:
+ case RHD_OUTPUT_UNIPHYD:
+ case RHD_OUTPUT_UNIPHYE:
+ case RHD_OUTPUT_UNIPHYF:
outname = "digital";
break;
default:
@@ -1406,7 +1732,8 @@ RHDRandrPreInit(ScrnInfoPtr pScrn)
for (i = 0; i < 2; i++) {
randr->RandrCrtc[i] = xf86CrtcCreate(pScrn, &rhdRRCrtcFuncs);
ASSERT(randr->RandrCrtc[i]);
- randr->RandrCrtc[i]->driver_private = rhdPtr->Crtc[i];
+ randr->RandrCrtc[i]->driver_private = xnfcalloc(sizeof(struct rhdRandrCrtc),1);
+ ((struct rhdRandrCrtc*) randr->RandrCrtc[i]->driver_private)->rhdCrtc = rhdPtr->Crtc[i]; /* TODO: not cleaning up correctly */
}
/* First count, then allocate */
@@ -1510,6 +1837,9 @@ RHDRandrPreInit(ScrnInfoPtr pScrn)
if (!xf86InitialConfiguration(pScrn, FALSE)) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"RandR: No valid modes. Disabling RandR support.\n");
+ for (i = 0; i < 2; i++)
+ xfree(randr->RandrCrtc[i]->driver_private);
+ xfree(randr);
rhdPtr->randr = NULL; /* TODO: not cleaning up correctly */
return FALSE;
}
@@ -1521,6 +1851,9 @@ RHDRandrPreInit(ScrnInfoPtr pScrn)
if (!xf86RandR12PreInit (pScrn)) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"RandR: xf86RandR12PreInit failed. Disabled.\n");
+ for (i = 0; i < 2; i++)
+ xfree(randr->RandrCrtc[i]->driver_private);
+ xfree(randr);
rhdPtr->randr = NULL; /* TODO: not cleaning up correctly */
return FALSE;
}
@@ -1539,7 +1872,7 @@ rhdRRPointerMoved(int scrnIndex, int x, int y)
for (i = 0; i < 2; i++) {
struct rhdCrtc *Crtc = rhdPtr->Crtc[i];
if (Crtc->scrnIndex == scrnIndex && Crtc->Active)
- rhdUpdateCrtcPos(Crtc, x + pScrn->frameX0, y + pScrn->frameY0);
+ rhdUpdateCrtcPos(rhdPtr, Crtc, x + pScrn->frameX0, y + pScrn->frameY0);
}
UNWRAP_SCRNINFO(PointerMoved);
pScrn->PointerMoved(scrnIndex, x, y);
@@ -1554,6 +1887,13 @@ RHDRandrScreenInit(ScreenPtr pScreen)
RHDPtr rhdPtr = RHDPTR(pScrn);
RHDFUNC(rhdPtr);
+
+ if (rhdPtr->AccelMethod == RHD_ACCEL_NONE || rhdPtr->AccelMethod == RHD_ACCEL_SHADOWFB) {
+ rhdRRCrtcFuncs.shadow_allocate = NULL;
+ rhdRRCrtcFuncs.shadow_create = NULL;
+ rhdRRCrtcFuncs.shadow_destroy = NULL;
+ }
+
if (!xf86CrtcScreenInit(pScreen))
return FALSE;
/* Wrap cursor for driver-level panning */
@@ -1576,12 +1916,7 @@ RHDRandrModeInit(ScrnInfoPtr pScrn)
rhdPtr->Crtc[0]->Blank(rhdPtr->Crtc[0], TRUE);
rhdPtr->Crtc[1]->Blank(rhdPtr->Crtc[1], TRUE);
- RHDVGADisable(rhdPtr);
-
- RHDAllIdle(pScrn);
-
- RHDMCSetup(rhdPtr);
-
+ RHDPrepareMode(rhdPtr);
ret = xf86SetDesiredModes(pScrn);
RHDDebugRandrState(rhdPtr, "POST-ModeInit");
diff --git a/driver/xf86-video-radeonhd/src/rhd_randr.h b/driver/xf86-video-radeonhd/src/rhd_randr.h
index 8a0db7bd4..5bb2a2fad 100644
--- a/driver/xf86-video-radeonhd/src/rhd_randr.h
+++ b/driver/xf86-video-radeonhd/src/rhd_randr.h
@@ -32,9 +32,11 @@
#ifndef _RHD_RANDR_H
#define _RHD_RANDR_H
-Bool RHDRandrPreInit(ScrnInfoPtr pScrn);
-Bool RHDRandrScreenInit(ScreenPtr pScreen);
-Bool RHDRandrModeInit(ScrnInfoPtr pScrn);
-Bool RHDRandrSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
+extern Bool RHDRandrPreInit(ScrnInfoPtr pScrn);
+extern Bool RHDRandrScreenInit(ScreenPtr pScreen);
+extern Bool RHDRandrModeInit(ScrnInfoPtr pScrn);
+extern Bool RHDRandrSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
+extern void RHDRRFreeShadow(ScrnInfoPtr pScrn);
+extern Bool RHDRRInitCursor(ScreenPtr pScreen);
#endif
diff --git a/driver/xf86-video-radeonhd/src/rhd_regs.h b/driver/xf86-video-radeonhd/src/rhd_regs.h
index 1c1e7d7c8..da6799595 100644
--- a/driver/xf86-video-radeonhd/src/rhd_regs.h
+++ b/driver/xf86-video-radeonhd/src/rhd_regs.h
@@ -96,6 +96,15 @@ enum {
PCLK_CRTC1_CNTL = 0x0480,
PCLK_CRTC2_CNTL = 0x0484,
+ /* these regs were reverse enginered,
+ * so the chance is high that the naming is wrong
+ * R6xx+ ??? */
+ AUDIO_PLL1_MUL = 0x0514,
+ AUDIO_PLL1_DIV = 0x0518,
+ AUDIO_PLL2_MUL = 0x0524,
+ AUDIO_PLL2_DIV = 0x0528,
+ AUDIO_CLK_SRCSEL = 0x0534,
+
DCCG_DISP_CLK_SRCSEL = 0x0538, /* rv620+ */
SRBM_STATUS = 0x0E50,
@@ -261,6 +270,38 @@ enum {
D2SCL_DITHER = 0x6DD4, /* guess */
D2SCL_FLIP_CONTROL = 0x6DD8, /* guess */
+ /* Audio, reverse enginered */
+ AUDIO_ENABLE = 0x7300, /* RW */
+ AUDIO_TIMING = 0x7344, /* RW */
+ /* Audio params */
+ AUDIO_VENDOR_ID = 0x7380, /* RW */
+ AUDIO_REVISION_ID = 0x7384, /* RW */
+ AUDIO_ROOT_NODE_COUNT = 0x7388, /* RW */
+ AUDIO_NID1_NODE_COUNT = 0x738c, /* RW */
+ AUDIO_NID1_TYPE = 0x7390, /* RW */
+ AUDIO_SUPPORTED_SIZE_RATE = 0x7394, /* RW */
+ AUDIO_SUPPORTED_CODEC = 0x7398, /* RW */
+ AUDIO_SUPPORTED_POWER_STATES = 0x739c, /* RW */
+ AUDIO_NID2_CAPS = 0x73a0, /* RW */
+ AUDIO_NID3_CAPS = 0x73a4, /* RW */
+ AUDIO_NID3_PIN_CAPS = 0x73a8, /* RW */
+ /* Audio conn list */
+ AUDIO_CONN_LIST_LEN = 0x73ac, /* RW */
+ AUDIO_CONN_LIST = 0x73b0, /* RW */
+ /* Audio verbs */
+ AUDIO_RATE_BPS_CHANNEL = 0x73c0, /* RO */
+ AUDIO_PLAYING = 0x73c4, /* RO */
+ AUDIO_IMPLEMENTATION_ID = 0x73c8, /* RW */
+ AUDIO_CONFIG_DEFAULT = 0x73cc, /* RW */
+ AUDIO_PIN_SENSE = 0x73d0, /* RW */
+ AUDIO_PIN_WIDGET_CNTL = 0x73d4, /* RO */
+ AUDIO_STATUS_BITS = 0x73d8, /* RO */
+
+ /* HDMI */
+ HDMI_TMDS = 0x7400,
+ HDMI_LVTMA = 0x7700,
+ HDMI_DIG = 0x7800,
+
/* R500 DAC A */
DACA_ENABLE = 0x7800,
DACA_SOURCE_SELECT = 0x7804,
@@ -467,7 +508,7 @@ enum RV620_EXT1_DIFF_POST_DIV_CNTL_BITS {
enum RV620_EXT2_DIFF_POST_DIV_CNTL_BITS {
RV62_EXT2_DIFF_POST_DIV_RESET = 1 << 0,
RV62_EXT2_DIFF_POST_DIV_SELECT = 1 << 4,
- RV62_EXT2_DIFF_DRIVER_ENABLE_SHIFT = 8
+ RV62_EXT2_DIFF_DRIVER_ENABLE = 1 << 8
};
enum RV620_LVTMA_PWRSEQ_CNTL_BITS {
@@ -1044,5 +1085,31 @@ enum AGP_STATUS_BITS {
AGPv3_8X_MODE = 0x02
};
+enum {
+ /* HDMI registers */
+ HDMI_ENABLE = 0x00,
+ HDMI_CNTL = 0x08,
+ HDMI_UNKNOWN_0 = 0x0C,
+ HDMI_AUDIOCNTL = 0x10,
+ HDMI_VIDEOCNTL = 0x14,
+ HDMI_VERSION = 0x18,
+ HDMI_UNKNOWN_1 = 0x28,
+ HDMI_VIDEOINFOFRAME_0 = 0x54,
+ HDMI_VIDEOINFOFRAME_1 = 0x58,
+ HDMI_VIDEOINFOFRAME_2 = 0x5c,
+ HDMI_VIDEOINFOFRAME_3 = 0x60,
+ HDMI_32kHz_CTS = 0xac,
+ HDMI_32kHz_N = 0xb0,
+ HDMI_44_1kHz_CTS = 0xb4,
+ HDMI_44_1kHz_N = 0xb8,
+ HDMI_48kHz_CTS = 0xbc,
+ HDMI_48kHz_N = 0xc0,
+ HDMI_AUDIOINFOFRAME_0 = 0xcc,
+ HDMI_AUDIOINFOFRAME_1 = 0xd0,
+ HDMI_IEC60958_1 = 0xd4,
+ HDMI_IEC60958_2 = 0xd8,
+ HDMI_UNKNOWN_2 = 0xdc,
+ HDMI_AUDIO_DEBUG = 0xe0
+};
#endif /* _RHD_REGS_H */
diff --git a/driver/xf86-video-radeonhd/src/rhd_tmds.c b/driver/xf86-video-radeonhd/src/rhd_tmds.c
index 9d8ae26da..fe439230c 100644
--- a/driver/xf86-video-radeonhd/src/rhd_tmds.c
+++ b/driver/xf86-video-radeonhd/src/rhd_tmds.c
@@ -46,6 +46,7 @@
#include "rhd_connector.h"
#include "rhd_output.h"
#include "rhd_regs.h"
+#include "rhd_hdmi.h"
#ifdef ATOM_BIOS
#include "rhd_atombios.h"
@@ -57,6 +58,8 @@ struct rhdTMDSPrivate {
Bool Coherent;
int PowerState;
+ struct rhdHdmi *Hdmi;
+
Bool Stored;
CARD32 StoreControl;
@@ -335,6 +338,8 @@ TMDSASet(struct rhdOutput *Output, DisplayModePtr Mode)
RHDRegMask(Output, TMDSA_TRANSMITTER_CONTROL, 0x00000000, 0x10000000);
else
RHDRegMask(Output, TMDSA_TRANSMITTER_CONTROL, 0x10000000, 0x10000000);
+
+ RHDHdmiSetMode(Private->Hdmi, Mode);
}
/*
@@ -353,7 +358,7 @@ TMDSAPower(struct rhdOutput *Output, int Power)
case RHD_POWER_ON:
if (Private->PowerState == RHD_POWER_SHUTDOWN
|| Private->PowerState == RHD_POWER_UNKNOWN) {
- RHDRegMask(Output, TMDSA_CNTL, 0x00000001, 0x00000001);
+ RHDRegMask(Output, TMDSA_CNTL, 0x1, 0x00000001);
RHDRegMask(Output, TMDSA_TRANSMITTER_CONTROL, 0x00000001, 0x00000001);
usleep(20);
@@ -385,6 +390,11 @@ TMDSAPower(struct rhdOutput *Output, int Power)
RHDRegMask(Output, TMDSA_TRANSMITTER_ENABLE, 0x00001F1F, 0x00001F1F);
} else
RHDRegMask(Output, TMDSA_TRANSMITTER_ENABLE, 0x0000001F, 0x00001F1F);
+
+ if(Output->Connector != NULL && RHDConnectorEnableHDMI(Output->Connector))
+ RHDHdmiEnable(Private->Hdmi, TRUE);
+ else
+ RHDHdmiEnable(Private->Hdmi, FALSE);
Private->PowerState = RHD_POWER_ON;
return;
@@ -403,6 +413,7 @@ TMDSAPower(struct rhdOutput *Output, int Power)
RHDRegMask(Output, TMDSA_TRANSMITTER_CONTROL, 0, 0x00000001);
RHDRegMask(Output, TMDSA_TRANSMITTER_ENABLE, 0, 0x00001F1F);
RHDRegMask(Output, TMDSA_CNTL, 0, 0x00000001);
+ RHDHdmiEnable(Private->Hdmi, FALSE);
Private->PowerState = RHD_POWER_SHUTDOWN;
return;
}
@@ -438,6 +449,8 @@ TMDSASave(struct rhdOutput *Output)
if (ChipSet >= RHD_RV610)
Private->StoreTXAdjust = RHDRegRead(Output, TMDSA_TRANSMITTER_ADJUST);
+ RHDHdmiSave(Private->Hdmi);
+
Private->Stored = TRUE;
}
@@ -476,6 +489,8 @@ TMDSARestore(struct rhdOutput *Output)
if (ChipSet >= RHD_RV610)
RHDRegWrite(Output, TMDSA_TRANSMITTER_ADJUST, Private->StoreTXAdjust);
+
+ RHDHdmiRestore(Private->Hdmi);
}
/*
@@ -484,12 +499,15 @@ TMDSARestore(struct rhdOutput *Output)
static void
TMDSADestroy(struct rhdOutput *Output)
{
+ struct rhdTMDSPrivate *Private = (struct rhdTMDSPrivate *) Output->Private;
RHDFUNC(Output);
- if (!Output->Private)
+ if (!Private)
return;
- xfree(Output->Private);
+ RHDHdmiDestroy(Private->Hdmi);
+
+ xfree(Private);
Output->Private = NULL;
}
@@ -501,6 +519,7 @@ RHDTMDSAInit(RHDPtr rhdPtr)
{
struct rhdOutput *Output;
struct rhdTMDSPrivate *Private;
+ int from;
RHDFUNC(rhdPtr);
@@ -521,8 +540,23 @@ RHDTMDSAInit(RHDPtr rhdPtr)
Private = xnfcalloc(sizeof(struct rhdTMDSPrivate), 1);
Private->RunsDualLink = FALSE;
- Private->Coherent = FALSE;
+ from = X_CONFIG;
+ switch (RhdParseBooleanOption(&rhdPtr->coherent, Output->Name)) {
+ case RHD_OPTION_NOT_SET:
+ case RHD_OPTION_DEFAULT:
+ from = X_DEFAULT;
+ Private->Coherent = FALSE;
+ break;
+ case RHD_OPTION_ON:
+ Private->Coherent = TRUE;
+ break;
+ case RHD_OPTION_OFF:
+ Private->Coherent = FALSE;
+ break;
+ }
+ xf86DrvMsg(rhdPtr->scrnIndex,from,"Setting %s to %scoherent\n",Output->Name,Private->Coherent ? "" : "in");
Private->PowerState = RHD_POWER_UNKNOWN;
+ Private->Hdmi = RHDHdmiInit(rhdPtr, Output);
Output->Private = Private;
diff --git a/driver/xf86-video-radeonhd/src/rhd_video.c b/driver/xf86-video-radeonhd/src/rhd_video.c
index 2f953ad9e..64cd950a6 100644
--- a/driver/xf86-video-radeonhd/src/rhd_video.c
+++ b/driver/xf86-video-radeonhd/src/rhd_video.c
@@ -497,8 +497,8 @@ R5xxXvCopyPlanar(RHDPtr rhdPtr, CARD8 *src1, CARD8 *src2, CARD8 *src3,
CARD16 dstPitch, CARD16 h, CARD16 w)
{
#if X_BYTE_ORDER == X_BIG_ENDIAN
- CARD32 val = RHDRegRead(pScrn, R5XX_SURFACE_CNTL);
- RHDRegWrite(pScrn, R5XX_SURFACE_CNTL,
+ CARD32 val = RHDRegRead(rhdPtr, R5XX_SURFACE_CNTL);
+ RHDRegWrite(rhdPtr, R5XX_SURFACE_CNTL,
(val | R5XX_NONSURF_AP0_SWP_32BPP) & ~R5XX_NONSURF_AP0_SWP_16BPP);
#endif
@@ -507,7 +507,7 @@ R5xxXvCopyPlanar(RHDPtr rhdPtr, CARD8 *src1, CARD8 *src2, CARD8 *src3,
#if X_BYTE_ORDER == X_BIG_ENDIAN
/* restore byte swapping */
- RHDRegWrite(pScrn, R5XX_SURFACE_CNTL, val);
+ RHDRegWrite(rhdPtr, R5XX_SURFACE_CNTL, val);
#endif
}
@@ -787,18 +787,22 @@ RHDInitVideo(ScreenPtr pScreen)
memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr));
adaptors = newAdaptors;
- if ((rhdPtr->ChipSet < RHD_R600) && rhdPtr->TwoDPrivate &&
- ((rhdPtr->CS->Type == RHD_CS_CP) || (rhdPtr->CS->Type == RHD_CS_CPDMA))) {
-
- texturedAdaptor = rhdSetupImageTexturedVideo(pScreen);
+ if (rhdPtr->ChipSet < RHD_R600) {
+ if (rhdPtr->TwoDPrivate &&
+ ((rhdPtr->CS->Type == RHD_CS_CP) ||
+ (rhdPtr->CS->Type == RHD_CS_CPDMA))) {
- adaptors[num_adaptors++] = texturedAdaptor;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Xv: Textured Video initialised.\n");
+ texturedAdaptor = rhdSetupImageTexturedVideo(pScreen);
- /* EXA could've initialised this already */
- if (!rhdPtr->ThreeDPrivate)
- R5xx3DInit(pScrn);
+ adaptors[num_adaptors++] = texturedAdaptor;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Xv: Textured Video initialised.\n");
+ /* EXA could've initialised this already */
+ if (!rhdPtr->ThreeDPrivate)
+ R5xx3DInit(pScrn);
+ } else
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Xv: No Textured Video "
+ "possible without the Command Processor.\n");
} else
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Xv: No Textured Video possible for %s.\n", pScrn->chipset);
diff --git a/driver/xf86-video-radeonhd/utils/conntest/Makefile.in b/driver/xf86-video-radeonhd/utils/conntest/Makefile.in
index c5baef763..0cebf4ebf 100644
--- a/driver/xf86-video-radeonhd/utils/conntest/Makefile.in
+++ b/driver/xf86-video-radeonhd/utils/conntest/Makefile.in
@@ -130,6 +130,8 @@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
HAVE_PCI_PCI_H_FALSE = @HAVE_PCI_PCI_H_FALSE@
HAVE_PCI_PCI_H_TRUE = @HAVE_PCI_PCI_H_TRUE@
+HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE = @HAVE_SED_WITH_REASONABLE_SUBSTITUTION_FALSE@
+HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE = @HAVE_SED_WITH_REASONABLE_SUBSTITUTION_TRUE@
HAVE_XF86_ANSIC_H_FALSE = @HAVE_XF86_ANSIC_H_FALSE@
HAVE_XF86_ANSIC_H_TRUE = @HAVE_XF86_ANSIC_H_TRUE@
HAVE_ZLIB_FALSE = @HAVE_ZLIB_FALSE@
@@ -161,6 +163,8 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
+PCIACCESS_LIBS = @PCIACCESS_LIBS@
PCIUTILS_CFLAGS = @PCIUTILS_CFLAGS@
PCIUTILS_LIBS = @PCIUTILS_LIBS@
PEDANTIC_CFLAGS = @PEDANTIC_CFLAGS@
@@ -179,6 +183,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
+XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@
+XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
diff --git a/driver/xf86-video-radeonhd/utils/conntest/git_version.h b/driver/xf86-video-radeonhd/utils/conntest/git_version.h
index 688ee7825..84c71967c 100644
--- a/driver/xf86-video-radeonhd/utils/conntest/git_version.h
+++ b/driver/xf86-video-radeonhd/utils/conntest/git_version.h
@@ -1,6 +1,6 @@
/*
* Basic versioning gathered from the git repository.
- * Automatically generated by ../../git_version.sh.
+ * Automatically generated by ../../../git_version.sh.
*/
#ifndef GIT_VERSION_H
@@ -14,13 +14,13 @@
/* git utilities found */
#undef GIT_NOT_FOUND
-#define GIT_VERSION "git version 1.5.2.4"
+#define GIT_VERSION "git version 1.5.6"
/* git repo found */
#define GIT_REPO 1
/* Git SHA ID of last commit */
-#define GIT_SHAID "9d131f90"
+#define GIT_SHAID "4e897263"
/* Branch this tree is on */
#define GIT_BRANCH "master"
diff --git a/driver/xf86-video-radeonhd/utils/conntest/rhd_conntest.c b/driver/xf86-video-radeonhd/utils/conntest/rhd_conntest.c
index e4ca8db78..07a13357d 100644
--- a/driver/xf86-video-radeonhd/utils/conntest/rhd_conntest.c
+++ b/driver/xf86-video-radeonhd/utils/conntest/rhd_conntest.c
@@ -467,6 +467,8 @@ struct RHDDevice {
{ 0x1002, 0x9446, 2, RHD_RV620},
{ 0x1002, 0x944E, 2, RHD_RV620},
{ 0x1002, 0x9456, 2, RHD_RV620},
+ { 0x1002, 0x9590, 2, RHD_RV620},
+ { 0x1002, 0x954F, 2, RHD_RV620},
{ 0, 0, 0, 0 }
};
@@ -543,13 +545,19 @@ MapBar(struct pci_dev *device, int ioBar, int devMem)
{
void *map;
- if (!device->base_addr[ioBar] || !device->size[ioBar])
+ pci_fill_info(device, PCI_FILL_BASES | PCI_FILL_SIZES);
+ if (!device->base_addr[ioBar]
+#if !defined (__FreeBSD__)
+ || !device->size[ioBar]
+#endif
+ )
return NULL;
-
- map = mmap(0, device->size[ioBar], PROT_WRITE | PROT_READ, MAP_SHARED,
- devMem, device->base_addr[ioBar]);
- /* printf("Mapped IO at 0x%08llX (BAR %1d: 0x%08llX)\n",
- device->base_addr[io_bar], io_bar, device->size[io_bar]); */
+ /* on FreeBSD the PCI bar sizes don't get filled in; pick a sane default size */
+ map = mmap(0, device->size[ioBar] ? device->size[ioBar] : 0x10000,
+ PROT_WRITE | PROT_READ, MAP_SHARED, devMem,
+ device->base_addr[ioBar]);
+ /* printf("Mapped IO at 0x%08X (BAR %1d: 0x%08X)\n",
+ device->base_addr[ioBar], ioBar, device->size[ioBar]); */
return map;
}
diff --git a/driver/xf86-video-radeonhd/utils/conntest/rhd_dump.c b/driver/xf86-video-radeonhd/utils/conntest/rhd_dump.c
index b5f5de315..54c3e2395 100644
--- a/driver/xf86-video-radeonhd/utils/conntest/rhd_dump.c
+++ b/driver/xf86-video-radeonhd/utils/conntest/rhd_dump.c
@@ -264,6 +264,8 @@ struct RHDDevice {
{ 0x1002, 0x9446, 2, RHD_RV620},
{ 0x1002, 0x944E, 2, RHD_RV620},
{ 0x1002, 0x9456, 2, RHD_RV620},
+ { 0x1002, 0x9590, 2, RHD_RV620},
+ { 0x1002, 0x954F, 2, RHD_RV620},
{ 0, 0, 0, 0 }
};