summaryrefslogtreecommitdiff
path: root/src/radeon_output.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@cube.(none)>2008-03-11 13:16:00 -0400
committerAlex Deucher <alex@cube.(none)>2008-03-11 13:16:00 -0400
commit78b10487cf222c96f8944ba25e2ea970506b3535 (patch)
tree06c1e729de0813dfbb94a8be66468c49e77f5052 /src/radeon_output.c
parentd20be31c46fbec623af4c3628a7c603ceacf500f (diff)
DCE3: add output attribute to enable/disable coherent mode
Enabled by default. The TMDS transmitter can be programmed slightly differently depending on the chips in the panel. If you have problems with tmds on a particular panel, try disabling it.
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r--src/radeon_output.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 62cc5d4f..cee3ca96 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -1168,6 +1168,7 @@ static Atom tmds_pll_atom;
static Atom rmx_atom;
static Atom monitor_type_atom;
static Atom load_detection_atom;
+static Atom coherent_mode_atom;
static Atom tv_hsize_atom;
static Atom tv_hpos_atom;
static Atom tv_vpos_atom;
@@ -1235,6 +1236,30 @@ radeon_create_resources(xf86OutputPtr output)
}
}
+ if (IS_DCE3_VARIANT &&
+ (OUTPUT_IS_DVI || (radeon_output->type == OUTPUT_HDMI))) {
+ coherent_mode_atom = MAKE_ATOM("coherent_mode");
+
+ range[0] = 0; /* off */
+ range[1] = 1; /* on */
+ err = RRConfigureOutputProperty(output->randr_output, coherent_mode_atom,
+ FALSE, TRUE, FALSE, 2, range);
+ if (err != 0) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "RRConfigureOutputProperty error, %d\n", err);
+ }
+
+ data = 1; /* use coherent mode by default */
+
+ err = RRChangeOutputProperty(output->randr_output, coherent_mode_atom,
+ XA_INTEGER, 32, PropModeReplace, 1, &data,
+ FALSE, TRUE);
+ if (err != 0) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "RRChangeOutputProperty error, %d\n", err);
+ }
+ }
+
if (OUTPUT_IS_DVI && radeon_output->TMDSType == TMDS_INT) {
tmds_pll_atom = MAKE_ATOM("tmds_pll");
@@ -1451,6 +1476,19 @@ radeon_set_property(xf86OutputPtr output, Atom property,
radeon_output->load_detection = val;
+ } else if (property == coherent_mode_atom) {
+ if (value->type != XA_INTEGER ||
+ value->format != 32 ||
+ value->size != 1) {
+ return FALSE;
+ }
+
+ val = *(INT32 *)value->data;
+ if (val < 0 || val > 1)
+ return FALSE;
+
+ radeon_output->coherent_mode = val;
+
} else if (property == rmx_atom) {
const char *s;
if (value->type != XA_STRING || value->format != 8)
@@ -2189,6 +2227,9 @@ void RADEONInitConnector(xf86OutputPtr output)
RADEONGetTVDacAdjInfo(output);
}
+ if (OUTPUT_IS_DVI || (radeon_output->type == OUTPUT_HDMI))
+ radeon_output->coherent_mode = TRUE;
+
if (radeon_output->ddc_i2c.valid)
RADEONI2CInit(output, &radeon_output->pI2CBus, output->name, FALSE);