Lines Matching refs:crtc_state
938 struct drm_crtc_state *crtc_state; in drm_helper_crtc_mode_set() local
943 crtc_state = crtc->funcs->atomic_duplicate_state(crtc); in drm_helper_crtc_mode_set()
945 crtc_state = kmemdup(crtc->state, sizeof(*crtc_state), in drm_helper_crtc_mode_set()
948 crtc_state = kzalloc(sizeof(*crtc_state), GFP_KERNEL); in drm_helper_crtc_mode_set()
949 if (!crtc_state) in drm_helper_crtc_mode_set()
951 crtc_state->crtc = crtc; in drm_helper_crtc_mode_set()
953 crtc_state->enable = true; in drm_helper_crtc_mode_set()
954 crtc_state->planes_changed = true; in drm_helper_crtc_mode_set()
955 crtc_state->mode_changed = true; in drm_helper_crtc_mode_set()
956 drm_mode_copy(&crtc_state->mode, mode); in drm_helper_crtc_mode_set()
957 drm_mode_copy(&crtc_state->adjusted_mode, adjusted_mode); in drm_helper_crtc_mode_set()
960 ret = crtc_funcs->atomic_check(crtc, crtc_state); in drm_helper_crtc_mode_set()
962 kfree(crtc_state); in drm_helper_crtc_mode_set()
968 swap(crtc->state, crtc_state); in drm_helper_crtc_mode_set()
972 if (crtc_state) { in drm_helper_crtc_mode_set()
974 crtc->funcs->atomic_destroy_state(crtc, crtc_state); in drm_helper_crtc_mode_set()
976 kfree(crtc_state); in drm_helper_crtc_mode_set()