Commit cd376b15 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Commit Bot

media/gpu/v4l2svda: use the queue memory type when dumping memory

The V4L2 queue can inform us on its actual memory type, so use this
instead of making assumptions.

Bug: None
Test: VDA unittest passes on Minnie.

Change-Id: I697545036808645d5bd689529c5b270550885827
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768477
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690222}
parent 08ac1b7f
......@@ -2073,16 +2073,14 @@ bool V4L2SliceVideoDecodeAccelerator::OnMemoryDump(
input_queue_->AllocatedBuffersCount();
size_t input_queue_memory_usage = 0;
std::string input_queue_buffers_memory_type =
V4L2Device::V4L2MemoryToString(V4L2_MEMORY_MMAP);
V4L2Device::V4L2MemoryToString(input_queue_->GetMemoryType());
input_queue_memory_usage += input_queue_->GetMemoryUsage();
// VIDEO_CAPTURE queue's memory usage.
const size_t output_queue_buffers_count = output_buffer_map_.size();
size_t output_queue_memory_usage = 0;
std::string output_queue_buffers_memory_type =
output_mode_ == Config::OutputMode::ALLOCATE
? V4L2Device::V4L2MemoryToString(V4L2_MEMORY_MMAP)
: V4L2Device::V4L2MemoryToString(V4L2_MEMORY_DMABUF);
V4L2Device::V4L2MemoryToString(output_queue_->GetMemoryType());
if (output_mode_ == Config::OutputMode::ALLOCATE) {
// Call QUERY_BUF here because the length of buffers on VIDIOC_CATURE queue
// are not recorded nowhere in V4L2VideoDecodeAccelerator.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment