/* * Copyright 2012-14 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: AMD *
*/
#ifndef DC_STREAM_H_ #define DC_STREAM_H_
#include"dc_types.h" #include"grph_object_defs.h"
/******************************************************************************* * Stream Interfaces
******************************************************************************/ struct timing_sync_info { int group_id; int group_size; bool master;
};
struct mall_stream_config { /* MALL stream config to indicate if the stream is phantom or not. * We will use a phantom stream to indicate that the pipe is phantom.
*/ enum mall_stream_type type; struct dc_stream_state *paired_stream; // master / slave stream bool subvp_limit_cursor_size; /* stream has/is using subvp limiting hw cursor support */ bool cursor_size_limit_subvp; /* stream is using hw cursor config preventing subvp */
};
struct dc_stream_status { int primary_otg_inst; int stream_enc_inst;
/** * @plane_count: Total of planes attached to a single stream
*/ int plane_count; int audio_inst; struct timing_sync_info timing_sync_info; struct dc_plane_state *plane_states[MAX_SURFACES]; bool is_abm_supported; struct mall_stream_config mall_stream_config; bool fpo_in_use;
};
struct dc_dmdata_attributes { /* Specifies whether dynamic meta data will be updated by software * or has to be fetched by hardware (DMA mode)
*/ enum hubp_dmdata_mode dmdata_mode; /* Specifies if current dynamic meta data is to be used only for the current frame */ bool dmdata_repeat; /* Specifies the size of Dynamic Metadata surface in byte. Size of 0 means no Dynamic metadata is fetched */
uint32_t dmdata_size; /* Specifies if a new dynamic meta data should be fetched for an upcoming frame */ bool dmdata_updated; /* If hardware mode is used, the base address where DMDATA surface is located */
PHYSICAL_ADDRESS_LOC address; /* Specifies whether QOS level will be provided by TTU or it will come from DMDATA_QOS_LEVEL */ bool dmdata_qos_mode; /* If qos_mode = 1, this is the QOS value to be used: */
uint32_t dmdata_qos_level; /* Specifies the value in unit of REFCLK cycles to be added to the * current time to produce the Amortized deadline for Dynamic Metadata chunk request
*/
uint32_t dmdata_dl_delta; /* An unbounded array of uint32s, represents software dmdata to be loaded */
uint32_t *dmdata_sw_data;
};
struct dc_writeback_info { bool wb_enabled; int dwb_pipe_inst; struct dc_dwb_params dwb_params; struct mcif_buf_params mcif_buf_params; struct mcif_warmup_params mcif_warmup_params; /* the plane that is the input to TOP_MUX for MPCC that is the DWB source */ struct dc_plane_state *writeback_source_plane; /* source MPCC instance. for use by internally by dc */ int mpcc_inst;
};
struct dc_stream_debug_options { char force_odm_combine_segments; /* * When force_odm_combine_segments is non zero, allow dc to * temporarily transition to ODM bypass when minimal transition state * is required to prevent visual glitches showing on the screen
*/ char allow_transition_for_forced_odm;
};
#define LUMINANCE_DATA_TABLE_SIZE 10
struct luminance_data { bool is_valid; int refresh_rate_hz[LUMINANCE_DATA_TABLE_SIZE]; int luminance_millinits[LUMINANCE_DATA_TABLE_SIZE]; int flicker_criteria_milli_nits_GAMING; int flicker_criteria_milli_nits_STATIC; int nominal_refresh_rate; int dm_max_decrease_from_nominal;
};
struct dc_stream_state { // sink is deprecated, new code should not reference // this pointer struct dc_sink *sink;
struct dc_link *link; /* For dynamic link encoder assignment, update the link encoder assigned to * a stream via the volatile dc_state rather than the static dc_link.
*/ struct link_encoder *link_enc; struct dc_stream_debug_options debug; struct dc_panel_patch sink_patches; struct dc_crtc_timing timing; struct dc_crtc_timing_adjust adjust; struct dc_info_packet vrr_infopacket; struct dc_info_packet vsc_infopacket; struct dc_info_packet vsp_infopacket; struct dc_info_packet hfvsif_infopacket; struct dc_info_packet vtem_infopacket; struct dc_info_packet adaptive_sync_infopacket; struct dc_info_packet avi_infopacket;
uint8_t dsc_packed_pps[128]; struct rect src; /* composition area */ struct rect dst; /* stream addressable area */
/* Output from DC when stream state is committed or altered * DC may only access these values during: * dc_commit_state, dc_commit_state_no_check, dc_commit_streams * values may not change outside of those calls
*/ struct { // For interrupt management, some hardware instance // offsets need to be exposed to DM
uint8_t otg_offset;
} out;
/* * Setup stream attributes if no stream updates are provided * there will be no impact on the stream parameters * * Set up surface attributes and associate to a stream * The surfaces parameter is an absolute set of all surface active for the stream. * If no surfaces are provided, the stream will be blanked; no memory read. * Any flip related attribute changes must be done through this interface. * * After this call: * Surfaces attributes are programmed and configured to be composed into stream. * This does not trigger a flip. No surface address is programmed. *
*/ bool dc_update_planes_and_stream(struct dc *dc, struct dc_surface_update *surface_updates, int surface_count, struct dc_stream_state *dc_stream, struct dc_stream_update *stream_update);
/* * Set up surface attributes and associate to a stream * The surfaces parameter is an absolute set of all surface active for the stream. * If no surfaces are provided, the stream will be blanked; no memory read. * Any flip related attribute changes must be done through this interface. * * After this call: * Surfaces attributes are programmed and configured to be composed into stream. * This does not trigger a flip. No surface address is programmed.
*/ void dc_commit_updates_for_stream(struct dc *dc, struct dc_surface_update *srf_updates, int surface_count, struct dc_stream_state *stream, struct dc_stream_update *stream_update, struct dc_state *state); /* * Log the current stream state.
*/ void dc_stream_log(conststruct dc *dc, conststruct dc_stream_state *stream);
uint8_t dc_get_current_stream_count(struct dc *dc); struct dc_stream_state *dc_get_stream_at_index(struct dc *dc, uint8_t i);
/* * Return the current frame counter.
*/
uint32_t dc_stream_get_vblank_counter(conststruct dc_stream_state *stream);
/* TODO: Return parsed values rather than direct register read * This has a dependency on the caller (amdgpu_display_get_crtc_scanoutpos) * being refactored properly to be dce-specific
*/ bool dc_stream_get_scanoutpos(conststruct dc_stream_state *stream,
uint32_t *v_blank_start,
uint32_t *v_blank_end,
uint32_t *h_position,
uint32_t *v_position);
bool dc_stream_add_writeback(struct dc *dc, struct dc_stream_state *stream, struct dc_writeback_info *wb_info);
bool dc_stream_fc_disable_writeback(struct dc *dc, struct dc_stream_state *stream,
uint32_t dwb_pipe_inst);
bool dc_stream_remove_writeback(struct dc *dc, struct dc_stream_state *stream,
uint32_t dwb_pipe_inst);
bool dc_stream_dmdata_status_done(struct dc *dc, struct dc_stream_state *stream);
bool dc_stream_set_dynamic_metadata(struct dc *dc, struct dc_stream_state *stream, struct dc_dmdata_attributes *dmdata_attr);
enum dc_status dc_validate_stream(struct dc *dc, struct dc_stream_state *stream);
/* * Enable stereo when commit_streams is not required, * for example, frame alternate.
*/ void dc_enable_stereo( struct dc *dc, struct dc_state *context, struct dc_stream_state *streams[],
uint8_t stream_count);
/******************************************************************************* * Cursor interfaces - To manages the cursor within a stream
******************************************************************************/ /* TODO: Deprecated once we switch to dc_set_cursor_position */
void program_cursor_attributes( struct dc *dc, struct dc_stream_state *stream);
void program_cursor_position( struct dc *dc, struct dc_stream_state *stream);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.