drm/stm: check pitch and size calculations even if !CONFIG_MMU

In all cases we have to check pitch and size calculations to speed up
data transfer.

Fixes: 21f815bf77 ("drm/stm: drv: Improve data transfers")

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Philippe Cornu <philippe.cornu@st.com>
Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180131080508.14356-1-benjamin.gaignard@linaro.org
This commit is contained in:
Benjamin Gaignard 2018-01-31 09:05:08 +01:00
parent fd9b503dec
commit 879659bb87

View File

@ -35,7 +35,6 @@ static int stm_gem_cma_dumb_create(struct drm_file *file,
struct drm_device *dev,
struct drm_mode_create_dumb *args)
{
#ifdef CONFIG_MMU
unsigned int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8);
/*
@ -44,7 +43,6 @@ static int stm_gem_cma_dumb_create(struct drm_file *file,
*/
args->pitch = roundup(min_pitch, 128);
args->height = roundup(args->height, 4);
#endif
return drm_gem_cma_dumb_create_internal(file, dev, args);
}