summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/atombios_output.c26
-rw-r--r--src/radeon_output.c41
-rw-r--r--src/radeon_probe.h1
3 files changed, 64 insertions, 4 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c
index 7ae004c7..1335b369 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -356,11 +356,20 @@ atombios_output_dig1_setup(xf86OutputPtr output, DisplayModePtr mode)
disp_data.ucAction = 1;
disp_data.usPixelClock = mode->Clock / 10;
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_TRANSMITTER1;
+ if (OUTPUT_IS_DVI || (radeon_output->type == OUTPUT_HDMI)) {
+ if (radeon_output->coherent_mode) {
+ disp_data.ucConfig |= ATOM_TRANSMITTER_CONFIG_COHERENT;
+ xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "DIG1: Coherent Mode enabled\n");
+ } else
+ xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "DIG1: Coherent Mode disabled\n");
+ }
+
if (mode->Clock > 165000) {
- disp_data.ucConfig = ATOM_ENCODER_CONFIG_LINKA_B | ATOM_ENCODER_CONFIG_TRANSMITTER1;
+ disp_data.ucConfig |= ATOM_ENCODER_CONFIG_LINKA_B;
disp_data.ucLaneNum = 8;
} else {
- disp_data.ucConfig = ATOM_ENCODER_CONFIG_LINKA | ATOM_ENCODER_CONFIG_TRANSMITTER1;
+ disp_data.ucConfig |= ATOM_ENCODER_CONFIG_LINKA;
disp_data.ucLaneNum = 4;
}
@@ -433,11 +442,20 @@ atombios_output_dig2_setup(xf86OutputPtr output, DisplayModePtr mode)
disp_data.ucAction = 1;
disp_data.usPixelClock = mode->Clock / 10;
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_TRANSMITTER2;
+ if (OUTPUT_IS_DVI || (radeon_output->type == OUTPUT_HDMI)) {
+ if (radeon_output->coherent_mode) {
+ disp_data.ucConfig |= ATOM_TRANSMITTER_CONFIG_COHERENT;
+ xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "DIG2: Coherent Mode enabled\n");
+ } else
+ xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "DIG2: Coherent Mode disabled\n");
+ }
+
if (mode->Clock > 165000) {
- disp_data.ucConfig = ATOM_ENCODER_CONFIG_LINKA_B | ATOM_ENCODER_CONFIG_TRANSMITTER2;
+ disp_data.ucConfig |= ATOM_ENCODER_CONFIG_LINKA_B;
disp_data.ucLaneNum = 8;
} else {
- disp_data.ucConfig = ATOM_ENCODER_CONFIG_LINKA | ATOM_ENCODER_CONFIG_TRANSMITTER2;
+ disp_data.ucConfig |= ATOM_ENCODER_CONFIG_LINKA;
disp_data.ucLaneNum = 4;
}
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);
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index ae24003c..5d368fe5 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -253,6 +253,7 @@ typedef struct _RADEONOutputPrivateRec {
int load_detection;
/* dig block */
int transmitter_config;
+ Bool coherent_mode;
char *name;
int output_id;