Skip to content

Commit 0c6cb95

Browse files
notbabaisyoumetux
authored andcommitted
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.
1 parent d3ec45f commit 0c6cb95

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hw/xfree86/drivers/video/modesetting/drmmode_display.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,9 +2452,13 @@ populate_format_modifiers(xf86CrtcPtr crtc, const drmModePlane *kplane,
24522452

24532453
if ((i < mod->offset) || (i > mod->offset + 63))
24542454
continue;
2455+
24552456
if (!(mod->formats & (1 << (i - mod->offset))))
24562457
continue;
24572458

2459+
if (mod->modifier == DRM_FORMAT_MOD_INVALID)
2460+
continue;
2461+
24582462
num_modifiers++;
24592463
tmp = realloc(modifiers, num_modifiers * sizeof(modifiers[0]));
24602464
if (!tmp) {

0 commit comments

Comments
 (0)