diff options
author | Rob Clark <robdclark@gmail.com> | 2014-12-02 11:50:06 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2014-12-18 14:32:14 -0500 |
commit | 8bc1fe92e15742985fcbd543df6954dae5f6b33e (patch) | |
tree | a1db1999389a7f86327dec5fe04a8f49ba6e2593 /drivers/gpu/drm/msm/mdp/mdp_kms.c | |
parent | f86afecf0defbc8d046bc7a7c5fc19a8c9ba1364 (diff) | |
download | lwn-8bc1fe92e15742985fcbd543df6954dae5f6b33e.tar.gz lwn-8bc1fe92e15742985fcbd543df6954dae5f6b33e.zip |
drm/msm/mdp5: update irqs on crtc<->encoder link change
If crtc <-> encoder linkage changes, we could end up with the CRTC
listening for the wrong error or vsync irqs. Generally this problem
would correct itself relatively quickly, since we update the global
irqmask after dispatching irqs, but to be sure let the CRTC trigger
update_irq().
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/mdp/mdp_kms.c')
-rw-r--r-- | drivers/gpu/drm/msm/mdp/mdp_kms.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/mdp/mdp_kms.c b/drivers/gpu/drm/msm/mdp/mdp_kms.c index 03455b64a245..2a731722d840 100644 --- a/drivers/gpu/drm/msm/mdp/mdp_kms.c +++ b/drivers/gpu/drm/msm/mdp/mdp_kms.c @@ -42,7 +42,10 @@ static void update_irq(struct mdp_kms *mdp_kms) mdp_kms->funcs->set_irqmask(mdp_kms, irqmask); } -static void update_irq_unlocked(struct mdp_kms *mdp_kms) +/* if an mdp_irq's irqmask has changed, such as when mdp5 crtc<->encoder + * link changes, this must be called to figure out the new global irqmask + */ +void mdp_irq_update(struct mdp_kms *mdp_kms) { unsigned long flags; spin_lock_irqsave(&list_lock, flags); @@ -122,7 +125,7 @@ void mdp_irq_register(struct mdp_kms *mdp_kms, struct mdp_irq *irq) spin_unlock_irqrestore(&list_lock, flags); if (needs_update) - update_irq_unlocked(mdp_kms); + mdp_irq_update(mdp_kms); } void mdp_irq_unregister(struct mdp_kms *mdp_kms, struct mdp_irq *irq) @@ -141,5 +144,5 @@ void mdp_irq_unregister(struct mdp_kms *mdp_kms, struct mdp_irq *irq) spin_unlock_irqrestore(&list_lock, flags); if (needs_update) - update_irq_unlocked(mdp_kms); + mdp_irq_update(mdp_kms); } |