rpms/xorg-x11-drv-ati/devel radeon-6.9.0-dig1-hdmi.patch, NONE, 1.1 xorg-x11-drv-ati.spec, 1.138, 1.139

Adam Jackson ajax at fedoraproject.org
Fri Oct 31 19:50:28 UTC 2008


Author: ajax

Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3753

Modified Files:
	xorg-x11-drv-ati.spec 
Added Files:
	radeon-6.9.0-dig1-hdmi.patch 
Log Message:
* Fri Oct 31 2008 Adam Jackson <ajax at redhat.com> 6.9.0-39
- radeon-6.9.0-dig1-hdmi.patch: Fix initialization of DVI sinks on HDMI
  connectors for DCE3.


radeon-6.9.0-dig1-hdmi.patch:

--- NEW FILE radeon-6.9.0-dig1-hdmi.patch ---
diff --git a/src/atombios_output.c b/src/atombios_output.c
index 49de04f..544c4c4 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -374,6 +374,61 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
     return ATOM_NOT_IMPLEMENTED;
 }
 
+/* lame.  this should go in the server. */
+static int
+atombios_maybe_hdmi_mode(xf86OutputPtr output)
+{
+    int i = 0, version, offset;
+    char *edid = NULL;
+#ifndef EDID_COMPLETE_RAWDATA
+    /* there's no getting this right unless we have complete EDID */
+    return ATOM_ENCODER_MODE_HDMI;
+#else
+    if (output->MonInfo)
+	return ATOM_ENCODER_MODE_DVI;
+
+    if (!(output->MonInfo->flags & EDID_COMPLETE_RAWDATA))
+	return ATOM_ENCODER_MODE_DVI;
+
+    if (!output->MonInfo->no_sections)
+	return ATOM_ENCODER_MODE_DVI;
+
+    edid = (char *)output->MonInfo->rawData;
+    if (!edid)
+	return ATOM_ENCODER_MODE_DVI;
+
+    /* find the CEA extension block */
+    for (i = 0; i < output->MonInfo->no_sections; i++)
+	if (edid[i * 128] == 0x02)
+	    break;
+    if (i == output->MonInfo->no_sections)
+	return ATOM_ENCODER_MODE_DVI;
+    edid += (i * 128);
+
+    version = edid[1];
+    offset = edid[2];
+    if (version < 3 && offset < 4)
+	return ATOM_ENCODER_MODE_DVI;
+
+    /* walk the cea data blocks */
+    for (i = 4; i < offset; i += (edid[i] & 0x1f) + 1) {
+	char *x = edid + i;
+
+	/* find a vendor specific block */
+	if ((x[0] & 0xe0) >> 5 == 0x03) {
+	    int oui = (x[3] << 16) + (x[2] << 8) + x[1];
+
+	    /* find the HDMI vendor OUI */
+	    if (oui == 0x000c03)
+		return ATOM_ENCODER_MODE_HDMI;
+	}
+    }
+
+    /* guess it's not HDMI after all */
+    return ATOM_ENCODER_MODE_DVI;
+#endif
+}
+
 static int
 atombios_output_dig1_setup(xf86OutputPtr output, DisplayModePtr mode)
 {
@@ -405,7 +460,7 @@ atombios_output_dig1_setup(xf86OutputPtr output, DisplayModePtr mode)
     if (OUTPUT_IS_DVI)
 	disp_data.ucEncoderMode = ATOM_ENCODER_MODE_DVI;
     else if (radeon_output->type == OUTPUT_HDMI)
-	disp_data.ucEncoderMode = ATOM_ENCODER_MODE_HDMI;
+	disp_data.ucEncoderMode = atombios_maybe_hdmi_mode(output);
     else if (radeon_output->type == OUTPUT_DP)
 	disp_data.ucEncoderMode = ATOM_ENCODER_MODE_DP;
     else if (radeon_output->type == OUTPUT_LVDS)


Index: xorg-x11-drv-ati.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/xorg-x11-drv-ati.spec,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- xorg-x11-drv-ati.spec	30 Oct 2008 06:59:28 -0000	1.138
+++ xorg-x11-drv-ati.spec	31 Oct 2008 19:49:58 -0000	1.139
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 ati video driver
 Name:      xorg-x11-drv-ati
 Version:   6.9.0
-Release:   38%{?dist}
+Release:   39%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -21,6 +21,7 @@
 Patch6:     radeon-6.9.0-bgnr-enable.patch
 Patch7:	    radeon-6.9.0-add-hd3300.patch
 Patch8:     radeon-6.9.0-quirk-agp.patch
+Patch9:	    radeon-6.9.0-dig1-hdmi.patch
 
 ExcludeArch: s390 s390x
 
@@ -49,6 +50,7 @@
 %patch6 -p1 -b .bgnr
 %patch7 -p1 -b .pciid
 %patch8 -p1 -b .quirk
+%patch9 -p1 -b .hdmi
 
 %build
 autoreconf
@@ -80,6 +82,10 @@
 %{_mandir}/man4/radeon.4*
 
 %changelog
+* Fri Oct 31 2008 Adam Jackson <ajax at redhat.com> 6.9.0-39
+- radeon-6.9.0-dig1-hdmi.patch: Fix initialization of DVI sinks on HDMI
+  connectors for DCE3.
+
 * Thu Oct 30 2008 Dave Airlie <airlied at redhat.com> 6.9.0-38
 - don't enable DFS under kms on anything but PCIE by default.
 




More information about the scm-commits mailing list