[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-radeonhd: Changes to 'upstream-experimental'



 .gitignore                    |    4 
 README                        |   13 
 configure.ac                  |   53 +++
 man/radeonhd.man              |   90 ++++--
 src/Imakefile                 |    8 
 src/Makefile.am               |   88 +++---
 src/r5xx_exa.c                |    4 
 src/r5xx_xaa.c                |    4 
 src/rhd.h                     |   25 +
 src/rhd_atombios.c            |  324 ++++++++++++++++------
 src/rhd_atombios.h            |   13 
 src/rhd_atomout.c             |  352 +++++++++++++++++++-----
 src/rhd_atomout.h             |    9 
 src/rhd_atompll.c             |   12 
 src/rhd_audio.c               |  407 ++++++++++++++++++++++++++++
 src/rhd_audio.h               |  119 ++++++++
 src/rhd_biosscratch.c         |   44 ++-
 src/rhd_connector.c           |   31 ++
 src/rhd_connector.h           |    2 
 src/rhd_cs.c                  |   24 +
 src/rhd_cs.h                  |   13 
 src/rhd_cursor.c              |   74 ++++-
 src/rhd_cursor.h              |    6 
 src/rhd_dig.c                 |  389 ++++++++++++++++++++++++--
 src/rhd_dri.c                 |   59 ++--
 src/rhd_driver.c              |  226 +++++++++------
 src/rhd_hdmi.c                |  529 ++++++++++++++++++++++++++++++++++++
 src/rhd_hdmi.h                |   81 +++++
 src/rhd_helper.c              |   47 +++
 src/rhd_i2c.c                 |   36 ++
 src/rhd_i2c.h                 |    2 
 src/rhd_id.c                  |   73 ++++-
 src/rhd_lut.c                 |   80 +++++
 src/rhd_lut.h                 |    7 
 src/rhd_lvtma.c               |  113 ++++++-
 src/rhd_mc.c                  |    2 
 src/rhd_modes.c               |    1 
 src/rhd_modes.h               |    1 
 src/rhd_output.h              |   10 
 src/rhd_randr.c               |  609 ++++++++++++++++++++++++++++++++----------
 src/rhd_randr.h               |   10 
 src/rhd_regs.h                |   69 ++++
 src/rhd_tmds.c                |   42 ++
 src/rhd_video.c               |   28 +
 utils/conntest/rhd_conntest.c |   20 -
 utils/conntest/rhd_dump.c     |    2 
 46 files changed, 3563 insertions(+), 592 deletions(-)

New commits:
commit 4e8972638db59d007bc61eb1bef8adb99cc67000
Author: Matthias Hopf <mhopf@suse.de>
Date:   Fri Dec 12 15:10:29 2008 +0100

    Bump to 1.2.4

diff --git a/configure.ac b/configure.ac
index e6face3..85a5520 100644
--- a/configure.ac
+++ b/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)
 

commit 2db9ee5ea0c66d99180432791d8098fedc73fa4a
Author: Matthias Hopf <mhopf@suse.de>
Date:   Fri Dec 12 15:09:18 2008 +0100

    Add release information for 1.2.4

diff --git a/README b/README
index 79a070d..6f9d27f 100644
--- a/README
+++ b/README
@@ -87,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.

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.

diff --git a/man/radeonhd.man b/man/radeonhd.man
index 8b44d61..90cafce 100644
--- a/man/radeonhd.man
+++ b/man/radeonhd.man
@@ -347,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.

commit 0679ce59ebf9e2ebb16d1d6c2286b275993519e4
Author: Matthias Hopf <mhopf@suse.de>
Date:   Fri Dec 12 15:00:34 2008 +0100

    Small manpage updates.

diff --git a/man/radeonhd.man b/man/radeonhd.man
index 93b5af1..8b44d61 100644
--- a/man/radeonhd.man
+++ b/man/radeonhd.man
@@ -432,7 +432,7 @@ Possible  values for
 are: 
 .B TMDS_A, 
 .B TMDS_B,
