Use Android log system in helpers.c.
This code might be loaded by a daemonized process now, so the existing
logging to stderr goes nowhere. It's better to use the Android logger.
Change-Id: I19f088b8f049f07c9c6839038d2971fad1a0e852
Reviewed-on: https://chromium-review.googlesource.com/971360
Commit-Ready: Alistair Strachan <astrachan@google.com>
Tested-by: Alistair Strachan <astrachan@google.com>
Reviewed-by: Alistair Strachan <astrachan@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
diff --git a/vc4.c b/vc4.c
index 7960247..f9e1c13 100644
--- a/vc4.c
+++ b/vc4.c
@@ -48,8 +48,7 @@
ret = drmIoctl(bo->drv->fd, DRM_IOCTL_VC4_CREATE_BO, &bo_create);
if (ret) {
- fprintf(stderr, "drv: DRM_IOCTL_VC4_GEM_CREATE failed (size=%zu)\n",
- bo->total_size);
+ drv_log("DRM_IOCTL_VC4_GEM_CREATE failed (size=%zu)\n", bo->total_size);
return ret;
}
@@ -69,7 +68,7 @@
ret = drmCommandWriteRead(bo->drv->fd, DRM_VC4_MMAP_BO, &bo_map, sizeof(bo_map));
if (ret) {
- fprintf(stderr, "drv: DRM_VC4_MMAP_BO failed\n");
+ drv_log("DRM_VC4_MMAP_BO failed\n");
return MAP_FAILED;
}