drm: Use mode_valid() in atomic modeset
authorJose Abreu <Jose.Abreu@synopsys.com>
Thu, 25 May 2017 14:19:16 +0000 (15:19 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 30 May 2017 06:37:51 +0000 (08:37 +0200)
commitfaf94a0883cedce892ef10a258c9388929462525
tree8fb3241b64545ba7e4064590ddab9708354c0a31
parent97f973d652602425f4dc31a13e8605d5841afe25
drm: Use mode_valid() in atomic modeset

This patches makes use of the new mode_valid() callbacks introduced
previously to validate the full video pipeline when modesetting.

This calls the connector->mode_valid(), encoder->mode_valid(),
bridge->mode_valid() and crtc->mode_valid() so that we can
make sure that the mode will be accepted in every components.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Changes v1->v2:
- Removed call to connector->mode_valid (Ville, Daniel)
- Changed function name (Ville)
- Use for_each_new_connector_in_state (Ville)
- Do not validate if connector and mode didn't change (Ville)
- Use new helpers to call mode_valid

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/a457d6a69ad07b3936304653c919068c430c0857.1495720737.git.joabreu@synopsys.com
drivers/gpu/drm/drm_atomic_helper.c