* just use the first kernel buffer.
*/
if (drv_num_buffers_per_bo(bo_) != 1) {
- cros_gralloc_error("Can only support one buffer per bo.");
+ drv_log("Can only support one buffer per bo.\n");
return -EINVAL;
}
}
if (vaddr == MAP_FAILED) {
- cros_gralloc_error("Mapping failed.");
+ drv_log("Mapping failed.\n");
return -EFAULT;
}
}
int32_t cros_gralloc_buffer::unlock()
{
if (lockcount_ <= 0) {
- cros_gralloc_error("Buffer was not locked.");
+ drv_log("Buffer was not locked.\n");
return -EINVAL;
}
if (!--lockcount_) {
if (lock_data_[0]) {
- drv_bo_unmap(bo_, lock_data_[0]);
+ drv_bo_flush_or_unmap(bo_, lock_data_[0]);
lock_data_[0] = nullptr;
}
}