diff options
Diffstat (limited to 'meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-run-async.patch')
-rw-r--r-- | meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-run-async.patch | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-run-async.patch b/meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-run-async.patch new file mode 100644 index 0000000000..eaef8eb6ce --- /dev/null +++ b/meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-run-async.patch | |||
@@ -0,0 +1,118 @@ | |||
1 | Index: b/drivers/gpu/drm/drm_crtc_helper.c | ||
2 | =================================================================== | ||
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 | @@ -62,6 +64,8 @@ static void drm_mode_validate_flag(struc | ||
15 | return; | ||
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 | @@ -916,6 +920,7 @@ bool drm_helper_plugged_event(struct drm | ||
24 | /* FIXME: send hotplug event */ | ||
25 | return true; | ||
26 | } | ||
27 | + | ||
28 | /** | ||
29 | * drm_initial_config - setup a sane initial connector configuration | ||
30 | * @dev: DRM device | ||
31 | @@ -953,13 +958,26 @@ bool drm_helper_initial_config(struct dr | ||
32 | |||
33 | drm_setup_crtcs(dev); | ||
34 | |||
35 | - /* alert the driver fb layer */ | ||
36 | dev->mode_config.funcs->fb_changed(dev); | ||
37 | - | ||
38 | return 0; | ||
39 | } | ||
40 | EXPORT_SYMBOL(drm_helper_initial_config); | ||
41 | |||
42 | +static void drm_helper_initial_config_helper(void *ptr, async_cookie_t cookie) | ||
43 | +{ | ||
44 | + struct drm_device *dev = ptr; | ||
45 | + drm_helper_initial_config(dev); | ||
46 | +} | ||
47 | + | ||
48 | +void drm_helper_initial_config_async(struct drm_device *dev) | ||
49 | +{ | ||
50 | + async_schedule_domain(drm_helper_initial_config_helper, | ||
51 | + dev, &drm_async_list); | ||
52 | +} | ||
53 | +EXPORT_SYMBOL(drm_helper_initial_config_async); | ||
54 | + | ||
55 | + | ||
56 | + | ||
57 | static int drm_helper_choose_encoder_dpms(struct drm_encoder *encoder) | ||
58 | { | ||
59 | int dpms = DRM_MODE_DPMS_OFF; | ||
60 | Index: b/drivers/gpu/drm/drm_drv.c | ||
61 | =================================================================== | ||
62 | --- a/drivers/gpu/drm/drm_drv.c | ||
63 | +++ b/drivers/gpu/drm/drm_drv.c | ||
64 | @@ -49,6 +49,7 @@ | ||
65 | #include <linux/debugfs.h> | ||
66 | #include "drmP.h" | ||
67 | #include "drm_core.h" | ||
68 | +#include <linux/async.h> | ||
69 | |||
70 | |||
71 | static int drm_version(struct drm_device *dev, void *data, | ||
72 | @@ -290,6 +291,9 @@ void drm_exit(struct drm_driver *driver) | ||
73 | struct drm_device *dev, *tmp; | ||
74 | DRM_DEBUG("\n"); | ||
75 | |||
76 | + /* make sure all async DRM operations are finished */ | ||
77 | + async_synchronize_full_domain(&drm_async_list); | ||
78 | + | ||
79 | if (driver->driver_features & DRIVER_MODESET) { | ||
80 | pci_unregister_driver(&driver->pci_driver); | ||
81 | } else { | ||
82 | Index: b/include/drm/drmP.h | ||
83 | =================================================================== | ||
84 | --- a/include/drm/drmP.h | ||
85 | +++ b/include/drm/drmP.h | ||
86 | @@ -328,6 +328,7 @@ struct drm_vma_entry { | ||
87 | pid_t pid; | ||
88 | }; | ||
89 | |||
90 | +extern struct list_head drm_async_list; | ||
91 | /** | ||
92 | * DMA buffer. | ||
93 | */ | ||
94 | Index: b/include/drm/drm_crtc_helper.h | ||
95 | =================================================================== | ||
96 | --- a/include/drm/drm_crtc_helper.h | ||
97 | +++ b/include/drm/drm_crtc_helper.h | ||
98 | @@ -92,6 +92,7 @@ extern int drm_helper_probe_single_conne | ||
99 | extern void drm_helper_disable_unused_functions(struct drm_device *dev); | ||
100 | extern int drm_helper_hotplug_stage_two(struct drm_device *dev); | ||
101 | extern bool drm_helper_initial_config(struct drm_device *dev); | ||
102 | +extern void drm_helper_initial_config_async(struct drm_device *dev); | ||
103 | extern int drm_crtc_helper_set_config(struct drm_mode_set *set); | ||
104 | extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, | ||
105 | struct drm_display_mode *mode, | ||
106 | Index: b/drivers/gpu/drm/i915/i915_dma.c | ||
107 | =================================================================== | ||
108 | --- a/drivers/gpu/drm/i915/i915_dma.c | ||
109 | +++ b/drivers/gpu/drm/i915/i915_dma.c | ||
110 | @@ -1045,7 +1045,7 @@ static int i915_load_modeset_init(struct | ||
111 | |||
112 | intel_modeset_init(dev); | ||
113 | |||
114 | - drm_helper_initial_config(dev); | ||
115 | + drm_helper_initial_config_async(dev); | ||
116 | |||
117 | return 0; | ||
118 | |||