-.B  UNIPHY_A,
+.B UNIPHY_A,
 .B UNIPHY_B,
 .B AtomOutputTMDSA,
 .B AtomOutputLVTMA,
@@ -441,7 +441,7 @@ are:
 .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"
+.B "Option \*qCoherent\*q \*qTMDS_A=off TMDS_B=on\*q"
 will set coherent mode to 
 .B off 
 for TMDS A and to 
@@ -489,9 +489,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
@@ -628,6 +629,12 @@ 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

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.

diff --git a/src/rhd_driver.c b/src/rhd_driver.c
index 1435b89..05bd35a 100644
--- a/src/rhd_driver.c
+++ b/src/rhd_driver.c
@@ -1772,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
@@ -1790,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");
 	}

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)

diff --git a/src/rhd_cs.c b/src/rhd_cs.c
index 2c9839d..256c1ae 100644
--- a/src/rhd_cs.c
+++ b/src/rhd_cs.c
@@ -190,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 */
diff --git a/src/rhd_dri.c b/src/rhd_dri.c
index dd1ed13..0ef6780 100644
--- a/src/rhd_dri.c
+++ b/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"

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

diff --git a/man/radeonhd.man b/man/radeonhd.man
index f067674..93b5af1 100644
--- a/man/radeonhd.man
+++ b/man/radeonhd.man
@@ -231,8 +231,8 @@ 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

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.

diff --git a/src/r5xx_xaa.c b/src/r5xx_xaa.c
index 1c35213..bcfaca9 100644
--- a/src/r5xx_xaa.c
+++ b/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;

commit 46df41699743d393a53faa44a21c131fefc2acba
Author: Matthias Hopf <mhopf@suse.de>
Date:   Thu Dec 4 18:31:34 2008 +0100

    RandR 1.3 Panning support

diff --git a/src/rhd_randr.c b/src/rhd_randr.c
index 68a9013..75c6056 100644
--- a/src/rhd_randr.c
+++ b/src/rhd_randr.c
@@ -500,7 +500,7 @@ rhdRRCrtcModeFixupDUMMY(xf86CrtcPtr    crtc,
 }
 
 static void
-rhdRRCrtcPan(xf86CrtcPtr  crtc, int x, int y)
+rhdRRCrtcSetOrigin(xf86CrtcPtr  crtc, int x, int y)
 {
     struct rhdCrtc  *rhdCrtc  = ((struct rhdRandrCrtc*) (crtc->driver_private))->rhdCrtc;
 
@@ -1559,8 +1559,8 @@ static xf86CrtcFuncsRec rhdRRCrtcFuncs = {
     , NULL
 #endif
 #if XF86_CRTC_VERSION >= 2
-    /* pan */
-    , rhdRRCrtcPan
+    /* set_origin */
+    , rhdRRCrtcSetOrigin
 #endif
 };
 

commit 907365c7af91daf8a34c187265eca5e1260a4386
Author: Matthias Hopf <mhopf@suse.de>
Date:   Fri Nov 28 18:06:46 2008 +0100

    RandR 1.3 Panning support

diff --git a/src/rhd_randr.c b/src/rhd_randr.c
index 5f6f981..68a9013 100644
--- a/src/rhd_randr.c
+++ b/src/rhd_randr.c
@@ -499,6 +499,14 @@ rhdRRCrtcModeFixupDUMMY(xf86CrtcPtr    crtc,
     return TRUE;
 }
 
+static void
+rhdRRCrtcPan(xf86CrtcPtr  crtc, int x, int y)
+{
+    struct rhdCrtc  *rhdCrtc  = ((struct rhdRandrCrtc*) (crtc->driver_private))->rhdCrtc;
+
+    rhdCrtc->FrameSet(rhdCrtc, x, y);
+}
+
 
 /*
  * xf86Output callback functions
@@ -1550,6 +1558,10 @@ static xf86CrtcFuncsRec rhdRRCrtcFuncs = {
     /* set_mode_major */
     , NULL
 #endif
+#if XF86_CRTC_VERSION >= 2
+    /* pan */
+    , rhdRRCrtcPan
+#endif
 };
 
 /*

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.

diff --git a/src/rhd_randr.c b/src/rhd_randr.c
index 62b5e74..5f6f981 100644
--- a/src/rhd_randr.c
+++ b/src/rhd_randr.c
@@ -977,13 +977,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);
 
@@ -1015,22 +1042,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;
 	    }
@@ -1077,8 +1090,14 @@ rhdRROutputDetect(xf86OutputPtr output)
 	    i2cRec.probe.i2cBusPtr = rout->Connector->DDC;
 	    if (RHDI2CFunc(rhdPtr->scrnIndex, rhdPtr->I2C,RHD_I2C_PROBE_ADDR,&i2cRec)
 		== RHD_I2C_SUCCESS) {
+		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 {

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".

diff --git a/src/rhd_id.c b/src/rhd_id.c
index 13b68db..875c358 100644
--- a/src/rhd_id.c
+++ b/src/rhd_id.c
@@ -418,6 +418,16 @@ 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,    \
@@ -780,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 },

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.

diff --git a/src/rhd_id.c b/src/rhd_id.c
index 4b2ea5d..13b68db 100644
--- a/src/rhd_id.c
+++ b/src/rhd_id.c
@@ -418,6 +418,15 @@ RHDIsIGP(enum RHD_CHIPSETS chipset)
 # define DEVINFO_EMPTY   { { atomNone, atomNone } }
 #endif
 
+/* 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, \
@@ -666,6 +675,7 @@ rhdCards[] =
     /* 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 */

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.

