Lines Matching refs:state

103 	crtc->state = crtc_state;  in __drm_atomic_helper_crtc_reset()
117 kzalloc(sizeof(*crtc->state), GFP_KERNEL); in drm_atomic_helper_crtc_reset()
119 if (crtc->state) in drm_atomic_helper_crtc_reset()
120 crtc->funcs->atomic_destroy_state(crtc, crtc->state); in drm_atomic_helper_crtc_reset()
135 struct drm_crtc_state *state) in __drm_atomic_helper_crtc_duplicate_state() argument
137 memcpy(state, crtc->state, sizeof(*state)); in __drm_atomic_helper_crtc_duplicate_state()
139 if (state->mode_blob) in __drm_atomic_helper_crtc_duplicate_state()
140 drm_property_blob_get(state->mode_blob); in __drm_atomic_helper_crtc_duplicate_state()
141 if (state->degamma_lut) in __drm_atomic_helper_crtc_duplicate_state()
142 drm_property_blob_get(state->degamma_lut); in __drm_atomic_helper_crtc_duplicate_state()
143 if (state->ctm) in __drm_atomic_helper_crtc_duplicate_state()
144 drm_property_blob_get(state->ctm); in __drm_atomic_helper_crtc_duplicate_state()
145 if (state->gamma_lut) in __drm_atomic_helper_crtc_duplicate_state()
146 drm_property_blob_get(state->gamma_lut); in __drm_atomic_helper_crtc_duplicate_state()
147 state->mode_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
148 state->active_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
149 state->planes_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
150 state->connectors_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
151 state->color_mgmt_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
152 state->zpos_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
153 state->commit = NULL; in __drm_atomic_helper_crtc_duplicate_state()
154 state->event = NULL; in __drm_atomic_helper_crtc_duplicate_state()
155 state->async_flip = false; in __drm_atomic_helper_crtc_duplicate_state()
158 state->active = drm_atomic_crtc_effectively_active(state); in __drm_atomic_helper_crtc_duplicate_state()
159 state->self_refresh_active = false; in __drm_atomic_helper_crtc_duplicate_state()
173 struct drm_crtc_state *state; in drm_atomic_helper_crtc_duplicate_state() local
175 if (WARN_ON(!crtc->state)) in drm_atomic_helper_crtc_duplicate_state()
178 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_crtc_duplicate_state()
179 if (state) in drm_atomic_helper_crtc_duplicate_state()
180 __drm_atomic_helper_crtc_duplicate_state(crtc, state); in drm_atomic_helper_crtc_duplicate_state()
182 return state; in drm_atomic_helper_crtc_duplicate_state()
194 void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state) in __drm_atomic_helper_crtc_destroy_state() argument
196 if (state->commit) { in __drm_atomic_helper_crtc_destroy_state()
206 if (state->event && state->commit->abort_completion) in __drm_atomic_helper_crtc_destroy_state()
207 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_crtc_destroy_state()
209 kfree(state->commit->event); in __drm_atomic_helper_crtc_destroy_state()
210 state->commit->event = NULL; in __drm_atomic_helper_crtc_destroy_state()
212 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_crtc_destroy_state()
215 drm_property_blob_put(state->mode_blob); in __drm_atomic_helper_crtc_destroy_state()
216 drm_property_blob_put(state->degamma_lut); in __drm_atomic_helper_crtc_destroy_state()
217 drm_property_blob_put(state->ctm); in __drm_atomic_helper_crtc_destroy_state()
218 drm_property_blob_put(state->gamma_lut); in __drm_atomic_helper_crtc_destroy_state()
231 struct drm_crtc_state *state) in drm_atomic_helper_crtc_destroy_state() argument
233 __drm_atomic_helper_crtc_destroy_state(state); in drm_atomic_helper_crtc_destroy_state()
234 kfree(state); in drm_atomic_helper_crtc_destroy_state()
314 plane->state = plane_state; in __drm_atomic_helper_plane_reset()
327 if (plane->state) in drm_atomic_helper_plane_reset()
328 __drm_atomic_helper_plane_destroy_state(plane->state); in drm_atomic_helper_plane_reset()
330 kfree(plane->state); in drm_atomic_helper_plane_reset()
331 plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL); in drm_atomic_helper_plane_reset()
332 if (plane->state) in drm_atomic_helper_plane_reset()
333 __drm_atomic_helper_plane_reset(plane, plane->state); in drm_atomic_helper_plane_reset()
346 struct drm_plane_state *state) in __drm_atomic_helper_plane_duplicate_state() argument
348 memcpy(state, plane->state, sizeof(*state)); in __drm_atomic_helper_plane_duplicate_state()
350 if (state->fb) in __drm_atomic_helper_plane_duplicate_state()
351 drm_framebuffer_get(state->fb); in __drm_atomic_helper_plane_duplicate_state()
353 state->fence = NULL; in __drm_atomic_helper_plane_duplicate_state()
354 state->commit = NULL; in __drm_atomic_helper_plane_duplicate_state()
355 state->fb_damage_clips = NULL; in __drm_atomic_helper_plane_duplicate_state()
356 state->color_mgmt_changed = false; in __drm_atomic_helper_plane_duplicate_state()
370 struct drm_plane_state *state; in drm_atomic_helper_plane_duplicate_state() local
372 if (WARN_ON(!plane->state)) in drm_atomic_helper_plane_duplicate_state()
375 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_plane_duplicate_state()
376 if (state) in drm_atomic_helper_plane_duplicate_state()
377 __drm_atomic_helper_plane_duplicate_state(plane, state); in drm_atomic_helper_plane_duplicate_state()
379 return state; in drm_atomic_helper_plane_duplicate_state()
391 void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) in __drm_atomic_helper_plane_destroy_state() argument
393 if (state->fb) in __drm_atomic_helper_plane_destroy_state()
394 drm_framebuffer_put(state->fb); in __drm_atomic_helper_plane_destroy_state()
396 if (state->fence) in __drm_atomic_helper_plane_destroy_state()
397 dma_fence_put(state->fence); in __drm_atomic_helper_plane_destroy_state()
399 if (state->commit) in __drm_atomic_helper_plane_destroy_state()
400 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_plane_destroy_state()
402 drm_property_blob_put(state->fb_damage_clips); in __drm_atomic_helper_plane_destroy_state()
415 struct drm_plane_state *state) in drm_atomic_helper_plane_destroy_state() argument
417 __drm_atomic_helper_plane_destroy_state(state); in drm_atomic_helper_plane_destroy_state()
418 kfree(state); in drm_atomic_helper_plane_destroy_state()
457 connector->state = conn_state; in __drm_atomic_helper_connector_reset()
474 if (connector->state) in drm_atomic_helper_connector_reset()
475 __drm_atomic_helper_connector_destroy_state(connector->state); in drm_atomic_helper_connector_reset()
477 kfree(connector->state); in drm_atomic_helper_connector_reset()
491 struct drm_connector_state *state = connector->state; in drm_atomic_helper_connector_tv_margins_reset() local
493 state->tv.margins.left = cmdline->tv_margins.left; in drm_atomic_helper_connector_tv_margins_reset()
494 state->tv.margins.right = cmdline->tv_margins.right; in drm_atomic_helper_connector_tv_margins_reset()
495 state->tv.margins.top = cmdline->tv_margins.top; in drm_atomic_helper_connector_tv_margins_reset()
496 state->tv.margins.bottom = cmdline->tv_margins.bottom; in drm_atomic_helper_connector_tv_margins_reset()
510 struct drm_connector_state *state = connector->state; in drm_atomic_helper_connector_tv_reset() local
518 state->tv.mode = val; in drm_atomic_helper_connector_tv_reset()
521 state->tv.mode = cmdline->tv_mode; in drm_atomic_helper_connector_tv_reset()
527 state->tv.select_subconnector = val; in drm_atomic_helper_connector_tv_reset()
533 state->tv.subconnector = val; in drm_atomic_helper_connector_tv_reset()
539 state->tv.brightness = val; in drm_atomic_helper_connector_tv_reset()
545 state->tv.contrast = val; in drm_atomic_helper_connector_tv_reset()
551 state->tv.flicker_reduction = val; in drm_atomic_helper_connector_tv_reset()
557 state->tv.overscan = val; in drm_atomic_helper_connector_tv_reset()
563 state->tv.saturation = val; in drm_atomic_helper_connector_tv_reset()
569 state->tv.hue = val; in drm_atomic_helper_connector_tv_reset()
587 struct drm_atomic_state *state) in drm_atomic_helper_connector_tv_check() argument
590 drm_atomic_get_old_connector_state(state, connector); in drm_atomic_helper_connector_tv_check()
592 drm_atomic_get_new_connector_state(state, connector); in drm_atomic_helper_connector_tv_check()
600 crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in drm_atomic_helper_connector_tv_check()
634 struct drm_connector_state *state) in __drm_atomic_helper_connector_duplicate_state() argument
636 memcpy(state, connector->state, sizeof(*state)); in __drm_atomic_helper_connector_duplicate_state()
637 if (state->crtc) in __drm_atomic_helper_connector_duplicate_state()
639 state->commit = NULL; in __drm_atomic_helper_connector_duplicate_state()
641 if (state->hdr_output_metadata) in __drm_atomic_helper_connector_duplicate_state()
642 drm_property_blob_get(state->hdr_output_metadata); in __drm_atomic_helper_connector_duplicate_state()
645 state->writeback_job = NULL; in __drm_atomic_helper_connector_duplicate_state()
659 struct drm_connector_state *state; in drm_atomic_helper_connector_duplicate_state() local
661 if (WARN_ON(!connector->state)) in drm_atomic_helper_connector_duplicate_state()
664 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_connector_duplicate_state()
665 if (state) in drm_atomic_helper_connector_duplicate_state()
666 __drm_atomic_helper_connector_duplicate_state(connector, state); in drm_atomic_helper_connector_duplicate_state()
668 return state; in drm_atomic_helper_connector_duplicate_state()
681 __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state) in __drm_atomic_helper_connector_destroy_state() argument
683 if (state->crtc) in __drm_atomic_helper_connector_destroy_state()
684 drm_connector_put(state->connector); in __drm_atomic_helper_connector_destroy_state()
686 if (state->commit) in __drm_atomic_helper_connector_destroy_state()
687 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_connector_destroy_state()
689 if (state->writeback_job) in __drm_atomic_helper_connector_destroy_state()
690 drm_writeback_cleanup_job(state->writeback_job); in __drm_atomic_helper_connector_destroy_state()
692 drm_property_blob_put(state->hdr_output_metadata); in __drm_atomic_helper_connector_destroy_state()
705 struct drm_connector_state *state) in drm_atomic_helper_connector_destroy_state() argument
707 __drm_atomic_helper_connector_destroy_state(state); in drm_atomic_helper_connector_destroy_state()
708 kfree(state); in drm_atomic_helper_connector_destroy_state()
721 struct drm_private_state *state) in __drm_atomic_helper_private_obj_duplicate_state() argument
723 memcpy(state, obj->state, sizeof(*state)); in __drm_atomic_helper_private_obj_duplicate_state()
736 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_duplicate_state() argument
739 &state->base); in __drm_atomic_helper_bridge_duplicate_state()
740 state->bridge = bridge; in __drm_atomic_helper_bridge_duplicate_state()
758 if (WARN_ON(!bridge->base.state)) in drm_atomic_helper_bridge_duplicate_state()
781 struct drm_bridge_state *state) in drm_atomic_helper_bridge_destroy_state() argument
783 kfree(state); in drm_atomic_helper_bridge_destroy_state()
798 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_reset() argument
800 memset(state, 0, sizeof(*state)); in __drm_atomic_helper_bridge_reset()
801 state->bridge = bridge; in __drm_atomic_helper_bridge_reset()