Path: blob/master/drivers/gpu/drm/amd/display/dc/dc_state.h
26535 views
/*1* Copyright 2023 Advanced Micro Devices, Inc.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice shall be included in11* all copies or substantial portions of the Software.12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR17* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,18* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR19* OTHER DEALINGS IN THE SOFTWARE.20*21* Authors: AMD22*23*/2425#ifndef _DC_STATE_H_26#define _DC_STATE_H_2728#include "inc/core_status.h"2930struct dc_state *dc_state_create(struct dc *dc, struct dc_state_create_params *params);31void dc_state_copy(struct dc_state *dst_state, struct dc_state *src_state);32struct dc_state *dc_state_create_copy(struct dc_state *src_state);33void dc_state_copy_current(struct dc *dc, struct dc_state *dst_state);34struct dc_state *dc_state_create_current_copy(struct dc *dc);35void dc_state_construct(struct dc *dc, struct dc_state *state);36void dc_state_destruct(struct dc_state *state);37void dc_state_retain(struct dc_state *state);38void dc_state_release(struct dc_state *state);3940enum dc_status dc_state_add_stream(const struct dc *dc,41struct dc_state *state,42struct dc_stream_state *stream);4344enum dc_status dc_state_remove_stream(45const struct dc *dc,46struct dc_state *state,47struct dc_stream_state *stream);4849bool dc_state_add_plane(50const struct dc *dc,51struct dc_stream_state *stream,52struct dc_plane_state *plane_state,53struct dc_state *state);5455bool dc_state_remove_plane(56const struct dc *dc,57struct dc_stream_state *stream,58struct dc_plane_state *plane_state,59struct dc_state *state);6061bool dc_state_rem_all_planes_for_stream(62const struct dc *dc,63struct dc_stream_state *stream,64struct dc_state *state);6566bool dc_state_add_all_planes_for_stream(67const struct dc *dc,68struct dc_stream_state *stream,69struct dc_plane_state * const *plane_states,70int plane_count,71struct dc_state *state);7273struct dc_stream_status *dc_state_get_stream_status(74struct dc_state *state,75const struct dc_stream_state *stream);76#endif /* _DC_STATE_H_ */777879