diff --git a/src/rhd_driver.c b/src/rhd_driver.c
index 05018cf..1435b89 100644
--- a/src/rhd_driver.c
+++ b/src/rhd_driver.c
@@ -2398,8 +2398,7 @@ rhdRestore(RHDPtr rhdPtr)
 
     RHDRestoreMC(rhdPtr);
 
-    if (rhdPtr->CursorInfo)
-	rhdRestoreCursor(pScrn);
+    rhdRestoreCursor(pScrn);
 
     RHDPLLsRestore(rhdPtr);
     RHDAudioRestore(rhdPtr);

commit 48f9d1affc440916ead14a5d80553143b36809fc
Author: Luc Verhaegen <libv@skynet.be>
Date:   Tue Nov 25 20:43:33 2008 +0100

    DIG: Remove stray ErrorFs

diff --git a/src/rhd_dig.c b/src/rhd_dig.c
index 7799d8d..3fe247a 100644
--- a/src/rhd_dig.c
+++ b/src/rhd_dig.c
@@ -1049,7 +1049,6 @@ EncoderSet(struct rhdOutput *Output, struct rhdCrtc *Crtc, DisplayModePtr Mode)
     ASSERT(Private->EncoderID != ENCODER_NONE);
     off = (Private->EncoderID == ENCODER_DIG2) ? DIG2_OFFSET : DIG1_OFFSET;
 
-    ErrorF("off=0x%x ",off);
     rhdPrintDigDebug(rhdPtr,__func__);
 
     RHDRegMask(Output, off + RV620_DIG1_CNTL, Output->Crtc->Id,
@@ -1149,7 +1148,7 @@ EncoderPower(struct rhdOutput *Output, int Power)
 	       0x3 << ((EncoderID == ENCODER_DIG2)
 		       ? RV62_SYMCLKB_SRC_SHIFT
 		       : RV62_SYMCLKA_SRC_SHIFT));
-    ErrorF("off=0x%x ",off);
+
     rhdPrintDigDebug(rhdPtr,__func__);
     switch (Power) {
 	case RHD_POWER_ON:

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.

diff --git a/src/rhd_id.c b/src/rhd_id.c
index e9ff2b4..4b2ea5d 100644
--- a/src/rhd_id.c
+++ b/src/rhd_id.c
@@ -665,6 +665,7 @@ 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 },
     /* 0x7188 : M64 : Mobility Radeon X2300 */
     /* 0x718A : M64 : Mobility Radeon X2300 */
     /* 0x718B : M62 : Mobility Radeon X1350 */

