summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/dc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dc.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dc.h112
1 files changed, 78 insertions, 34 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index b14bad10db97..e15e8fb1eefe 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -31,6 +31,7 @@
#include "logger_types.h"
#include "gpio_types.h"
#include "link_service_types.h"
+#include "grph_object_ctrl_defs.h"
#define MAX_SURFACES 3
#define MAX_STREAMS 6
@@ -141,11 +142,11 @@ struct dc_link_funcs {
bool skip_video_pattern);
void (*set_preferred_link_settings)(struct dc *dc,
struct dc_link_settings *link_setting,
- const struct dc_link *link);
+ struct dc_link *link);
void (*enable_hpd)(const struct dc_link *link);
void (*disable_hpd)(const struct dc_link *link);
void (*set_test_pattern)(
- const struct dc_link *link,
+ struct dc_link *link,
enum dp_test_pattern test_pattern,
const struct link_training_settings *p_link_settings,
const unsigned char *p_custom_pattern,
@@ -641,7 +642,7 @@ struct dc_stream_status {
/*
* link this stream passes through
*/
- const struct dc_link *link;
+ struct dc_link *link;
};
struct dc_stream_status *dc_stream_get_status(
@@ -662,6 +663,50 @@ void dc_release_validate_context(struct validate_context *context);
* Link Interfaces
******************************************************************************/
+struct dpcd_caps {
+ union dpcd_rev dpcd_rev;
+ union max_lane_count max_ln_count;
+ union max_down_spread max_down_spread;
+
+ /* dongle type (DP converter, CV smart dongle) */
+ enum display_dongle_type dongle_type;
+ /* Dongle's downstream count. */
+ union sink_count sink_count;
+ /* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER,
+ indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/
+ struct dc_dongle_caps dongle_caps;
+
+ uint32_t sink_dev_id;
+ uint32_t branch_dev_id;
+ int8_t branch_dev_name[6];
+ int8_t branch_hw_revision;
+
+ bool allow_invalid_MSA_timing_param;
+ bool panel_mode_edp;
+};
+
+struct dc_link_status {
+ struct dpcd_caps *dpcd_caps;
+};
+
+/* DP MST stream allocation (payload bandwidth number) */
+struct link_mst_stream_allocation {
+ /* DIG front */
+ const struct stream_encoder *stream_enc;
+ /* associate DRM payload table with DC stream encoder */
+ uint8_t vcp_id;
+ /* number of slots required for the DP stream in transport packet */
+ uint8_t slot_count;
+};
+
+/* DP MST stream allocation table */
+struct link_mst_stream_allocation_table {
+ /* number of DP video streams */
+ int stream_count;
+ /* array of stream allocations */
+ struct link_mst_stream_allocation stream_allocations[MAX_CONTROLLER_NUM];
+};
+
/*
* A link contains one or more sinks and their connected status.
* The currently active signal type (HDMI, DP-SST, DP-MST) is also reported.
@@ -699,32 +744,31 @@ struct dc_link {
struct ddc_service *ddc;
bool aux_mode;
-};
-struct dpcd_caps {
- union dpcd_rev dpcd_rev;
- union max_lane_count max_ln_count;
- union max_down_spread max_down_spread;
+ /* Private to DC core */
- /* dongle type (DP converter, CV smart dongle) */
- enum display_dongle_type dongle_type;
- /* Dongle's downstream count. */
- union sink_count sink_count;
- /* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER,
- indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/
- struct dc_dongle_caps dongle_caps;
+ const struct core_dc *dc;
- uint32_t sink_dev_id;
- uint32_t branch_dev_id;
- int8_t branch_dev_name[6];
- int8_t branch_hw_revision;
+ struct dc_context *ctx;
- bool allow_invalid_MSA_timing_param;
- bool panel_mode_edp;
-};
+ struct link_encoder *link_enc;
+ struct graphics_object_id link_id;
+ union ddi_channel_mapping ddi_channel_mapping;
+ struct connector_device_tag_info device_tag;
+ struct dpcd_caps dpcd_caps;
+ unsigned int dpcd_sink_count;
+
+ enum edp_revision edp_revision;
+ bool psr_enabled;
+
+ /* MST record stream using this link */
+ struct link_flags {
+ bool dp_keep_receiver_powered;
+ } wa_flags;
+ struct link_mst_stream_allocation_table mst_stream_alloc_table;
+
+ struct dc_link_status link_status;
-struct dc_link_status {
- struct dpcd_caps *dpcd_caps;
};
const struct dc_link_status *dc_link_get_status(const struct dc_link *dc_link);
@@ -734,7 +778,7 @@ const struct dc_link_status *dc_link_get_status(const struct dc_link *dc_link);
* boot time. They cannot be created or destroyed.
* Use dc_get_caps() to get number of links.
*/
-const struct dc_link *dc_get_link_at_index(const struct dc *dc, uint32_t link_index);
+struct dc_link *dc_get_link_at_index(const struct dc *dc, uint32_t link_index);
/* Return id of physical connector represented by a dc_link at link_index.*/
const struct graphics_object_id dc_get_link_id_at_index(
@@ -750,7 +794,7 @@ bool dc_link_set_psr_enable(const struct dc_link *dc_link, bool enable);
bool dc_link_get_psr_state(const struct dc_link *dc_link, uint32_t *psr_state);
-bool dc_link_setup_psr(const struct dc_link *dc_link,
+bool dc_link_setup_psr(struct dc_link *dc_link,
const struct dc_stream *stream, struct psr_config *psr_config,
struct psr_context *psr_context);
@@ -760,7 +804,7 @@ bool dc_link_setup_psr(const struct dc_link *dc_link,
* true otherwise. True meaning further action is required (status update
* and OS notification).
*/
-bool dc_link_detect(const struct dc_link *dc_link, bool boot);
+bool dc_link_detect(struct dc_link *dc_link, bool boot);
/* Notify DC about DP RX Interrupt (aka Short Pulse Interrupt).
* Return:
@@ -768,26 +812,26 @@ bool dc_link_detect(const struct dc_link *dc_link, bool boot);
* detection.
* false - no change in Downstream port status. No further action required
* from DM. */
-bool dc_link_handle_hpd_rx_irq(const struct dc_link *dc_link,
+bool dc_link_handle_hpd_rx_irq(struct dc_link *dc_link,
union hpd_irq_data *hpd_irq_dpcd_data);
struct dc_sink_init_data;
struct dc_sink *dc_link_add_remote_sink(
- const struct dc_link *dc_link,
+ struct dc_link *dc_link,
const uint8_t *edid,
int len,
struct dc_sink_init_data *init_data);
void dc_link_remove_remote_sink(
- const struct dc_link *link,
+ struct dc_link *link,
const struct dc_sink *sink);
/* Used by diagnostics for virtual link at the moment */
-void dc_link_set_sink(const struct dc_link *link, struct dc_sink *sink);
+void dc_link_set_sink(struct dc_link *link, struct dc_sink *sink);
void dc_link_dp_set_drive_settings(
- const struct dc_link *link,
+ struct dc_link *link,
struct link_training_settings *lt_settings);
enum link_training_result dc_link_dp_perform_link_training(
@@ -800,7 +844,7 @@ void dc_link_dp_enable_hpd(const struct dc_link *link);
void dc_link_dp_disable_hpd(const struct dc_link *link);
bool dc_link_dp_set_test_pattern(
- const struct dc_link *link,
+ struct dc_link *link,
enum dp_test_pattern test_pattern,
const struct link_training_settings *p_link_settings,
const unsigned char *p_custom_pattern,
@@ -844,7 +888,7 @@ const struct audio **dc_get_audios(struct dc *dc);
struct dc_sink_init_data {
enum signal_type sink_signal;
- const struct dc_link *link;
+ struct dc_link *link;
uint32_t dongle_max_pix_clk;
bool converter_disable_audio;
};
OpenPOWER on IntegriCloud