[PATCH RFC 106/111] staging: etnaviv: properly prefix all prime functions to etnaviv
Christian Gmeiner
christian.gmeiner at gmail.com
Tue Apr 7 00:35:41 PDT 2015
Hi Lucas
2015-04-02 17:30 GMT+02:00 Lucas Stach <l.stach at pengutronix.de>:
> This is a simple rename without functional changes.
>
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> ---
> drivers/staging/etnaviv/etnaviv_drv.c | 10 +++++-----
> drivers/staging/etnaviv/etnaviv_drv.h | 12 ++++++------
> drivers/staging/etnaviv/etnaviv_gem.c | 2 +-
> drivers/staging/etnaviv/etnaviv_gem_prime.c | 17 ++++++++---------
> 4 files changed, 20 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/staging/etnaviv/etnaviv_drv.c b/drivers/staging/etnaviv/etnaviv_drv.c
> index d01af1290bb2..5045dee1932d 100644
> --- a/drivers/staging/etnaviv/etnaviv_drv.c
> +++ b/drivers/staging/etnaviv/etnaviv_drv.c
> @@ -540,12 +540,12 @@ static struct drm_driver etnaviv_drm_driver = {
> .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
> .gem_prime_export = drm_gem_prime_export,
> .gem_prime_import = drm_gem_prime_import,
> - .gem_prime_pin = msm_gem_prime_pin,
> - .gem_prime_unpin = msm_gem_prime_unpin,
> - .gem_prime_get_sg_table = msm_gem_prime_get_sg_table,
> + .gem_prime_pin = etnaviv_gem_prime_pin,
> + .gem_prime_unpin = etnaviv_gem_prime_unpin,
> + .gem_prime_get_sg_table = etnaviv_gem_prime_get_sg_table,
> .gem_prime_import_sg_table = etnaviv_gem_prime_import_sg_table,
> - .gem_prime_vmap = msm_gem_prime_vmap,
> - .gem_prime_vunmap = msm_gem_prime_vunmap,
> + .gem_prime_vmap = etnaviv_gem_prime_vmap,
> + .gem_prime_vunmap = etnaviv_gem_prime_vunmap,
> #ifdef CONFIG_DEBUG_FS
> .debugfs_init = etnaviv_debugfs_init,
> .debugfs_cleanup = etnaviv_debugfs_cleanup,
> diff --git a/drivers/staging/etnaviv/etnaviv_drv.h b/drivers/staging/etnaviv/etnaviv_drv.h
> index 8d835a5e2e2a..c4892badb33b 100644
> --- a/drivers/staging/etnaviv/etnaviv_drv.h
> +++ b/drivers/staging/etnaviv/etnaviv_drv.h
> @@ -80,15 +80,15 @@ int etnaviv_gem_get_iova_locked(struct etnaviv_gpu *gpu,
> int etnaviv_gem_get_iova(struct etnaviv_gpu *gpu, struct drm_gem_object *obj,
> int id, uint32_t *iova);
> void etnaviv_gem_put_iova(struct drm_gem_object *obj);
> -struct sg_table *msm_gem_prime_get_sg_table(struct drm_gem_object *obj);
> -void *msm_gem_prime_vmap(struct drm_gem_object *obj);
> -void msm_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
> +struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj);
> +void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj);
> +void etnaviv_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
> struct drm_gem_object *etnaviv_gem_prime_import_sg_table(struct drm_device *dev,
> struct dma_buf_attachment *attach, struct sg_table *sg);
> -int msm_gem_prime_pin(struct drm_gem_object *obj);
> -void msm_gem_prime_unpin(struct drm_gem_object *obj);
> +int etnaviv_gem_prime_pin(struct drm_gem_object *obj);
> +void etnaviv_gem_prime_unpin(struct drm_gem_object *obj);
> void *etnaviv_gem_vaddr_locked(struct drm_gem_object *obj);
> -void *msm_gem_vaddr(struct drm_gem_object *obj);
> +void *etnaviv_gem_vaddr(struct drm_gem_object *obj);
> dma_addr_t etnaviv_gem_paddr_locked(struct drm_gem_object *obj);
> void etnaviv_gem_move_to_active(struct drm_gem_object *obj,
> struct etnaviv_gpu *gpu, uint32_t access, uint32_t fence);
> diff --git a/drivers/staging/etnaviv/etnaviv_gem.c b/drivers/staging/etnaviv/etnaviv_gem.c
> index e396ee90bc5e..dd223b5e230c 100644
> --- a/drivers/staging/etnaviv/etnaviv_gem.c
> +++ b/drivers/staging/etnaviv/etnaviv_gem.c
> @@ -387,7 +387,7 @@ void *etnaviv_gem_vaddr_locked(struct drm_gem_object *obj)
> return etnaviv_obj->vaddr;
> }
>
> -void *msm_gem_vaddr(struct drm_gem_object *obj)
> +void *etnaviv_gem_vaddr(struct drm_gem_object *obj)
> {
> void *ret;
>
> diff --git a/drivers/staging/etnaviv/etnaviv_gem_prime.c b/drivers/staging/etnaviv/etnaviv_gem_prime.c
> index d15f4b60fa47..a47fbbddb9f6 100644
> --- a/drivers/staging/etnaviv/etnaviv_gem_prime.c
> +++ b/drivers/staging/etnaviv/etnaviv_gem_prime.c
> @@ -1,6 +1,5 @@
> /*
> - * Copyright (C) 2013 Red Hat
> - * Author: Rob Clark <robdclark at gmail.com>
> + * Copyright (C) 2015 Etnaviv Project
> *
> * This program is free software; you can redistribute it and/or modify it
> * under the terms of the GNU General Public License version 2 as published by
> @@ -20,7 +19,7 @@
> #include "etnaviv_gem.h"
>
>
> -struct sg_table *msm_gem_prime_get_sg_table(struct drm_gem_object *obj)
> +struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj)
> {
> struct etnaviv_gem_object *etnaviv_obj = to_etnaviv_bo(obj);
>
> @@ -29,17 +28,17 @@ struct sg_table *msm_gem_prime_get_sg_table(struct drm_gem_object *obj)
> return etnaviv_obj->sgt;
> }
>
> -void *msm_gem_prime_vmap(struct drm_gem_object *obj)
> +void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj)
> {
> - return msm_gem_vaddr(obj);
> + return etnaviv_gem_vaddr(obj);
> }
>
> -void msm_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
> +void etnaviv_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
> {
> - /* TODO msm_gem_vunmap() */
> + /* TODO etnaviv_gem_vunmap() */
> }
>
> -int msm_gem_prime_pin(struct drm_gem_object *obj)
> +int etnaviv_gem_prime_pin(struct drm_gem_object *obj)
> {
> if (!obj->import_attach) {
> struct drm_device *dev = obj->dev;
> @@ -51,7 +50,7 @@ int msm_gem_prime_pin(struct drm_gem_object *obj)
> return 0;
> }
>
> -void msm_gem_prime_unpin(struct drm_gem_object *obj)
> +void etnaviv_gem_prime_unpin(struct drm_gem_object *obj)
> {
> if (!obj->import_attach) {
> struct drm_device *dev = obj->dev;
> --
> 2.1.4
>
This change looks also very similar to this one:
https://github.com/austriancoder/linux/commit/6addb5f0a98e8670b703de787cc75b136ec4df6e
greets
--
Christian Gmeiner, MSc
https://soundcloud.com/christian-gmeiner
More information about the dri-devel
mailing list