static int drm_simple_kms_crtc_check(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{
- struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
- crtc);
- bool has_primary = crtc_state->plane_mask &
- drm_plane_mask(crtc->primary);
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
+ int ret;
- /* We always want to have an active plane with an active CRTC */
- if (has_primary != crtc_state->enable)
- return -EINVAL;
+ ret = drm_atomic_helper_check_crtc_state(crtc_state, false);
+ if (ret)
+ return ret;
return drm_atomic_add_affected_planes(state, crtc);
}
ret = drm_atomic_helper_check_plane_state(plane_state, crtc_state,
DRM_PLANE_HELPER_NO_SCALING,
DRM_PLANE_HELPER_NO_SCALING,
- false, true);
+ false, false);
if (ret)
return ret;