gpu: use DEBUG macro for trace_printk [1/1]
authorJiyu Yang <jiyu.yang@amlogic.com>
Fri, 28 Sep 2018 05:55:38 +0000 (13:55 +0800)
committerJiyu Yang <jiyu.yang@amlogic.com>
Tue, 23 Oct 2018 08:27:46 +0000 (01:27 -0700)
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 <Jiyu.Yang@amlogic.com>
mali/linux/mali_internal_sync.c
utgard/platform/meson_bu/mali_clock.c

index a951cef26b344f946d81d7542ed55a387d95322a..c6625189d407e25af2e1efcdc0f540c040da6dbe 100644 (file)
@@ -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
index b208f3d1a37f64f6599b3fee6f4bbf0a9c4d862e..e99bee4c3792ad699ac082dbc7416d90c2e17e16 100644 (file)
@@ -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;