summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Johnson <charles.f.johnson@intel.com>2012-07-10 17:51:32 -0700
committerCharles Johnson <charles.f.johnson@intel.com>2012-07-10 17:51:32 -0700
commitb56dc927f1a8797b1b7fe356ae89ce18d42731dd (patch)
tree5d088dc01ea3150c3e18d7ada63b0b3e1362fbf9
parentb65a3f83ccf8d17cea46fe5af1bc348ad5d4467f (diff)
downloadexternal_drm_gralloc-b56dc927f1a8797b1b7fe356ae89ce18d42731dd.zip
external_drm_gralloc-b56dc927f1a8797b1b7fe356ae89ce18d42731dd.tar.gz
external_drm_gralloc-b56dc927f1a8797b1b7fe356ae89ce18d42731dd.tar.bz2
Change all occurances of LOGE to ALOGE, LOGW to ALOGW and LOGI to ALOGI due to change in Jelly Bean.
Signed-off-by: Charles Johnson <charles.f.johnson@intel.com> modified: gralloc.c modified: gralloc_drm.c modified: gralloc_drm_intel.c modified: gralloc_drm_kms.c modified: gralloc_drm_nouveau.c modified: gralloc_drm_pipe.c modified: gralloc_drm_radeon.c Change-Id: Idd9e533eab366d9f9dc199d961891255a66384a2
-rw-r--r--gralloc.c4
-rw-r--r--gralloc_drm.c8
-rw-r--r--gralloc_drm_intel.c22
-rw-r--r--gralloc_drm_kms.c28
-rw-r--r--gralloc_drm_nouveau.c16
-rw-r--r--gralloc_drm_pipe.c16
-rw-r--r--gralloc_drm_radeon.c20
7 files changed, 57 insertions, 57 deletions
diff --git a/gralloc.c b/gralloc.c
index bc55e23..6d55307 100644
--- a/gralloc.c
+++ b/gralloc.c
@@ -200,7 +200,7 @@ static int drm_mod_alloc_gpu0(alloc_device_t *dev,
if (gralloc_drm_bo_need_fb(bo)) {
err = gralloc_drm_bo_add_fb(bo);
if (err) {
- LOGE("failed to add fb");
+ ALOGE("failed to add fb");
gralloc_drm_bo_destroy(bo);
return err;
}
@@ -308,7 +308,7 @@ static int drm_mod_open_fb0(struct drm_module_t *dmod, struct hw_device_t **dev)
*dev = &fb->common;
- LOGI("mode.hdisplay %d\n"
+ ALOGI("mode.hdisplay %d\n"
"mode.vdisplay %d\n"
"mode.vrefresh %f\n"
"format 0x%x\n"
diff --git a/gralloc_drm.c b/gralloc_drm.c
index 57021ac..ca069f1 100644
--- a/gralloc_drm.c
+++ b/gralloc_drm.c
@@ -63,7 +63,7 @@ init_drv_from_fd(int fd)
/* get the kernel module name */
version = drmGetVersion(fd);
if (!version) {
- LOGE("invalid DRM fd");
+ ALOGE("invalid DRM fd");
return NULL;
}
@@ -87,7 +87,7 @@ init_drv_from_fd(int fd)
}
if (!drv) {
- LOGE("unsupported driver: %s", (version->name) ?
+ ALOGE("unsupported driver: %s", (version->name) ?
version->name : "NULL");
}
@@ -110,7 +110,7 @@ struct gralloc_drm_t *gralloc_drm_create(void)
drm->fd = open(GRALLOC_DRM_DEVICE, O_RDWR);
if (drm->fd < 0) {
- LOGE("failed to open %s", GRALLOC_DRM_DEVICE);
+ ALOGE("failed to open %s", GRALLOC_DRM_DEVICE);
return NULL;
}
@@ -164,7 +164,7 @@ int gralloc_drm_auth_magic(struct gralloc_drm_t *drm, int32_t magic)
*/
int gralloc_drm_set_master(struct gralloc_drm_t *drm)
{
- LOGD("set master");
+ ALOGD("set master");
drmSetMaster(drm->fd);
drm->first_post = 1;
diff --git a/gralloc_drm_intel.c b/gralloc_drm_intel.c
index 2bf9524..8e74c66 100644
--- a/gralloc_drm_intel.c
+++ b/gralloc_drm_intel.c
@@ -127,12 +127,12 @@ batch_flush(struct intel_info *info)
size *= sizeof(info->batch[0]);
ret = drm_intel_bo_subdata(info->batch_ibo, 0, size, info->batch);
if (ret) {
- LOGE("failed to subdata batch");
+ ALOGE("failed to subdata batch");
goto fail;
}
ret = drm_intel_bo_exec(info->batch_ibo, size, NULL, 0, 0);
if (ret) {
- LOGE("failed to exec batch");
+ ALOGE("failed to exec batch");
goto fail;
}
@@ -205,7 +205,7 @@ static void intel_copy(struct gralloc_drm_drv_t *drv,
dst->handle->height != src->handle->height ||
dst->handle->stride != src->handle->stride ||
dst->handle->format != src->handle->format) {
- LOGE("copy between incompatible buffers");
+ ALOGE("copy between incompatible buffers");
return;
}
@@ -246,7 +246,7 @@ static void intel_copy(struct gralloc_drm_drv_t *drv,
cmd |= XY_SRC_COPY_BLT_WRITE_ALPHA | XY_SRC_COPY_BLT_WRITE_RGB;
break;
default:
- LOGE("copy with unsupported format");
+ ALOGE("copy with unsupported format");
return;
}
@@ -305,7 +305,7 @@ static drm_intel_bo *alloc_ibo(struct intel_info *info,
flags = 0;
bpp = gralloc_drm_get_bpp(handle->format);
if (!bpp) {
- LOGE("unrecognized format 0x%x", handle->format);
+ ALOGE("unrecognized format 0x%x", handle->format);
return NULL;
}
@@ -406,14 +406,14 @@ static struct gralloc_drm_bo_t *intel_alloc(struct gralloc_drm_drv_t *drv,
ib->ibo = drm_intel_bo_gem_create_from_name(info->bufmgr,
"gralloc-r", handle->name);
if (!ib->ibo) {
- LOGE("failed to create ibo from name %u",
+ ALOGE("failed to create ibo from name %u",
handle->name);
free(ib);
return NULL;
}
if (drm_intel_bo_get_tiling(ib->ibo, &ib->tiling, &dummy)) {
- LOGE("failed to get ibo tiling");
+ ALOGE("failed to get ibo tiling");
drm_intel_bo_unreference(ib->ibo);
free(ib);
return NULL;
@@ -424,7 +424,7 @@ static struct gralloc_drm_bo_t *intel_alloc(struct gralloc_drm_drv_t *drv,
ib->ibo = alloc_ibo(info, handle, &ib->tiling, &stride);
if (!ib->ibo) {
- LOGE("failed to allocate ibo %dx%d (format %d)",
+ ALOGE("failed to allocate ibo %dx%d (format %d)",
handle->width,
handle->height,
handle->format);
@@ -435,7 +435,7 @@ static struct gralloc_drm_bo_t *intel_alloc(struct gralloc_drm_drv_t *drv,
handle->stride = stride;
if (drm_intel_bo_flink(ib->ibo, (uint32_t *) &handle->name)) {
- LOGE("failed to flink ibo");
+ ALOGE("failed to flink ibo");
drm_intel_bo_unreference(ib->ibo);
free(ib);
return NULL;
@@ -570,14 +570,14 @@ struct gralloc_drm_drv_t *gralloc_drm_drv_create_for_intel(int fd)
info = calloc(1, sizeof(*info));
if (!info) {
- LOGE("failed to allocate driver info");
+ ALOGE("failed to allocate driver info");
return NULL;
}
info->fd = fd;
info->bufmgr = drm_intel_bufmgr_gem_init(info->fd, 16 * 1024);
if (!info->bufmgr) {
- LOGE("failed to create buffer manager");
+ ALOGE("failed to create buffer manager");
free(info);
return NULL;
}
diff --git a/gralloc_drm_kms.c b/gralloc_drm_kms.c
index d2900ae..9847811 100644
--- a/gralloc_drm_kms.c
+++ b/gralloc_drm_kms.c
@@ -81,7 +81,7 @@ static int drm_kms_set_crtc(struct gralloc_drm_t *drm, int fb_id)
ret = drmModeSetCrtc(drm->fd, drm->crtc_id, fb_id,
0, 0, &drm->connector_id, 1, &drm->mode);
if (ret) {
- LOGE("failed to set crtc");
+ ALOGE("failed to set crtc");
return ret;
}
@@ -120,7 +120,7 @@ static int drm_kms_page_flip(struct gralloc_drm_t *drm,
drm->waiting_flip = 0;
if (drm->next_front) {
/* record an error and break */
- LOGE("drmHandleEvent returned without flipping");
+ ALOGE("drmHandleEvent returned without flipping");
drm->current_front = drm->next_front;
drm->next_front = NULL;
}
@@ -132,7 +132,7 @@ static int drm_kms_page_flip(struct gralloc_drm_t *drm,
ret = drmModePageFlip(drm->fd, drm->crtc_id, bo->fb_id,
DRM_MODE_PAGE_FLIP_EVENT, (void *) drm);
if (ret)
- LOGE("failed to perform page flip");
+ ALOGE("failed to perform page flip");
else
drm->next_front = bo;
@@ -162,7 +162,7 @@ static void drm_kms_wait_for_post(struct gralloc_drm_t *drm, int flip)
/* get the current vblank */
ret = drmWaitVBlank(drm->fd, &vbl);
if (ret) {
- LOGW("failed to get vblank");
+ ALOGW("failed to get vblank");
return;
}
@@ -188,7 +188,7 @@ static void drm_kms_wait_for_post(struct gralloc_drm_t *drm, int flip)
ret = drmWaitVBlank(drm->fd, &vbl);
if (ret) {
- LOGW("failed to wait vblank");
+ ALOGW("failed to wait vblank");
return;
}
}
@@ -205,7 +205,7 @@ int gralloc_drm_bo_post(struct gralloc_drm_bo_t *bo)
int ret;
if (!bo->fb_id && drm->swap_mode != DRM_SWAP_COPY) {
- LOGE("unable to post bo %p without fb", bo);
+ ALOGE("unable to post bo %p without fb", bo);
return -EINVAL;
}
@@ -357,7 +357,7 @@ static void drm_kms_init_features(struct gralloc_drm_t *drm)
break;
}
- LOGD("will use %s for fb posting", swap_mode);
+ ALOGD("will use %s for fb posting", swap_mode);
}
static drmModeModeInfoPtr find_mode(drmModeConnectorPtr connector, int *bpp)
@@ -378,7 +378,7 @@ static drmModeModeInfoPtr find_mode(drmModeConnectorPtr connector, int *bpp)
}
if ((xres && yres) || *bpp) {
- LOGI("will find the closest match for %dx%d@%d",
+ ALOGI("will find the closest match for %dx%d@%d",
xres, yres, *bpp);
}
}
@@ -448,21 +448,21 @@ static int drm_kms_init_with_connector(struct gralloc_drm_t *drm,
/* print connector info */
if (connector->count_modes > 1) {
- LOGI("there are %d modes on connector 0x%x",
+ ALOGI("there are %d modes on connector 0x%x",
connector->count_modes,
connector->connector_id);
for (i = 0; i < connector->count_modes; i++)
- LOGI(" %s", connector->modes[i].name);
+ ALOGI(" %s", connector->modes[i].name);
}
else {
- LOGI("there is one mode on connector 0x%d: %s",
+ ALOGI("there is one mode on connector 0x%d: %s",
connector->connector_id,
connector->modes[0].name);
}
mode = find_mode(connector, &bpp);
- LOGI("the best mode is %s", mode->name);
+ ALOGI("the best mode is %s", mode->name);
drm->mode = *mode;
switch (bpp) {
@@ -506,7 +506,7 @@ int gralloc_drm_init_kms(struct gralloc_drm_t *drm)
drm->resources = drmModeGetResources(drm->fd);
if (!drm->resources) {
- LOGE("failed to get modeset resources");
+ ALOGE("failed to get modeset resources");
return -EINVAL;
}
@@ -527,7 +527,7 @@ int gralloc_drm_init_kms(struct gralloc_drm_t *drm)
}
}
if (i == drm->resources->count_connectors) {
- LOGE("failed to find a valid crtc/connector/mode combination");
+ ALOGE("failed to find a valid crtc/connector/mode combination");
drmModeFreeResources(drm->resources);
drm->resources = NULL;
diff --git a/gralloc_drm_nouveau.c b/gralloc_drm_nouveau.c
index a3ef333..cbbb76d 100644
--- a/gralloc_drm_nouveau.c
+++ b/gralloc_drm_nouveau.c
@@ -164,7 +164,7 @@ static struct nouveau_bo *alloc_bo(struct nouveau_info *info,
if (nouveau_bo_new_tile(info->dev, flags, 0, *pitch * height,
tile_mode, tile_flags, &bo)) {
- LOGE("failed to allocate bo (flags 0x%x, size %d, tile_mode 0x%x, tile_flags 0x%x)",
+ ALOGE("failed to allocate bo (flags 0x%x, size %d, tile_mode 0x%x, tile_flags 0x%x)",
flags, *pitch * height, tile_mode, tile_flags);
bo = NULL;
}
@@ -181,7 +181,7 @@ nouveau_alloc(struct gralloc_drm_drv_t *drv, struct gralloc_drm_handle_t *handle
cpp = gralloc_drm_get_bpp(handle->format);
if (!cpp) {
- LOGE("unrecognized format 0x%x", handle->format);
+ ALOGE("unrecognized format 0x%x", handle->format);
return NULL;
}
@@ -191,7 +191,7 @@ nouveau_alloc(struct gralloc_drm_drv_t *drv, struct gralloc_drm_handle_t *handle
if (handle->name) {
if (nouveau_bo_handle_ref(info->dev, handle->name, &nb->bo)) {
- LOGE("failed to create nouveau bo from name %u",
+ ALOGE("failed to create nouveau bo from name %u",
handle->name);
free(nb);
return NULL;
@@ -207,7 +207,7 @@ nouveau_alloc(struct gralloc_drm_drv_t *drv, struct gralloc_drm_handle_t *handle
nb->bo = alloc_bo(info, width, height,
cpp, handle->usage, &pitch);
if (!nb->bo) {
- LOGE("failed to allocate nouveau bo %dx%dx%d",
+ ALOGE("failed to allocate nouveau bo %dx%dx%d",
handle->width, handle->height, cpp);
free(nb);
return NULL;
@@ -215,7 +215,7 @@ nouveau_alloc(struct gralloc_drm_drv_t *drv, struct gralloc_drm_handle_t *handle
if (nouveau_bo_handle_get(nb->bo,
(uint32_t *) &handle->name)) {
- LOGE("failed to flink nouveau bo");
+ ALOGE("failed to flink nouveau bo");
nouveau_bo_ref(NULL, &nb->bo);
free(nb);
return NULL;
@@ -330,7 +330,7 @@ static int nouveau_init(struct nouveau_info *info)
info->arch = 0xc0;
break;
default:
- LOGE("unknown nouveau chipset 0x%x", info->dev->chipset);
+ ALOGE("unknown nouveau chipset 0x%x", info->dev->chipset);
err = -EINVAL;
break;
}
@@ -352,7 +352,7 @@ struct gralloc_drm_drv_t *gralloc_drm_drv_create_for_nouveau(int fd)
info->fd = fd;
err = nouveau_device_open_existing(&info->dev, 0, info->fd, 0);
if (err) {
- LOGE("failed to create nouveau device");
+ ALOGE("failed to create nouveau device");
free(info);
return NULL;
}
@@ -361,7 +361,7 @@ struct gralloc_drm_drv_t *gralloc_drm_drv_create_for_nouveau(int fd)
24 * 1024, &info->chan);
if (err) {
/* make it non-fatal temporarily as it may require firmwares */
- LOGW("failed to create nouveau channel");
+ ALOGW("failed to create nouveau channel");
info->chan = NULL;
}
diff --git a/gralloc_drm_pipe.c b/gralloc_drm_pipe.c
index a66ce1a..83d02d1 100644
--- a/gralloc_drm_pipe.c
+++ b/gralloc_drm_pipe.c
@@ -122,13 +122,13 @@ static struct pipe_buffer *get_pipe_buffer_locked(struct pipe_manager *pm,
if (templ.format == PIPE_FORMAT_NONE ||
!pm->screen->is_format_supported(pm->screen, templ.format,
templ.target, 0, templ.bind)) {
- LOGE("unsupported format 0x%x", handle->format);
+ ALOGE("unsupported format 0x%x", handle->format);
return NULL;
}
buf = CALLOC(1, sizeof(*buf));
if (!buf) {
- LOGE("failed to allocate pipe buffer");
+ ALOGE("failed to allocate pipe buffer");
return NULL;
}
@@ -175,7 +175,7 @@ static struct pipe_buffer *get_pipe_buffer_locked(struct pipe_manager *pm,
return buf;
fail:
- LOGE("failed to allocate pipe buffer");
+ ALOGE("failed to allocate pipe buffer");
if (buf->resource)
pipe_resource_reference(&buf->resource, NULL);
FREE(buf);
@@ -233,7 +233,7 @@ static int pipe_map(struct gralloc_drm_drv_t *drv,
if (!pm->context) {
pm->context = pm->screen->context_create(pm->screen, NULL);
if (!pm->context) {
- LOGE("failed to create pipe context");
+ ALOGE("failed to create pipe context");
err = -ENOMEM;
}
}
@@ -298,7 +298,7 @@ static void pipe_copy(struct gralloc_drm_drv_t *drv,
dst_bo->handle->height != src_bo->handle->height ||
dst_bo->handle->stride != src_bo->handle->stride ||
dst_bo->handle->format != src_bo->handle->format) {
- LOGE("copy between incompatible buffers");
+ ALOGE("copy between incompatible buffers");
return;
}
@@ -322,7 +322,7 @@ static void pipe_copy(struct gralloc_drm_drv_t *drv,
if (!pm->context) {
pm->context = pm->screen->context_create(pm->screen, NULL);
if (!pm->context) {
- LOGE("failed to create pipe context");
+ ALOGE("failed to create pipe context");
pthread_mutex_unlock(&pm->mutex);
return;
}
@@ -431,7 +431,7 @@ static int pipe_init_screen(struct pipe_manager *pm)
#endif
if (!screen) {
- LOGW("failed to create screen for %s", pm->driver);
+ ALOGW("failed to create screen for %s", pm->driver);
return -EINVAL;
}
@@ -538,7 +538,7 @@ struct gralloc_drm_drv_t *gralloc_drm_drv_create_for_pipe(int fd, const char *na
pm = CALLOC(1, sizeof(*pm));
if (!pm) {
- LOGE("failed to allocate pipe manager for %s", name);
+ ALOGE("failed to allocate pipe manager for %s", name);
return NULL;
}
diff --git a/gralloc_drm_radeon.c b/gralloc_drm_radeon.c
index 8d27bf9..94c7613 100644
--- a/gralloc_drm_radeon.c
+++ b/gralloc_drm_radeon.c
@@ -194,7 +194,7 @@ static struct radeon_bo *radeon_alloc(struct radeon_info *info,
cpp = gralloc_drm_get_bpp(handle->format);
if (!cpp) {
- LOGE("unrecognized format 0x%x", handle->format);
+ ALOGE("unrecognized format 0x%x", handle->format);
return NULL;
}
@@ -224,7 +224,7 @@ static struct radeon_bo *radeon_alloc(struct radeon_info *info,
rbo = radeon_bo_open(info->bufmgr, 0, size, base_align, domain, 0);
if (!rbo) {
- LOGE("failed to allocate rbo %dx%dx%d",
+ ALOGE("failed to allocate rbo %dx%dx%d",
handle->width, handle->height, cpp);
return NULL;
}
@@ -234,7 +234,7 @@ static struct radeon_bo *radeon_alloc(struct radeon_info *info,
if (radeon_gem_get_kernel_name(rbo,
(uint32_t *) &handle->name)) {
- LOGE("failed to flink rbo");
+ ALOGE("failed to flink rbo");
radeon_bo_unref(rbo);
return NULL;
}
@@ -268,7 +268,7 @@ drm_gem_radeon_alloc(struct gralloc_drm_drv_t *drv, struct gralloc_drm_handle_t
rbuf->rbo = radeon_bo_open(info->bufmgr,
handle->name, 0, 0, 0, 0);
if (!rbuf->rbo) {
- LOGE("failed to create rbo from name %u",
+ ALOGE("failed to create rbo from name %u",
handle->name);
free(rbuf);
return NULL;
@@ -471,7 +471,7 @@ static int radeon_probe(struct radeon_info *info)
kinfo.value = (long) &info->chipset;
err = drmCommandWriteRead(info->fd, DRM_RADEON_INFO, &kinfo, sizeof(kinfo));
if (err) {
- LOGE("failed to get device id");
+ ALOGE("failed to get device id");
return err;
}
@@ -487,13 +487,13 @@ static int radeon_probe(struct radeon_info *info)
}
if (info->chip_family == CHIP_FAMILY_UNKNOW) {
- LOGE("unknown device id 0x%04x", info->chipset);
+ ALOGE("unknown device id 0x%04x", info->chipset);
return -EINVAL;
}
err = radeon_init_tile_config(info);
if (err) {
- LOGE("failed to get tiling config");
+ ALOGE("failed to get tiling config");
return err;
}
@@ -503,14 +503,14 @@ static int radeon_probe(struct radeon_info *info)
memset(&mminfo, 0, sizeof(mminfo));
err = drmCommandWriteRead(info->fd, DRM_RADEON_GEM_INFO, &mminfo, sizeof(mminfo));
if (err) {
- LOGE("failed to get gem info");
+ ALOGE("failed to get gem info");
return err;
}
info->vram_size = mminfo.vram_visible;
info->gart_size = mminfo.gart_size;
- LOGI("detected chipset 0x%04x family 0x%02x (vram size %dMiB, gart size %dMiB)",
+ ALOGI("detected chipset 0x%04x family 0x%02x (vram size %dMiB, gart size %dMiB)",
info->chipset, info->chip_family,
info->vram_size / 1024 / 1024,
info->gart_size / 1024 / 1024);
@@ -534,7 +534,7 @@ struct gralloc_drm_drv_t *gralloc_drm_drv_create_for_radeon(int fd)
info->bufmgr = radeon_bo_manager_gem_ctor(info->fd);
if (!info->bufmgr) {
- LOGE("failed to create buffer manager");
+ ALOGE("failed to create buffer manager");
free(info);
return NULL;
}