summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorFabien Dessenne <fabien.dessenne@st.com>2016-09-06 09:42:00 +0200
committerVincent Abriou <vincent.abriou@st.com>2016-09-20 11:32:05 +0200
commit00b517e54f937ae4917ca613e3956e424f7a17cd (patch)
tree9c4ed953d0300f0782d66c7c7b25aa7514d5a1fa /drivers/gpu/drm
parent9dd5942b3195fc94c538d6cf1d26cde8813da80c (diff)
drm/sti: run gdp init sequence only once
Do not rely on plane->status to define whether this is the first update but rather check for gdp->vtg. This avoids multiple and unwanted calls to sti_vtg_register_client() which breaks the kernel scheduler. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/sti/sti_gdp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
index 531cb87c685e..1d5ebe4c51db 100644
--- a/drivers/gpu/drm/sti/sti_gdp.c
+++ b/drivers/gpu/drm/sti/sti_gdp.c
@@ -460,6 +460,7 @@ static void sti_gdp_disable(struct sti_gdp *gdp)
clk_disable_unprepare(gdp->clk_pix);
gdp->plane.status = STI_PLANE_DISABLED;
+ gdp->vtg = NULL;
}
/**
@@ -611,7 +612,6 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane,
struct drm_crtc *crtc = state->crtc;
struct sti_compositor *compo = dev_get_drvdata(gdp->dev);
struct drm_framebuffer *fb = state->fb;
- bool first_prepare = plane->status == STI_PLANE_DISABLED ? true : false;
struct drm_crtc_state *crtc_state;
struct sti_mixer *mixer;
struct drm_display_mode *mode;
@@ -648,7 +648,7 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane,
return -EINVAL;
}
- if (first_prepare) {
+ if (!gdp->vtg) {
/* Register gdp callback */
gdp->vtg = mixer->id == STI_MIXER_MAIN ?
compo->vtg_main : compo->vtg_aux;