gralloc: Remove release_fence arg from cros_gralloc_driver::flush()

... to match downstream aosp/2279448.

BUG=b:259311835
TEST=presubmit

Change-Id: I696998e627abb0d88b83d55f8fb335df3dd7576c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4073504
Commit-Queue: Jason Macnak <natsu@google.com>
Tested-by: Jason Macnak <natsu@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
This commit is contained in:
Jason Macnak 2022-12-01 15:53:02 -08:00 committed by Chromeos LUCI
parent 3018207f4d
commit 399fa8b592
3 changed files with 9 additions and 10 deletions

View file

@ -504,7 +504,7 @@ int32_t cros_gralloc_driver::invalidate(buffer_handle_t handle)
return buffer->invalidate();
}
int32_t cros_gralloc_driver::flush(buffer_handle_t handle, int32_t *release_fence)
int32_t cros_gralloc_driver::flush(buffer_handle_t handle)
{
std::lock_guard<std::mutex> lock(mutex_);
@ -520,13 +520,6 @@ int32_t cros_gralloc_driver::flush(buffer_handle_t handle, int32_t *release_fenc
return -EINVAL;
}
/*
* From the ANativeWindow::dequeueBuffer documentation:
*
* "A value of -1 indicates that the caller may access the buffer immediately without
* waiting on a fence."
*/
*release_fence = -1;
return buffer->flush();
}

View file

@ -36,7 +36,7 @@ class cros_gralloc_driver
int32_t unlock(buffer_handle_t handle, int32_t *release_fence);
int32_t invalidate(buffer_handle_t handle);
int32_t flush(buffer_handle_t handle, int32_t *release_fence);
int32_t flush(buffer_handle_t handle);
int32_t get_backing_store(buffer_handle_t handle, uint64_t *out_store);
int32_t resource_info(buffer_handle_t handle, uint32_t strides[DRV_MAX_PLANES],

View file

@ -335,8 +335,14 @@ Return<void> CrosGralloc4Mapper::flushLockedBuffer(void* rawHandle, flushLockedB
return Void();
}
/*
* From the ANativeWindow::dequeueBuffer documentation:
*
* "A value of -1 indicates that the caller may access the buffer immediately without
* waiting on a fence."
*/
int releaseFenceFd = -1;
int ret = mDriver->flush(bufferHandle, &releaseFenceFd);
int ret = mDriver->flush(bufferHandle);
if (ret) {
ALOGE("Failed to flushLockedBuffer. Flush failed.");
hidlCb(Error::BAD_BUFFER, nullptr);