Commit 00b517e5 authored by Fabien Dessenne's avatar Fabien Dessenne Committed by Vincent Abriou

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: default avatarFabien Dessenne <fabien.dessenne@st.com>
Acked-by: default avatarVincent Abriou <vincent.abriou@st.com>
parent 9dd5942b
...@@ -460,6 +460,7 @@ static void sti_gdp_disable(struct sti_gdp *gdp) ...@@ -460,6 +460,7 @@ static void sti_gdp_disable(struct sti_gdp *gdp)
clk_disable_unprepare(gdp->clk_pix); clk_disable_unprepare(gdp->clk_pix);
gdp->plane.status = STI_PLANE_DISABLED; gdp->plane.status = STI_PLANE_DISABLED;
gdp->vtg = NULL;
} }
/** /**
...@@ -611,7 +612,6 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane, ...@@ -611,7 +612,6 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane,
struct drm_crtc *crtc = state->crtc; struct drm_crtc *crtc = state->crtc;
struct sti_compositor *compo = dev_get_drvdata(gdp->dev); struct sti_compositor *compo = dev_get_drvdata(gdp->dev);
struct drm_framebuffer *fb = state->fb; struct drm_framebuffer *fb = state->fb;
bool first_prepare = plane->status == STI_PLANE_DISABLED ? true : false;
struct drm_crtc_state *crtc_state; struct drm_crtc_state *crtc_state;
struct sti_mixer *mixer; struct sti_mixer *mixer;
struct drm_display_mode *mode; struct drm_display_mode *mode;
...@@ -648,7 +648,7 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane, ...@@ -648,7 +648,7 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane,
return -EINVAL; return -EINVAL;
} }
if (first_prepare) { if (!gdp->vtg) {
/* Register gdp callback */ /* Register gdp callback */
gdp->vtg = mixer->id == STI_MIXER_MAIN ? gdp->vtg = mixer->id == STI_MIXER_MAIN ?
compo->vtg_main : compo->vtg_aux; compo->vtg_main : compo->vtg_aux;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment