Merge tag 'amd-drm-next-5.14-2021-06-02' of https://gitlab.freedesktop.org/agd5f...
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / display / dc / dc.h
index 18ed0d3..c0fbcbd 100644 (file)
 #include "inc/hw/dmcu.h"
 #include "dml/display_mode_lib.h"
 
-#define DC_VER "3.2.122"
+/* forward declaration */
+struct aux_payload;
+
+#define DC_VER "3.2.137"
 
 #define MAX_SURFACES 3
 #define MAX_PLANES 6
 #define MAX_STREAMS 6
 #define MAX_SINKS_PER_LINK 4
 #define MIN_VIEWPORT_SIZE 12
+#define MAX_NUM_EDP 2
 
 /*******************************************************************************
  * Display Core Interfaces
@@ -151,6 +155,8 @@ struct dc_caps {
        uint32_t max_links;
        uint32_t max_audios;
        uint32_t max_slave_planes;
+       uint32_t max_slave_yuv_planes;
+       uint32_t max_slave_rgb_planes;
        uint32_t max_planes;
        uint32_t max_downscale_ratio;
        uint32_t i2c_speed_in_khz;
@@ -287,7 +293,6 @@ struct dc_config {
        bool gpu_vm_support;
        bool disable_disp_pll_sharing;
        bool fbc_support;
-       bool optimize_edp_link_rate;
        bool disable_fractional_pwm;
        bool allow_seamless_boot_optimization;
        bool power_down_display_on_boot;
@@ -301,6 +306,10 @@ struct dc_config {
 #if defined(CONFIG_DRM_AMD_DC_DCN)
        bool clamp_min_dcfclk;
 #endif
+       uint64_t vblank_alignment_dto_params;
+       uint8_t  vblank_alignment_max_frame_time_diff;
+       bool is_asymmetric_memory;
+       bool is_single_rank_dimm;
 };
 
 enum visual_confirm {
@@ -452,6 +461,7 @@ struct dc_debug_options {
        enum pipe_split_policy pipe_split_policy;
        bool force_single_disp_pipe_split;
        bool voltage_align_fclk;
+       bool disable_min_fclk;
 
        bool disable_dfs_bypass;
        bool disable_dpp_power_gate;
@@ -528,6 +538,15 @@ struct dc_debug_options {
        bool disable_dsc;
        bool enable_dram_clock_change_one_display_vactive;
        union mem_low_power_enable_options enable_mem_low_power;
+       bool force_vblank_alignment;
+
+       /* Enable dmub aux for legacy ddc */
+       bool enable_dmub_aux_for_legacy_ddc;
+       bool optimize_edp_link_rate; /* eDP ILR */
+       /* force enable edp FEC */
+       bool force_enable_edp_fec;
+       /* FEC/PSR1 sequence enable delay in 100us */
+       uint8_t fec_enable_delay_in100us;
 };
 
 struct dc_debug_data {
@@ -581,7 +600,6 @@ struct dc_bounding_box_overrides {
        int min_dcfclk_mhz;
 };
 
-struct dc_state;
 struct resource_pool;
 struct dce_hwseq;
 struct gpu_info_soc_bounding_box_v1_0;
@@ -628,7 +646,6 @@ struct dc {
 #endif
 
        /* Require to maintain clocks and bandwidth for UEFI enabled HW */
-       int optimize_seamless_boot_streams;
 
        /* FBC compressor */
        struct compressor *fbc_compressor;
@@ -888,6 +905,8 @@ struct dc_plane_state {
 
        union surface_update_flags update_flags;
        bool flip_int_enabled;
+       bool skip_manual_trigger;
+
        /* private to DC core */
        struct dc_plane_status status;
        struct dc_context *ctx;
@@ -1050,8 +1069,6 @@ bool dc_resource_is_dsc_encoding_supported(const struct dc *dc);
  */
 bool dc_commit_state(struct dc *dc, struct dc_state *context);
 
-void dc_power_down_on_boot(struct dc *dc);
-
 struct dc_state *dc_create_state(struct dc *dc);
 struct dc_state *dc_copy_state(struct dc_state *src_ctx);
 void dc_retain_state(struct dc_state *context);
@@ -1292,8 +1309,20 @@ void dc_hardware_release(struct dc *dc);
 
 bool dc_set_psr_allow_active(struct dc *dc, bool enable);
 
+bool dc_enable_dmub_notifications(struct dc *dc);
+
+bool dc_process_dmub_aux_transfer_async(struct dc *dc,
+                               uint32_t link_index,
+                               struct aux_payload *payload);
+
 /*******************************************************************************
  * DSC Interfaces
  ******************************************************************************/
 #include "dc_dsc.h"
+
+/*******************************************************************************
+ * Disable acc mode Interfaces
+ ******************************************************************************/
+void dc_disable_accelerated_mode(struct dc *dc);
+
 #endif /* DC_INTERFACE_H_ */