diff --git a/drivers/gpu/mediatek/gpu_mali/mali_valhall/mali-r32p1/drivers/gpu/arm/midgard/Kbuild-mtk-custom-env b/drivers/gpu/mediatek/gpu_mali/mali_valhall/mali-r32p1/drivers/gpu/arm/midgard/Kbuild-mtk-custom-env index 36b22719574b..09cc13e920c5 100644 --- a/drivers/gpu/mediatek/gpu_mali/mali_valhall/mali-r32p1/drivers/gpu/arm/midgard/Kbuild-mtk-custom-env +++ b/drivers/gpu/mediatek/gpu_mali/mali_valhall/mali-r32p1/drivers/gpu/arm/midgard/Kbuild-mtk-custom-env @@ -91,4 +91,3 @@ ifeq (, $(findstring $(CONFIG_MTK_PLATFORM), "mt6768" "mt6785")) ccflags-y += -DCONFIG_MTK_GPU_DEBUG ccflags-y += -DCONFIG_MTK_GPU_DEBUG_DFD endif -ccflags-y += -DCONFIG_MTK_GPU_MEM_TRACK \ No newline at end of file diff --git a/drivers/gpu/mediatek/gpu_mali/mali_valhall/mali-r32p1/drivers/gpu/arm/midgard/platform/mtk_platform_common/mtk_platform_common.c b/drivers/gpu/mediatek/gpu_mali/mali_valhall/mali-r32p1/drivers/gpu/arm/midgard/platform/mtk_platform_common/mtk_platform_common.c index cc6f638755db..a31207ce80df 100644 --- a/drivers/gpu/mediatek/gpu_mali/mali_valhall/mali-r32p1/drivers/gpu/arm/midgard/platform/mtk_platform_common/mtk_platform_common.c +++ b/drivers/gpu/mediatek/gpu_mali/mali_valhall/mali-r32p1/drivers/gpu/arm/midgard/platform/mtk_platform_common/mtk_platform_common.c @@ -22,9 +22,6 @@ #include #if IS_ENABLED(CONFIG_PROC_FS) #include -#if IS_ENABLED(CONFIG_MTK_GPU_MEM_TRACK) -#include -#endif #endif static bool mfg_powered; @@ -107,44 +104,6 @@ static int mtk_common_gpu_utilization_show(struct seq_file *m, void *v) } DEFINE_SHOW_ATTRIBUTE(mtk_common_gpu_utilization); -static int mtk_common_gpu_memory_show(struct seq_file *m, void *v) -{ -#if IS_ENABLED(CONFIG_MTK_GPU_MEM_TRACK) - struct list_head *entry; - const struct list_head *kbdev_list; - - kbdev_list = kbase_device_get_list(); - list_for_each(entry, kbdev_list) { - struct kbase_device *kbdev = NULL; - struct kbase_context *kctx; - - kbdev = list_entry(entry, struct kbase_device, entry); - /* output the total memory usage and cap for this device */ - seq_printf(m, "%-16s %10u\n", - kbdev->devname, - atomic_read(&(kbdev->memdev.used_pages))); - mutex_lock(&kbdev->kctx_list_lock); - list_for_each_entry(kctx, &kbdev->kctx_list, kctx_list_link) { - /* output the memory usage and cap for each kctx - * opened on this device - */ - seq_printf(m, " %s-0x%p %10u %10u\n", - "kctx", - kctx, - atomic_read(&(kctx->used_pages)), - kctx->tgid); - } - mutex_unlock(&kbdev->kctx_list_lock); - } - kbase_device_put_list(kbdev_list); -#else - seq_puts(m, "GPU mem_profile doesn't be enabled\n"); -#endif - - return 0; -} -DEFINE_SHOW_ATTRIBUTE(mtk_common_gpu_memory); - void mtk_common_procfs_init(void) { mtk_mali_root = proc_mkdir("mtk_mali", NULL); @@ -153,14 +112,12 @@ void mtk_common_procfs_init(void) return; } proc_create("utilization", 0444, mtk_mali_root, &mtk_common_gpu_utilization_fops); - proc_create("gpu_memory", 0444, mtk_mali_root, &mtk_common_gpu_memory_fops); } void mtk_common_procfs_exit(void) { mtk_mali_root = NULL; remove_proc_entry("utilization", mtk_mali_root); - remove_proc_entry("gpu_memory", mtk_mali_root); remove_proc_entry("mtk_mali", NULL); } #endif