summaryrefslogtreecommitdiff
path: root/include/android
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-04-04 01:22:47 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-04-04 01:18:49 +0300
commit7d7879833812635f3d34a8b41b93202b4faf4f9c (patch)
treea7462e8f610d95b4d44339b62eca5a59273977ff /include/android
parentcbb580d5afbe4bc5d4a0012fa977d89e8edb547d (diff)
android: mm: cros: Handle buffer registration failure
cros::CameraBufferManager::Register() fails if a buffer handle is invalid. We should mark CameraBuffer as invalid on the failure of Register(). While the cros::CameraBufferManager Unlock() and Deregister() functions should be able to handle buffers that haven't been locked and registered, this isn't an API guarantee, and errors will be logged. Avoid this by skipping unlocking and unregistration of buffers that haven't been locked or registered. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include/android')
0 files changed, 0 insertions, 0 deletions
n>")/ipc" chromium_dir="$1" if [ ! -d "${chromium_dir}/mojo" ] ; then echo "Directory ${chromium_dir} doesn't contain mojo" exit 1 fi if [ ! -d "${chromium_dir}/.git" ] ; then echo "Directory ${chromium_dir} doesn't contain a git tree" exit 1 fi # Get the chromium commit id version=$(git -C "${chromium_dir}" rev-parse --short HEAD) # Reject dirty trees if [ -n "$(git -C "${chromium_dir}" status --porcelain)" ] ; then echo "Chromium tree in ${chromium_dir} is dirty" exit 1 fi # Copy the diagnosis file cp "${chromium_dir}/tools/diagnosis/crbug_1001171.py" "${ipc_dir}/tools/diagnosis" # Copy the rest of mojo cp "${chromium_dir}/mojo/public/LICENSE" "${ipc_dir}/mojo/public" rm -rf "${ipc_dir}/mojo/public/tools/*" ( cd "${chromium_dir}" || exit find ./mojo/public/tools -type f \ -not -path "*/generators/*" \ -not -path "*/fuzzers/*" \ -exec cp --parents "{}" "${ipc_dir}" ";" ) # Update the README files readme=$(cat <<EOF # SPDX-License-Identifier: CC0-1.0 Files in this directory are imported from ${version} of Chromium. Do not modify them manually. EOF ) echo "$readme" > "${ipc_dir}/mojo/README" echo "$readme" > "${ipc_dir}/tools/README" cat <<EOF ------------------------------------------------------------ mojo updated. Please review and up-port local changes before committing. ------------------------------------------------------------ EOF