All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/gpu: Add comment for memory barrier
@ 2019-10-24  4:28 Bhanusree
  2019-10-24 12:33 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Bhanusree @ 2019-10-24  4:28 UTC (permalink / raw)
  To: dri-devel; +Cc: airlied, Bhanusree, sean

-Add comment for memory barrier
-Issue found using checkpatch.pl

Signed-off-by: Bhanusree <bhanusreemahesh@gmail.com>
---

v2:modified memory barrier comments appropriately

 drivers/gpu/drm/drm_cache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index 3bd76e9..e574261 100644
--- a/drivers/gpu/drm/drm_cache.c
+++ b/drivers/gpu/drm/drm_cache.c
@@ -62,10 +62,10 @@ static void drm_cache_flush_clflush(struct page *pages[],
 {
 	unsigned long i;
 
-	mb();
+	mb(); /*Full memory barrier used before so that CLFLUSH is ordered*/
 	for (i = 0; i < num_pages; i++)
 		drm_clflush_page(*pages++);
-	mb();
+	mb(); /*Also used after CLFLUSH so that all cache is flushed*/
 }
 #endif
 
-- 
2.7.4

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

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

* Re: [PATCH v2] drm/gpu: Add comment for memory barrier
  2019-10-24  4:28 [PATCH v2] drm/gpu: Add comment for memory barrier Bhanusree
@ 2019-10-24 12:33 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2019-10-24 12:33 UTC (permalink / raw)
  To: Bhanusree; +Cc: airlied, dri-devel, sean

On Thu, Oct 24, 2019 at 09:58:33AM +0530, Bhanusree wrote:
> -Add comment for memory barrier
> -Issue found using checkpatch.pl
> 
> Signed-off-by: Bhanusree <bhanusreemahesh@gmail.com>
> ---
> 
> v2:modified memory barrier comments appropriately

Applied, thanks.
-Daniel

> 
>  drivers/gpu/drm/drm_cache.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
> index 3bd76e9..e574261 100644
> --- a/drivers/gpu/drm/drm_cache.c
> +++ b/drivers/gpu/drm/drm_cache.c
> @@ -62,10 +62,10 @@ static void drm_cache_flush_clflush(struct page *pages[],
>  {
>  	unsigned long i;
>  
> -	mb();
> +	mb(); /*Full memory barrier used before so that CLFLUSH is ordered*/
>  	for (i = 0; i < num_pages; i++)
>  		drm_clflush_page(*pages++);
> -	mb();
> +	mb(); /*Also used after CLFLUSH so that all cache is flushed*/
>  }
>  #endif
>  
> -- 
> 2.7.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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:[~2019-10-24 12:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24  4:28 [PATCH v2] drm/gpu: Add comment for memory barrier Bhanusree
2019-10-24 12:33 ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.