Title: Overlay plane (plane 62) AtomicCommit blocks ~3 seconds when Primary plane (plane 50) is already active on Jetson Orin Nano L4T R39.2
Environment
- Board: NVIDIA Jetson Orin Nano Engineering Reference Developer Kit Super
- L4T: R39.2 (REVISION: 2.0, GCID: 45755727)
- Kernel: 6.8.12-1021-tegra
- nvidia-drm: NVIDIA DRM driver 0.0.0 20160202
- libdrm: 2.4.125-1ubuntu0.1~24.04.2
- Display: BenQ VL2245Z via DP-1, 1920x1080@60Hz
- Test program: Custom C application using DRM/KMS API (GBM + PRIME + AtomicCommit)
DRM Resources (from modetest -M nvidia-drm)
DRM device : /dev/dri/card1 (nvidia-drm / nv_platform)
/dev/dri/card0 (tegra, open-source, NOT used)
CRTC id : 61 (DP-1, 1920x1080@60Hz)
plane 50 : Primary, possibleCRTCs=0x1
plane 55 : Cursor, possibleCRTCs=0x1
plane 62 : Overlay, possibleCRTCs=0x1
Problem Description
I am trying to display content on two DRM planes simultaneously from a single process:
- plane 50 (Primary): background + horizontal marquee animation
- plane 62 (Overlay): background + horizontal marquee animation with a transparent region
When both planes are managed in the same process, updating plane 62 independently after plane 50 is already active results in a ~3 second block per commit call.
Test Results
| Test Case |
Result |
Observation |
| plane 50 AtomicCommit (alone) |
PASS |
Returns immediately, smooth animation |
| plane 62 standalone (self as DRM master, plane 50 not active) |
PASS |
Returns immediately, smooth animation |
| plane 62 AtomicCommit (plane 50 already active) |
FAIL |
Blocks ~3 seconds per call |
| plane 62 drmModeSetPlane (plane 50 already active) |
FAIL |
Same ~3 second block |
| DRM lease → plane 62 AtomicCommit |
FAIL |
Same ~3 second block |
| plane 50 + plane 62 in single AtomicCommit request |
PASS |
Both planes update smoothly (~16ms/frame) |
Kernel Error Message
Every ~3 seconds when plane 62 commits independently:
[drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0xfffffffe] Flip event timeout on head 0
Root Cause Analysis (from our investigation)
The nvidia-drm driver has a three-layer architecture:
User space
|
nvidia-drm (DRM KMS layer)
|
NVKMS (nvidia-modeset.ko)
|
RM (nvidia.ko)
We believe the issue is in the NVKMS layer’s flip completion event definition. NVKMS appears to define a complete display head update (“head flip”) as:
head flip = CRTC mode update + Primary plane (plane 50) framebuffer update
Updating only the Overlay plane (plane 62) does NOT constitute a head flip, so NVKMS never issues a flip completion event. However, nv_drm_atomic_commit() unconditionally waits for a flip completion event regardless of which plane was updated, resulting in a ~3 second driver-side timeout.
This behavior is identical for both drmModeAtomicCommit() and drmModeSetPlane() (legacy API), confirming that both paths go through the same NVKMS code path internally.
Workaround Found
Combining both plane updates into a single drmModeAtomicCommit() call resolves the issue:
c
drmModeAtomicReqPtr req = drmModeAtomicAlloc();
// Add plane 50 properties (FB_ID, CRTC_ID, CRTC_W/H, SRC_W/H, ...)
drmModeAtomicAddProperty(req, PLANE_50, prop_fb_id, fb_id_50);
drmModeAtomicAddProperty(req, PLANE_50, prop_crtc_id, CRTC_ID);
// ... other plane 50 properties
// Add plane 62 properties
drmModeAtomicAddProperty(req, PLANE_62, prop_fb_id, fb_id_62);
drmModeAtomicAddProperty(req, PLANE_62, prop_crtc_id, CRTC_ID);
// ... other plane 62 properties
// Single commit for both planes - works correctly
drmModeAtomicCommit(fd, req, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
When combined, the Primary plane update triggers a head flip, the flip completion event is issued normally, and both planes update together in ~16ms.
However, this workaround requires both planes to be managed within a single process, which prevents the intended use case of having an independent video decoder process and an independent GUI process each managing their own plane.
Questions
- Is this a known limitation of NVKMS on Orin Nano? Is it addressed in any newer L4T release?
- Is there an official API or mechanism to update the Overlay plane independently without requiring a simultaneous Primary plane update?
- Is DRM lease (
drmModeCreateLease) intended to support independent Overlay plane updates on Orin Nano with nvidia-drm? We tested this but the lessee process experiences the same ~3 second timeout.
- A 2023 forum post (Orin Nano with nvdrm overlay) states that overlay plane operations fail on Orin. Is this still the case in L4T R39.2, or has the driver behavior changed?
- What is the recommended architecture for a use case where a video decoder process and a GUI process each need to independently and smoothly update their own display plane on Orin Nano?
Reference: Timing measurement code used for diagnosis
c
struct timespec t0, t1;
clock_gettime(CLOCK_MONOTONIC, &t0);
int ret = drmModeAtomicCommit(fd, req, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
clock_gettime(CLOCK_MONOTONIC, &t1);
long ms = (t1.tv_sec - t0.tv_sec) * 1000
+ (t1.tv_nsec - t0.tv_nsec) / 1000000;
// Result: plane 50 -> ~0ms, plane 62 (independent) -> ~3000ms
fprintf(stderr, "plane %u commit took %ldms\n", plane_id, ms);