Skip to content

renderer/native: DRM dumb buffer assertions and a stride fix

Pekka Paalanen requested to merge ppaalanen/mutter:mr/cpu-stride into master

While working to enable DisplayLink devices in GNOME, I reviewed the CPU copy path for secondary GPUs. I found an assumption about stride that theoretically is not true; this is fixed. I also added a couple of checks to ensure values are as expected since they weren't obvious.

I have tested this on DisplayLink devices and some additional patches to make Mutter to use DisplayLink devices with the CPU copy path. Intel GPU was the primary. I found no issues before or after these patches, even at 1366x768, but I still think they would be worthwhile safety measures.

I would expect a secondary device with a hardware driver to have issues with a resolution like 1366x768 where width * 4 is not divisible by 64 (I think I saw Intel driver use that stride alignment), but I didn't (couldn't?) test that specifically. DisplayLink driver being essentially virtual probably has much less stride alignment requirements.

Edited by Pekka Paalanen

Merge request reports