dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drm/stm: check pitch and size calculations even if !CONFIG_MMU
@ 2018-01-31  8:05 Benjamin Gaignard
  2018-01-31 15:55 ` Philippe CORNU
  2018-02-23  8:33 ` Philippe CORNU
  0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Gaignard @ 2018-01-31  8:05 UTC (permalink / raw)
  To: yannick.fertre, philippe.cornu, vincent.abriou, laurent.pinchart
  Cc: airlied, linux-kernel, dri-devel

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>
---
 drivers/gpu/drm/stm/drv.c | 2 --
 1 file changed, 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,
 				   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);
 }
-- 
2.15.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drm/stm: check pitch and size calculations even if !CONFIG_MMU
  2018-01-31  8:05 [PATCH v2] drm/stm: check pitch and size calculations even if !CONFIG_MMU Benjamin Gaignard
@ 2018-01-31 15:55 ` Philippe CORNU
  2018-02-23  8:33 ` Philippe CORNU
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe CORNU @ 2018-01-31 15:55 UTC (permalink / raw)
  To: Benjamin Gaignard, Yannick FERTRE, Vincent ABRIOU, laurent.pinchart
  Cc: airlied, linux-kernel, dri-devel

Hi Benjamin,
Great, Many thanks,

Tested-by: Philippe Cornu <philippe.cornu@st.com>

Philippe :-)


On 01/31/2018 09:05 AM, Benjamin Gaignard wrote:
> 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>
> ---
>   drivers/gpu/drm/stm/drv.c | 2 --
>   1 file changed, 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,
>   				   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);
>   }
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drm/stm: check pitch and size calculations even if !CONFIG_MMU
  2018-01-31  8:05 [PATCH v2] drm/stm: check pitch and size calculations even if !CONFIG_MMU Benjamin Gaignard
  2018-01-31 15:55 ` Philippe CORNU
@ 2018-02-23  8:33 ` Philippe CORNU
  2018-02-23  9:05   ` Benjamin Gaignard
  1 sibling, 1 reply; 4+ messages in thread
From: Philippe CORNU @ 2018-02-23  8:33 UTC (permalink / raw)
  To: Benjamin Gaignard, Yannick FERTRE, Vincent ABRIOU, laurent.pinchart
  Cc: airlied, linux-kernel, dri-devel

Hi Benjamin,

On 01/31/2018 09:05 AM, Benjamin Gaignard wrote:
> 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>
> ---
>   drivers/gpu/drm/stm/drv.c | 2 --
>   1 file changed, 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,
>   				   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

Reviewed-by: Philippe Cornu <philippe.cornu@st.com>

Many thanks,
Philippe :-)

>   
>   	return drm_gem_cma_dumb_create_internal(file, dev, args);
>   }
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drm/stm: check pitch and size calculations even if !CONFIG_MMU
  2018-02-23  8:33 ` Philippe CORNU
@ 2018-02-23  9:05   ` Benjamin Gaignard
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Gaignard @ 2018-02-23  9:05 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: airlied, linux-kernel, dri-devel, Yannick FERTRE,
	laurent.pinchart, Vincent ABRIOU

2018-02-23 9:33 GMT+01:00 Philippe CORNU <philippe.cornu@st.com>:
> Hi Benjamin,
>
> On 01/31/2018 09:05 AM, Benjamin Gaignard wrote:
>> 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>
>> ---
>>   drivers/gpu/drm/stm/drv.c | 2 --
>>   1 file changed, 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,
>>                                  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
>
> Reviewed-by: Philippe Cornu <philippe.cornu@st.com>

Applied on drm-misc-next.

Regards,
Benjamin

>
> Many thanks,
> Philippe :-)
>
>>
>>       return drm_gem_cma_dumb_create_internal(file, dev, args);
>>   }
>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-23  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31  8:05 [PATCH v2] drm/stm: check pitch and size calculations even if !CONFIG_MMU Benjamin Gaignard
2018-01-31 15:55 ` Philippe CORNU
2018-02-23  8:33 ` Philippe CORNU
2018-02-23  9:05   ` Benjamin Gaignard

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).