drm/sun4i: hdmi: Move the mode_valid callback to the encoder
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 20 Dec 2017 10:52:47 +0000 (11:52 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 20 Dec 2017 11:59:46 +0000 (12:59 +0100)
commit2c08cd7c20968ddf71feeac2265b4741d2b3fdde
treeded30b72a517e64d50befb89f5247c6b31280405
parent92411f6d7f1afcc95e54295d40e96a75385212ec
drm/sun4i: hdmi: Move the mode_valid callback to the encoder

When attached to the connector, the mode_valid callback will only filter
the modes provided by the connector itself as part of its probe.

However, it will not be doing it when the mode is provided by the
userspace, which still might result in a broken configuration.

In order to enforce these constraints, move our mode_valid callback to the
encoder which doesn't have this behaviour.

Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[maxime: Wrote the commit log in order to update the patch from the merged
 v3 to the v4 that was correct.]
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/0fa230a8-d01d-561a-f74f-6b4fd421255b@xs4all.nl
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c