if (acrtc_state->stream == NULL) {
- DRM_ERROR("dc_stream is NULL for crtc '%d'!\n", crtc);
+ DRM_ERROR("dc_stream_state is NULL for crtc '%d'!\n",
+ crtc);
return 0;
}
acrtc->base.state);
if (acrtc_state->stream == NULL) {
- DRM_ERROR("dc_stream is NULL for crtc '%d'!\n", crtc);
+ DRM_ERROR("dc_stream_state is NULL for crtc '%d'!\n",
+ crtc);
return 0;
}
num_streams = dc_get_current_stream_count(adev->dm.dc);
for (i = 0; i < num_streams; i++) {
- struct dc_stream *stream;
+ struct dc_stream_state *stream;
stream = dc_get_stream_at_index(adev->dm.dc, i);
mod_freesync_update_state(adev->dm.freesync_module,
container_of((x), struct dm_connector_state, base)
static bool modeset_required(struct drm_crtc_state *crtc_state,
- struct dc_stream *new_stream,
- struct dc_stream *old_stream)
+ struct dc_stream_state *new_stream,
+ struct dc_stream_state *old_stream)
{
if (dc_is_stream_unchanged(new_stream, old_stream)) {
crtc_state->mode_changed = false;
static void update_stream_scaling_settings(
const struct drm_display_mode *mode,
const struct dm_connector_state *dm_state,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
enum amdgpu_rmx_type rmx_type;
/*****************************************************************************/
static void fill_stream_properties_from_drm_display_mode(
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
const struct drm_display_mode *mode_in,
const struct drm_connector *connector)
{
}
}
-static struct dc_stream *create_stream_for_sink(
+static struct dc_stream_state *create_stream_for_sink(
struct amdgpu_connector *aconnector,
const struct drm_display_mode *drm_mode,
const struct dm_connector_state *dm_state)
{
struct drm_display_mode *preferred_mode = NULL;
const struct drm_connector *drm_connector;
- struct dc_stream *stream = NULL;
+ struct dc_stream_state *stream = NULL;
struct drm_display_mode mode = *drm_mode;
bool native_mode_found = false;
struct dc_sink *dc_sink;
struct amdgpu_device *adev = connector->dev->dev_private;
/* TODO: Unhardcode stream count */
- struct dc_stream *stream;
+ struct dc_stream_state *stream;
struct amdgpu_connector *aconnector = to_amdgpu_connector(connector);
if ((mode->flags & DRM_MODE_FLAG_INTERLACE) ||
struct dc_sink *dc_sink =
to_amdgpu_connector(connector)->dc_sink;
/* TODO: Unhardcode stream count */
- struct dc_stream *stream;
+ struct dc_stream_state *stream;
if ((mode->flags & DRM_MODE_FLAG_INTERLACE) ||
(mode->flags & DRM_MODE_FLAG_DBLSCAN))
static void remove_stream(
struct amdgpu_device *adev,
struct amdgpu_crtc *acrtc,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
/* this is the update mode case */
if (adev->dm.freesync_module)
uint32_t i;
struct drm_plane *plane;
struct drm_plane_state *old_plane_state;
- struct dc_stream *dc_stream_attach;
+ struct dc_stream_state *dc_stream_attach;
struct dc_plane_state *dc_surfaces_constructed[MAX_SURFACES];
struct amdgpu_crtc *acrtc_attach = to_amdgpu_crtc(pcrtc);
struct dm_crtc_state *acrtc_state = to_dm_crtc_state(pcrtc->state);
struct drm_crtc *crtc, *pcrtc;
struct drm_crtc_state *old_crtc_state;
struct amdgpu_crtc *new_crtcs[MAX_STREAMS];
- struct dc_stream *new_stream = NULL;
+ struct dc_stream_state *new_stream = NULL;
unsigned long flags;
bool wait_for_vblank = true;
struct drm_connector *connector;
new_acrtc_state = to_dm_crtc_state(acrtc->base.state);
update_stream_scaling_settings(&con_new_state->base.crtc->mode,
- con_new_state, (struct dc_stream *)new_acrtc_state->stream);
+ con_new_state, (struct dc_stream_state *)new_acrtc_state->stream);
status = dc_stream_get_status(new_acrtc_state->stream);
WARN_ON(!status);
static uint32_t add_val_sets_surface(
struct dc_validation_set *val_sets,
uint32_t set_count,
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
struct dc_plane_state *surface)
{
uint32_t i = 0, j = 0;
static uint32_t update_in_val_sets_stream(
struct dc_validation_set *val_sets,
uint32_t set_count,
- struct dc_stream *old_stream,
- struct dc_stream *new_stream,
+ struct dc_stream_state *old_stream,
+ struct dc_stream_state *new_stream,
struct drm_crtc *crtc)
{
uint32_t i = 0;
static uint32_t remove_from_val_sets(
struct dc_validation_set *val_sets,
uint32_t set_count,
- const struct dc_stream *stream)
+ const struct dc_stream_state *stream)
{
int i;
for_each_crtc_in_state(state, crtc, crtc_state, i) {
struct amdgpu_crtc *acrtc = NULL;
struct amdgpu_connector *aconnector = NULL;
- struct dc_stream *new_stream = NULL;
+ struct dc_stream_state *new_stream = NULL;
struct drm_connector_state *conn_state = NULL;
struct dm_connector_state *dm_conn_state = NULL;
struct dm_crtc_state {
struct drm_crtc_state base;
- struct dc_stream *stream;
+ struct dc_stream_state *stream;
};
#define to_dm_crtc_state(x) container_of(x, struct dm_crtc_state, base)
*/
bool dm_helpers_dp_mst_write_payload_allocation_table(
struct dc_context *ctx,
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
struct dp_mst_stream_allocation_table *proposed_table,
bool enable)
{
*/
bool dm_helpers_dp_mst_poll_for_allocation_change_trigger(
struct dc_context *ctx,
- const struct dc_stream *stream)
+ const struct dc_stream_state *stream)
{
struct amdgpu_connector *aconnector;
struct drm_dp_mst_topology_mgr *mst_mgr;
bool dm_helpers_dp_mst_send_payload_allocation(
struct dc_context *ctx,
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
bool enable)
{
struct amdgpu_connector *aconnector;
}
static bool stream_adjust_vmin_vmax(struct dc *dc,
- struct dc_stream **streams, int num_streams,
+ struct dc_stream_state **streams, int num_streams,
int vmin, int vmax)
{
/* TODO: Support multiple streams */
struct core_dc *core_dc = DC_TO_CORE(dc);
- struct dc_stream *stream = streams[0];
+ struct dc_stream_state *stream = streams[0];
int i = 0;
bool ret = false;
}
static bool stream_get_crtc_position(struct dc *dc,
- struct dc_stream **streams, int num_streams,
+ struct dc_stream_state **streams, int num_streams,
unsigned int *v_pos, unsigned int *nom_v_pos)
{
/* TODO: Support multiple streams */
struct core_dc *core_dc = DC_TO_CORE(dc);
- struct dc_stream *stream = streams[0];
+ struct dc_stream_state *stream = streams[0];
int i = 0;
bool ret = false;
struct crtc_position position;
return ret;
}
-static bool set_gamut_remap(struct dc *dc, const struct dc_stream *stream)
+static bool set_gamut_remap(struct dc *dc, const struct dc_stream_state *stream)
{
struct core_dc *core_dc = DC_TO_CORE(dc);
int i = 0;
return ret;
}
-static bool program_csc_matrix(struct dc *dc, struct dc_stream *stream)
+static bool program_csc_matrix(struct dc *dc, struct dc_stream_state *stream)
{
struct core_dc *core_dc = DC_TO_CORE(dc);
int i = 0;
}
static void set_static_screen_events(struct dc *dc,
- struct dc_stream **streams,
+ struct dc_stream_state **streams,
int num_streams,
const struct dc_static_screen_events *events)
{
int num_pipes_affected = 0;
for (i = 0; i < num_streams; i++) {
- struct dc_stream *stream = streams[i];
+ struct dc_stream_state *stream = streams[i];
for (j = 0; j < MAX_PIPES; j++) {
if (core_dc->current_context->res_ctx.pipe_ctx[j].stream
cust_pattern_size);
}
-void set_dither_option(struct dc_stream *stream,
+void set_dither_option(struct dc_stream_state *stream,
enum dc_dither_option option)
{
struct bit_depth_reduction_params params;
bool dc_validate_guaranteed(
const struct dc *dc,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
struct core_dc *core_dc = DC_TO_CORE(dc);
enum dc_status result = DC_ERROR_UNEXPECTED;
static bool streams_changed(
struct core_dc *dc,
- struct dc_stream *streams[],
+ struct dc_stream_state *streams[],
uint8_t stream_count)
{
uint8_t i;
bool dc_enable_stereo(
struct dc *dc,
struct validate_context *context,
- struct dc_stream *streams[],
+ struct dc_stream_state *streams[],
uint8_t stream_count)
{
bool ret = true;
enum dc_status result = DC_ERROR_UNEXPECTED;
struct pipe_ctx *pipe;
int i, j, k, l;
- struct dc_stream *dc_streams[MAX_STREAMS] = {0};
+ struct dc_stream_state *dc_streams[MAX_STREAMS] = {0};
for (i = 0; i < context->stream_count; i++)
dc_streams[i] = context->streams[i];
__func__, context->stream_count);
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
dc_stream_log(stream,
core_dc->ctx->logger,
bool dc_commit_streams(
struct dc *dc,
- struct dc_stream *streams[],
+ struct dc_stream_state *streams[],
uint8_t stream_count)
{
struct core_dc *core_dc = DC_TO_CORE(dc);
__func__, stream_count);
for (i = 0; i < stream_count; i++) {
- struct dc_stream *stream = streams[i];
+ struct dc_stream_state *stream = streams[i];
struct dc_stream_status *status = dc_stream_get_status(stream);
int j;
struct dc *dc,
struct dc_plane_state **new_surfaces,
uint8_t new_surface_count,
- struct dc_stream *dc_stream)
+ struct dc_stream_state *dc_stream)
{
struct dc_surface_update updates[MAX_SURFACES];
struct dc_flip_addrs flip_addr[MAX_SURFACES];
void dc_update_surfaces_and_stream(struct dc *dc,
struct dc_surface_update *srf_updates, int surface_count,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct dc_stream_update *stream_update)
{
struct core_dc *core_dc = DC_TO_CORE(dc);
return core_dc->current_context->stream_count;
}
-struct dc_stream *dc_get_stream_at_index(const struct dc *dc, uint8_t i)
+struct dc_stream_state *dc_get_stream_at_index(const struct dc *dc, uint8_t i)
{
struct core_dc *core_dc = DC_TO_CORE(dc);
if (i < core_dc->current_context->stream_count)
static void enable_stream_features(struct pipe_ctx *pipe_ctx)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->sink->link;
union down_spread_ctrl downspread;
static enum dc_status enable_link_dp(struct pipe_ctx *pipe_ctx)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
enum dc_status status;
bool skip_video_pattern;
struct dc_link *link = stream->sink->link;
static void enable_link_hdmi(struct pipe_ctx *pipe_ctx)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->sink->link;
enum dc_color_depth display_color_depth;
}
enum dc_status dc_link_validate_mode_timing(
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
struct dc_link *link,
const struct dc_crtc_timing *timing)
{
bool dc_link_set_backlight_level(const struct dc_link *link, uint32_t level,
- uint32_t frame_ramp, const struct dc_stream *stream)
+ uint32_t frame_ramp, const struct dc_stream_state *stream)
{
struct core_dc *core_dc = DC_TO_CORE(link->ctx->dc);
struct abm *abm = core_dc->res_pool->abm;
}
bool dc_link_setup_psr(struct dc_link *link,
- const struct dc_stream *stream, struct psr_config *psr_config,
+ const struct dc_stream_state *stream, struct psr_config *psr_config,
struct psr_context *psr_context)
{
struct core_dc *core_dc = DC_TO_CORE(link->ctx->dc);
program_hpd_filter(link);
}
-static struct fixed31_32 get_pbn_per_slot(struct dc_stream *stream)
+static struct fixed31_32 get_pbn_per_slot(struct dc_stream_state *stream)
{
struct dc_link_settings *link_settings =
&stream->sink->link->cur_link_settings;
*/
static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->sink->link;
struct link_encoder *link_encoder = link->link_enc;
struct stream_encoder *stream_encoder = pipe_ctx->stream_enc;
static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->sink->link;
struct link_encoder *link_encoder = link->link_enc;
struct stream_encoder *stream_encoder = pipe_ctx->stream_enc;
return false;
}
-void decide_link_settings(struct dc_stream *stream,
+void decide_link_settings(struct dc_stream_state *stream,
struct dc_link_settings *link_setting)
{
}
bool resource_are_streams_timing_synchronizable(
- struct dc_stream *stream1,
- struct dc_stream *stream2)
+ struct dc_stream_state *stream1,
+ struct dc_stream_state *stream2)
{
if (stream1->timing.h_total != stream2->timing.h_total)
return false;
static void calculate_viewport(struct pipe_ctx *pipe_ctx)
{
const struct dc_plane_state *surface = pipe_ctx->surface;
- const struct dc_stream *stream = pipe_ctx->stream;
+ const struct dc_stream_state *stream = pipe_ctx->stream;
struct scaler_data *data = &pipe_ctx->scl_data;
struct rect surf_src = surface->src_rect;
struct rect clip = { 0 };
static void calculate_recout(struct pipe_ctx *pipe_ctx, struct view *recout_skip)
{
const struct dc_plane_state *surface = pipe_ctx->surface;
- const struct dc_stream *stream = pipe_ctx->stream;
+ const struct dc_stream_state *stream = pipe_ctx->stream;
struct rect surf_src = surface->src_rect;
struct rect surf_clip = surface->clip_rect;
int recout_full_x, recout_full_y;
static void calculate_scaling_ratios(struct pipe_ctx *pipe_ctx)
{
const struct dc_plane_state *surface = pipe_ctx->surface;
- const struct dc_stream *stream = pipe_ctx->stream;
+ const struct dc_stream_state *stream = pipe_ctx->stream;
struct rect surf_src = surface->src_rect;
const int in_w = stream->src.width;
const int in_h = stream->src.height;
struct pipe_ctx *resource_get_head_pipe_for_stream(
struct resource_context *res_ctx,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
int i;
for (i = 0; i < MAX_PIPES; i++) {
static struct pipe_ctx *acquire_free_pipe_for_stream(
struct validate_context *context,
const struct resource_pool *pool,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
int i;
struct resource_context *res_ctx = &context->res_ctx;
static void release_free_pipes_for_stream(
struct resource_context *res_ctx,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
int i;
static int acquire_first_split_pipe(
struct resource_context *res_ctx,
const struct resource_pool *pool,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
int i;
bool resource_attach_surfaces_to_context(
struct dc_plane_state * const *surfaces,
int surface_count,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct validate_context *context,
const struct resource_pool *pool)
{
}
-static bool is_timing_changed(struct dc_stream *cur_stream,
- struct dc_stream *new_stream)
+static bool is_timing_changed(struct dc_stream_state *cur_stream,
+ struct dc_stream_state *new_stream)
{
if (cur_stream == NULL)
return true;
}
static bool are_stream_backends_same(
- struct dc_stream *stream_a, struct dc_stream *stream_b)
+ struct dc_stream_state *stream_a, struct dc_stream_state *stream_b)
{
if (stream_a == stream_b)
return true;
}
bool dc_is_stream_unchanged(
- struct dc_stream *old_stream, struct dc_stream *stream)
+ struct dc_stream_state *old_stream, struct dc_stream_state *stream)
{
if (!are_stream_backends_same(old_stream, stream))
static int acquire_first_free_pipe(
struct resource_context *res_ctx,
const struct resource_pool *pool,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
int i;
static struct stream_encoder *find_first_free_match_stream_enc_for_link(
struct resource_context *res_ctx,
const struct resource_pool *pool,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
int i;
int j = -1;
return 0;
}
-static void update_stream_signal(struct dc_stream *stream)
+static void update_stream_signal(struct dc_stream_state *stream)
{
if (stream->output_signal == SIGNAL_TYPE_NONE) {
struct dc_sink *dc_sink = stream->sink;
}
bool resource_is_stream_unchanged(
- struct validate_context *old_context, struct dc_stream *stream)
+ struct validate_context *old_context, struct dc_stream_state *stream)
{
int i;
for (i = 0; i < old_context->stream_count; i++) {
- struct dc_stream *old_stream = old_context->streams[i];
+ struct dc_stream_state *old_stream = old_context->streams[i];
if (are_stream_backends_same(old_stream, stream))
return true;
const struct pipe_ctx *from_pipe_ctx, struct pipe_ctx *to_pipe_ctx)
{
struct dc_plane_state *surface = to_pipe_ctx->surface;
- struct dc_stream *stream = to_pipe_ctx->stream;
+ struct dc_stream_state *stream = to_pipe_ctx->stream;
*to_pipe_ctx = *from_pipe_ctx;
to_pipe_ctx->stream = stream;
to_pipe_ctx->surface = surface;
}
-static struct dc_stream *find_pll_sharable_stream(
- struct dc_stream *stream_needs_pll,
+static struct dc_stream_state *find_pll_sharable_stream(
+ struct dc_stream_state *stream_needs_pll,
struct validate_context *context)
{
int i;
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream_has_pll = context->streams[i];
+ struct dc_stream_state *stream_has_pll = context->streams[i];
/* We are looking for non dp, non virtual stream */
if (resource_are_streams_timing_synchronizable(
return normalized_pix_clk;
}
-static void calculate_phy_pix_clks(struct dc_stream *stream)
+static void calculate_phy_pix_clks(struct dc_stream_state *stream)
{
update_stream_signal(stream);
int i, j;
for (i = 0; old_context && i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
if (!resource_is_stream_unchanged(old_context, stream)) {
if (stream != NULL && old_context->streams[i] != NULL) {
}
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
struct pipe_ctx *pipe_ctx = NULL;
int pipe_idx = -1;
struct encoder_info_packet *info_packet,
struct pipe_ctx *pipe_ctx)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
enum dc_color_space color_space = COLOR_SPACE_UNKNOWN;
struct info_frame info_frame = { {0} };
uint32_t pixel_encoding = 0;
static void set_vendor_info_packet(
struct encoder_info_packet *info_packet,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
uint32_t length = 0;
bool hdmi_vic_mode = false;
static void set_spd_info_packet(
struct encoder_info_packet *info_packet,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
/* SPD info packet for FreeSync */
static void set_hdr_static_info_packet(
struct encoder_info_packet *info_packet,
struct dc_plane_state *surface,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
uint16_t i = 0;
enum signal_type signal = stream->signal;
static void set_vsc_info_packet(
struct encoder_info_packet *info_packet,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
unsigned int vscPacketRevision = 0;
unsigned int i;
/* acquire new resources */
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
if (old_context && resource_is_stream_unchanged(old_context, stream))
continue;
return false;
}
-void resource_build_bit_depth_reduction_params(struct dc_stream *stream,
+void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream,
struct bit_depth_reduction_params *fmt_bit_depth)
{
enum dc_dither_option option = stream->dither_option;
fmt_bit_depth->pixel_encoding = pixel_encoding;
}
-bool dc_validate_stream(const struct dc *dc, struct dc_stream *stream)
+bool dc_validate_stream(const struct dc *dc, struct dc_stream_state *stream)
{
struct core_dc *core_dc = DC_TO_CORE(dc);
struct dc_context *dc_ctx = core_dc->ctx;
* Private functions
******************************************************************************/
-static bool construct(struct dc_stream *stream,
+static bool construct(struct dc_stream_state *stream,
struct dc_sink *dc_sink_data)
{
uint32_t i = 0;
return true;
}
-static void destruct(struct dc_stream *stream)
+static void destruct(struct dc_stream_state *stream)
{
dc_sink_release(stream->sink);
if (stream->out_transfer_func != NULL) {
}
}
-void dc_stream_retain(struct dc_stream *stream)
+void dc_stream_retain(struct dc_stream_state *stream)
{
ASSERT(stream->ref_count > 0);
stream->ref_count++;
}
-void dc_stream_release(struct dc_stream *stream)
+void dc_stream_release(struct dc_stream_state *stream)
{
if (stream != NULL) {
}
}
-struct dc_stream *dc_create_stream_for_sink(
+struct dc_stream_state *dc_create_stream_for_sink(
struct dc_sink *sink)
{
- struct dc_stream *stream;
+ struct dc_stream_state *stream;
if (sink == NULL)
goto alloc_fail;
- stream = dm_alloc(sizeof(struct dc_stream));
+ stream = dm_alloc(sizeof(struct dc_stream_state));
if (NULL == stream)
goto alloc_fail;
}
struct dc_stream_status *dc_stream_get_status(
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
uint8_t i;
struct core_dc *dc = DC_TO_CORE(stream->ctx->dc);
* Update the cursor attributes and set cursor surface address
*/
bool dc_stream_set_cursor_attributes(
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
const struct dc_cursor_attributes *attributes)
{
int i;
}
bool dc_stream_set_cursor_position(
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
const struct dc_cursor_position *position)
{
int i;
return true;
}
-uint32_t dc_stream_get_vblank_counter(const struct dc_stream *stream)
+uint32_t dc_stream_get_vblank_counter(const struct dc_stream_state *stream)
{
uint8_t i;
struct core_dc *core_dc = DC_TO_CORE(stream->ctx->dc);
return 0;
}
-bool dc_stream_get_scanoutpos(const struct dc_stream *stream,
+bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,
uint32_t *v_blank_start,
uint32_t *v_blank_end,
uint32_t *h_position,
void dc_stream_log(
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
struct dal_logger *dm_logger,
enum dc_log_type log_type)
{
struct dc_surface_dcc_cap *output);
};
-struct dc_stream_funcs {
+struct dc_stream_state_funcs {
bool (*adjust_vmin_vmax)(struct dc *dc,
- struct dc_stream **stream,
+ struct dc_stream_state **stream,
int num_streams,
int vmin,
int vmax);
bool (*get_crtc_position)(struct dc *dc,
- struct dc_stream **stream,
+ struct dc_stream_state **stream,
int num_streams,
unsigned int *v_pos,
unsigned int *nom_v_pos);
bool (*set_gamut_remap)(struct dc *dc,
- const struct dc_stream *stream);
+ const struct dc_stream_state *stream);
bool (*program_csc_matrix)(struct dc *dc,
- struct dc_stream *stream);
+ struct dc_stream_state *stream);
void (*set_static_screen_events)(struct dc *dc,
- struct dc_stream **stream,
+ struct dc_stream_state **stream,
int num_streams,
const struct dc_static_screen_events *events);
- void (*set_dither_option)(struct dc_stream *stream,
+ void (*set_dither_option)(struct dc_stream_state *stream,
enum dc_dither_option option);
};
struct dc {
struct dc_caps caps;
struct dc_cap_funcs cap_funcs;
- struct dc_stream_funcs stream_funcs;
+ struct dc_stream_state_funcs stream_funcs;
struct dc_link_funcs link_funcs;
struct dc_config config;
struct dc_debug debug;
struct dc *dc,
struct dc_plane_state **dc_surfaces,
uint8_t surface_count,
- struct dc_stream *stream);
+ struct dc_stream_state *stream);
bool dc_post_update_surfaces_to_stream(
struct dc *dc);
struct dc_link *link;
};
-struct dc_stream {
+struct dc_stream_state {
struct dc_sink *sink;
struct dc_crtc_timing timing;
};
bool dc_is_stream_unchanged(
- struct dc_stream *old_stream, struct dc_stream *stream);
+ struct dc_stream_state *old_stream, struct dc_stream_state *stream);
/*
* Setup stream attributes if no stream updates are provided
void dc_update_surfaces_and_stream(struct dc *dc,
struct dc_surface_update *surface_updates, int surface_count,
- struct dc_stream *dc_stream,
+ struct dc_stream_state *dc_stream,
struct dc_stream_update *stream_update);
/*
* Log the current stream state.
*/
void dc_stream_log(
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
struct dal_logger *dc_logger,
enum dc_log_type log_type);
uint8_t dc_get_current_stream_count(const struct dc *dc);
-struct dc_stream *dc_get_stream_at_index(const struct dc *dc, uint8_t i);
+struct dc_stream_state *dc_get_stream_at_index(const struct dc *dc, uint8_t i);
/*
* Return the current frame counter.
*/
-uint32_t dc_stream_get_vblank_counter(const struct dc_stream *stream);
+uint32_t dc_stream_get_vblank_counter(const struct dc_stream_state *stream);
/* TODO: Return parsed values rather than direct register read
* This has a dependency on the caller (amdgpu_get_crtc_scanoutpos)
* being refactored properly to be dce-specific
*/
-bool dc_stream_get_scanoutpos(const struct dc_stream *stream,
+bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,
uint32_t *v_blank_start,
uint32_t *v_blank_end,
uint32_t *h_position,
* Structure to store surface/stream associations for validation
*/
struct dc_validation_set {
- struct dc_stream *stream;
+ struct dc_stream_state *stream;
struct dc_plane_state *surfaces[MAX_SURFACES];
uint8_t surface_count;
};
-bool dc_validate_stream(const struct dc *dc, struct dc_stream *stream);
+bool dc_validate_stream(const struct dc *dc, struct dc_stream_state *stream);
bool dc_validate_plane(const struct dc *dc, const struct dc_plane_state *plane_state);
/*
bool dc_validate_guaranteed(
const struct dc *dc,
- struct dc_stream *stream);
+ struct dc_stream_state *stream);
void dc_resource_validate_ctx_copy_construct(
const struct validate_context *src_ctx,
*/
bool dc_commit_streams(
struct dc *dc,
- struct dc_stream *streams[],
+ struct dc_stream_state *streams[],
uint8_t stream_count);
/*
* Enable stereo when commit_streams is not required,
bool dc_enable_stereo(
struct dc *dc,
struct validate_context *context,
- struct dc_stream *streams[],
+ struct dc_stream_state *streams[],
uint8_t stream_count);
/**
* Create a new default stream for the requested sink
*/
-struct dc_stream *dc_create_stream_for_sink(struct dc_sink *dc_sink);
+struct dc_stream_state *dc_create_stream_for_sink(struct dc_sink *dc_sink);
-void dc_stream_retain(struct dc_stream *dc_stream);
-void dc_stream_release(struct dc_stream *dc_stream);
+void dc_stream_retain(struct dc_stream_state *dc_stream);
+void dc_stream_release(struct dc_stream_state *dc_stream);
struct dc_stream_status *dc_stream_get_status(
- struct dc_stream *dc_stream);
+ struct dc_stream_state *dc_stream);
enum surface_update_type dc_check_update_surfaces_for_stream(
struct dc *dc,
/* Set backlight level of an embedded panel (eDP, LVDS). */
bool dc_link_set_backlight_level(const struct dc_link *dc_link, uint32_t level,
- uint32_t frame_ramp, const struct dc_stream *stream);
+ uint32_t frame_ramp, const struct dc_stream_state *stream);
bool dc_link_set_abm_disable(const struct dc_link *dc_link);
bool dc_link_get_psr_state(const struct dc_link *dc_link, uint32_t *psr_state);
bool dc_link_setup_psr(struct dc_link *dc_link,
- const struct dc_stream *stream, struct psr_config *psr_config,
+ const struct dc_stream_state *stream, struct psr_config *psr_config,
struct psr_context *psr_context);
/* Request DC to detect if there is a Panel connected.
******************************************************************************/
/* TODO: Deprecated once we switch to dc_set_cursor_position */
bool dc_stream_set_cursor_attributes(
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
const struct dc_cursor_attributes *attributes);
bool dc_stream_set_cursor_position(
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
const struct dc_cursor_position *position);
/* Newer interfaces */
/* forward declarations */
struct dc_plane_state;
-struct dc_stream;
+struct dc_stream_state;
struct dc_link;
struct dc_sink;
struct dal;
bool dce110_link_encoder_validate_output_with_stream(
struct link_encoder *enc,
- const struct dc_stream *stream)
+ const struct dc_stream_state *stream)
{
struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc);
bool is_valid;
bool dce110_link_encoder_validate_output_with_stream(
struct link_encoder *enc,
- const struct dc_stream *stream);
+ const struct dc_stream_state *stream);
/****************** HW programming ************************/
uint8_t i, j;
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
if (old_context && resource_is_stream_unchanged(old_context, stream))
continue;
enum dc_status dce100_validate_guaranteed(
const struct core_dc *dc,
- struct dc_stream *dc_stream,
+ struct dc_stream_state *dc_stream,
struct validate_context *context)
{
enum dc_status result = DC_ERROR_UNEXPECTED;
static bool dce110_set_output_transfer_func(
struct pipe_ctx *pipe_ctx,
- const struct dc_stream *stream)
+ const struct dc_stream_state *stream)
{
struct transform *xfm = pipe_ctx->xfm;
void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->sink->link;
if (pipe_ctx->audio) {
const struct pipe_ctx *pipe_ctx,
struct audio_output *audio_output)
{
- const struct dc_stream *stream = pipe_ctx->stream;
+ const struct dc_stream_state *stream = pipe_ctx->stream;
audio_output->engine_id = pipe_ctx->stream_enc->id;
audio_output->signal = pipe_ctx->stream->signal;
struct validate_context *context,
struct core_dc *dc)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
struct pipe_ctx *pipe_ctx_old = &dc->current_context->res_ctx.
pipe_ctx[pipe_ctx->pipe_idx];
struct tg_color black_color = {0};
struct validate_context *context,
struct core_dc *dc)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
struct pipe_ctx *pipe_ctx_old = &dc->current_context->res_ctx.
pipe_ctx[pipe_ctx->pipe_idx];
static uint32_t compute_pstate_blackout_duration(
struct bw_fixed blackout_duration,
- const struct dc_stream *stream)
+ const struct dc_stream_state *stream)
{
uint32_t total_dest_line_time_ns;
uint32_t pstate_blackout_duration_ns;
for (j = 0; j < context->stream_count; j++) {
int k;
- const struct dc_stream *stream = context->streams[j];
+ const struct dc_stream_state *stream = context->streams[j];
struct dm_pp_single_disp_config *cfg =
&pp_display_cfg->disp_configs[num_cfgs];
const struct pipe_ctx *pipe_ctx = NULL;
uint32_t min_vertical_blank_time = -1;
for (j = 0; j < context->stream_count; j++) {
- struct dc_stream *stream = context->streams[j];
+ struct dc_stream_state *stream = context->streams[j];
uint32_t vertical_blank_in_pixels = 0;
uint32_t vertical_blank_time = 0;
const struct pipe_ctx *pipe_ctx,
struct pixel_clk_params *pixel_clk_params)
{
- const struct dc_stream *stream = pipe_ctx->stream;
+ const struct dc_stream_state *stream = pipe_ctx->stream;
/*TODO: is this halved for YCbCr 420? in that case we might want to move
* the pixel clock normalization for hdmi up to here instead of doing it
uint8_t i, j;
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
if (old_context && resource_is_stream_unchanged(old_context, stream))
continue;
enum dc_status dce110_validate_guaranteed(
const struct core_dc *dc,
- struct dc_stream *dc_stream,
+ struct dc_stream_state *dc_stream,
struct validate_context *context)
{
enum dc_status result = DC_ERROR_UNEXPECTED;
static struct pipe_ctx *dce110_acquire_underlay(
struct validate_context *context,
const struct resource_pool *pool,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
struct core_dc *dc = DC_TO_CORE(stream->ctx->dc);
struct resource_context *res_ctx = &context->res_ctx;
static struct clock_source *find_matching_pll(
struct resource_context *res_ctx,
const struct resource_pool *pool,
- const struct dc_stream *const stream)
+ const struct dc_stream_state *const stream)
{
switch (stream->sink->link->link_enc->transmitter) {
case TRANSMITTER_UNIPHY_A:
uint8_t i, j;
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
if (old_context && resource_is_stream_unchanged(old_context, stream))
continue;
/* acquire new resources */
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
if (old_context && resource_is_stream_unchanged(old_context, stream))
continue;
enum dc_status dce112_validate_guaranteed(
const struct core_dc *dc,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct validate_context *context)
{
enum dc_status result = DC_ERROR_UNEXPECTED;
enum dc_status dce112_validate_guaranteed(
const struct core_dc *dc,
- struct dc_stream *dc_stream,
+ struct dc_stream_state *dc_stream,
struct validate_context *context);
bool dce112_validate_bandwidth(
uint8_t i, j;
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
if (old_context && resource_is_stream_unchanged(old_context, stream))
continue;
enum dc_status dce80_validate_guaranteed(
const struct core_dc *dc,
- struct dc_stream *dc_stream,
+ struct dc_stream_state *dc_stream,
struct validate_context *context)
{
enum dc_status result = DC_ERROR_UNEXPECTED;
struct validate_context *context,
struct core_dc *dc)
{
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
enum dc_color_space color_space;
struct tg_color black_color = {0};
bool enableStereo = stream->timing.timing_3d_format == TIMING_3D_FORMAT_NONE ?
static bool dcn10_set_output_transfer_func(
struct pipe_ctx *pipe_ctx,
- const struct dc_stream *stream)
+ const struct dc_stream_state *stream)
{
struct transform *xfm = pipe_ctx->xfm;
}
static void dcn10_config_stereo_parameters(
- struct dc_stream *stream, struct crtc_stereo_flags *flags)
+ struct dc_stream_state *stream, struct crtc_stereo_flags *flags)
{
enum view_3d_format view_format = stream->view_format;
enum dc_timing_3d_format timing_3d_format =\
static void dcn10_setup_stereo(struct pipe_ctx *pipe_ctx, struct core_dc *dc)
{
struct crtc_stereo_flags flags = { 0 };
- struct dc_stream *stream = pipe_ctx->stream;
+ struct dc_stream_state *stream = pipe_ctx->stream;
dcn10_config_stereo_parameters(stream, &flags);
const struct pipe_ctx *pipe_ctx,
struct pixel_clk_params *pixel_clk_params)
{
- const struct dc_stream *stream = pipe_ctx->stream;
+ const struct dc_stream_state *stream = pipe_ctx->stream;
pixel_clk_params->requested_pix_clk = stream->timing.pix_clk_khz;
pixel_clk_params->encoder_object_id = stream->sink->link->link_enc->id;
pixel_clk_params->signal_type = pipe_ctx->stream->signal;
}
-static void build_clamping_params(struct dc_stream *stream)
+static void build_clamping_params(struct dc_stream_state *stream)
{
stream->clamping.clamping_level = CLAMPING_FULL_RANGE;
stream->clamping.c_depth = stream->timing.display_color_depth;
uint8_t i, j;
for (i = 0; i < context->stream_count; i++) {
- struct dc_stream *stream = context->streams[i];
+ struct dc_stream_state *stream = context->streams[i];
if (old_context && resource_is_stream_unchanged(old_context, stream)) {
if (stream != NULL && old_context->streams[i] != NULL) {
enum dc_status dcn10_validate_guaranteed(
const struct core_dc *dc,
- struct dc_stream *dc_stream,
+ struct dc_stream_state *dc_stream,
struct validate_context *context)
{
enum dc_status result = DC_ERROR_UNEXPECTED;
static struct pipe_ctx *dcn10_acquire_idle_pipe_for_layer(
struct validate_context *context,
const struct resource_pool *pool,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
struct resource_context *res_ctx = &context->res_ctx;
struct pipe_ctx *head_pipe = resource_get_head_pipe_for_stream(res_ctx, stream);
*/
bool dm_helpers_dp_mst_write_payload_allocation_table(
struct dc_context *ctx,
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
struct dp_mst_stream_allocation_table *proposed_table,
bool enable);
*/
bool dm_helpers_dp_mst_poll_for_allocation_change_trigger(
struct dc_context *ctx,
- const struct dc_stream *stream);
+ const struct dc_stream_state *stream);
/*
* Sends ALLOCATE_PAYLOAD message.
*/
bool dm_helpers_dp_mst_send_payload_allocation(
struct dc_context *ctx,
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
bool enable);
bool dm_helpers_dp_mst_start_top_mgr(
void link_destroy(struct dc_link **link);
enum dc_status dc_link_validate_mode_timing(
- const struct dc_stream *stream,
+ const struct dc_stream_state *stream,
struct dc_link *link,
const struct dc_crtc_timing *timing);
enum dc_status (*validate_guaranteed)(
const struct core_dc *dc,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct validate_context *context);
bool (*validate_bandwidth)(
struct pipe_ctx *(*acquire_idle_pipe_for_layer)(
struct validate_context *context,
const struct resource_pool *pool,
- struct dc_stream *stream);
-
+ struct dc_stream_state *stream);
enum dc_status (*validate_plane)(const struct dc_plane_state *plane_state);
};
struct pipe_ctx {
struct dc_plane_state *surface;
- struct dc_stream *stream;
+ struct dc_stream_state *stream;
struct mem_input *mi;
struct input_pixel_processor *ipp;
};
struct validate_context {
- struct dc_stream *streams[MAX_PIPES];
+ struct dc_stream_state *streams[MAX_PIPES];
struct dc_stream_status stream_status[MAX_PIPES];
uint8_t stream_count;
#define LINK_TRAINING_RETRY_DELAY 50 /* ms */
struct dc_link;
-struct dc_stream;
+struct dc_stream_state;
struct dc_link_settings;
bool dp_hbr_verify_link_cap(
const struct dc_crtc_timing *timing);
void decide_link_settings(
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct dc_link_settings *link_setting);
bool perform_link_training_with_retries(
struct link_encoder_funcs {
bool (*validate_output_with_stream)(
- struct link_encoder *enc, const struct dc_stream *stream);
+ struct link_encoder *enc, const struct dc_stream_state *stream);
void (*hw_init)(struct link_encoder *enc);
void (*setup)(struct link_encoder *enc,
enum signal_type signal);
bool (*set_output_transfer_func)(
struct pipe_ctx *pipe_ctx,
- const struct dc_stream *stream);
+ const struct dc_stream_state *stream);
void (*power_down)(struct core_dc *dc);
struct clock_source *clock_source);
bool resource_are_streams_timing_synchronizable(
- struct dc_stream *stream1,
- struct dc_stream *stream2);
+ struct dc_stream_state *stream1,
+ struct dc_stream_state *stream2);
struct clock_source *resource_find_used_clk_src_for_sharing(
struct resource_context *res_ctx,
struct pipe_ctx *resource_get_head_pipe_for_stream(
struct resource_context *res_ctx,
- struct dc_stream *stream);
+ struct dc_stream_state *stream);
bool resource_attach_surfaces_to_context(
struct dc_plane_state *const *surfaces,
int surface_count,
- struct dc_stream *dc_stream,
+ struct dc_stream_state *dc_stream,
struct validate_context *context,
const struct resource_pool *pool);
const struct resource_pool *pool);
bool resource_is_stream_unchanged(
- struct validate_context *old_context, struct dc_stream *stream);
-
+ struct validate_context *old_context, struct dc_stream_state *stream);
bool resource_validate_attach_surfaces(
const struct dc_validation_set set[],
struct pipe_ctx *pipe_ctx_old,
struct pipe_ctx *pipe_ctx);
-void resource_build_bit_depth_reduction_params(struct dc_stream *stream,
+void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream,
struct bit_depth_reduction_params *fmt_bit_depth);
#endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */
static bool virtual_link_encoder_validate_output_with_stream(
struct link_encoder *enc,
- const struct dc_stream *stream) { return true; }
+ const struct dc_stream_state *stream) { return true; }
static void virtual_link_encoder_hw_init(struct link_encoder *enc) {}
};
struct freesync_entity {
- struct dc_stream *stream;
+ struct dc_stream_state *stream;
struct mod_freesync_caps *caps;
struct freesync_state state;
struct mod_freesync_user_enable user_enable;
* on the core_freesync->map and returns the corresponding index
*/
static unsigned int map_index_from_stream(struct core_freesync *core_freesync,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
unsigned int index = 0;
}
bool mod_freesync_add_stream(struct mod_freesync *mod_freesync,
- struct dc_stream *stream, struct mod_freesync_caps *caps)
+ struct dc_stream_state *stream, struct mod_freesync_caps *caps)
{
struct core_dc *core_dc = NULL;
struct core_freesync *core_freesync = NULL;
}
bool mod_freesync_remove_stream(struct mod_freesync *mod_freesync,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
int i = 0;
struct core_freesync *core_freesync = NULL;
}
static void update_stream_freesync_context(struct core_freesync *core_freesync,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
unsigned int index;
struct freesync_context *ctx;
}
static void update_stream(struct core_freesync *core_freesync,
- struct dc_stream *stream)
+ struct dc_stream_state *stream)
{
unsigned int index = map_index_from_stream(core_freesync, stream);
if (core_freesync->map[index].caps->supported) {
}
static void calc_freesync_range(struct core_freesync *core_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct freesync_state *state,
unsigned int min_refresh_in_uhz,
unsigned int max_refresh_in_uhz)
min_frame_duration_in_ns) / 2000;
}
-static void calc_v_total_from_duration(struct dc_stream *stream,
+static void calc_v_total_from_duration(struct dc_stream_state *stream,
unsigned int duration_in_ns, int *v_total_nominal)
{
*v_total_nominal = div64_u64(div64_u64(((unsigned long long)(
}
static void calc_v_total_for_static_ramp(struct core_freesync *core_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
unsigned int index, int *v_total)
{
unsigned int frame_duration = 0;
* Sets freesync mode on a stream depending on current freesync state.
*/
static bool set_freesync_on_streams(struct core_freesync *core_freesync,
- struct dc_stream **streams, int num_streams)
+ struct dc_stream_state **streams, int num_streams)
{
int v_total_nominal = 0, v_total_min = 0, v_total_max = 0;
unsigned int stream_idx, map_index = 0;
}
void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams)
+ struct dc_stream_state **streams, int num_streams)
{
unsigned int index, v_total, inserted_frame_v_total = 0;
unsigned int min_frame_duration_in_ns, vmax, vmin = 0;
}
void mod_freesync_update_state(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams,
+ struct dc_stream_state **streams, int num_streams,
struct mod_freesync_params *freesync_params)
{
bool freesync_program_required = false;
bool mod_freesync_get_state(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct mod_freesync_params *freesync_params)
{
unsigned int index = 0;
}
bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams,
+ struct dc_stream_state **streams, int num_streams,
struct mod_freesync_user_enable *user_enable)
{
unsigned int stream_index, map_index;
}
bool mod_freesync_get_user_enable(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct mod_freesync_user_enable *user_enable)
{
unsigned int index = 0;
}
bool mod_freesync_get_static_ramp_active(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
bool *is_ramp_active)
{
unsigned int index = 0;
}
bool mod_freesync_override_min_max(struct mod_freesync *mod_freesync,
- struct dc_stream *streams,
+ struct dc_stream_state *streams,
unsigned int min_refresh,
unsigned int max_refresh,
struct mod_freesync_caps *caps)
}
bool mod_freesync_get_min_max(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
unsigned int *min_refresh,
unsigned int *max_refresh)
{
}
bool mod_freesync_get_vmin_vmax(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
unsigned int *vmin,
unsigned int *vmax)
{
}
bool mod_freesync_get_v_position(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
unsigned int *nom_v_pos,
unsigned int *v_pos)
{
}
void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams)
+ struct dc_stream_state **streams, int num_streams)
{
unsigned int stream_index, map_index;
struct freesync_state *state;
* is required, depending on the times calculated
*/
static void update_timestamps(struct core_freesync *core_freesync,
- const struct dc_stream *stream, unsigned int map_index,
+ const struct dc_stream_state *stream, unsigned int map_index,
unsigned int last_render_time_in_us)
{
struct freesync_state *state = &core_freesync->map[map_index].state;
}
static void apply_below_the_range(struct core_freesync *core_freesync,
- struct dc_stream *stream, unsigned int map_index,
+ struct dc_stream_state *stream, unsigned int map_index,
unsigned int last_render_time_in_us)
{
unsigned int inserted_frame_duration_in_us = 0;
}
static void apply_fixed_refresh(struct core_freesync *core_freesync,
- struct dc_stream *stream, unsigned int map_index)
+ struct dc_stream_state *stream, unsigned int map_index)
{
unsigned int vmin = 0, vmax = 0;
struct freesync_state *state = &core_freesync->map[map_index].state;
}
void mod_freesync_pre_update_plane_addresses(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams,
+ struct dc_stream_state **streams, int num_streams,
unsigned int curr_time_stamp_in_us)
{
unsigned int stream_index, map_index, last_render_time_in_us = 0;
* Add stream to be tracked by module
*/
bool mod_freesync_add_stream(struct mod_freesync *mod_freesync,
- struct dc_stream *stream, struct mod_freesync_caps *caps);
+ struct dc_stream_state *stream, struct mod_freesync_caps *caps);
/*
* Remove stream to be tracked by module
*/
bool mod_freesync_remove_stream(struct mod_freesync *mod_freesync,
- struct dc_stream *stream);
+ struct dc_stream_state *stream);
/*
* Update the freesync state flags for each display and program
* freesync accordingly
*/
void mod_freesync_update_state(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams,
+ struct dc_stream_state **streams, int num_streams,
struct mod_freesync_params *freesync_params);
bool mod_freesync_get_state(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct mod_freesync_params *freesync_params);
bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams,
+ struct dc_stream_state **streams, int num_streams,
struct mod_freesync_user_enable *user_enable);
bool mod_freesync_get_user_enable(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
struct mod_freesync_user_enable *user_enable);
bool mod_freesync_get_static_ramp_active(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
bool *is_ramp_active);
bool mod_freesync_override_min_max(struct mod_freesync *mod_freesync,
- struct dc_stream *streams,
+ struct dc_stream_state *streams,
unsigned int min_refresh,
unsigned int max_refresh,
struct mod_freesync_caps *caps);
bool mod_freesync_get_min_max(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
unsigned int *min_refresh,
unsigned int *max_refresh);
bool mod_freesync_get_vmin_vmax(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
unsigned int *vmin,
unsigned int *vmax);
bool mod_freesync_get_v_position(struct mod_freesync *mod_freesync,
- struct dc_stream *stream,
+ struct dc_stream_state *stream,
unsigned int *nom_v_pos,
unsigned int *v_pos);
void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams);
+ struct dc_stream_state **streams, int num_streams);
void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams);
+ struct dc_stream_state **streams, int num_streams);
void mod_freesync_pre_update_plane_addresses(struct mod_freesync *mod_freesync,
- struct dc_stream **streams, int num_streams,
+ struct dc_stream_state **streams, int num_streams,
unsigned int curr_time_stamp);
#endif