From ffb89d4c3b6650551aaab06076896540a78faddf Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Fri, 9 Nov 2007 15:47:24 +0100 Subject: drm: split edid handling in get_edid & add_edid_mode This way driver can get_edid in output status detection (using all workaround which are in get_edid) and then provide this edid data in get_mode callback of output. --- linux-core/intel_modes.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'linux-core/intel_modes.c') diff --git a/linux-core/intel_modes.c b/linux-core/intel_modes.c index 601770e1..346cf1ac 100644 --- a/linux-core/intel_modes.c +++ b/linux-core/intel_modes.c @@ -50,6 +50,13 @@ bool intel_ddc_probe(struct drm_output *output) int intel_ddc_get_modes(struct drm_output *output) { struct intel_output *intel_output = output->driver_private; + struct edid *edid; + int ret = 0; - return drm_add_edid_modes(output, &intel_output->ddc_bus->adapter); + edid = drm_get_edid(output, &intel_output->ddc_bus->adapter); + if (edid) { + ret = drm_add_edid_modes(output, edid); + kfree(edid); + } + return ret; } -- cgit v1.2.3