From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: yannick.fertre@st.com, philippe.cornu@st.com,
vincent.abriou@st.com, laurent.pinchart@ideasonboard.com
Cc: airlied@linux.ie, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Benjamin Gaignard <benjamin.gaignard@linaro.org>
Subject: [PATCH] drm/stm: check pitch and size calculations even if !CONFIG_MMU
Date: Tue, 30 Jan 2018 16:24:00 +0100 [thread overview]
Message-ID: <20180130152400.28972-1-benjamin.gaignard@linaro.org> (raw)
In all cases we have to check pitch and size calculations.
Rely on drm_gem_cma_dumb_create for no MMU cases.
Fixes: 21f815bf773c ("drm/stm: drv: Improve data transfers")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
---
drivers/gpu/drm/stm/drv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
index 8bc7e8418b8d..3e0fb5f34b8e 100644
--- a/drivers/gpu/drm/stm/drv.c
+++ b/drivers/gpu/drm/stm/drv.c
@@ -44,9 +44,11 @@ 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);
+#else
+ return drm_gem_cma_dumb_create(file, dev, args);
+#endif
}
DEFINE_DRM_GEM_CMA_FOPS(drv_driver_fops);
--
2.15.0
next reply other threads:[~2018-01-30 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 15:24 Benjamin Gaignard [this message]
2018-01-30 20:02 ` [PATCH] drm/stm: check pitch and size calculations even if !CONFIG_MMU Philippe CORNU
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180130152400.28972-1-benjamin.gaignard@linaro.org \
--to=benjamin.gaignard@linaro.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=philippe.cornu@st.com \
--cc=vincent.abriou@st.com \
--cc=yannick.fertre@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).