2017-09-12 19:58:20 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2015 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_HW_SEQUENCER_H__
|
|
|
|
#define __DC_HW_SEQUENCER_H__
|
|
|
|
#include "core_types.h"
|
|
|
|
#include "timing_generator.h"
|
|
|
|
|
|
|
|
enum pipe_gating_control {
|
|
|
|
PIPE_GATING_CONTROL_DISABLE = 0,
|
|
|
|
PIPE_GATING_CONTROL_ENABLE,
|
|
|
|
PIPE_GATING_CONTROL_INIT
|
|
|
|
};
|
|
|
|
|
2017-02-28 20:23:38 +00:00
|
|
|
struct dce_hwseq_wa {
|
|
|
|
bool blnd_crtc_trigger;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct dce_hwseq {
|
|
|
|
struct dc_context *ctx;
|
|
|
|
const struct dce_hwseq_registers *regs;
|
|
|
|
const struct dce_hwseq_shift *shifts;
|
|
|
|
const struct dce_hwseq_mask *masks;
|
|
|
|
struct dce_hwseq_wa wa;
|
2017-09-12 19:58:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct hw_sequencer_funcs {
|
|
|
|
|
|
|
|
void (*init_hw)(struct core_dc *dc);
|
|
|
|
|
|
|
|
enum dc_status (*apply_ctx_to_hw)(
|
|
|
|
struct core_dc *dc, struct validate_context *context);
|
|
|
|
|
|
|
|
void (*reset_hw_ctx_wrap)(
|
|
|
|
struct core_dc *dc, struct validate_context *context);
|
|
|
|
|
|
|
|
void (*apply_ctx_for_surface)(
|
|
|
|
struct core_dc *dc,
|
2017-07-27 13:55:38 +00:00
|
|
|
const struct dc_plane_state *plane_state,
|
2017-09-12 19:58:20 +00:00
|
|
|
struct validate_context *context);
|
|
|
|
|
|
|
|
void (*set_plane_config)(
|
|
|
|
const struct core_dc *dc,
|
|
|
|
struct pipe_ctx *pipe_ctx,
|
|
|
|
struct resource_context *res_ctx);
|
|
|
|
|
2017-06-02 21:25:49 +00:00
|
|
|
void (*program_gamut_remap)(
|
|
|
|
struct pipe_ctx *pipe_ctx);
|
|
|
|
|
2017-06-28 21:21:42 +00:00
|
|
|
void (*program_csc_matrix)(
|
|
|
|
struct pipe_ctx *pipe_ctx,
|
|
|
|
enum dc_color_space colorspace,
|
|
|
|
uint16_t *matrix);
|
|
|
|
|
2017-09-12 19:58:20 +00:00
|
|
|
void (*update_plane_addr)(
|
|
|
|
const struct core_dc *dc,
|
|
|
|
struct pipe_ctx *pipe_ctx);
|
|
|
|
|
2017-07-23 22:30:15 +00:00
|
|
|
void (*update_dchub)(
|
|
|
|
struct dce_hwseq *hws,
|
|
|
|
struct dchub_init_data *dh_data);
|
|
|
|
|
2017-09-12 19:58:20 +00:00
|
|
|
void (*update_pending_status)(
|
|
|
|
struct pipe_ctx *pipe_ctx);
|
|
|
|
|
2016-12-15 17:09:46 +00:00
|
|
|
bool (*set_input_transfer_func)(
|
2016-12-13 18:59:41 +00:00
|
|
|
struct pipe_ctx *pipe_ctx,
|
2017-07-27 13:55:38 +00:00
|
|
|
const struct dc_plane_state *plane_state);
|
2017-09-12 19:58:20 +00:00
|
|
|
|
2016-12-15 17:09:46 +00:00
|
|
|
bool (*set_output_transfer_func)(
|
|
|
|
struct pipe_ctx *pipe_ctx,
|
2017-07-27 13:33:33 +00:00
|
|
|
const struct dc_stream_state *stream);
|
2016-12-15 17:09:46 +00:00
|
|
|
|
2017-09-12 19:58:20 +00:00
|
|
|
void (*power_down)(struct core_dc *dc);
|
|
|
|
|
|
|
|
void (*enable_accelerated_mode)(struct core_dc *dc);
|
|
|
|
|
|
|
|
void (*enable_timing_synchronization)(
|
|
|
|
struct core_dc *dc,
|
|
|
|
int group_index,
|
|
|
|
int group_size,
|
|
|
|
struct pipe_ctx *grouped_pipes[]);
|
|
|
|
|
|
|
|
void (*enable_display_pipe_clock_gating)(
|
|
|
|
struct dc_context *ctx,
|
|
|
|
bool clock_gating);
|
|
|
|
|
|
|
|
bool (*enable_display_power_gating)(
|
|
|
|
struct core_dc *dc,
|
|
|
|
uint8_t controller_id,
|
|
|
|
struct dc_bios *dcb,
|
|
|
|
enum pipe_gating_control power_gating);
|
|
|
|
|
2017-06-14 22:58:04 +00:00
|
|
|
void (*power_down_front_end)(struct core_dc *dc, int fe_idx);
|
2017-03-23 14:34:06 +00:00
|
|
|
|
|
|
|
void (*power_on_front_end)(struct core_dc *dc,
|
|
|
|
struct pipe_ctx *pipe,
|
|
|
|
struct validate_context *context);
|
|
|
|
|
2017-09-12 19:58:20 +00:00
|
|
|
void (*update_info_frame)(struct pipe_ctx *pipe_ctx);
|
|
|
|
|
|
|
|
void (*enable_stream)(struct pipe_ctx *pipe_ctx);
|
|
|
|
|
|
|
|
void (*disable_stream)(struct pipe_ctx *pipe_ctx);
|
|
|
|
|
|
|
|
void (*unblank_stream)(struct pipe_ctx *pipe_ctx,
|
|
|
|
struct dc_link_settings *link_settings);
|
|
|
|
|
|
|
|
void (*pipe_control_lock)(
|
2017-02-28 20:23:38 +00:00
|
|
|
struct core_dc *dc,
|
|
|
|
struct pipe_ctx *pipe,
|
2017-09-12 19:58:20 +00:00
|
|
|
bool lock);
|
|
|
|
|
2017-02-22 22:52:22 +00:00
|
|
|
void (*set_bandwidth)(
|
|
|
|
struct core_dc *dc,
|
|
|
|
struct validate_context *context,
|
|
|
|
bool decrease_allowed);
|
2017-09-12 19:58:20 +00:00
|
|
|
|
|
|
|
void (*set_drr)(struct pipe_ctx **pipe_ctx, int num_pipes,
|
|
|
|
int vmin, int vmax);
|
|
|
|
|
2017-04-18 19:24:50 +00:00
|
|
|
void (*get_position)(struct pipe_ctx **pipe_ctx, int num_pipes,
|
|
|
|
struct crtc_position *position);
|
|
|
|
|
2017-09-12 19:58:20 +00:00
|
|
|
void (*set_static_screen_control)(struct pipe_ctx **pipe_ctx,
|
2017-04-21 19:29:55 +00:00
|
|
|
int num_pipes, const struct dc_static_screen_events *events);
|
2017-09-12 19:58:20 +00:00
|
|
|
|
|
|
|
enum dc_status (*prog_pixclk_crtc_otg)(
|
|
|
|
struct pipe_ctx *pipe_ctx,
|
|
|
|
struct validate_context *context,
|
|
|
|
struct core_dc *dc);
|
2017-06-07 17:23:59 +00:00
|
|
|
|
|
|
|
void (*setup_stereo)(
|
|
|
|
struct pipe_ctx *pipe_ctx,
|
|
|
|
struct core_dc *dc);
|
2017-07-17 20:04:02 +00:00
|
|
|
|
|
|
|
void (*set_avmute)(struct pipe_ctx *pipe_ctx, bool enable);
|
2017-07-20 04:12:20 +00:00
|
|
|
|
|
|
|
void (*log_hw_state)(struct core_dc *dc);
|
2017-07-23 19:18:57 +00:00
|
|
|
|
2017-07-24 14:47:02 +00:00
|
|
|
void (*wait_for_mpcc_disconnect)(struct core_dc *dc,
|
|
|
|
struct resource_pool *res_pool,
|
|
|
|
struct pipe_ctx *pipe_ctx);
|
2017-09-12 19:58:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void color_space_to_black_color(
|
|
|
|
const struct core_dc *dc,
|
|
|
|
enum dc_color_space colorspace,
|
|
|
|
struct tg_color *black_color);
|
|
|
|
|
2017-01-06 21:23:18 +00:00
|
|
|
bool hwss_wait_for_blank_complete(
|
|
|
|
struct timing_generator *tg);
|
|
|
|
|
2017-09-12 19:58:20 +00:00
|
|
|
#endif /* __DC_HW_SEQUENCER_H__ */
|