Automatically detect the presence of HDMI.
Now, SDVO is only probed if the SDVO detected bit is set. If the SDVO probe fails, but the detect bit is set, assume that it's an HDMI output.
This commit is contained in:
parent
ea0d21006e
commit
65ad29d787
|
|
@ -372,6 +372,7 @@ extern int I810_DEBUG;
|
|||
#define HWS_NEED_GFX(pI810) (IS_G33CLASS(pI810) || IS_IGD_GM(pI810) || IS_G4X(pI810))
|
||||
/* chipsets require status page in non stolen memory */
|
||||
#define HWS_NEED_NONSTOLEN(pI810) (IS_IGD_GM(pI810) || IS_G4X(pI810))
|
||||
#define SUPPORTS_INTEGRATED_HDMI(pI810) (IS_IGD_GM(pI810) || IS_G4X(pI810))
|
||||
|
||||
#define GTT_PAGE_SIZE KB(4)
|
||||
#define ROUND_TO(x, y) (((x) + (y) - 1) / (y) * (y))
|
||||
|
|
|
|||
|
|
@ -924,13 +924,19 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
|
|||
i830_lvds_init(pScrn);
|
||||
|
||||
if (IS_I9XX(pI830)) {
|
||||
#if 1
|
||||
i830_sdvo_init(pScrn, SDVOB);
|
||||
i830_sdvo_init(pScrn, SDVOC);
|
||||
#else
|
||||
i830_hdmi_init(pScrn, SDVOB);
|
||||
i830_hdmi_init(pScrn, SDVOC);
|
||||
#endif
|
||||
if (INREG(SDVOB) & SDVO_DETECTED) {
|
||||
Bool found = i830_sdvo_init(pScrn, SDVOB);
|
||||
|
||||
if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
|
||||
i830_hdmi_init(pScrn, SDVOB);
|
||||
}
|
||||
|
||||
if (INREG(SDVOB) & SDVO_DETECTED) {
|
||||
Bool found = i830_sdvo_init(pScrn, SDVOC);
|
||||
|
||||
if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
|
||||
i830_hdmi_init(pScrn, SDVOC);
|
||||
}
|
||||
} else {
|
||||
i830_dvo_init(pScrn);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1503,7 +1503,7 @@ i830_sdvo_select_ddc_bus(struct i830_sdvo_priv *dev_priv)
|
|||
dev_priv->ddc_bus = 1 << num_bits;
|
||||
}
|
||||
|
||||
void
|
||||
Bool
|
||||
i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
|
||||
{
|
||||
xf86OutputPtr output;
|
||||
|
|
@ -1518,13 +1518,13 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
|
|||
|
||||
output = xf86OutputCreate (pScrn, &i830_sdvo_output_funcs,NULL);
|
||||
if (!output)
|
||||
return;
|
||||
return FALSE;
|
||||
intel_output = xnfcalloc (sizeof (I830OutputPrivateRec) +
|
||||
sizeof (struct i830_sdvo_priv), 1);
|
||||
if (!intel_output)
|
||||
{
|
||||
xf86OutputDestroy (output);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
output->driver_private = intel_output;
|
||||
output->interlaceAllowed = FALSE;
|
||||
|
|
@ -1546,7 +1546,7 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
|
|||
if (i2cbus == NULL)
|
||||
{
|
||||
xf86OutputDestroy (output);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (output_device == SDVOB) {
|
||||
|
|
@ -1568,7 +1568,7 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
|
|||
"Failed to initialize %s I2C device\n",
|
||||
SDVO_NAME(dev_priv));
|
||||
xf86OutputDestroy (output);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
intel_output->pI2CBus = i2cbus;
|
||||
|
|
@ -1581,7 +1581,7 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
|
|||
"No SDVO device found on SDVO%c\n",
|
||||
output_device == SDVOB ? 'B' : 'C');
|
||||
xf86OutputDestroy (output);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1594,7 +1594,7 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
|
|||
if (ddcbus == NULL)
|
||||
{
|
||||
xf86OutputDestroy (output);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
if (output_device == SDVOB)
|
||||
ddcbus->BusName = "SDVOB DDC Bus";
|
||||
|
|
@ -1611,7 +1611,7 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
|
|||
if (!xf86I2CBusInit(ddcbus))
|
||||
{
|
||||
xf86OutputDestroy (output);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
intel_output->pI2CBus = i2cbus;
|
||||
|
|
@ -1670,7 +1670,7 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
|
|||
if (!xf86OutputRename (output, name))
|
||||
{
|
||||
xf86OutputDestroy (output);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
i830_sdvo_select_ddc_bus(dev_priv);
|
||||
|
|
@ -1718,4 +1718,5 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
|
|||
REPORT_OUTPUT_FLAG(SDVO_OUTPUT_SCART1, "SCART1");
|
||||
REPORT_OUTPUT_FLAG(SDVO_OUTPUT_LVDS1, "LVDS1");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
void
|
||||
Bool
|
||||
i830_sdvo_init(ScrnInfoPtr pScrn, int output_device);
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in New Issue