xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Sun Oct 18 13:22:55 PDT 2009


 man/radeon.man      |   11 +++++++----
 src/radeon_output.c |   30 ++++++++++++------------------
 2 files changed, 19 insertions(+), 22 deletions(-)

New commits:
commit bd89b7501f294ac645390ef144df569953c81dc4
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Sun Oct 18 16:21:36 2009 -0400

    radeon: fixup CustomEDID option
    
    - add support for analog option to force edid to analog
    mode
    - fix compilation on older xservers
    - updated man page

diff --git a/man/radeon.man b/man/radeon.man
index 8514c1c..28b1385 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -306,8 +306,11 @@ The default value is
 Forces the X driver to use the EDID data specified in a file rather
 than the display's EDID. Also overrides DDC monitor detection.
 .br
-You may specify a semicolon separated list of output name and filename pairs.
-The output name is something like "VGA-0" or "DVI-0";
+You may specify a semicolon separated list of output name and filename pairs
+with an optional flag, "digital" or "analog", to override the digital bit in
+the edid which is used by the driver to determine whether to use the
+analog or digital encoder associated with a DVI-I port.
+The output name is the randr output name, e.g., "VGA-0" or "DVI-0";
 consult the Xorg log for the supported output names of any given system.
 .br
 The file must contain a raw 128-byte EDID block, as captured by
@@ -316,10 +319,10 @@ get-edid.
 .br
 For example:
 .B
-Option \*qCustomEDID\*q \*qVGA-0:/tmp/edid1.bin; DVI-0:/tmp/edid2.bin\*q
+Option \*qCustomEDID\*q \*qVGA-0:/tmp/edid1.bin; DVI-0:/tmp/edid2.bin:digital\*q
 will assign the EDID from the file /tmp/edid1.bin to the output device
 VGA-0, and the EDID from the file /tmp/edid2.bin to the output device
-DVI-0.
+DVI-0 and force the DVI port to use the digital encoder.
 .br
 Note that a output name must always be specified,
 even if only one EDID is specified.
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 0429088..a252363 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -260,26 +260,20 @@ RADEONGetHardCodedEDIDFromFile(xf86OutputPtr output)
 			       "Successfully read Custom EDID data for output %s from %s.\n",
 			       name, outputEDID);
 		    if (command != NULL) {
-		      if (!strcmp(command, "digital")) {
-			struct edid_version *v = &radeon_output->custom_mon->ver;
-			struct disp_features *r = &radeon_output->custom_mon->features;
-			r->input_type = 1;
-			if (v->revision == 2 || v->revision == 3) {
-			  // Nothing to do
-			} else if (v->revision >= 4) {
-			  r->input_interface = 1; // Using DVI by default
-			  r->input_bpc = 2; // 8 bits per channes by default
+			if (!strcmp(command, "digital")) {
+			    radeon_output->custom_mon->rawData[0x14] |= 0x80;
+			    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+				       "Forcing digital output for output %s.\n", name);
+			} else if (!strcmp(command, "analog")) {
+			    radeon_output->custom_mon->rawData[0x14] &= ~0x80;
+			    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+				       "Forcing analog output for output %s.\n", name);
+			} else {
+			    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+				       "Unknown custom EDID command: '%s'.\n",
+				       command);
 			}
-			radeon_output->custom_mon->rawData[0x14] |=  0x80;
-			xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-				   "Forcing digital output for output %s.\n", name);
-		      } else {
-			xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-				   "Unknown custom EDID command: '%s'.\n",
-				   command);
-		      }
 		    }
-
 		} else {
 		    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 			       "Custom EDID data for %s read from %s was invalid.\n",


More information about the xorg-commit mailing list