drm/vc4: hdmi: Take into account the clock doubling flag in atomic_check
authorMaxime Ripard <maxime@cerno.tech>
Tue, 15 Dec 2020 15:42:37 +0000 (16:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:36 +0000 (11:37 +0100)
commit5d93dad67df85a41b52f97fc53b5066207f4c65f
treee5c2867a79b0a986fe1b1be3e1cf18c1850367e7
parent5eb0784f4dd02962f6c02ec557c36c28b22f8965
drm/vc4: hdmi: Take into account the clock doubling flag in atomic_check

[ Upstream commit 320e84dc6111ecc1c957e2b186d4d2bafee6bde2 ]

Commit 63495f6b4aed ("drm/vc4: hdmi: Make sure our clock rate is within
limits") was intended to compute the pixel rate to make sure we remain
within the boundaries of what the hardware can provide.

However, unlike what mode_valid was checking for, we forgot to take
into account the clock doubling flag that can be set for modes. Let's
honor that flag if it's there.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Fixes: 63495f6b4aed ("drm/vc4: hdmi: Make sure our clock rate is within limits")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-4-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vc4/vc4_hdmi.c