[PATCH 1/2] drm: Document drm_cache interface

Daniel Vetter daniel at ffwll.ch
Wed Jan 4 09:01:37 UTC 2017


On Mon, Jan 02, 2017 at 03:17:05PM -0200, Gabriel Krisman Bertazi wrote:
> Signed-off-by: Gabriel Krisman Bertazi <krisman at collabora.co.uk>
> ---
>  drivers/gpu/drm/drm_cache.c | 23 +++++++++++++++++++++++

When adding docs, please also add a kernel-doc stanza (good place would be
a new chapter in Documentation/gpu/drm-mm.rst I think) to pull it all in.
Otherwise it's not built, which means not checked by 0day, which means
will get out of data. Also, you can't find it when browsing the html docs
;-)

Otherwise looks pretty, thanks for the patch. One nit below.
-Daniel

>  1 file changed, 23 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
> index a7916e5f8864..b52e16e2b8ef 100644
> --- a/drivers/gpu/drm/drm_cache.c
> +++ b/drivers/gpu/drm/drm_cache.c
> @@ -67,6 +67,14 @@ static void drm_cache_flush_clflush(struct page *pages[],
>  }
>  #endif
>  
> +/**
> + * drm_clflush_pages - Flush dcache lines of a set of pages
> + * @pages - struct page array
> + * @num_pages - Number of pages in the array
> + *
> + * Flush every data cache line entry that points to an address belonging
> + * to a page in the array.
> + */
>  void
>  drm_clflush_pages(struct page *pages[], unsigned long num_pages)
>  {
> @@ -101,6 +109,13 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages)
>  }
>  EXPORT_SYMBOL(drm_clflush_pages);
>  
> +/**
> + * drm_clflush_sg - Flush dcache lines pointing to a scather-gather
> + * @st - struct sg_table
> + *
> + * Flush every data cache line entry that points to an address in the
> + * sg.
> + */
>  void
>  drm_clflush_sg(struct sg_table *st)
>  {
> @@ -125,6 +140,14 @@ drm_clflush_sg(struct sg_table *st)
>  }
>  EXPORT_SYMBOL(drm_clflush_sg);
>  
> +/**
> + * drm_clflush_virt_range - Flush dcache lines of a region
> + * @addr - Initial memory address

s/memory/kernel memory/ is clearer I think.

> + * @length - Region size
> + *
> + * Flush every data cache line entry that points to an address in the
> + * region requested.
> + */
>  void
>  drm_clflush_virt_range(void *addr, unsigned long length)
>  {
> -- 
> 2.11.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list