[Spice-devel] [PATCH] display: add a few debug prints (level=3)

Alon Levy alevy at redhat.com
Wed Jul 6 05:34:52 PDT 2011


---
 display/driver.c |    1 +
 display/res.c    |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/display/driver.c b/display/driver.c
index 4ff0d43..3d15295 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -1269,6 +1269,7 @@ HBITMAP APIENTRY DrvCreateDeviceBitmap(DHPDEV dhpdev, SIZEL size, ULONG format)
     if (!surface_id) {
         goto out_error;
     }
+    DEBUG_PRINT((pdev, 3, "%s: %p: %d\n", __FUNCTION__, pdev, surface_id));
 
     hbitmap = CreateDeviceBitmap(pdev, size, pdev->bitmap_format, &phys_mem, &base_mem, surface_id,
                                  DEVICE_BITMAP_ALLOCATION_TYPE_VRAM);
diff --git a/display/res.c b/display/res.c
index ea3f7f8..67c4903 100644
--- a/display/res.c
+++ b/display/res.c
@@ -607,6 +607,7 @@ void InitResources(PDev *pdev)
     UINT32 id;
     DevRes **new_global_res;
 
+    DEBUG_PRINT((pdev, 3, "%s: entry\n", __FUNCTION__));
     RtlZeroMemory(pdev->update_trace_items, sizeof(pdev->update_trace_items));
     RingInit(&pdev->update_trace);
     for (i = 0; i < NUM_UPDATE_TRACE_ITEMS; i++) {
@@ -634,10 +635,12 @@ void InitResources(PDev *pdev)
     if (global_res[id] == NULL) {
         global_res[id] = EngAllocMem(FL_ZERO_MEMORY, sizeof(DevRes), ALLOC_TAG);
         pdev->Res = global_res[id];
+        DEBUG_PRINT((pdev, 3, "%s: calling InitRes (id == %d)\n", __FUNCTION__, id));
         InitRes(pdev);
     } else {
         pdev->Res = global_res[id];
     }
+    DEBUG_PRINT((pdev, 3, "%s: exit\n", __FUNCTION__));
     EngReleaseSemaphore(res_sem);
 }
 
-- 
1.7.5.4



More information about the Spice-devel mailing list