diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c index 2379127..7ffac94 100644 --- a/src/i830_sdvo.c +++ b/src/i830_sdvo.c @@ -66,6 +66,8 @@ struct i830_sdvo_priv { */ struct i830_sdvo_caps caps; + uint8_t hdmi_encode_mode; + /** Pixel clock limitations reported by the SDVO device, in kHz */ int pixel_clock_min, pixel_clock_max; @@ -998,6 +1000,9 @@ i830_sdvo_restore(xf86OutputPtr output) i830_sdvo_set_active_outputs(output, 0); + i830_sdvo_write_cmd(output, SDVO_CMD_SET_ENCODE, + &dev_priv->hdmi_encode_mode, 1); + for (o = SDVO_OUTPUT_FIRST; o <= SDVO_OUTPUT_LAST; o++) { uint16_t this_output = (1 << o); @@ -1513,6 +1518,7 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device) char name[60]; char *name_prefix; char *name_suffix; + uint8_t tmp; output = xf86OutputCreate (pScrn, &i830_sdvo_output_funcs,NULL); if (!output) @@ -1616,6 +1622,10 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device) intel_output->pDDCBus = ddcbus; intel_output->dev_priv = dev_priv; + i830_sdvo_write_cmd(output, SDVO_CMD_GET_ENCODE, NULL, 0); + i830_sdvo_read_response(output, &dev_priv->hdmi_encode_mode, 1); + tmp = 0; /* set encode mode to DVI */ + i830_sdvo_write_cmd(output, SDVO_CMD_SET_ENCODE, &tmp, 1); i830_sdvo_get_capabilities(output, &dev_priv->caps); if (dev_priv->caps.output_flags & SDVO_OUTPUT_TMDS0) diff --git a/src/i830_sdvo_regs.h b/src/i830_sdvo_regs.h index dc2522a..9ace458 100644 --- a/src/i830_sdvo_regs.h +++ b/src/i830_sdvo_regs.h @@ -511,3 +511,5 @@ struct i830_sdvo_enhancements_arg { # define SDVO_CONTROL_BUS_DDC2 (1 << 2) # define SDVO_CONTROL_BUS_DDC3 (1 << 3) +#define SDVO_CMD_GET_ENCODE 0x9e +#define SDVO_CMD_SET_ENCODE 0x9f