Lines Matching refs:state

102 	crtc->state = crtc_state;  in __drm_atomic_helper_crtc_reset()
116 kzalloc(sizeof(*crtc->state), GFP_KERNEL); in drm_atomic_helper_crtc_reset()
118 if (crtc->state) in drm_atomic_helper_crtc_reset()
119 crtc->funcs->atomic_destroy_state(crtc, crtc->state); in drm_atomic_helper_crtc_reset()
134 struct drm_crtc_state *state) in __drm_atomic_helper_crtc_duplicate_state() argument
136 memcpy(state, crtc->state, sizeof(*state)); in __drm_atomic_helper_crtc_duplicate_state()
138 if (state->mode_blob) in __drm_atomic_helper_crtc_duplicate_state()
139 drm_property_blob_get(state->mode_blob); in __drm_atomic_helper_crtc_duplicate_state()
140 if (state->degamma_lut) in __drm_atomic_helper_crtc_duplicate_state()
141 drm_property_blob_get(state->degamma_lut); in __drm_atomic_helper_crtc_duplicate_state()
142 if (state->ctm) in __drm_atomic_helper_crtc_duplicate_state()
143 drm_property_blob_get(state->ctm); in __drm_atomic_helper_crtc_duplicate_state()
144 if (state->gamma_lut) in __drm_atomic_helper_crtc_duplicate_state()
145 drm_property_blob_get(state->gamma_lut); in __drm_atomic_helper_crtc_duplicate_state()
146 state->mode_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
147 state->active_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
148 state->planes_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
149 state->connectors_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
150 state->color_mgmt_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
151 state->zpos_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
152 state->commit = NULL; in __drm_atomic_helper_crtc_duplicate_state()
153 state->event = NULL; in __drm_atomic_helper_crtc_duplicate_state()
154 state->async_flip = false; in __drm_atomic_helper_crtc_duplicate_state()
157 state->active = drm_atomic_crtc_effectively_active(state); in __drm_atomic_helper_crtc_duplicate_state()
158 state->self_refresh_active = false; in __drm_atomic_helper_crtc_duplicate_state()
172 struct drm_crtc_state *state; in drm_atomic_helper_crtc_duplicate_state() local
174 if (WARN_ON(!crtc->state)) in drm_atomic_helper_crtc_duplicate_state()
177 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_crtc_duplicate_state()
178 if (state) in drm_atomic_helper_crtc_duplicate_state()
179 __drm_atomic_helper_crtc_duplicate_state(crtc, state); in drm_atomic_helper_crtc_duplicate_state()
181 return state; in drm_atomic_helper_crtc_duplicate_state()
193 void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state) in __drm_atomic_helper_crtc_destroy_state() argument
195 if (state->commit) { in __drm_atomic_helper_crtc_destroy_state()
205 if (state->event && state->commit->abort_completion) in __drm_atomic_helper_crtc_destroy_state()
206 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_crtc_destroy_state()
208 kfree(state->commit->event); in __drm_atomic_helper_crtc_destroy_state()
209 state->commit->event = NULL; in __drm_atomic_helper_crtc_destroy_state()
211 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_crtc_destroy_state()
214 drm_property_blob_put(state->mode_blob); in __drm_atomic_helper_crtc_destroy_state()
215 drm_property_blob_put(state->degamma_lut); in __drm_atomic_helper_crtc_destroy_state()
216 drm_property_blob_put(state->ctm); in __drm_atomic_helper_crtc_destroy_state()
217 drm_property_blob_put(state->gamma_lut); in __drm_atomic_helper_crtc_destroy_state()
230 struct drm_crtc_state *state) in drm_atomic_helper_crtc_destroy_state() argument
232 __drm_atomic_helper_crtc_destroy_state(state); in drm_atomic_helper_crtc_destroy_state()
233 kfree(state); in drm_atomic_helper_crtc_destroy_state()
313 plane->state = plane_state; in __drm_atomic_helper_plane_reset()
326 if (plane->state) in drm_atomic_helper_plane_reset()
327 __drm_atomic_helper_plane_destroy_state(plane->state); in drm_atomic_helper_plane_reset()
329 kfree(plane->state); in drm_atomic_helper_plane_reset()
330 plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL); in drm_atomic_helper_plane_reset()
331 if (plane->state) in drm_atomic_helper_plane_reset()
332 __drm_atomic_helper_plane_reset(plane, plane->state); in drm_atomic_helper_plane_reset()
345 struct drm_plane_state *state) in __drm_atomic_helper_plane_duplicate_state() argument
347 memcpy(state, plane->state, sizeof(*state)); in __drm_atomic_helper_plane_duplicate_state()
349 if (state->fb) in __drm_atomic_helper_plane_duplicate_state()
350 drm_framebuffer_get(state->fb); in __drm_atomic_helper_plane_duplicate_state()
352 state->fence = NULL; in __drm_atomic_helper_plane_duplicate_state()
353 state->commit = NULL; in __drm_atomic_helper_plane_duplicate_state()
354 state->fb_damage_clips = NULL; in __drm_atomic_helper_plane_duplicate_state()
355 state->color_mgmt_changed = false; in __drm_atomic_helper_plane_duplicate_state()
369 struct drm_plane_state *state; in drm_atomic_helper_plane_duplicate_state() local
371 if (WARN_ON(!plane->state)) in drm_atomic_helper_plane_duplicate_state()
374 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_plane_duplicate_state()
375 if (state) in drm_atomic_helper_plane_duplicate_state()
376 __drm_atomic_helper_plane_duplicate_state(plane, state); in drm_atomic_helper_plane_duplicate_state()
378 return state; in drm_atomic_helper_plane_duplicate_state()
390 void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) in __drm_atomic_helper_plane_destroy_state() argument
392 if (state->fb) in __drm_atomic_helper_plane_destroy_state()
393 drm_framebuffer_put(state->fb); in __drm_atomic_helper_plane_destroy_state()
395 if (state->fence) in __drm_atomic_helper_plane_destroy_state()
396 dma_fence_put(state->fence); in __drm_atomic_helper_plane_destroy_state()
398 if (state->commit) in __drm_atomic_helper_plane_destroy_state()
399 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_plane_destroy_state()
401 drm_property_blob_put(state->fb_damage_clips); in __drm_atomic_helper_plane_destroy_state()
414 struct drm_plane_state *state) in drm_atomic_helper_plane_destroy_state() argument
416 __drm_atomic_helper_plane_destroy_state(state); in drm_atomic_helper_plane_destroy_state()
417 kfree(state); in drm_atomic_helper_plane_destroy_state()
456 connector->state = conn_state; in __drm_atomic_helper_connector_reset()
473 if (connector->state) in drm_atomic_helper_connector_reset()
474 __drm_atomic_helper_connector_destroy_state(connector->state); in drm_atomic_helper_connector_reset()
476 kfree(connector->state); in drm_atomic_helper_connector_reset()
490 struct drm_connector_state *state = connector->state; in drm_atomic_helper_connector_tv_margins_reset() local
492 state->tv.margins.left = cmdline->tv_margins.left; in drm_atomic_helper_connector_tv_margins_reset()
493 state->tv.margins.right = cmdline->tv_margins.right; in drm_atomic_helper_connector_tv_margins_reset()
494 state->tv.margins.top = cmdline->tv_margins.top; in drm_atomic_helper_connector_tv_margins_reset()
495 state->tv.margins.bottom = cmdline->tv_margins.bottom; in drm_atomic_helper_connector_tv_margins_reset()
509 struct drm_connector_state *state = connector->state; in drm_atomic_helper_connector_tv_reset() local
517 state->tv.mode = val; in drm_atomic_helper_connector_tv_reset()
520 state->tv.mode = cmdline->tv_mode; in drm_atomic_helper_connector_tv_reset()
526 state->tv.select_subconnector = val; in drm_atomic_helper_connector_tv_reset()
532 state->tv.subconnector = val; in drm_atomic_helper_connector_tv_reset()
538 state->tv.brightness = val; in drm_atomic_helper_connector_tv_reset()
544 state->tv.contrast = val; in drm_atomic_helper_connector_tv_reset()
550 state->tv.flicker_reduction = val; in drm_atomic_helper_connector_tv_reset()
556 state->tv.overscan = val; in drm_atomic_helper_connector_tv_reset()
562 state->tv.saturation = val; in drm_atomic_helper_connector_tv_reset()
568 state->tv.hue = val; in drm_atomic_helper_connector_tv_reset()
586 struct drm_atomic_state *state) in drm_atomic_helper_connector_tv_check() argument
589 drm_atomic_get_old_connector_state(state, connector); in drm_atomic_helper_connector_tv_check()
591 drm_atomic_get_new_connector_state(state, connector); in drm_atomic_helper_connector_tv_check()
599 crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in drm_atomic_helper_connector_tv_check()
633 struct drm_connector_state *state) in __drm_atomic_helper_connector_duplicate_state() argument
635 memcpy(state, connector->state, sizeof(*state)); in __drm_atomic_helper_connector_duplicate_state()
636 if (state->crtc) in __drm_atomic_helper_connector_duplicate_state()
638 state->commit = NULL; in __drm_atomic_helper_connector_duplicate_state()
640 if (state->hdr_output_metadata) in __drm_atomic_helper_connector_duplicate_state()
641 drm_property_blob_get(state->hdr_output_metadata); in __drm_atomic_helper_connector_duplicate_state()
644 state->writeback_job = NULL; in __drm_atomic_helper_connector_duplicate_state()
658 struct drm_connector_state *state; in drm_atomic_helper_connector_duplicate_state() local
660 if (WARN_ON(!connector->state)) in drm_atomic_helper_connector_duplicate_state()
663 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_connector_duplicate_state()
664 if (state) in drm_atomic_helper_connector_duplicate_state()
665 __drm_atomic_helper_connector_duplicate_state(connector, state); in drm_atomic_helper_connector_duplicate_state()
667 return state; in drm_atomic_helper_connector_duplicate_state()
680 __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state) in __drm_atomic_helper_connector_destroy_state() argument
682 if (state->crtc) in __drm_atomic_helper_connector_destroy_state()
683 drm_connector_put(state->connector); in __drm_atomic_helper_connector_destroy_state()
685 if (state->commit) in __drm_atomic_helper_connector_destroy_state()
686 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_connector_destroy_state()
688 if (state->writeback_job) in __drm_atomic_helper_connector_destroy_state()
689 drm_writeback_cleanup_job(state->writeback_job); in __drm_atomic_helper_connector_destroy_state()
691 drm_property_blob_put(state->hdr_output_metadata); in __drm_atomic_helper_connector_destroy_state()
704 struct drm_connector_state *state) in drm_atomic_helper_connector_destroy_state() argument
706 __drm_atomic_helper_connector_destroy_state(state); in drm_atomic_helper_connector_destroy_state()
707 kfree(state); in drm_atomic_helper_connector_destroy_state()
720 struct drm_private_state *state) in __drm_atomic_helper_private_obj_duplicate_state() argument
722 memcpy(state, obj->state, sizeof(*state)); in __drm_atomic_helper_private_obj_duplicate_state()
735 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_duplicate_state() argument
738 &state->base); in __drm_atomic_helper_bridge_duplicate_state()
739 state->bridge = bridge; in __drm_atomic_helper_bridge_duplicate_state()
757 if (WARN_ON(!bridge->base.state)) in drm_atomic_helper_bridge_duplicate_state()
780 struct drm_bridge_state *state) in drm_atomic_helper_bridge_destroy_state() argument
782 kfree(state); in drm_atomic_helper_bridge_destroy_state()
797 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_reset() argument
799 memset(state, 0, sizeof(*state)); in __drm_atomic_helper_bridge_reset()
800 state->bridge = bridge; in __drm_atomic_helper_bridge_reset()