Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bunch of fixes to make the tool work on rockchip platforms #16

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bbrezillon
Copy link

No description provided.

Not all KMS drivers have a zpos property attached to their plane.
Let's make this prop optional so that v4l2-request-test can work on
those platforms.

Signed-off-by: Boris Brezillon <[email protected]>
Latest version of the stateless H264 patch series renamed
V4L2_PIX_FMT_H264_SLICE into V4L2_PIX_FMT_H264_SLICE_RAW. Let's
reflect that in v4l2-request-test.

Signed-off-by: Boris Brezillon <[email protected]>
Having a #ifdef DRM_FORMAT_MOD_ALLWINNER_TILED does not guarantee that
V4L2_PIX_FMT_SUNXI_TILED_NV12 exists in the videodev2.h header.
Let's make this dependency explicit to avoid compilation errors.

Signed-off-by: Boris Brezillon <[email protected]>
…tive

connector->encoder_id is only set to a valid encoder ID if the
connector is active, otherwise it's set to 0. In that case, we can
pick any encoder that can connect to this connector, so let's pick the
first one.

Signed-off-by: Boris Brezillon <[email protected]>
Drivers that are MPLANE capable can also support non-M formats, and
requests for non-M formats should take the _mplane path (which is
unintuitive).

Let the v4l2 glue decide when it's appropriate to use _MPLANE types
instead of specifying it in the supported formats table.

Signed-off-by: Boris Brezillon <[email protected]>
@mjhammel
Copy link

mjhammel commented Mar 18, 2021

I'm trying to use this patch to validate an rk3399 board. We're using 5.10.17 and the rkvdec/hantro drivers with panfrost. I get the following error:

$ ./v4l2-request-test -D panfrost /root
Config:
Video path: /dev/video0
Media path: /dev/media0
DRM path: /dev/dri/card0
DRM driver: panfrost
Slices path: /root
Slices filename format: slice-%d.dump
FPS: 0

Preset:
Name: bbb-mpeg2
Description: big_buck_bunny_480p_MPEG2_MP2_25fps_1800K.MPG
License: Creative Commons Attribution 3.0
Attribution: Blender Foundation | www.blender.org
Width: 854
Height: 480
Frames count: 25
Format: MPEG2

Media device driver: rkvdec
Destination format: NV12 YUV
Unable to set DRM atomic capability: Operation not supported
Unable to start display engine

I looked at the panfrost driver but don't see the atomic ioctl implemented. Am I looking in the right place? Should this work or am I even testing this correctly? Or is there another, lower-level way to validate rkvdec/hantro HW decoding without having to use the whole libva/ffmpeg stack?

As an additional bit of information, I tried this using "rockchip" as the driver name.

$ ./v4l2-request-test -D rockchip /root
Config:
Video path: /dev/video0
Media path: /dev/media0
DRM path: /dev/dri/card0
DRM driver: rockchip
Slices path: /root
Slices filename format: slice-%d.dump
FPS: 0

Preset:
Name: bbb-mpeg2
Description: big_buck_bunny_480p_MPEG2_MP2_25fps_1800K.MPG
License: Creative Commons Attribution 3.0
Attribution: Blender Foundation | www.blender.org
Width: 854
Height: 480
Frames count: 25
Format: MPEG2

Media device driver: rkvdec
Destination format: NV12 YUV
Unable to find any plane for CRTC 37
Unable to select DRM plane for CRTC 37
Unable to start display engine

And some additional data points:

Video Devices: /dev/video1 /dev/video2 /dev/video0
Media Devices: /dev/media1 /dev/media0
By Driver:
rockchip,rk3399-vpu-enc (platform: hantro-vpu):
/dev/video1
/dev/video2
/dev/media1
rkvdec (platform:rkvdec):
/dev/video0
/dev/media0

LIBVA_DRIVER_NAME=v4l2_request vainfo --display drm --device /dev/video1
libva info: VA-API version 1.11.0
libva info: User environment variable requested driver 'v4l2_request'
libva info: Trying to open /usr/lib/dri/v4l2_request_drv_video.so
libva info: Found init function __vaDriverInit_1_11
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.11 (libva 2.11.0.pre1)
vainfo: Driver version: v4l2-request
vainfo: Supported profile and entrypoints
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD

LIBVA_DRIVER_NAME=v4l2_request vainfo --display drm --device /dev/video2
libva info: VA-API version 1.11.0
libva info: User environment variable requested driver 'v4l2_request'
libva info: Trying to open /usr/lib/dri/v4l2_request_drv_video.so
libva info: Found init function __vaDriverInit_1_11
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.11 (libva 2.11.0.pre1)
vainfo: Driver version: v4l2-request
vainfo: Supported profile and entrypoints
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD

LIBVA_DRIVER_NAME=v4l2_request vainfo --display drm --device /dev/video0
libva info: VA-API version 1.11.0
libva info: User environment variable requested driver 'v4l2_request'
libva info: Trying to open /usr/lib/dri/v4l2_request_drv_video.so
libva info: Found init function __vaDriverInit_1_11
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.11 (libva 2.11.0.pre1)
vainfo: Driver version: v4l2-request
vainfo: Supported profile and entrypoints
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants