|
@@ -6291,7 +6291,7 @@ static int _sde_crtc_event_disable(struct sde_kms *kms,
|
|
spin_lock_irqsave(&crtc->spin_lock, flags);
|
|
spin_lock_irqsave(&crtc->spin_lock, flags);
|
|
list_for_each_entry(node, &crtc->user_event_list, list) {
|
|
list_for_each_entry(node, &crtc->user_event_list, list) {
|
|
if (node->event == event) {
|
|
if (node->event == event) {
|
|
- list_del(&node->list);
|
|
|
|
|
|
+ list_del_init(&node->list);
|
|
found = true;
|
|
found = true;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -6319,7 +6319,14 @@ static int _sde_crtc_event_disable(struct sde_kms *kms,
|
|
}
|
|
}
|
|
|
|
|
|
ret = node->func(crtc_drm, false, &node->irq);
|
|
ret = node->func(crtc_drm, false, &node->irq);
|
|
- kfree(node);
|
|
|
|
|
|
+ if (ret) {
|
|
|
|
+ spin_lock_irqsave(&crtc->spin_lock, flags);
|
|
|
|
+ list_add_tail(&node->list, &crtc->user_event_list);
|
|
|
|
+ spin_unlock_irqrestore(&crtc->spin_lock, flags);
|
|
|
|
+ } else {
|
|
|
|
+ kfree(node);
|
|
|
|
+ }
|
|
|
|
+
|
|
pm_runtime_put_sync(crtc_drm->dev->dev);
|
|
pm_runtime_put_sync(crtc_drm->dev->dev);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|