|
@@ -846,6 +846,17 @@ static void vc4_crtc_destroy_state(struct drm_crtc *crtc,
|
|
drm_atomic_helper_crtc_destroy_state(crtc, state);
|
|
drm_atomic_helper_crtc_destroy_state(crtc, state);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void
|
|
|
|
+vc4_crtc_reset(struct drm_crtc *crtc)
|
|
|
|
+{
|
|
|
|
+ if (crtc->state)
|
|
|
|
+ __drm_atomic_helper_crtc_destroy_state(crtc->state);
|
|
|
|
+
|
|
|
|
+ crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
|
|
|
|
+ if (crtc->state)
|
|
|
|
+ crtc->state->crtc = crtc;
|
|
|
|
+}
|
|
|
|
+
|
|
static const struct drm_crtc_funcs vc4_crtc_funcs = {
|
|
static const struct drm_crtc_funcs vc4_crtc_funcs = {
|
|
.set_config = drm_atomic_helper_set_config,
|
|
.set_config = drm_atomic_helper_set_config,
|
|
.destroy = vc4_crtc_destroy,
|
|
.destroy = vc4_crtc_destroy,
|
|
@@ -853,7 +864,7 @@ static const struct drm_crtc_funcs vc4_crtc_funcs = {
|
|
.set_property = NULL,
|
|
.set_property = NULL,
|
|
.cursor_set = NULL, /* handled by drm_mode_cursor_universal */
|
|
.cursor_set = NULL, /* handled by drm_mode_cursor_universal */
|
|
.cursor_move = NULL, /* handled by drm_mode_cursor_universal */
|
|
.cursor_move = NULL, /* handled by drm_mode_cursor_universal */
|
|
- .reset = drm_atomic_helper_crtc_reset,
|
|
|
|
|
|
+ .reset = vc4_crtc_reset,
|
|
.atomic_duplicate_state = vc4_crtc_duplicate_state,
|
|
.atomic_duplicate_state = vc4_crtc_duplicate_state,
|
|
.atomic_destroy_state = vc4_crtc_destroy_state,
|
|
.atomic_destroy_state = vc4_crtc_destroy_state,
|
|
.gamma_set = vc4_crtc_gamma_set,
|
|
.gamma_set = vc4_crtc_gamma_set,
|