* [PATCH] drm/stm: check pitch and size calculations even if !CONFIG_MMU
@ 2018-01-30 15:24 Benjamin Gaignard
2018-01-30 20:02 ` Philippe CORNU
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Gaignard @ 2018-01-30 15:24 UTC (permalink / raw)
To: yannick.fertre, philippe.cornu, vincent.abriou, laurent.pinchart
Cc: airlied, dri-devel, linux-kernel, Benjamin Gaignard
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/stm: check pitch and size calculations even if !CONFIG_MMU
2018-01-30 15:24 [PATCH] drm/stm: check pitch and size calculations even if !CONFIG_MMU Benjamin Gaignard
@ 2018-01-30 20:02 ` Philippe CORNU
0 siblings, 0 replies; 2+ messages in thread
From: Philippe CORNU @ 2018-01-30 20:02 UTC (permalink / raw)
To: Benjamin Gaignard, Yannick FERTRE, Vincent ABRIOU, laurent.pinchart
Cc: airlied, linux-kernel, dri-devel
Hi Benjamin,
Working on a coming patch (based on the new has_alpha field in fourcc),
I realized that in particular cases (2 layers + "odd" layer sizes)
memory transfers on MCU are greatly improved too if drm buffers are
aligned on 128 bytes : )
So I suggest to cancel this patch.
Then you can post a new one removing ifdef CONFIG_MMU endif, or I can do
it, it is up to you.
Many thanks for your support,
Philippe :-)
On 01/30/2018 04:24 PM, Benjamin Gaignard wrote:
> 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);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-30 20:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 15:24 [PATCH] drm/stm: check pitch and size calculations even if !CONFIG_MMU Benjamin Gaignard
2018-01-30 20:02 ` Philippe CORNU
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).