Lines Matching refs:state
100 crtc->state = crtc_state; in __drm_atomic_helper_crtc_reset()
114 kzalloc(sizeof(*crtc->state), GFP_KERNEL); in drm_atomic_helper_crtc_reset()
116 if (crtc->state) in drm_atomic_helper_crtc_reset()
117 crtc->funcs->atomic_destroy_state(crtc, crtc->state); in drm_atomic_helper_crtc_reset()
132 struct drm_crtc_state *state) in __drm_atomic_helper_crtc_duplicate_state() argument
134 memcpy(state, crtc->state, sizeof(*state)); in __drm_atomic_helper_crtc_duplicate_state()
136 if (state->mode_blob) in __drm_atomic_helper_crtc_duplicate_state()
137 drm_property_blob_get(state->mode_blob); in __drm_atomic_helper_crtc_duplicate_state()
138 if (state->degamma_lut) in __drm_atomic_helper_crtc_duplicate_state()
139 drm_property_blob_get(state->degamma_lut); in __drm_atomic_helper_crtc_duplicate_state()
140 if (state->ctm) in __drm_atomic_helper_crtc_duplicate_state()
141 drm_property_blob_get(state->ctm); in __drm_atomic_helper_crtc_duplicate_state()
142 if (state->gamma_lut) in __drm_atomic_helper_crtc_duplicate_state()
143 drm_property_blob_get(state->gamma_lut); in __drm_atomic_helper_crtc_duplicate_state()
144 state->mode_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
145 state->active_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
146 state->planes_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
147 state->connectors_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
148 state->color_mgmt_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
149 state->zpos_changed = false; in __drm_atomic_helper_crtc_duplicate_state()
150 state->commit = NULL; in __drm_atomic_helper_crtc_duplicate_state()
151 state->event = NULL; in __drm_atomic_helper_crtc_duplicate_state()
152 state->async_flip = false; in __drm_atomic_helper_crtc_duplicate_state()
155 state->active = drm_atomic_crtc_effectively_active(state); in __drm_atomic_helper_crtc_duplicate_state()
156 state->self_refresh_active = false; in __drm_atomic_helper_crtc_duplicate_state()
170 struct drm_crtc_state *state; in drm_atomic_helper_crtc_duplicate_state() local
172 if (WARN_ON(!crtc->state)) in drm_atomic_helper_crtc_duplicate_state()
175 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_crtc_duplicate_state()
176 if (state) in drm_atomic_helper_crtc_duplicate_state()
177 __drm_atomic_helper_crtc_duplicate_state(crtc, state); in drm_atomic_helper_crtc_duplicate_state()
179 return state; in drm_atomic_helper_crtc_duplicate_state()
191 void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state) in __drm_atomic_helper_crtc_destroy_state() argument
193 if (state->commit) { in __drm_atomic_helper_crtc_destroy_state()
203 if (state->event && state->commit->abort_completion) in __drm_atomic_helper_crtc_destroy_state()
204 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_crtc_destroy_state()
206 kfree(state->commit->event); in __drm_atomic_helper_crtc_destroy_state()
207 state->commit->event = NULL; in __drm_atomic_helper_crtc_destroy_state()
209 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_crtc_destroy_state()
212 drm_property_blob_put(state->mode_blob); in __drm_atomic_helper_crtc_destroy_state()
213 drm_property_blob_put(state->degamma_lut); in __drm_atomic_helper_crtc_destroy_state()
214 drm_property_blob_put(state->ctm); in __drm_atomic_helper_crtc_destroy_state()
215 drm_property_blob_put(state->gamma_lut); in __drm_atomic_helper_crtc_destroy_state()
228 struct drm_crtc_state *state) in drm_atomic_helper_crtc_destroy_state() argument
230 __drm_atomic_helper_crtc_destroy_state(state); in drm_atomic_helper_crtc_destroy_state()
231 kfree(state); in drm_atomic_helper_crtc_destroy_state()
272 plane->state = plane_state; in __drm_atomic_helper_plane_reset()
285 if (plane->state) in drm_atomic_helper_plane_reset()
286 __drm_atomic_helper_plane_destroy_state(plane->state); in drm_atomic_helper_plane_reset()
288 kfree(plane->state); in drm_atomic_helper_plane_reset()
289 plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL); in drm_atomic_helper_plane_reset()
290 if (plane->state) in drm_atomic_helper_plane_reset()
291 __drm_atomic_helper_plane_reset(plane, plane->state); in drm_atomic_helper_plane_reset()
304 struct drm_plane_state *state) in __drm_atomic_helper_plane_duplicate_state() argument
306 memcpy(state, plane->state, sizeof(*state)); in __drm_atomic_helper_plane_duplicate_state()
308 if (state->fb) in __drm_atomic_helper_plane_duplicate_state()
309 drm_framebuffer_get(state->fb); in __drm_atomic_helper_plane_duplicate_state()
311 state->fence = NULL; in __drm_atomic_helper_plane_duplicate_state()
312 state->commit = NULL; in __drm_atomic_helper_plane_duplicate_state()
313 state->fb_damage_clips = NULL; in __drm_atomic_helper_plane_duplicate_state()
327 struct drm_plane_state *state; in drm_atomic_helper_plane_duplicate_state() local
329 if (WARN_ON(!plane->state)) in drm_atomic_helper_plane_duplicate_state()
332 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_plane_duplicate_state()
333 if (state) in drm_atomic_helper_plane_duplicate_state()
334 __drm_atomic_helper_plane_duplicate_state(plane, state); in drm_atomic_helper_plane_duplicate_state()
336 return state; in drm_atomic_helper_plane_duplicate_state()
348 void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) in __drm_atomic_helper_plane_destroy_state() argument
350 if (state->fb) in __drm_atomic_helper_plane_destroy_state()
351 drm_framebuffer_put(state->fb); in __drm_atomic_helper_plane_destroy_state()
353 if (state->fence) in __drm_atomic_helper_plane_destroy_state()
354 dma_fence_put(state->fence); in __drm_atomic_helper_plane_destroy_state()
356 if (state->commit) in __drm_atomic_helper_plane_destroy_state()
357 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_plane_destroy_state()
359 drm_property_blob_put(state->fb_damage_clips); in __drm_atomic_helper_plane_destroy_state()
372 struct drm_plane_state *state) in drm_atomic_helper_plane_destroy_state() argument
374 __drm_atomic_helper_plane_destroy_state(state); in drm_atomic_helper_plane_destroy_state()
375 kfree(state); in drm_atomic_helper_plane_destroy_state()
414 connector->state = conn_state; in __drm_atomic_helper_connector_reset()
431 if (connector->state) in drm_atomic_helper_connector_reset()
432 __drm_atomic_helper_connector_destroy_state(connector->state); in drm_atomic_helper_connector_reset()
434 kfree(connector->state); in drm_atomic_helper_connector_reset()
448 struct drm_connector_state *state = connector->state; in drm_atomic_helper_connector_tv_reset() local
450 state->tv.margins.left = cmdline->tv_margins.left; in drm_atomic_helper_connector_tv_reset()
451 state->tv.margins.right = cmdline->tv_margins.right; in drm_atomic_helper_connector_tv_reset()
452 state->tv.margins.top = cmdline->tv_margins.top; in drm_atomic_helper_connector_tv_reset()
453 state->tv.margins.bottom = cmdline->tv_margins.bottom; in drm_atomic_helper_connector_tv_reset()
467 struct drm_connector_state *state) in __drm_atomic_helper_connector_duplicate_state() argument
469 memcpy(state, connector->state, sizeof(*state)); in __drm_atomic_helper_connector_duplicate_state()
470 if (state->crtc) in __drm_atomic_helper_connector_duplicate_state()
472 state->commit = NULL; in __drm_atomic_helper_connector_duplicate_state()
474 if (state->hdr_output_metadata) in __drm_atomic_helper_connector_duplicate_state()
475 drm_property_blob_get(state->hdr_output_metadata); in __drm_atomic_helper_connector_duplicate_state()
478 state->writeback_job = NULL; in __drm_atomic_helper_connector_duplicate_state()
492 struct drm_connector_state *state; in drm_atomic_helper_connector_duplicate_state() local
494 if (WARN_ON(!connector->state)) in drm_atomic_helper_connector_duplicate_state()
497 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_connector_duplicate_state()
498 if (state) in drm_atomic_helper_connector_duplicate_state()
499 __drm_atomic_helper_connector_duplicate_state(connector, state); in drm_atomic_helper_connector_duplicate_state()
501 return state; in drm_atomic_helper_connector_duplicate_state()
514 __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state) in __drm_atomic_helper_connector_destroy_state() argument
516 if (state->crtc) in __drm_atomic_helper_connector_destroy_state()
517 drm_connector_put(state->connector); in __drm_atomic_helper_connector_destroy_state()
519 if (state->commit) in __drm_atomic_helper_connector_destroy_state()
520 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_connector_destroy_state()
522 if (state->writeback_job) in __drm_atomic_helper_connector_destroy_state()
523 drm_writeback_cleanup_job(state->writeback_job); in __drm_atomic_helper_connector_destroy_state()
525 drm_property_blob_put(state->hdr_output_metadata); in __drm_atomic_helper_connector_destroy_state()
538 struct drm_connector_state *state) in drm_atomic_helper_connector_destroy_state() argument
540 __drm_atomic_helper_connector_destroy_state(state); in drm_atomic_helper_connector_destroy_state()
541 kfree(state); in drm_atomic_helper_connector_destroy_state()
554 struct drm_private_state *state) in __drm_atomic_helper_private_obj_duplicate_state() argument
556 memcpy(state, obj->state, sizeof(*state)); in __drm_atomic_helper_private_obj_duplicate_state()
569 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_duplicate_state() argument
572 &state->base); in __drm_atomic_helper_bridge_duplicate_state()
573 state->bridge = bridge; in __drm_atomic_helper_bridge_duplicate_state()
591 if (WARN_ON(!bridge->base.state)) in drm_atomic_helper_bridge_duplicate_state()
614 struct drm_bridge_state *state) in drm_atomic_helper_bridge_destroy_state() argument
616 kfree(state); in drm_atomic_helper_bridge_destroy_state()
631 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_reset() argument
633 memset(state, 0, sizeof(*state)); in __drm_atomic_helper_bridge_reset()
634 state->bridge = bridge; in __drm_atomic_helper_bridge_reset()