summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sti/sti_compositor.c
diff options
context:
space:
mode:
authorFabien Dessenne <fabien.dessenne@st.com>2016-09-06 09:42:13 +0200
committerVincent Abriou <vincent.abriou@st.com>2016-09-20 11:32:06 +0200
commitae2178503d4237047db4afb5888aa7c8e8b820fb (patch)
treeccfab4cbd243f96d4ba28642bcbe8e28b11c0866 /drivers/gpu/drm/sti/sti_compositor.c
parent5552aad35d439ad96ae55f0e3db25b6268170259 (diff)
drm/sti: use different notifier_block for each pipe
Each pipe shall have its own notifier block to manage the vblank event. This fixes issues where a client registered on given pipe is later abusively notified of events on the other pipe. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
Diffstat (limited to 'drivers/gpu/drm/sti/sti_compositor.c')
-rw-r--r--drivers/gpu/drm/sti/sti_compositor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
index a8441ae2623a..f5cc5a0d89a3 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -201,6 +201,7 @@ static int sti_compositor_probe(struct platform_device *pdev)
struct device_node *vtg_np;
struct sti_compositor *compo;
struct resource *res;
+ unsigned int i;
compo = devm_kzalloc(dev, sizeof(*compo), GFP_KERNEL);
if (!compo) {
@@ -208,7 +209,8 @@ static int sti_compositor_probe(struct platform_device *pdev)
return -ENOMEM;
}
compo->dev = dev;
- compo->vtg_vblank_nb.notifier_call = sti_crtc_vblank_cb;
+ for (i = 0; i < STI_MAX_MIXER; i++)
+ compo->vtg_vblank_nb[i].notifier_call = sti_crtc_vblank_cb;
/* populate data structure depending on compatibility */
BUG_ON(!of_match_node(compositor_of_match, np)->data);