Skip to content

Commit

Permalink
drm/gpu: Add comment for memory barrier
Browse files Browse the repository at this point in the history
-Add comment for memory barrier
-Issue found using checkpatch.pl

Signed-off-by: Bhanusree <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
Bhanusree-Pola authored and danvet committed Oct 24, 2019
1 parent 2ec35bd commit 606be04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/drm_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 606be04

Please sign in to comment.