From cb0e9e5ab3a846cf6930ef3c764abb1ed1ecd6ee Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Oct 31 2008 19:49:58 +0000 Subject: - radeon-6.9.0-dig1-hdmi.patch: Fix initialization of DVI sinks on HDMI connectors for DCE3. --- diff --git a/radeon-6.9.0-dig1-hdmi.patch b/radeon-6.9.0-dig1-hdmi.patch new file mode 100644 index 0000000..bdf182f --- /dev/null +++ b/radeon-6.9.0-dig1-hdmi.patch @@ -0,0 +1,75 @@ +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) diff --git a/xorg-x11-drv-ati.spec b/xorg-x11-drv-ati.spec index d1efa64..c3f7225 100644 --- a/xorg-x11-drv-ati.spec +++ b/xorg-x11-drv-ati.spec @@ -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 @@ Patch5: radeon-6.9.0-panel-size-sanity.patch 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 @@ X.Org X11 ati video driver. %patch6 -p1 -b .bgnr %patch7 -p1 -b .pciid %patch8 -p1 -b .quirk +%patch9 -p1 -b .hdmi %build autoreconf @@ -80,6 +82,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/radeon.4* %changelog +* Fri Oct 31 2008 Adam Jackson 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 6.9.0-38 - don't enable DFS under kms on anything but PCIE by default.