Commit 879659bb authored by Benjamin Gaignard's avatar Benjamin Gaignard

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: 21f815bf ("drm/stm: drv: Improve data transfers")
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: default avatarPhilippe Cornu <philippe.cornu@st.com>
Reviewed-by: default avatarPhilippe Cornu <philippe.cornu@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180131080508.14356-1-benjamin.gaignard@linaro.org
parent fd9b503d
...@@ -35,7 +35,6 @@ static int stm_gem_cma_dumb_create(struct drm_file *file, ...@@ -35,7 +35,6 @@ static int stm_gem_cma_dumb_create(struct drm_file *file,
struct drm_device *dev, struct drm_device *dev,
struct drm_mode_create_dumb *args) struct drm_mode_create_dumb *args)
{ {
#ifdef CONFIG_MMU
unsigned int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); 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, ...@@ -44,7 +43,6 @@ static int stm_gem_cma_dumb_create(struct drm_file *file,
*/ */
args->pitch = roundup(min_pitch, 128); args->pitch = roundup(min_pitch, 128);
args->height = roundup(args->height, 4); args->height = roundup(args->height, 4);
#endif
return drm_gem_cma_dumb_create_internal(file, dev, args); return drm_gem_cma_dumb_create_internal(file, dev, args);
} }
......
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