All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/lima: Remove unused lima_vm_print()
@ 2021-08-20  2:19 Cai Huoqing
  2021-08-23  1:05 ` Qiang Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Cai Huoqing @ 2021-08-20  2:19 UTC (permalink / raw)
  To: yuq825, airlied, daniel; +Cc: dri-devel, lima, Cai Huoqing

lima_vm_print() isn't used, so remove it

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/gpu/drm/lima/lima_vm.c | 29 -----------------------------
 drivers/gpu/drm/lima/lima_vm.h |  1 -
 2 files changed, 30 deletions(-)

diff --git a/drivers/gpu/drm/lima/lima_vm.c b/drivers/gpu/drm/lima/lima_vm.c
index 2b2739adc7f5..b3426c5c987f 100644
--- a/drivers/gpu/drm/lima/lima_vm.c
+++ b/drivers/gpu/drm/lima/lima_vm.c
@@ -251,35 +251,6 @@ void lima_vm_release(struct kref *kref)
 	kfree(vm);
 }
 
-void lima_vm_print(struct lima_vm *vm)
-{
-	int i, j, k;
-	u32 *pd, *pt;
-
-	if (!vm->pd.cpu)
-		return;
-
-	pd = vm->pd.cpu;
-	for (i = 0; i < LIMA_VM_NUM_BT; i++) {
-		if (!vm->bts[i].cpu)
-			continue;
-
-		pt = vm->bts[i].cpu;
-		for (j = 0; j < LIMA_VM_NUM_PT_PER_BT; j++) {
-			int idx = (i << LIMA_VM_NUM_PT_PER_BT_SHIFT) + j;
-
-			printk(KERN_INFO "lima vm pd %03x:%08x\n", idx, pd[idx]);
-
-			for (k = 0; k < LIMA_PAGE_ENT_NUM; k++) {
-				u32 pte = *pt++;
-
-				if (pte)
-					printk(KERN_INFO "  pt %03x:%08x\n", k, pte);
-			}
-		}
-	}
-}
-
 int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff)
 {
 	struct lima_bo_va *bo_va;
diff --git a/drivers/gpu/drm/lima/lima_vm.h b/drivers/gpu/drm/lima/lima_vm.h
index 3a7c74822d8b..291ec9a0a1c4 100644
--- a/drivers/gpu/drm/lima/lima_vm.h
+++ b/drivers/gpu/drm/lima/lima_vm.h
@@ -58,7 +58,6 @@ static inline void lima_vm_put(struct lima_vm *vm)
 		kref_put(&vm->refcount, lima_vm_release);
 }
 
-void lima_vm_print(struct lima_vm *vm);
 int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff);
 
 #endif
-- 
2.25.1


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

* Re: [PATCH] drm/lima: Remove unused lima_vm_print()
  2021-08-20  2:19 [PATCH] drm/lima: Remove unused lima_vm_print() Cai Huoqing
@ 2021-08-23  1:05 ` Qiang Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Qiang Yu @ 2021-08-23  1:05 UTC (permalink / raw)
  To: Cai Huoqing; +Cc: David Airlie, Daniel Vetter, dri-devel, lima

This function is kept for debug usage.

On Fri, Aug 20, 2021 at 10:19 AM Cai Huoqing <caihuoqing@baidu.com> wrote:
>
> lima_vm_print() isn't used, so remove it
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>  drivers/gpu/drm/lima/lima_vm.c | 29 -----------------------------
>  drivers/gpu/drm/lima/lima_vm.h |  1 -
>  2 files changed, 30 deletions(-)
>
> diff --git a/drivers/gpu/drm/lima/lima_vm.c b/drivers/gpu/drm/lima/lima_vm.c
> index 2b2739adc7f5..b3426c5c987f 100644
> --- a/drivers/gpu/drm/lima/lima_vm.c
> +++ b/drivers/gpu/drm/lima/lima_vm.c
> @@ -251,35 +251,6 @@ void lima_vm_release(struct kref *kref)
>         kfree(vm);
>  }
>
> -void lima_vm_print(struct lima_vm *vm)
> -{
> -       int i, j, k;
> -       u32 *pd, *pt;
> -
> -       if (!vm->pd.cpu)
> -               return;
> -
> -       pd = vm->pd.cpu;
> -       for (i = 0; i < LIMA_VM_NUM_BT; i++) {
> -               if (!vm->bts[i].cpu)
> -                       continue;
> -
> -               pt = vm->bts[i].cpu;
> -               for (j = 0; j < LIMA_VM_NUM_PT_PER_BT; j++) {
> -                       int idx = (i << LIMA_VM_NUM_PT_PER_BT_SHIFT) + j;
> -
> -                       printk(KERN_INFO "lima vm pd %03x:%08x\n", idx, pd[idx]);
> -
> -                       for (k = 0; k < LIMA_PAGE_ENT_NUM; k++) {
> -                               u32 pte = *pt++;
> -
> -                               if (pte)
> -                                       printk(KERN_INFO "  pt %03x:%08x\n", k, pte);
> -                       }
> -               }
> -       }
> -}
> -
>  int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff)
>  {
>         struct lima_bo_va *bo_va;
> diff --git a/drivers/gpu/drm/lima/lima_vm.h b/drivers/gpu/drm/lima/lima_vm.h
> index 3a7c74822d8b..291ec9a0a1c4 100644
> --- a/drivers/gpu/drm/lima/lima_vm.h
> +++ b/drivers/gpu/drm/lima/lima_vm.h
> @@ -58,7 +58,6 @@ static inline void lima_vm_put(struct lima_vm *vm)
>                 kref_put(&vm->refcount, lima_vm_release);
>  }
>
> -void lima_vm_print(struct lima_vm *vm);
>  int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff);
>
>  #endif
> --
> 2.25.1
>

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

end of thread, other threads:[~2021-08-23  1:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  2:19 [PATCH] drm/lima: Remove unused lima_vm_print() Cai Huoqing
2021-08-23  1:05 ` Qiang Yu

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.