diff options
author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2018-01-31 03:05:08 -0500 |
---|---|---|
committer | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2018-02-23 03:37:12 -0500 |
commit | 879659bb87a87a7a23b190e211d33bdd6763c746 (patch) | |
tree | c3745562ffb73f02b6e05113a1b220f4b79b8b76 | |
parent | fd9b503dec9b533afa49ac105ce65f87419b5528 (diff) |
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: 21f815bf773c ("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
-rw-r--r-- | drivers/gpu/drm/stm/drv.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index 8bc7e8418b8d..9ab00a87f7cc 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c | |||
@@ -35,7 +35,6 @@ static int stm_gem_cma_dumb_create(struct drm_file *file, | |||
35 | struct drm_device *dev, | 35 | struct drm_device *dev, |
36 | struct drm_mode_create_dumb *args) | 36 | struct drm_mode_create_dumb *args) |
37 | { | 37 | { |
38 | #ifdef CONFIG_MMU | ||
39 | unsigned int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); | 38 | unsigned int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); |
40 | 39 | ||
41 | /* | 40 | /* |
@@ -44,7 +43,6 @@ static int stm_gem_cma_dumb_create(struct drm_file *file, | |||
44 | */ | 43 | */ |
45 | args->pitch = roundup(min_pitch, 128); | 44 | args->pitch = roundup(min_pitch, 128); |
46 | args->height = roundup(args->height, 4); | 45 | args->height = roundup(args->height, 4); |
47 | #endif | ||
48 | 46 | ||
49 | return drm_gem_cma_dumb_create_internal(file, dev, args); | 47 | return drm_gem_cma_dumb_create_internal(file, dev, args); |
50 | } | 48 | } |