summaryrefslogtreecommitdiffstats
path: root/libhwcomposer
diff options
context:
space:
mode:
authorjung-min.oh <jung-min.oh@samsung.com>2011-09-21 21:13:02 +0900
committerJames Dong <jdong@google.com>2011-10-01 12:01:02 -0700
commit41a8a0b4a06cfe4072985c7724b6189d59c610ca (patch)
tree76b4c8f3f1b9d331a9e5a0321f9b2c335a27a822 /libhwcomposer
parentcf663174a6221ba8b2442bc7d6507e797a3954f9 (diff)
downloaddevice_samsung_crespo-41a8a0b4a06cfe4072985c7724b6189d59c610ca.zip
device_samsung_crespo-41a8a0b4a06cfe4072985c7724b6189d59c610ca.tar.gz
device_samsung_crespo-41a8a0b4a06cfe4072985c7724b6189d59c610ca.tar.bz2
libhwcomposer: fix a bug
fix a bug and add error handling code Change-Id: Ibe2c70cf6718a964b23b9832626613cc73855116 Signed-off-by: jung-min.oh <jung-min.oh@samsung.com>
Diffstat (limited to 'libhwcomposer')
-rw-r--r--libhwcomposer/SecHWC.cpp2
-rw-r--r--libhwcomposer/SecHWCUtils.cpp11
2 files changed, 9 insertions, 4 deletions
diff --git a/libhwcomposer/SecHWC.cpp b/libhwcomposer/SecHWC.cpp
index cbed30d..59736ed 100644
--- a/libhwcomposer/SecHWC.cpp
+++ b/libhwcomposer/SecHWC.cpp
@@ -150,7 +150,7 @@ static int get_hwc_compos_decision(hwc_layer_t* cur)
return compositionType;
if((prev_handle->usage & GRALLOC_USAGE_PHYS_CONTIG) &&
- (cur->blending = HWC_BLENDING_NONE))
+ (cur->blending == HWC_BLENDING_NONE))
compositionType = HWC_OVERLAY;
else
compositionType = HWC_FRAMEBUFFER;
diff --git a/libhwcomposer/SecHWCUtils.cpp b/libhwcomposer/SecHWCUtils.cpp
index 7c89f47..c184348 100644
--- a/libhwcomposer/SecHWCUtils.cpp
+++ b/libhwcomposer/SecHWCUtils.cpp
@@ -388,6 +388,8 @@ int fimc_v4l2_clr_buf(int fd)
int fimc_handle_oneshot(int fd, struct fimc_buf *fimc_buf)
{
+ int ret =0;
+
if (fimc_v4l2_stream_on(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT) < 0) {
LOGE("Fail : v4l2_stream_on()");
return -1;
@@ -395,14 +397,17 @@ int fimc_handle_oneshot(int fd, struct fimc_buf *fimc_buf)
if (fimc_v4l2_queue(fd, fimc_buf) < 0) {
LOGE("Fail : v4l2_queue()");
- return -1;
+ ret = -1;
+ goto stream_off;
}
if (fimc_v4l2_dequeue(fd) < 0) {
LOGE("Fail : v4l2_dequeue()");
- return -1;
+ ret = -1;
+ goto stream_off;
}
+stream_off:
if (fimc_v4l2_stream_off(fd) < 0) {
LOGE("Fail : v4l2_stream_off()");
return -1;
@@ -413,7 +418,7 @@ int fimc_handle_oneshot(int fd, struct fimc_buf *fimc_buf)
return -1;
}
- return 0;
+ return ret;
}
static int get_src_phys_addr(struct hwc_context_t *ctx,