Package sources for project openSUSE:Factory:PullRequest:48:Factory are received through scmsync. This is not supported by the OBS frontend

File linux-2.6.29-kms-edid-cache.patch of Package kernel

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index a51573d..3dcf5cc 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -102,6 +102,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 3118ce2..fa0299e 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -716,6 +716,7 @@ static void intel_lvds_destroy(struct drm_connector *connector)
 		acpi_lid_notifier_unregister(&dev_priv->lid_notifier);
 	drm_sysfs_connector_remove(connector);
 	drm_connector_cleanup(connector);
+	kfree(intel_output->edid);
 	kfree(connector);
 }
 
@@ -1189,5 +1190,6 @@ failed:
 		intel_i2c_destroy(intel_output->ddc_bus);
 	drm_connector_cleanup(connector);
 	drm_encoder_cleanup(encoder);
+	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;
openSUSE Build Service is sponsored by