drm/stm: ltdc: limit number of layer to avoid memory overflow
authorYannick Fertré <yannick.fertre@st.com>
Wed, 3 Apr 2019 09:20:16 +0000 (11:20 +0200)
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>
Wed, 24 Apr 2019 11:52:06 +0000 (13:52 +0200)
commit77756ad6d08fb3f276d357be4c318f871dab8734
treede84d976d1f6d8b398d73bc486ba1deb4da317ef
parent8ceb8568d6e8d53dc000a9eeacd47c8f298c38f0
drm/stm: ltdc: limit number of layer to avoid memory overflow

If the number of layer is greater than LTDC_MAX_LAYER, we can have
memory overflow when reading plane_fpsi[].

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1554283216-2700-1-git-send-email-yannick.fertre@st.com
drivers/gpu/drm/stm/ltdc.c