Permalink
Browse files

libcopybit: Update error logs, if stretch_copybit() returns EINVAL

During monkey runs, on 8x25, we see copybit_stretch failed errors.
Update error log, whnever stretch_copybit() returns EINVAL.

Change-Id: I817bbc7d72dd4da05c05d12daa068556030be35a
  • Loading branch information...
1 parent bf81651 commit 67d881439c0139341fe9735751832cbdaf9d7f42 Neti Ravi Kumar committed May 21, 2012
Showing with 11 additions and 2 deletions.
  1. +11 −2 libcopybit/copybit.cpp
View
@@ -382,21 +382,29 @@ static int stretch_copybit(
case HAL_PIXEL_FORMAT_BGRA_8888:
case HAL_PIXEL_FORMAT_RGBA_5551:
case HAL_PIXEL_FORMAT_RGBA_4444:
+ LOGE ("%s : Unsupported Pixel format %d", __FUNCTION__, src->format);
return -EINVAL;
}
}
if (src_rect->l < 0 || src_rect->r > src->w ||
src_rect->t < 0 || src_rect->b > src->h) {
// this is always invalid
+ LOGE ("%s : Invalid source rectangle : src_rect l %d t %d r %d b %d",\
+ __FUNCTION__, src_rect->l, src_rect->t, src_rect->r, src_rect->b);
+
return -EINVAL;
}
- if (src->w > MAX_DIMENSION || src->h > MAX_DIMENSION)
+ if (src->w > MAX_DIMENSION || src->h > MAX_DIMENSION) {
+ LOGE ("%s : Invalid source dimensions w %d h %d", __FUNCTION__, src->w, src->h);
return -EINVAL;
+ }
- if (dst->w > MAX_DIMENSION || dst->h > MAX_DIMENSION)
+ if (dst->w > MAX_DIMENSION || dst->h > MAX_DIMENSION) {
+ LOGE ("%s : Invalid DST dimensions w %d h %d", __FUNCTION__, dst->w, dst->h);
return -EINVAL;
+ }
if(src->format == HAL_PIXEL_FORMAT_YV12) {
int usage = GRALLOC_USAGE_PRIVATE_ADSP_HEAP | GRALLOC_USAGE_PRIVATE_MM_HEAP;
@@ -453,6 +461,7 @@ static int stretch_copybit(
status = msm_copybit(ctx, &list);
}
} else {
+ LOGE ("%s : Invalid COPYBIT context", __FUNCTION__);
status = -EINVAL;
}
if(yv12_handle)

0 comments on commit 67d8814

Please sign in to comment.