mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-25 23:39:26 +00:00
modesetting: Omit DRM_FORMAT_MOD_INVALID.
Previously it was possible for the invalid modifier to be placed in the IN_FORMATS or IN_FORMATS_ASYNC arrays, this is of course not wanted as this can cause problems with devices that lack support for explicit modifiers.
This commit is contained in:
committed by
Enrico Weigelt
parent
d3ec45f01c
commit
0c6cb9532b
@@ -2452,9 +2452,13 @@ populate_format_modifiers(xf86CrtcPtr crtc, const drmModePlane *kplane,
|
||||
|
||||
if ((i < mod->offset) || (i > mod->offset + 63))
|
||||
continue;
|
||||
|
||||
if (!(mod->formats & (1 << (i - mod->offset))))
|
||||
continue;
|
||||
|
||||
if (mod->modifier == DRM_FORMAT_MOD_INVALID)
|
||||
continue;
|
||||
|
||||
num_modifiers++;
|
||||
tmp = realloc(modifiers, num_modifiers * sizeof(modifiers[0]));
|
||||
if (!tmp) {
|
||||
|
||||
Reference in New Issue
Block a user