drm/omap: Move DISPC timing checks to CRTC .mode_valid() operation

The DISPC timings checks relate to the CRTC, but they're performed in
the encoder and connector .atomic_check() and .mode_valid() operations.
Move them to the CRTC .mode_valid() operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Laurent Pinchart 2018-09-20 00:17:42 +03:00 committed by Tomi Valkeinen
parent df6682b435
commit 116c772107
3 changed files with 9 additions and 12 deletions

View file

@ -245,8 +245,6 @@ static int omap_connector_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct omap_connector *omap_connector = to_omap_connector(connector);
enum omap_channel channel = omap_connector->output->dispc_channel;
struct omap_drm_private *priv = connector->dev->dev_private;
struct omap_dss_device *dssdev;
struct videomode vm = {0};
struct drm_device *dev = connector->dev;
@ -256,10 +254,6 @@ static int omap_connector_mode_valid(struct drm_connector *connector,
drm_display_mode_to_videomode(mode, &vm);
mode->vrefresh = drm_mode_vrefresh(mode);
r = priv->dispc_ops->mgr_check_timings(priv->dispc, channel, &vm);
if (r)
goto done;
for (dssdev = omap_connector->output; dssdev; dssdev = dssdev->next) {
if (!dssdev->ops->check_timings)
continue;