upstream reference: https://lore.kernel.org/linux-media/20211109131013.2684058-1-martin.kepplinger@puri.sm/