OSDN Git Service

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 08:21:07 +0000 (09:21 +0100)
commit7d9566fb14f0e24d6472c425fd1d64746a257287
tree9d7d9e284f7b7cb84e754dd5a89b4937f81d0bba
parent498ce67eb68c38d73c998ff0de6972e0dcf4d10d
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