Commit c26a0586 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915: Use a high priority wq for nonblocking plane updates



system_unbound_wq can't keep up sometimes and we get dropped frames.
Switch to a high priority variant.

Reported-by: default avatarHeinrich Fink <heinrich.fink@daqri.com>
Tested-by: default avatarHeinrich Fink <heinrich.fink@daqri.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190910121347.22958-1-ville.syrjala@linux.intel.com


Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 43ed2275
......@@ -14272,7 +14272,7 @@ static int intel_atomic_commit(struct drm_device *dev,
if (nonblock && state->modeset) {
queue_work(dev_priv->modeset_wq, &state->base.commit_work);
} else if (nonblock) {
queue_work(system_unbound_wq, &state->base.commit_work);
queue_work(dev_priv->flip_wq, &state->base.commit_work);
} else {
if (state->modeset)
flush_workqueue(dev_priv->modeset_wq);
......@@ -16181,6 +16181,8 @@ int intel_modeset_init(struct drm_device *dev)
int ret;
dev_priv->modeset_wq = alloc_ordered_workqueue("i915_modeset", 0);
dev_priv->flip_wq = alloc_workqueue("i915_flip", WQ_HIGHPRI |
WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE);
drm_mode_config_init(dev);
......@@ -17139,6 +17141,7 @@ void intel_modeset_driver_remove(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = to_i915(dev);
flush_workqueue(dev_priv->flip_wq);
flush_workqueue(dev_priv->modeset_wq);
flush_work(&dev_priv->atomic_helper.free_work);
......@@ -17175,6 +17178,7 @@ void intel_modeset_driver_remove(struct drm_device *dev)
intel_gmbus_teardown(dev_priv);
destroy_workqueue(dev_priv->flip_wq);
destroy_workqueue(dev_priv->modeset_wq);
intel_fbc_cleanup_cfb(dev_priv);
......
......@@ -1438,6 +1438,8 @@ struct drm_i915_private {
/* ordered wq for modesets */
struct workqueue_struct *modeset_wq;
/* unbound hipri wq for page flips/plane updates */
struct workqueue_struct *flip_wq;
/* Display functions */
struct drm_i915_display_funcs display;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment