From 43a752d52d86c5b264e96201cd5a79675de8f265 Mon Sep 17 00:00:00 2001 From: Jiyu Yang Date: Fri, 28 Sep 2018 13:55:38 +0800 Subject: [PATCH] gpu: use DEBUG macro for trace_printk [1/1] PD#SWPL-313 Problem: use trace print in release driver Solution: remove the trace_printk Verify: run on the p321, there is no trace_printk debug info. Change-Id: I9b6f4a5e9df41cf0dd3d4791e87d9b01ed4b43e2 Signed-off-by: Jiyu Yang --- mali/linux/mali_internal_sync.c | 8 ++++++++ utgard/platform/meson_bu/mali_clock.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mali/linux/mali_internal_sync.c b/mali/linux/mali_internal_sync.c index a951cef..c662518 100644 --- a/mali/linux/mali_internal_sync.c +++ b/mali/linux/mali_internal_sync.c @@ -94,8 +94,10 @@ static void mali_internal_fence_check_cb_func(struct dma_fence *fence, struct dm #else ret =sync_fence->fence->ops->signaled(sync_fence->fence); +#ifdef DEBUG if (0 > ret) trace_printk("Mali internal sync:fence signaled? ret=%d, fence 0x%p for sync_fence 0x%p.\n", ret, fence, sync_fence); +#endif if (1 == ret) wake_up_all(&sync_fence->wq); @@ -551,7 +553,9 @@ int mali_internal_sync_fence_wait_async(struct mali_internal_sync_fence *sync_fe err = -1; if (0 > err) { +#ifdef DEBUG trace_printk("Mali, line%d, signal error\n", __LINE__); +#endif return err; } @@ -565,7 +569,9 @@ int mali_internal_sync_fence_wait_async(struct mali_internal_sync_fence *sync_fe #endif if (0 != err) { +#ifdef DEBUG trace_printk("Mali, fence_add_callback error %d\n", err); +#endif if (-ENOENT == err) err = 1; return err; @@ -581,8 +587,10 @@ int mali_internal_sync_fence_wait_async(struct mali_internal_sync_fence *sync_fe __add_wait_queue_tail(&sync_fence->wq, &waiter->work); spin_unlock_irqrestore(&sync_fence->wq.lock, flags); +#ifdef DEBUG if ((1 != err) && (0 != err)) trace_printk("Mali, line%d, signal error\n", __LINE__); +#endif return err; #endif diff --git a/utgard/platform/meson_bu/mali_clock.c b/utgard/platform/meson_bu/mali_clock.c index b208f3d..e99bee4 100644 --- a/utgard/platform/meson_bu/mali_clock.c +++ b/utgard/platform/meson_bu/mali_clock.c @@ -27,7 +27,7 @@ MODULE_PARM_DESC(gpu_dbg_level, "gpu debug level"); #define GPU_CLK_DBG(fmt, arg...) //disable print -//#define _dev_info(...) +#define _dev_info(...) //static DEFINE_SPINLOCK(lock); static mali_plat_info_t* pmali_plat = NULL; -- 2.20.1