diff options
Diffstat (limited to 'meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-edid-cache.patch')
-rw-r--r-- | meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-edid-cache.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-edid-cache.patch b/meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-edid-cache.patch new file mode 100644 index 0000000000..47e5b16a2a --- /dev/null +++ b/meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-edid-cache.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h | ||
2 | index 004541c..b218780 100644 | ||
3 | --- a/drivers/gpu/drm/i915/intel_drv.h | ||
4 | +++ b/drivers/gpu/drm/i915/intel_drv.h | ||
5 | @@ -81,6 +81,7 @@ struct intel_output { | ||
6 | int type; | ||
7 | struct i2c_adapter *i2c_bus; | ||
8 | struct i2c_adapter *ddc_bus; | ||
9 | + struct edid *edid; | ||
10 | bool load_detect_temp; | ||
11 | bool needs_tv_clock; | ||
12 | void *dev_priv; | ||
13 | diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c | ||
14 | index 9ab38ef..9fba800 100644 | ||
15 | --- a/drivers/gpu/drm/i915/intel_lvds.c | ||
16 | +++ b/drivers/gpu/drm/i915/intel_lvds.c | ||
17 | @@ -657,6 +657,7 @@ static void intel_lvds_destroy(struct drm_connector *connector) | ||
18 | intel_i2c_destroy(intel_output->ddc_bus); | ||
19 | drm_sysfs_connector_remove(connector); | ||
20 | drm_connector_cleanup(connector); | ||
21 | + kfree(intel_output->edid); | ||
22 | kfree(connector); | ||
23 | } | ||
24 | |||
25 | @@ -1017,5 +1018,6 @@ failed: | ||
26 | if (intel_output->ddc_bus) | ||
27 | intel_i2c_destroy(intel_output->ddc_bus); | ||
28 | drm_connector_cleanup(connector); | ||
29 | + kfree(intel_output->edid); | ||
30 | kfree(intel_output); | ||
31 | } | ||
32 | diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c | ||
33 | index 67e2f46..5ac537f 100644 | ||
34 | --- a/drivers/gpu/drm/i915/intel_modes.c | ||
35 | +++ b/drivers/gpu/drm/i915/intel_modes.c | ||
36 | @@ -74,6 +74,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output) | ||
37 | int ret = 0; | ||
38 | |||
39 | intel_i2c_quirk_set(intel_output->base.dev, true); | ||
40 | + if (intel_output->edid && intel_output->type == INTEL_OUTPUT_LVDS) { | ||
41 | + printk(KERN_INFO "Skipping EDID probe due to cached edid\n"); | ||
42 | + return ret; | ||
43 | + } | ||
44 | edid = drm_get_edid(&intel_output->base, intel_output->ddc_bus); | ||
45 | intel_i2c_quirk_set(intel_output->base.dev, false); | ||
46 | if (edid) { | ||
47 | @@ -81,7 +85,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output) | ||
48 | edid); | ||
49 | ret = drm_add_edid_modes(&intel_output->base, edid); | ||
50 | intel_output->base.display_info.raw_edid = NULL; | ||
51 | - kfree(edid); | ||
52 | + if (intel_output->type == INTEL_OUTPUT_LVDS) | ||
53 | + intel_output->edid = edid; | ||
54 | + else | ||
55 | + kfree(edid); | ||
56 | } | ||
57 | |||
58 | return ret; | ||