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()
299 plane->state = plane_state; in __drm_atomic_helper_plane_reset()
312 if (plane->state) in drm_atomic_helper_plane_reset()
313 __drm_atomic_helper_plane_destroy_state(plane->state); in drm_atomic_helper_plane_reset()
315 kfree(plane->state); in drm_atomic_helper_plane_reset()
316 plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL); in drm_atomic_helper_plane_reset()
317 if (plane->state) in drm_atomic_helper_plane_reset()
318 __drm_atomic_helper_plane_reset(plane, plane->state); in drm_atomic_helper_plane_reset()
331 struct drm_plane_state *state) in __drm_atomic_helper_plane_duplicate_state() argument
333 memcpy(state, plane->state, sizeof(*state)); in __drm_atomic_helper_plane_duplicate_state()
335 if (state->fb) in __drm_atomic_helper_plane_duplicate_state()
336 drm_framebuffer_get(state->fb); in __drm_atomic_helper_plane_duplicate_state()
338 state->fence = NULL; in __drm_atomic_helper_plane_duplicate_state()
339 state->commit = NULL; in __drm_atomic_helper_plane_duplicate_state()
340 state->fb_damage_clips = NULL; in __drm_atomic_helper_plane_duplicate_state()
354 struct drm_plane_state *state; in drm_atomic_helper_plane_duplicate_state() local
356 if (WARN_ON(!plane->state)) in drm_atomic_helper_plane_duplicate_state()
359 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_plane_duplicate_state()
360 if (state) in drm_atomic_helper_plane_duplicate_state()
361 __drm_atomic_helper_plane_duplicate_state(plane, state); in drm_atomic_helper_plane_duplicate_state()
363 return state; in drm_atomic_helper_plane_duplicate_state()
375 void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) in __drm_atomic_helper_plane_destroy_state() argument
377 if (state->fb) in __drm_atomic_helper_plane_destroy_state()
378 drm_framebuffer_put(state->fb); in __drm_atomic_helper_plane_destroy_state()
380 if (state->fence) in __drm_atomic_helper_plane_destroy_state()
381 dma_fence_put(state->fence); in __drm_atomic_helper_plane_destroy_state()
383 if (state->commit) in __drm_atomic_helper_plane_destroy_state()
384 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_plane_destroy_state()
386 drm_property_blob_put(state->fb_damage_clips); in __drm_atomic_helper_plane_destroy_state()
399 struct drm_plane_state *state) in drm_atomic_helper_plane_destroy_state() argument
401 __drm_atomic_helper_plane_destroy_state(state); in drm_atomic_helper_plane_destroy_state()
402 kfree(state); in drm_atomic_helper_plane_destroy_state()
441 connector->state = conn_state; in __drm_atomic_helper_connector_reset()
458 if (connector->state) in drm_atomic_helper_connector_reset()
459 __drm_atomic_helper_connector_destroy_state(connector->state); in drm_atomic_helper_connector_reset()
461 kfree(connector->state); in drm_atomic_helper_connector_reset()
475 struct drm_connector_state *state = connector->state; in drm_atomic_helper_connector_tv_margins_reset() local
477 state->tv.margins.left = cmdline->tv_margins.left; in drm_atomic_helper_connector_tv_margins_reset()
478 state->tv.margins.right = cmdline->tv_margins.right; in drm_atomic_helper_connector_tv_margins_reset()
479 state->tv.margins.top = cmdline->tv_margins.top; in drm_atomic_helper_connector_tv_margins_reset()
480 state->tv.margins.bottom = cmdline->tv_margins.bottom; in drm_atomic_helper_connector_tv_margins_reset()
494 struct drm_connector_state *state = connector->state; in drm_atomic_helper_connector_tv_reset() local
502 state->tv.mode = val; in drm_atomic_helper_connector_tv_reset()
505 state->tv.mode = cmdline->tv_mode; in drm_atomic_helper_connector_tv_reset()
511 state->tv.select_subconnector = val; in drm_atomic_helper_connector_tv_reset()
517 state->tv.subconnector = val; in drm_atomic_helper_connector_tv_reset()
523 state->tv.brightness = val; in drm_atomic_helper_connector_tv_reset()
529 state->tv.contrast = val; in drm_atomic_helper_connector_tv_reset()
535 state->tv.flicker_reduction = val; in drm_atomic_helper_connector_tv_reset()
541 state->tv.overscan = val; in drm_atomic_helper_connector_tv_reset()
547 state->tv.saturation = val; in drm_atomic_helper_connector_tv_reset()
553 state->tv.hue = val; in drm_atomic_helper_connector_tv_reset()
571 struct drm_atomic_state *state) in drm_atomic_helper_connector_tv_check() argument
574 drm_atomic_get_old_connector_state(state, connector); in drm_atomic_helper_connector_tv_check()
576 drm_atomic_get_new_connector_state(state, connector); in drm_atomic_helper_connector_tv_check()
584 crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in drm_atomic_helper_connector_tv_check()
618 struct drm_connector_state *state) in __drm_atomic_helper_connector_duplicate_state() argument
620 memcpy(state, connector->state, sizeof(*state)); in __drm_atomic_helper_connector_duplicate_state()
621 if (state->crtc) in __drm_atomic_helper_connector_duplicate_state()
623 state->commit = NULL; in __drm_atomic_helper_connector_duplicate_state()
625 if (state->hdr_output_metadata) in __drm_atomic_helper_connector_duplicate_state()
626 drm_property_blob_get(state->hdr_output_metadata); in __drm_atomic_helper_connector_duplicate_state()
629 state->writeback_job = NULL; in __drm_atomic_helper_connector_duplicate_state()
643 struct drm_connector_state *state; in drm_atomic_helper_connector_duplicate_state() local
645 if (WARN_ON(!connector->state)) in drm_atomic_helper_connector_duplicate_state()
648 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_connector_duplicate_state()
649 if (state) in drm_atomic_helper_connector_duplicate_state()
650 __drm_atomic_helper_connector_duplicate_state(connector, state); in drm_atomic_helper_connector_duplicate_state()
652 return state; in drm_atomic_helper_connector_duplicate_state()
665 __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state) in __drm_atomic_helper_connector_destroy_state() argument
667 if (state->crtc) in __drm_atomic_helper_connector_destroy_state()
668 drm_connector_put(state->connector); in __drm_atomic_helper_connector_destroy_state()
670 if (state->commit) in __drm_atomic_helper_connector_destroy_state()
671 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_connector_destroy_state()
673 if (state->writeback_job) in __drm_atomic_helper_connector_destroy_state()
674 drm_writeback_cleanup_job(state->writeback_job); in __drm_atomic_helper_connector_destroy_state()
676 drm_property_blob_put(state->hdr_output_metadata); in __drm_atomic_helper_connector_destroy_state()
689 struct drm_connector_state *state) in drm_atomic_helper_connector_destroy_state() argument
691 __drm_atomic_helper_connector_destroy_state(state); in drm_atomic_helper_connector_destroy_state()
692 kfree(state); in drm_atomic_helper_connector_destroy_state()
705 struct drm_private_state *state) in __drm_atomic_helper_private_obj_duplicate_state() argument
707 memcpy(state, obj->state, sizeof(*state)); in __drm_atomic_helper_private_obj_duplicate_state()
720 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_duplicate_state() argument
723 &state->base); in __drm_atomic_helper_bridge_duplicate_state()
724 state->bridge = bridge; in __drm_atomic_helper_bridge_duplicate_state()
742 if (WARN_ON(!bridge->base.state)) in drm_atomic_helper_bridge_duplicate_state()
765 struct drm_bridge_state *state) in drm_atomic_helper_bridge_destroy_state() argument
767 kfree(state); in drm_atomic_helper_bridge_destroy_state()
782 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_reset() argument
784 memset(state, 0, sizeof(*state)); in __drm_atomic_helper_bridge_reset()
785 state->bridge = bridge; in __drm_atomic_helper_bridge_reset()