commit dc81290f0d8247670838ed5ac17c8da7bc82794e
Author: Egbert Eich <eich@freedesktop.org>
Date:   Wed Nov 19 16:43:36 2008 +0100

    Rotation: document limitations in man page.

diff --git a/man/radeonhd.man b/man/radeonhd.man
index 463071e..f067674 100644
--- a/man/radeonhd.man
+++ b/man/radeonhd.man
@@ -226,6 +226,8 @@ 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"
@@ -624,6 +626,8 @@ 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.
 .\"
 .\"
 .SH KNOWN BUGS

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.

diff --git a/src/rhd_randr.c b/src/rhd_randr.c
index c28ec1d..62b5e74 100644
--- a/src/rhd_randr.c
+++ b/src/rhd_randr.c
@@ -1515,7 +1515,7 @@ static const xf86CrtcConfigFuncsRec rhdRRCrtcConfigFuncs = {
     rhdRRXF86CrtcResize
 };
 
-static const xf86CrtcFuncsRec rhdRRCrtcFuncs = {
+static xf86CrtcFuncsRec rhdRRCrtcFuncs = {
     rhdRRCrtcDpms,
     NULL, NULL,						/* Save,Restore */
     rhdRRCrtcLock, rhdRRCrtcUnlock,
@@ -1857,6 +1857,12 @@ RHDRandrScreenInit(ScreenPtr pScreen)
 
     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 */

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.

diff --git a/src/rhd_randr.c b/src/rhd_randr.c
index 187f2c0..c28ec1d 100644
--- a/src/rhd_randr.c
+++ b/src/rhd_randr.c
@@ -1210,8 +1210,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)) {

commit 5b9ef245f9eda1a29318752f1f41bac8f9c78027
Author: Egbert Eich <eich@freedesktop.org>
Date:   Wed Nov 19 14:50:49 2008 +0100

    Rotation: Fix up Crtc base pointer.

diff --git a/src/rhd_randr.c b/src/rhd_randr.c
index 1c017ca..187f2c0 100644
--- a/src/rhd_randr.c
+++ b/src/rhd_randr.c
@@ -190,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;
@@ -206,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;
+	    }
+	}
     }
 }
 
@@ -416,7 +425,7 @@ rhdRRCrtcModeSet(xf86CrtcPtr  crtc,
 	rhdCrtc->ScaleSet(rhdCrtc, RHD_CRTC_SCALE_TYPE_NONE, Mode, NULL);
 
     rhdCrtc->FrameSet(rhdCrtc, x, y);
-    rhdUpdateCrtcPos(rhdCrtc, rhdCrtc->Cursor->X, rhdCrtc->Cursor->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);
 
@@ -1216,7 +1225,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;
@@ -1265,8 +1274,8 @@ rhdRRCrtcShadowAllocate(xf86CrtcPtr crtc, int Width, int Height)
     int		      OctPerPixel = pScrn->bitsPerPixel >> 3;
     int               Size = (pScrn->displayWidth * OctPerPixel) * Height;
 
-    if (rhdPtr->AccelMethod == RHD_ACCEL_NONE
-	|| rhdPtr->AccelMethod == RHD_ACCEL_SHADOWFB)
+    if (rhdPtr->AccelMethod == RHD_ACCEL_SHADOWFB
+	|| rhdPtr->AccelMethod == RHD_ACCEL_NONE)
 	return NULL;
 
 #ifdef USE_EXA
@@ -1820,7 +1829,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);

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.

diff --git a/src/rhd_randr.c b/src/rhd_randr.c
index 059cb09..1c017ca 100644
--- a/src/rhd_randr.c
+++ b/src/rhd_randr.c
@@ -1286,7 +1286,6 @@ rhdRRCrtcShadowAllocate(xf86CrtcPtr crtc, int Width, int Height)
     }
 
 #endif /* USE_EXA */
