mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
drm: msm: sde: handle event disable failure
If unregister event fails to succeed due to invalid params or due to inappropriate hardware configuration, The callback function is not deleted from the irq table. This leads to list corruption issues in the subsequent calls to event enable and disable. Change-Id: I549bd15b07b9a3b04c0f0a239bd85748acf7d473 Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
This commit is contained in:
parent
51e45dfa59
commit
1f331b536f
1 changed files with 9 additions and 2 deletions
|
|
@ -6291,7 +6291,7 @@ static int _sde_crtc_event_disable(struct sde_kms *kms,
|
|||
spin_lock_irqsave(&crtc->spin_lock, flags);
|
||||
list_for_each_entry(node, &crtc->user_event_list, list) {
|
||||
if (node->event == event) {
|
||||
list_del(&node->list);
|
||||
list_del_init(&node->list);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -6319,7 +6319,14 @@ static int _sde_crtc_event_disable(struct sde_kms *kms,
|
|||
}
|
||||
|
||||
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);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue