diff --git a/tests/test-device-manager.cpp b/tests/test-device-manager.cpp
index d0eaa99..fb44b2e 100644
--- a/tests/test-device-manager.cpp
+++ b/tests/test-device-manager.cpp
@@ -55,6 +55,7 @@
         , _interval (1)
         , _frame_count (0)
         , _frame_save (0)
+        , _enable_display (false)
     {
 #if HAVE_LIBDRM
         _display = DrmDisplay::instance();
@@ -75,6 +76,10 @@
         _frame_save = frame_save;
     }
 
+    void enable_display(bool value) {
+        _enable_display = value;
+    }
+
 protected:
     virtual void handle_message (SmartPtr<XCamMessage> &msg);
     virtual void handle_buffer (SmartPtr<VideoBuffer> &buf);
@@ -91,6 +96,7 @@
     uint32_t   _frame_count;
     uint32_t   _frame_save;
     SmartPtr<DrmDisplay> _display;
+    bool       _enable_display;
 };
 
 void
@@ -102,7 +108,10 @@
 void
 MainDeviceManager::handle_buffer (SmartPtr<VideoBuffer> &buf)
 {
-    display_buf (buf);
+    FPS_CALCULATION (fps_buf, 30);
+
+    if (_enable_display)
+        display_buf (buf);
 
     if (!_save_file)
         return ;
@@ -324,6 +333,9 @@
         }
     }
 
+    if (need_display)
+        device_manager->enable_display (true);
+
     if (!device.ptr ())  {
         if (capture_mode == V4L2_CAPTURE_MODE_STILL)
             device = new AtomispDevice (CAPTURE_DEVICE_STILL);
diff --git a/tests/test-poll-thread.cpp b/tests/test-poll-thread.cpp
index 808c592..98baf3f 100644
--- a/tests/test-poll-thread.cpp
+++ b/tests/test-poll-thread.cpp
@@ -123,8 +123,8 @@
     //             );
 
 #if HAVE_LIBDRM
-    if (!_drm_dev->has_frame_buffer (base))
-        _drm_dev->render_setup_frame_buffer (base);
+    //if (!_drm_dev->has_frame_buffer (base))
+    _drm_dev->render_setup_frame_buffer (base);
 
     _drm_dev->render_buffer (base);
 #endif
diff --git a/tests/test_common.h b/tests/test_common.h
index 392bac2..8d7dc03 100644
--- a/tests/test_common.h
+++ b/tests/test_common.h
@@ -46,6 +46,34 @@
 #define DEFAULT_CPF_FILE       "/etc/atomisp/imx185.cpf"
 #define DEFAULT_SAVE_FILE_NAME "capture_buffer"
 
+#define FPS_CALCULATION(objname, count)                     \
+    do{                                              \
+        static uint32_t num_frame = 0;                  \
+        static struct timeval last_sys_time;         \
+        static struct timeval first_sys_time;        \
+        static bool b_last_sys_time_init = false;     \
+        if (!b_last_sys_time_init) {                 \
+          gettimeofday (&last_sys_time, NULL);       \
+          gettimeofday (&first_sys_time, NULL);      \
+          b_last_sys_time_init = true;               \
+        } else {                                     \
+          if ((num_frame%count)==0) {                   \
+            double total, current;                   \
+            struct timeval cur_sys_time;             \
+            gettimeofday (&cur_sys_time, NULL);      \
+            total = (cur_sys_time.tv_sec - first_sys_time.tv_sec)*1.0f +       \
+                   (cur_sys_time.tv_usec - first_sys_time.tv_usec)/1000000.0f; \
+            current = (cur_sys_time.tv_sec - last_sys_time.tv_sec)*1.0f +      \
+                    (cur_sys_time.tv_usec - last_sys_time.tv_usec)/1000000.0f; \
+            printf("%s Current fps: %.2f, Total avg fps: %.2f\n",              \
+                    #objname, ((float)(count))/current, (float)num_frame/total);   \
+            last_sys_time = cur_sys_time;            \
+          }                                          \
+        }                                            \
+        ++num_frame;                                 \
+    }while(0)
+
+
 #define PROFILING_START(name) \
     static unsigned int name##_times = 0;                   \
     static struct timeval name##_start_time;         \
@@ -59,7 +87,7 @@
     name##_sum_time += (name##_end_time.tv_sec - name##_start_time.tv_sec)*1000.0f +  \
                    (name##_end_time.tv_usec - name##_start_time.tv_usec)/1000.0f;      \
     if (name##_times >= times_of_print) {                  \
-        printf ("profiling %s, fps:%d duration:%.2fms\n", #name, name##_sum_time/name##_times); \
+        printf ("profiling %s, fps:%.2f duration:%.2fms\n", #name, (name##_times*1000.0f/name##_sum_time), name##_sum_time/name##_times); \
         name##_times = 0;                   \
         name##_sum_time = 0.0;       \
     }
