While experimenting with DRM output, I noticed an issue when using the primary and overlay planes on one CRTC simultaneously.
To verify this, I adapted the 08_video_dec_drm example so that the video uses the primary plane and the box uses the overlay plane. This works, but with one issue. It runs very slowly, with only one frame every 15 seconds.
Other observations:
1. Setting up one of the planes and keeping it static works without issue.
2. Using drmModeSetPlane for both planes, or drmModePageFlip for one plane and drmModeSetPlane for the other, shows the same issue.
As this issue occurs in my own code and in 08_video_dec_drm, as well as in nvdrmvideosink, I can’t see where I’m going wrong. So what’s going on here?
Thanks
Sebastian
Hi,
For information, do you use Jetpack 6.2.2 r36.5 and observe the issue?
apt reports version 6.2.2+b24: nvidia-jetpack is already the newest version (6.2.2+b24).
I can reproduce the issue with the following changes to the 08_video_dec_drm example:
$ diff /usr/src/jetson_multimedia_api/samples/08_video_dec_drm/video_dec_drm.cpp video_dec_drm.cpp
268c268,271
< ctx->drm_renderer->setPlane(primary_plane_index, ui_fb[0].fb_id,
---
> primary_plane_index = 3;
> fprintf(stdout, "primary_plane\n");
>
> /*ctx->drm_renderer->setPlane(primary_plane_index, ui_fb[0].fb_id,
270c273
< 0, 0, image_w << 16, image_h << 16);
---
> 0, 0, image_w << 16, image_h << 16);*/
308a312,315
> overlay_plane_index = 2;
> fprintf(stdout, "planes primary %d secondary %d plane_count %d\n", primary_plane_index, overlay_plane_index, plane_count);
> fprintf(stdout, "overlay_plane\n");
>
519a527
> ctx->drm_renderer->enableUniversalPlanes(1);
The variable names are unfortunately misleading. The following planes are used:
- Video crtc_id=46, plane_id=39 (primary plane)
- Jpeg disabled
- Box crtc_id=46, plane_id=47 (overlay plane)
Anything new regarding this issue? Is it reproducible for you? Or could there be something wrong with my setup.
Hi,
On Jetpack 6 we support only single video plane in DRM. The supported use-case is
08_video_dec_drm$ ./video_dec_drm ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 --disable-ui
If you need UI plane, please use NvBufSurface APIs to composite the planes into single plane and render it.