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>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Gerrit - the friendly Code Review server

vecāks
51e45dfa59
revīzija
1f331b536f
@@ -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;
|
||||
}
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user