gpu: ipu-v3: pre: don't trigger update if buffer address doesn't change
authorLucas Stach <l.stach@pengutronix.de>
Tue, 18 Dec 2018 15:46:29 +0000 (16:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 14:37:56 +0000 (15:37 +0100)
commit189f921470547fc15f1e4c49bb5a27f9b4a0b6f4
tree13744e5522a84d4f2a071dae67ade2bb462ce472
parentf21cb374df34cacd7cae4dff25989e9288e5d537
gpu: ipu-v3: pre: don't trigger update if buffer address doesn't change

[ Upstream commit eb0200a4357da100064971689d3a0e9e3cf57f33 ]

On a NOP double buffer update where current buffer address is the same
as the next buffer address, the SDW_UPDATE bit clears too late. As we
are now using this bit to determine when it is safe to signal flip
completion to userspace this will delay completion of atomic commits
where one plane doesn't change the buffer by a whole frame period.

Fix this by remembering the last buffer address and just skip the
double buffer update if it would not change the buffer address.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
[p.zabel@pengutronix.de: initialize last_bufaddr in ipu_pre_configure]
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/ipu-v3/ipu-pre.c