Commit c5649ee4 authored by Vincent Abriou's avatar Vincent Abriou

drm/sti: do not set gdp pixel clock rate if mode is not set

Fix a division by 0 case : in some cases, when the GDP plane is being
disabled atomic_check() is called with "mode->clock = 0".
In that case, do not set parent and pixel clock rate.
Signed-off-by: default avatarVincent Abriou <vincent.abriou@st.com>
parent 1b7f1451
......@@ -648,7 +648,7 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane,
}
/* Set gdp clock */
if (gdp->clk_pix) {
if (mode->clock && gdp->clk_pix) {
struct clk *clkp;
int rate = mode->clock * 1000;
int res;
......
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