diff options
author | Kevin Brace <kevinbrace@gmx.com> | 2020-02-11 17:02:45 -0800 |
---|---|---|
committer | Kevin Brace <kevinbrace@gmx.com> | 2020-02-11 17:02:45 -0800 |
commit | 99059ff049211bf4407a40f3d61589967a101aa0 (patch) | |
tree | 7ca4bb12916004aba51cc0426b48ae88b77e3667 /src | |
parent | d9680b6b411c1014968ee0f14e36941e31e5711d (diff) |
Update messages inside drm_bo_alloc()
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/via_memmgr.c | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/via_memmgr.c b/src/via_memmgr.c index 9c574a2..a1dae77 100644 --- a/src/via_memmgr.c +++ b/src/via_memmgr.c @@ -79,8 +79,9 @@ drm_bo_alloc(ScrnInfoPtr pScrn, unsigned int size, unsigned int alignment, int d obj = xnfcalloc(1, sizeof(*obj)); if (!obj) { - DEBUG(ErrorF("Allocation of a buffer object used for memory " - "allocation failed\n")); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Allocation of a buffer object used for " + "memory allocation failed.\n")); goto exit; } @@ -89,10 +90,17 @@ drm_bo_alloc(ScrnInfoPtr pScrn, unsigned int size, unsigned int alignment, int d case TTM_PL_FLAG_VRAM: if (pVia->directRenderingType == DRI_NONE) { if (Success != viaOffScreenLinear(obj, pScrn, size)) { - ErrorF("Linear memory allocation failed\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Linear memory allocation " + "failed.\n")); ret = -ENOMEM; } else - DEBUG(ErrorF("%lu bytes of Linear memory allocated at %lx, handle %lu\n", obj->size, obj->offset, obj->handle)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "%lu bytes of linear memory " + "allocated at 0x%lx, " + "handle 0x%lx.\n", + obj->size, obj->offset, + obj->handle)); #ifdef HAVE_DRI } else if (pVia->directRenderingType == DRI_1) { drm_via_mem_t drm; @@ -110,8 +118,12 @@ drm_bo_alloc(ScrnInfoPtr pScrn, unsigned int size, unsigned int alignment, int d obj->handle = drm.index; obj->domain = domain; obj->size = drm.size; - DEBUG(ErrorF("%lu bytes of DRI memory allocated at %lx, handle %lu\n", - obj->size, obj->offset, obj->handle)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "%lu bytes of DRI memory " + "allocated at 0x%lx, " + "handle 0x%lx.\n", + obj->size, obj->offset, + obj->handle)); } } else if (pVia->directRenderingType == DRI_2) { struct drm_via_gem_object args; @@ -131,8 +143,12 @@ drm_bo_alloc(ScrnInfoPtr pScrn, unsigned int size, unsigned int alignment, int d obj->handle = args.handle; obj->size = args.size; obj->domain = domain; - DEBUG(ErrorF("%lu bytes of DRI2 memory allocated at %lx, handle %lu\n", - obj->size, obj->offset, obj->handle)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "%lu bytes of DRI2 memory " + "allocated at 0x%lx, " + "handle 0x%lx.\n", + obj->size, obj->offset, + obj->handle)); } #endif } @@ -145,7 +161,9 @@ drm_bo_alloc(ScrnInfoPtr pScrn, unsigned int size, unsigned int alignment, int d } if (ret) { - DEBUG(ErrorF("DRM memory allocation failed %d\n", ret)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "DRM memory allocation failed.\n" + "Error Code: %d\n", ret)); free(obj); obj = NULL; goto exit; |