static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{
- struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
- crtc);
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
struct drm_device *dev = crtc->dev;
struct ast_crtc_state *ast_state;
const struct drm_format_info *format;
bool succ;
+ int ret;
+
+ ret = drm_atomic_helper_check_crtc_state(crtc_state, false);
+ if (ret)
+ return ret;
if (!crtc_state->enable)
- return 0; /* no mode checks if CRTC is being disabled */
+ goto out;
ast_state = to_ast_crtc_state(crtc_state);
if (!succ)
return -EINVAL;
- return 0;
+out:
+ return drm_atomic_add_affected_planes(state, crtc);
}
static void ast_crtc_helper_atomic_begin(struct drm_crtc *crtc, struct drm_atomic_state *state)