summaryrefslogtreecommitdiffstats
path: root/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-fast-kms.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-fast-kms.patch')
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-fast-kms.patch285
1 files changed, 0 insertions, 285 deletions
diff --git a/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-fast-kms.patch b/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-fast-kms.patch
deleted file mode 100644
index f213958bf5..0000000000
--- a/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-fast-kms.patch
+++ /dev/null
@@ -1,285 +0,0 @@
1diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
2index 1c3a8c5..144624a 100644
3--- a/drivers/gpu/drm/drm_crtc_helper.c
4+++ b/drivers/gpu/drm/drm_crtc_helper.c
5@@ -29,6 +29,8 @@
6 * Jesse Barnes <jesse.barnes@intel.com>
7 */
8
9+#include <linux/async.h>
10+
11 #include "drmP.h"
12 #include "drm_crtc.h"
13 #include "drm_crtc_helper.h"
14@@ -42,6 +44,8 @@ static struct drm_display_mode std_modes[] = {
15 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
16 };
17
18+LIST_HEAD(drm_async_list);
19+
20 /**
21 * drm_helper_probe_connector_modes - get complete set of display modes
22 * @dev: DRM device
23@@ -137,6 +141,26 @@ int drm_helper_probe_connector_modes(struct drm_device *dev, uint32_t maxX,
24 }
25 EXPORT_SYMBOL(drm_helper_probe_connector_modes);
26
27+int drm_helper_probe_connector_modes_fast(struct drm_device *dev, uint32_t maxX,
28+ uint32_t maxY)
29+{
30+ struct drm_connector *connector;
31+ int count = 0;
32+
33+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
34+ count += drm_helper_probe_single_connector_modes(connector,
35+ maxX, maxY);
36+ /*
37+ * If we found a 'good' connector, we stop probing futher.
38+ */
39+ if (count > 0)
40+ break;
41+ }
42+
43+ return count;
44+}
45+EXPORT_SYMBOL(drm_helper_probe_connector_modes_fast);
46+
47 static void drm_helper_add_std_modes(struct drm_device *dev,
48 struct drm_connector *connector)
49 {
50@@ -882,6 +906,24 @@ bool drm_helper_plugged_event(struct drm_device *dev)
51 /* FIXME: send hotplug event */
52 return true;
53 }
54+
55+static void async_notify_fb_changed(void *data, async_cookie_t cookie)
56+{
57+ struct drm_device *dev = data;
58+ dev->mode_config.funcs->fb_changed(dev);
59+}
60+
61+static void async_probe_hard(void *data, async_cookie_t cookie)
62+{
63+ struct drm_device *dev = data;
64+ /* Need to wait for async_notify_fb_changed to be done */
65+ async_synchronize_cookie_domain(cookie, &drm_async_list);
66+ drm_helper_probe_connector_modes(dev,
67+ dev->mode_config.max_width,
68+ dev->mode_config.max_height);
69+}
70+
71+
72 /**
73 * drm_initial_config - setup a sane initial connector configuration
74 * @dev: DRM device
75@@ -902,7 +944,7 @@ bool drm_helper_initial_config(struct drm_device *dev, bool can_grow)
76 struct drm_connector *connector;
77 int count = 0;
78
79- count = drm_helper_probe_connector_modes(dev,
80+ count = drm_helper_probe_connector_modes_fast(dev,
81 dev->mode_config.max_width,
82 dev->mode_config.max_height);
83
84@@ -921,7 +963,9 @@ bool drm_helper_initial_config(struct drm_device *dev, bool can_grow)
85 drm_setup_crtcs(dev);
86
87 /* alert the driver fb layer */
88- dev->mode_config.funcs->fb_changed(dev);
89+ async_schedule_domain(async_notify_fb_changed, dev, &drm_async_list);
90+ /* probe further outputs */
91+ async_schedule_domain(async_probe_hard, dev, &drm_async_list);
92
93 return 0;
94 }
95diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
96index 14c7a23..ef52021 100644
97--- a/drivers/gpu/drm/drm_drv.c
98+++ b/drivers/gpu/drm/drm_drv.c
99@@ -48,6 +48,7 @@
100
101 #include "drmP.h"
102 #include "drm_core.h"
103+#include <linux/async.h>
104
105 static int drm_version(struct drm_device *dev, void *data,
106 struct drm_file *file_priv);
107@@ -345,6 +346,9 @@ void drm_exit(struct drm_driver *driver)
108 struct drm_device *dev, *tmp;
109 DRM_DEBUG("\n");
110
111+ /* make sure all async DRM operations are finished */
112+ async_synchronize_full_domain(&drm_async_list);
113+
114 list_for_each_entry_safe(dev, tmp, &driver->device_list, driver_item)
115 drm_cleanup(dev);
116
117diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
118index a839a28..069b189 100644
119--- a/drivers/gpu/drm/drm_edid.c
120+++ b/drivers/gpu/drm/drm_edid.c
121@@ -588,20 +588,22 @@ static unsigned char *drm_ddc_read(struct i2c_adapter *adapter)
122 {
123 struct i2c_algo_bit_data *algo_data = adapter->algo_data;
124 unsigned char *edid = NULL;
125+ int divider = 5;
126 int i, j;
127
128 algo_data->setscl(algo_data->data, 1);
129
130- for (i = 0; i < 1; i++) {
131+ for (i = 0; i < 2; i++) {
132 /* For some old monitors we need the
133 * following process to initialize/stop DDC
134 */
135+
136 algo_data->setsda(algo_data->data, 1);
137- msleep(13);
138+ msleep(13 / divider);
139
140 algo_data->setscl(algo_data->data, 1);
141 for (j = 0; j < 5; j++) {
142- msleep(10);
143+ msleep(10 / divider);
144 if (algo_data->getscl(algo_data->data))
145 break;
146 }
147@@ -609,31 +611,33 @@ static unsigned char *drm_ddc_read(struct i2c_adapter *adapter)
148 continue;
149
150 algo_data->setsda(algo_data->data, 0);
151- msleep(15);
152+ msleep(15 / divider);
153 algo_data->setscl(algo_data->data, 0);
154- msleep(15);
155+ msleep(15 / divider);
156 algo_data->setsda(algo_data->data, 1);
157- msleep(15);
158+ msleep(15 / divider);
159
160 /* Do the real work */
161 edid = drm_do_probe_ddc_edid(adapter);
162 algo_data->setsda(algo_data->data, 0);
163 algo_data->setscl(algo_data->data, 0);
164- msleep(15);
165+ msleep(15 / divider);
166
167 algo_data->setscl(algo_data->data, 1);
168 for (j = 0; j < 10; j++) {
169- msleep(10);
170+ msleep(10 / divider);
171 if (algo_data->getscl(algo_data->data))
172 break;
173 }
174
175 algo_data->setsda(algo_data->data, 1);
176- msleep(15);
177+ msleep(15 / divider);
178 algo_data->setscl(algo_data->data, 0);
179 algo_data->setsda(algo_data->data, 0);
180+
181 if (edid)
182 break;
183+ divider = 1;
184 }
185 /* Release the DDC lines when done or the Apple Cinema HD display
186 * will switch off
187diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
188index a283427..6f2eced 100644
189--- a/drivers/gpu/drm/i915/intel_display.c
190+++ b/drivers/gpu/drm/i915/intel_display.c
191@@ -319,7 +319,7 @@ void
192 intel_wait_for_vblank(struct drm_device *dev)
193 {
194 /* Wait for 20ms, i.e. one cycle at 50hz. */
195- udelay(20000);
196+ mdelay(20);
197 }
198
199 static int
200@@ -1466,12 +1466,12 @@ static void intel_setup_outputs(struct drm_device *dev)
201 struct drm_i915_private *dev_priv = dev->dev_private;
202 struct drm_connector *connector;
203
204- intel_crt_init(dev);
205-
206- /* Set up integrated LVDS */
207+ /* Set up integrated LVDS -- will skip if the lid is closed */
208 if (IS_MOBILE(dev) && !IS_I830(dev))
209 intel_lvds_init(dev);
210
211+ intel_crt_init(dev);
212+
213 if (IS_I9XX(dev)) {
214 int found;
215
216diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
217index 957daef..22a74bd 100644
218--- a/drivers/gpu/drm/i915/intel_drv.h
219+++ b/drivers/gpu/drm/i915/intel_drv.h
220@@ -81,6 +81,7 @@ struct intel_output {
221 int type;
222 struct intel_i2c_chan *i2c_bus; /* for control functions */
223 struct intel_i2c_chan *ddc_bus; /* for DDC only stuff */
224+ struct edid *edid;
225 bool load_detect_temp;
226 bool needs_tv_clock;
227 void *dev_priv;
228diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
229index 0d211af..dc4fecc 100644
230--- a/drivers/gpu/drm/i915/intel_lvds.c
231+++ b/drivers/gpu/drm/i915/intel_lvds.c
232@@ -336,6 +336,7 @@ static void intel_lvds_destroy(struct drm_connector *connector)
233 intel_i2c_destroy(intel_output->ddc_bus);
234 drm_sysfs_connector_remove(connector);
235 drm_connector_cleanup(connector);
236+ kfree(intel_output->edid);
237 kfree(connector);
238 }
239
240@@ -516,5 +517,6 @@ failed:
241 if (intel_output->ddc_bus)
242 intel_i2c_destroy(intel_output->ddc_bus);
243 drm_connector_cleanup(connector);
244+ kfree(intel_output->edid);
245 kfree(connector);
246 }
247diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
248index e42019e..8c0d5f6 100644
249--- a/drivers/gpu/drm/i915/intel_modes.c
250+++ b/drivers/gpu/drm/i915/intel_modes.c
251@@ -70,13 +70,21 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
252 struct edid *edid;
253 int ret = 0;
254
255+ if (intel_output->edid) {
256+ printk(KERN_INFO "Skipping EDID probe due to cached edid\n");
257+ return ret;
258+ }
259+
260 edid = drm_get_edid(&intel_output->base,
261 &intel_output->ddc_bus->adapter);
262 if (edid) {
263 drm_mode_connector_update_edid_property(&intel_output->base,
264 edid);
265 ret = drm_add_edid_modes(&intel_output->base, edid);
266- kfree(edid);
267+ if (intel_output->type == INTEL_OUTPUT_LVDS)
268+ intel_output->edid = edid;
269+ else
270+ kfree(edid);
271 }
272
273 return ret;
274diff --git a/include/drm/drmP.h b/include/drm/drmP.h
275index e5f4ae9..69ce4f4 100644
276--- a/include/drm/drmP.h
277+++ b/include/drm/drmP.h
278@@ -304,6 +304,7 @@ struct drm_vma_entry {
279 pid_t pid;
280 };
281
282+extern struct list_head drm_async_list;
283 /**
284 * DMA buffer.
285 */