Excessive logging when async page flip fails
This bug has been extracted out of #871 (closed).
As of recent Linux kernel with i915 and recent X master with modesetting driver, applications that request async flips will result in the following error in the logs for each async flip:
[ 4952.118] (WW) modeset(0): flip queue failed: Invalid argument
[ 4952.118] (WW) modeset(0): Present-flip: Queue flip on CRTC 0 failed: Invalid argument
[ 4952.123] (WW) modeset(0): flip queue failed: Invalid argument
[ 4952.123] (WW) modeset(0): Present-flip: Queue flip on CRTC 0 failed: Invalid argument
The root cause for failing flips seems to be that the hardware itself can't do async page flips with the modifiers that are being used on the particular CRTC. See https://github.com/torvalds/linux/blob/0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e/drivers/gpu/drm/i915/display/intel_display.c#L12374.
Kernel prints the following error if drm debugging is enabled:
[ 827.411096] i915 0000:00:02.0: [drm:intel_atomic_check [i915]] Linear memory/CCS does not support async flips
It seems that there's not much we can do because there's no way to get the information on whether async flip will succeed on a particular CRTC, nor we can pass it to the applications via PresentQueryCapabilities request of the present extension (the capability may change dynamically if the modifiers change).
So at least we should not output logs for every failed async flip as that's will grow logs very fast.
Tested Linux 5.11.0 and 5.12.0-rc4, xserver d231ce2d.