-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
drm_prime: fix use of formats with modifiers #14508
Conversation
Download the artifacts for this pull request: |
Similar to handles the modifiers must be supplied for each plane of the format or a framebuffer cannot be created. Use the format_modifier tied to the object used for the plane to fix use of formats with modifiers. Also fix the improper use of the DRM_MODE_FB_MODIFIERS-flag for formats without modifiers. This fixes playback of videos decoded by e.g. rpivid into a NV12 format using SAND128 modifer on RPi using the drmprime-overlay interop. Signed-off-by: Jonas Karlman <[email protected]>
Change to always use drmModeAddFB2WithModifiers for all formats and fall back on using drmModeAddFB2 if drmModeAddFB2WithModifiers fail. With the DRM_MODE_FB_MODIFIERS-flag now only being used for formats with modifiers all formats without modifiers should also work. Signed-off-by: Jonas Karlman <[email protected]>
89372ac
to
fc9372f
Compare
Updated to always use The change to always use |
This statement is not fully true, the use of The use of modifiers in a format is a good indicator that driver will support modifiers. The only possible downside to not fully checking for this capability is that display drivers that support modifiers may choose to use a format with modifier when the |
Similar to
handles
themodifiers
must be supplied for each plane of the format or a framebuffer cannot be created.Use the
format_modifier
tied to theobject
used for theplane
to fix use of formats with modifiers.Also fix the improper use of the
DRM_MODE_FB_MODIFIERS
-flag for formats without modifiers.This changes to always use
drmModeAddFB2WithModifiers
for all formats and with proper use of theDRM_MODE_FB_MODIFIERS
-flag all formats with or without modifiers should be supported. The fallback to usedrmModeAddFB2
is kept just in case.This fixes playback of videos decoded by e.g.
rpivid
intoNV12
format withSAND128
modifer on RPi5 using thedrmprime-overlay
interop.