Commit 8e4d36b9 authored by ling.ma@intel.com's avatar ling.ma@intel.com Committed by Eric Anholt

drm/i915: crt fetch EDID by DVI-I converter on G4x platform

Usually crt mainly get modes via GPIOA ports.
However on G4X platform we need to probe possible
ports for DVI-I, which could be wired to GPIOD,
then fetch our desired EDID, i.e on DG45ID platform
we successfully fetch EDID by GPIOD port.

It fixed freedesktop.org bug #21084
Signed-off-by: default avatarMa Ling <ling.ma@intel.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 22bd50c5
...@@ -428,8 +428,34 @@ static void intel_crt_destroy(struct drm_connector *connector) ...@@ -428,8 +428,34 @@ static void intel_crt_destroy(struct drm_connector *connector)
static int intel_crt_get_modes(struct drm_connector *connector) static int intel_crt_get_modes(struct drm_connector *connector)
{ {
int ret;
struct intel_output *intel_output = to_intel_output(connector); struct intel_output *intel_output = to_intel_output(connector);
return intel_ddc_get_modes(intel_output); struct intel_i2c_chan *ddcbus;
struct drm_device *dev = connector->dev;
ret = intel_ddc_get_modes(intel_output);
if (ret || !IS_G4X(dev))
goto end;
ddcbus = intel_output->ddc_bus;
/* Try to probe digital port for output in DVI-I -> VGA mode. */
intel_output->ddc_bus =
intel_i2c_create(connector->dev, GPIOD, "CRTDDC_D");
if (!intel_output->ddc_bus) {
intel_output->ddc_bus = ddcbus;
dev_printk(KERN_ERR, &connector->dev->pdev->dev,
"DDC bus registration failed for CRTDDC_D.\n");
goto end;
}
/* Try to get modes by GPIOD port */
ret = intel_ddc_get_modes(intel_output);
intel_i2c_destroy(ddcbus);
end:
return ret;
} }
static int intel_crt_set_property(struct drm_connector *connector, static int intel_crt_set_property(struct drm_connector *connector,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment