59 lines
2.0 KiB
Diff
59 lines
2.0 KiB
Diff
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
|
index 004541c..b218780 100644
|
|
--- a/drivers/gpu/drm/i915/intel_drv.h
|
|
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
|
@@ -81,6 +81,7 @@ struct intel_output {
|
|
int type;
|
|
struct i2c_adapter *i2c_bus;
|
|
struct i2c_adapter *ddc_bus;
|
|
+ struct edid *edid;
|
|
bool load_detect_temp;
|
|
bool needs_tv_clock;
|
|
void *dev_priv;
|
|
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
|
|
index 9ab38ef..9fba800 100644
|
|
--- a/drivers/gpu/drm/i915/intel_lvds.c
|
|
+++ b/drivers/gpu/drm/i915/intel_lvds.c
|
|
@@ -657,6 +657,7 @@ static void intel_lvds_destroy(struct drm_connector *connector)
|
|
intel_i2c_destroy(intel_output->ddc_bus);
|
|
drm_sysfs_connector_remove(connector);
|
|
drm_connector_cleanup(connector);
|
|
+ kfree(intel_output->edid);
|
|
kfree(connector);
|
|
}
|
|
|
|
@@ -1017,5 +1018,6 @@ failed:
|
|
if (intel_output->ddc_bus)
|
|
intel_i2c_destroy(intel_output->ddc_bus);
|
|
drm_connector_cleanup(connector);
|
|
+ kfree(intel_output->edid);
|
|
kfree(intel_output);
|
|
}
|
|
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
|
|
index 67e2f46..5ac537f 100644
|
|
--- a/drivers/gpu/drm/i915/intel_modes.c
|
|
+++ b/drivers/gpu/drm/i915/intel_modes.c
|
|
@@ -74,6 +74,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
|
|
int ret = 0;
|
|
|
|
intel_i2c_quirk_set(intel_output->base.dev, true);
|
|
+ if (intel_output->edid && intel_output->type == INTEL_OUTPUT_LVDS) {
|
|
+ printk(KERN_INFO "Skipping EDID probe due to cached edid\n");
|
|
+ return ret;
|
|
+ }
|
|
edid = drm_get_edid(&intel_output->base, intel_output->ddc_bus);
|
|
intel_i2c_quirk_set(intel_output->base.dev, false);
|
|
if (edid) {
|
|
@@ -81,7 +85,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
|
|
edid);
|
|
ret = drm_add_edid_modes(&intel_output->base, edid);
|
|
intel_output->base.display_info.raw_edid = NULL;
|
|
- kfree(edid);
|
|
+ if (intel_output->type == INTEL_OUTPUT_LVDS)
|
|
+ intel_output->edid = edid;
|
|
+ else
|
|
+ kfree(edid);
|
|
}
|
|
|
|
return ret;
|