@@ -50,10 +50,6 @@ static void bochs_crtc_mode_set_nofb(struct drm_crtc *crtc)
bochs_hw_setmode(bochs, &crtc->mode);
}
-static void bochs_crtc_prepare(struct drm_crtc *crtc)
-{
-}
-
static void bochs_crtc_commit(struct drm_crtc *crtc)
{
}
@@ -86,7 +82,7 @@ static int bochs_crtc_page_flip(struct drm_crtc *crtc,
/* These provide the minimum set of functions required to handle a CRTC */
static const struct drm_crtc_funcs bochs_crtc_funcs = {
.gamma_set = bochs_crtc_gamma_set,
- .set_config = drm_crtc_helper_set_config,
+ .set_config = drm_atomic_helper_set_config,
.destroy = drm_crtc_cleanup,
.page_flip = bochs_crtc_page_flip,
.reset = drm_atomic_helper_crtc_reset,
@@ -97,10 +93,7 @@ static const struct drm_crtc_funcs bochs_crtc_funcs = {
static const struct drm_crtc_helper_funcs bochs_helper_funcs = {
.dpms = bochs_crtc_dpms,
.mode_fixup = bochs_crtc_mode_fixup,
- .mode_set = drm_helper_crtc_mode_set,
- .mode_set_base = drm_helper_crtc_mode_set_base,
.mode_set_nofb = bochs_crtc_mode_set_nofb,
- .prepare = bochs_crtc_prepare,
.commit = bochs_crtc_commit,
};
@@ -162,7 +155,15 @@ static void bochs_plane_cleanup_fb(struct drm_plane *plane,
static int bochs_plane_atomic_check(struct drm_plane *plane,
struct drm_plane_state *plane_state)
{
- return 0;
+ bool visible;
+
+ if (!plane_state->fb)
+ return 0;
+
+ return drm_atomic_helper_plane_check_update(plane_state,
+ DRM_PLANE_HELPER_NO_SCALING,
+ DRM_PLANE_HELPER_NO_SCALING,
+ false, &visible);
}
static void bochs_plane_atomic_update(struct drm_plane *plane,
@@ -227,10 +228,6 @@ static void bochs_encoder_dpms(struct drm_encoder *encoder, int state)
{
}
-static void bochs_encoder_prepare(struct drm_encoder *encoder)
-{
-}
-
static void bochs_encoder_commit(struct drm_encoder *encoder)
{
}
@@ -239,7 +236,6 @@ static const struct drm_encoder_helper_funcs bochs_encoder_helper_funcs = {
.dpms = bochs_encoder_dpms,
.mode_fixup = bochs_encoder_mode_fixup,
.mode_set = bochs_encoder_mode_set,
- .prepare = bochs_encoder_prepare,
.commit = bochs_encoder_commit,
};