mirror of
https://git.yoctoproject.org/poky
synced 2026-03-25 10:02:22 +01:00
119 lines
3.4 KiB
Diff
119 lines
3.4 KiB
Diff
Index: b/drivers/gpu/drm/drm_crtc_helper.c
|
|
===================================================================
|
|
--- a/drivers/gpu/drm/drm_crtc_helper.c
|
|
+++ b/drivers/gpu/drm/drm_crtc_helper.c
|
|
@@ -29,6 +29,8 @@
|
|
* Jesse Barnes <jesse.barnes@intel.com>
|
|
*/
|
|
|
|
+#include <linux/async.h>
|
|
+
|
|
#include "drmP.h"
|
|
#include "drm_crtc.h"
|
|
#include "drm_crtc_helper.h"
|
|
@@ -62,6 +64,8 @@ static void drm_mode_validate_flag(struc
|
|
return;
|
|
}
|
|
|
|
+LIST_HEAD(drm_async_list);
|
|
+
|
|
/**
|
|
* drm_helper_probe_connector_modes - get complete set of display modes
|
|
* @dev: DRM device
|
|
@@ -916,6 +920,7 @@ bool drm_helper_plugged_event(struct drm
|
|
/* FIXME: send hotplug event */
|
|
return true;
|
|
}
|
|
+
|
|
/**
|
|
* drm_initial_config - setup a sane initial connector configuration
|
|
* @dev: DRM device
|
|
@@ -953,13 +958,26 @@ bool drm_helper_initial_config(struct dr
|
|
|
|
drm_setup_crtcs(dev);
|
|
|
|
- /* alert the driver fb layer */
|
|
dev->mode_config.funcs->fb_changed(dev);
|
|
-
|
|
return 0;
|
|
}
|
|
EXPORT_SYMBOL(drm_helper_initial_config);
|
|
|
|
+static void drm_helper_initial_config_helper(void *ptr, async_cookie_t cookie)
|
|
+{
|
|
+ struct drm_device *dev = ptr;
|
|
+ drm_helper_initial_config(dev);
|
|
+}
|
|
+
|
|
+void drm_helper_initial_config_async(struct drm_device *dev)
|
|
+{
|
|
+ async_schedule_domain(drm_helper_initial_config_helper,
|
|
+ dev, &drm_async_list);
|
|
+}
|
|
+EXPORT_SYMBOL(drm_helper_initial_config_async);
|
|
+
|
|
+
|
|
+
|
|
static int drm_helper_choose_encoder_dpms(struct drm_encoder *encoder)
|
|
{
|
|
int dpms = DRM_MODE_DPMS_OFF;
|
|
Index: b/drivers/gpu/drm/drm_drv.c
|
|
===================================================================
|
|
--- a/drivers/gpu/drm/drm_drv.c
|
|
+++ b/drivers/gpu/drm/drm_drv.c
|
|
@@ -49,6 +49,7 @@
|
|
#include <linux/debugfs.h>
|
|
#include "drmP.h"
|
|
#include "drm_core.h"
|
|
+#include <linux/async.h>
|
|
|
|
|
|
static int drm_version(struct drm_device *dev, void *data,
|
|
@@ -290,6 +291,9 @@ void drm_exit(struct drm_driver *driver)
|
|
struct drm_device *dev, *tmp;
|
|
DRM_DEBUG("\n");
|
|
|
|
+ /* make sure all async DRM operations are finished */
|
|
+ async_synchronize_full_domain(&drm_async_list);
|
|
+
|
|
if (driver->driver_features & DRIVER_MODESET) {
|
|
pci_unregister_driver(&driver->pci_driver);
|
|
} else {
|
|
Index: b/include/drm/drmP.h
|
|
===================================================================
|
|
--- a/include/drm/drmP.h
|
|
+++ b/include/drm/drmP.h
|
|
@@ -328,6 +328,7 @@ struct drm_vma_entry {
|
|
pid_t pid;
|
|
};
|
|
|
|
+extern struct list_head drm_async_list;
|
|
/**
|
|
* DMA buffer.
|
|
*/
|
|
Index: b/include/drm/drm_crtc_helper.h
|
|
===================================================================
|
|
--- a/include/drm/drm_crtc_helper.h
|
|
+++ b/include/drm/drm_crtc_helper.h
|
|
@@ -92,6 +92,7 @@ extern int drm_helper_probe_single_conne
|
|
extern void drm_helper_disable_unused_functions(struct drm_device *dev);
|
|
extern int drm_helper_hotplug_stage_two(struct drm_device *dev);
|
|
extern bool drm_helper_initial_config(struct drm_device *dev);
|
|
+extern void drm_helper_initial_config_async(struct drm_device *dev);
|
|
extern int drm_crtc_helper_set_config(struct drm_mode_set *set);
|
|
extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
|
|
struct drm_display_mode *mode,
|
|
Index: b/drivers/gpu/drm/i915/i915_dma.c
|
|
===================================================================
|
|
--- a/drivers/gpu/drm/i915/i915_dma.c
|
|
+++ b/drivers/gpu/drm/i915/i915_dma.c
|
|
@@ -1045,7 +1045,7 @@ static int i915_load_modeset_init(struct
|
|
|
|
intel_modeset_init(dev);
|
|
|
|
- drm_helper_initial_config(dev);
|
|
+ drm_helper_initial_config_async(dev);
|
|
|
|
return 0;
|
|
|