New issue
Advanced search Search tips

Issue 674791 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

go2001: Use VIDIOC_DECODER_CMD to implement flush

Project Member Reported by wuchengli@chromium.org, Dec 16 2016

Issue description

Now V4L2VDA supports using VIDIOC_DECODER_CMD to flush. We should use the official v4l2 API to avoid deprecation warning when bytesused=0. The reference CL is https://chromium-review.googlesource.com/#/c/397099/
 
Blocking: 735783
Labels: videoshortlist
Owner: hiroh@chromium.org
Status: Assigned (was: Available)

Comment 3 by hiroh@chromium.org, Jul 10 2017

Status: Started (was: Assigned)

Comment 4 by hiroh@chromium.org, Jul 14 2017

I introduced VIDIOC_DECODER_CMD to go2001.
However, the test failure  crbug.com/735783  was not resolved yet.
I think my implementation does not comply with the specification.
But the specification of VIDIOC_DECODER_CMD is unclear.
 (https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/vidioc-decoder-cmd.html)
I think I should implement referring an upstreamed code such as sf5pmfc (http://elixir.free-electrons.com/linux/latest/source/drivers/media/platform/s5p-mfc/s5p_mfc.c#L223)
I am going to do next week.

Comment 5 by hiroh@chromium.org, Jul 21 2017

tomasz@ checked my driver implementation and personally gave me LGTM.
code review is here: https://chromium-review.googlesource.com/c/571106/
Therefore, assuming that is right, I concentrated on investigating why VDA unittest ( crbug.com/735783 ) today. I couldn't complete debugging today by some unfortunate reason. 
Although I hadn't found the failure reason yet, flush (DECODER_CMD_STOP) looks work correctly and some problem is happened around initialization.
In detail, buffers inserted in the beginning are discarded and as a result the number of decoded surfaces is not the expected one. Then, test is failed.
I have no idea why this is happened only on go2001 devices.
I am going to investigate and debug next week.

Comment 6 by hiroh@chromium.org, Jul 21 2017

Output buffers are discarded in DestroyOutputBuffers().
DestroyOutputBuffers are called via ServicePollTask(), because VIDIOC_DQEVENT catches a resolution change event.
I am experimenting with elm as a 100% test success device, and no resolution change happens on elm.
Perhaps, VDA unittest is failed if the initial resolution change is necessary.
I don't know there is such device except buddy and rikku.

Comment 7 by hiroh@chromium.org, Jul 28 2017

Blocking: -735783

Comment 8 by hiroh@chromium.org, Jul 28 2017

It turned out the test failure ( crbug.com/735783 ) isn't absolutely due to flush operation.
For more information, please see https://bugs.chromium.org/p/chromium/issues/detail?id=735783#c8
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 28 2017

Labels: merge-merged-chromeos-3.14
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/3ec10f1c3a7466e243febd670b617baef578ccc4

commit 3ec10f1c3a7466e243febd670b617baef578ccc4
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Mon Aug 28 01:01:44 2017

CHROMIUM: [media] go2001: Implement official V4L2 flush flow

Use VIDIOC_DECODER_CMD to implement flush.

BUG= chromium:674791 
TEST=video_decode_accelerator_unittest on buddy

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Change-Id: Ic74c60d73f6b64c584aa84a1f3fbb5279d0dcd7f
Reviewed-on: https://chromium-review.googlesource.com/571106
Reviewed-by: Tomasz Figa <tfiga@chromium.org>

[modify] https://crrev.com/3ec10f1c3a7466e243febd670b617baef578ccc4/drivers/media/pci/go2001/go2001_hw.c
[modify] https://crrev.com/3ec10f1c3a7466e243febd670b617baef578ccc4/drivers/media/pci/go2001/go2001.h
[modify] https://crrev.com/3ec10f1c3a7466e243febd670b617baef578ccc4/drivers/media/pci/go2001/go2001_driver.c

Comment 10 by hiroh@chromium.org, Aug 28 2017

Status: Fixed (was: Started)
Cc: avkodipelli@chromium.org
Status: Verified (was: Fixed)

Sign in to add a comment