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()
297 plane->state = plane_state; in __drm_atomic_helper_plane_reset()
310 if (plane->state) in drm_atomic_helper_plane_reset()
311 __drm_atomic_helper_plane_destroy_state(plane->state); in drm_atomic_helper_plane_reset()
313 kfree(plane->state); in drm_atomic_helper_plane_reset()
314 plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL); in drm_atomic_helper_plane_reset()
315 if (plane->state) in drm_atomic_helper_plane_reset()
316 __drm_atomic_helper_plane_reset(plane, plane->state); in drm_atomic_helper_plane_reset()
329 struct drm_plane_state *state) in __drm_atomic_helper_plane_duplicate_state() argument
331 memcpy(state, plane->state, sizeof(*state)); in __drm_atomic_helper_plane_duplicate_state()
333 if (state->fb) in __drm_atomic_helper_plane_duplicate_state()
334 drm_framebuffer_get(state->fb); in __drm_atomic_helper_plane_duplicate_state()
336 state->fence = NULL; in __drm_atomic_helper_plane_duplicate_state()
337 state->commit = NULL; in __drm_atomic_helper_plane_duplicate_state()
338 state->fb_damage_clips = NULL; in __drm_atomic_helper_plane_duplicate_state()
352 struct drm_plane_state *state; in drm_atomic_helper_plane_duplicate_state() local
354 if (WARN_ON(!plane->state)) in drm_atomic_helper_plane_duplicate_state()
357 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_plane_duplicate_state()
358 if (state) in drm_atomic_helper_plane_duplicate_state()
359 __drm_atomic_helper_plane_duplicate_state(plane, state); in drm_atomic_helper_plane_duplicate_state()
361 return state; in drm_atomic_helper_plane_duplicate_state()
373 void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) in __drm_atomic_helper_plane_destroy_state() argument
375 if (state->fb) in __drm_atomic_helper_plane_destroy_state()
376 drm_framebuffer_put(state->fb); in __drm_atomic_helper_plane_destroy_state()
378 if (state->fence) in __drm_atomic_helper_plane_destroy_state()
379 dma_fence_put(state->fence); in __drm_atomic_helper_plane_destroy_state()
381 if (state->commit) in __drm_atomic_helper_plane_destroy_state()
382 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_plane_destroy_state()
384 drm_property_blob_put(state->fb_damage_clips); in __drm_atomic_helper_plane_destroy_state()
397 struct drm_plane_state *state) in drm_atomic_helper_plane_destroy_state() argument
399 __drm_atomic_helper_plane_destroy_state(state); in drm_atomic_helper_plane_destroy_state()
400 kfree(state); in drm_atomic_helper_plane_destroy_state()
439 connector->state = conn_state; in __drm_atomic_helper_connector_reset()
456 if (connector->state) in drm_atomic_helper_connector_reset()
457 __drm_atomic_helper_connector_destroy_state(connector->state); in drm_atomic_helper_connector_reset()
459 kfree(connector->state); in drm_atomic_helper_connector_reset()
473 struct drm_connector_state *state = connector->state; in drm_atomic_helper_connector_tv_reset() local
475 state->tv.margins.left = cmdline->tv_margins.left; in drm_atomic_helper_connector_tv_reset()
476 state->tv.margins.right = cmdline->tv_margins.right; in drm_atomic_helper_connector_tv_reset()
477 state->tv.margins.top = cmdline->tv_margins.top; in drm_atomic_helper_connector_tv_reset()
478 state->tv.margins.bottom = cmdline->tv_margins.bottom; in drm_atomic_helper_connector_tv_reset()
492 struct drm_connector_state *state) in __drm_atomic_helper_connector_duplicate_state() argument
494 memcpy(state, connector->state, sizeof(*state)); in __drm_atomic_helper_connector_duplicate_state()
495 if (state->crtc) in __drm_atomic_helper_connector_duplicate_state()
497 state->commit = NULL; in __drm_atomic_helper_connector_duplicate_state()
499 if (state->hdr_output_metadata) in __drm_atomic_helper_connector_duplicate_state()
500 drm_property_blob_get(state->hdr_output_metadata); in __drm_atomic_helper_connector_duplicate_state()
503 state->writeback_job = NULL; in __drm_atomic_helper_connector_duplicate_state()
517 struct drm_connector_state *state; in drm_atomic_helper_connector_duplicate_state() local
519 if (WARN_ON(!connector->state)) in drm_atomic_helper_connector_duplicate_state()
522 state = kmalloc(sizeof(*state), GFP_KERNEL); in drm_atomic_helper_connector_duplicate_state()
523 if (state) in drm_atomic_helper_connector_duplicate_state()
524 __drm_atomic_helper_connector_duplicate_state(connector, state); in drm_atomic_helper_connector_duplicate_state()
526 return state; in drm_atomic_helper_connector_duplicate_state()
539 __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state) in __drm_atomic_helper_connector_destroy_state() argument
541 if (state->crtc) in __drm_atomic_helper_connector_destroy_state()
542 drm_connector_put(state->connector); in __drm_atomic_helper_connector_destroy_state()
544 if (state->commit) in __drm_atomic_helper_connector_destroy_state()
545 drm_crtc_commit_put(state->commit); in __drm_atomic_helper_connector_destroy_state()
547 if (state->writeback_job) in __drm_atomic_helper_connector_destroy_state()
548 drm_writeback_cleanup_job(state->writeback_job); in __drm_atomic_helper_connector_destroy_state()
550 drm_property_blob_put(state->hdr_output_metadata); in __drm_atomic_helper_connector_destroy_state()
563 struct drm_connector_state *state) in drm_atomic_helper_connector_destroy_state() argument
565 __drm_atomic_helper_connector_destroy_state(state); in drm_atomic_helper_connector_destroy_state()
566 kfree(state); in drm_atomic_helper_connector_destroy_state()
579 struct drm_private_state *state) in __drm_atomic_helper_private_obj_duplicate_state() argument
581 memcpy(state, obj->state, sizeof(*state)); in __drm_atomic_helper_private_obj_duplicate_state()
594 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_duplicate_state() argument
597 &state->base); in __drm_atomic_helper_bridge_duplicate_state()
598 state->bridge = bridge; in __drm_atomic_helper_bridge_duplicate_state()
616 if (WARN_ON(!bridge->base.state)) in drm_atomic_helper_bridge_duplicate_state()
639 struct drm_bridge_state *state) in drm_atomic_helper_bridge_destroy_state() argument
641 kfree(state); in drm_atomic_helper_bridge_destroy_state()
656 struct drm_bridge_state *state) in __drm_atomic_helper_bridge_reset() argument
658 memset(state, 0, sizeof(*state)); in __drm_atomic_helper_bridge_reset()
659 state->bridge = bridge; in __drm_atomic_helper_bridge_reset()