-#ifdef USE_XAA
     if (rhdPtr->AccelMethod == RHD_ACCEL_XAA) {
 	int Align = (4096 + OctPerPixel - 1) / OctPerPixel;
 	Size = (Size + OctPerPixel - 1) / OctPerPixel;
@@ -1307,7 +1306,6 @@ rhdRRCrtcShadowAllocate(xf86CrtcPtr crtc, int Width, int Height)
 		 + rhdRRCrtc->u.MemXAA->offset * OctPerPixel);
     }
 
-#endif /* USE_XAA */
     return NULL;
 }
 
@@ -1359,12 +1357,10 @@ rhdRRCrtcShadowDestroy(xf86CrtcPtr crtc, PixmapPtr RPixmap, void *Data)
 	}
 
 #endif /* USE_EXA */
-#ifdef USE_XAA
 	if (rhdPtr->AccelMethod == RHD_ACCEL_XAA) {
 	    xf86FreeOffscreenLinear(rhdRRCrtc->u.MemXAA);
 	    rhdRRCrtc->u.MemXAA = NULL;
 	}
-#endif /* USE_XAA */
     }
 }
 

commit 24ba47d9d3cc7a53e322256b8893ed63fe05c893
Author: Egbert Eich <eich@freedesktop.org>
Date:   Sat Sep 20 16:42:02 2008 +0200

    RandR: Some minor cleanup.

diff --git a/src/rhd_randr.c b/src/rhd_randr.c
index 95d678c..059cb09 100644
--- a/src/rhd_randr.c
+++ b/src/rhd_randr.c
@@ -490,32 +490,6 @@ 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)
-
-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
-
 
 /*
  * xf86Output callback functions
@@ -1289,7 +1263,7 @@ rhdRRCrtcShadowAllocate(xf86CrtcPtr crtc, int Width, int Height)
     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;
+    int               Size = (pScrn->displayWidth * OctPerPixel) * Height;
 
     if (rhdPtr->AccelMethod == RHD_ACCEL_NONE
 	|| rhdPtr->AccelMethod == RHD_ACCEL_SHADOWFB)
@@ -1300,7 +1274,7 @@ rhdRRCrtcShadowAllocate(xf86CrtcPtr crtc, int Width, int Height)
 
 	ASSERT(rhdRRCrtc->u.MemEXA == NULL);
 
-	rhdRRCrtc->u.MemEXA = exaOffscreenAlloc(pScreen, size, 4096,
+	rhdRRCrtc->u.MemEXA = exaOffscreenAlloc(pScreen, Size, 4096,
 						TRUE, NULL, NULL);
 	if (rhdRRCrtc->u.MemEXA == NULL) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -1314,13 +1288,13 @@ rhdRRCrtcShadowAllocate(xf86CrtcPtr crtc, int Width, int Height)
 #endif /* USE_EXA */
 #ifdef USE_XAA
     if (rhdPtr->AccelMethod == RHD_ACCEL_XAA) {
-	int align = (4096 + OctPerPixel - 1) / OctPerPixel;
-	size = (size + OctPerPixel - 1) / OctPerPixel;
+	int Align = (4096 + OctPerPixel - 1) / OctPerPixel;
+	Size = (Size + OctPerPixel - 1) / OctPerPixel;
 
 	ASSERT(rhdRRCrtc->u.MemXAA == NULL);
 
 	rhdRRCrtc->u.MemXAA =
-	    xf86AllocateOffscreenLinear(pScreen, size, align,  /* @@@ */
+	    xf86AllocateOffscreenLinear(pScreen, Size, Align,  /* @@@ */
 					       NULL, NULL, NULL);
 	if (rhdRRCrtc->u.MemXAA == NULL) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,

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.

diff --git a/src/rhd_cursor.c b/src/rhd_cursor.c
index 8e21409..c967bbf 100644
--- a/src/rhd_cursor.c
+++ b/src/rhd_cursor.c
@@ -399,7 +399,6 @@ rhdSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
     }
 }
 
-
 static void
 rhdLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
 {
@@ -574,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;
+}
+
+/*
+ *
+ */


Reply to: