dc_state);
if ((acrtc_state->update_type > UPDATE_TYPE_FAST) &&
- acrtc_state->stream->link->psr_settings.psr_version != PSR_VERSION_UNSUPPORTED &&
+ acrtc_state->stream->link->psr_settings.psr_version != DC_PSR_VERSION_UNSUPPORTED &&
!acrtc_state->stream->link->psr_settings.psr_feature_enabled)
amdgpu_dm_link_setup_psr(acrtc_state->stream);
else if ((acrtc_state->update_type == UPDATE_TYPE_FAST) &&
link->dpcd_caps.psr_caps.psr_version = dpcd_data[0];
if (dpcd_data[0] == 0) {
- link->psr_settings.psr_version = PSR_VERSION_UNSUPPORTED;
+ link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
link->psr_settings.psr_feature_enabled = false;
} else {
- link->psr_settings.psr_version = PSR_VERSION_1;
+ link->psr_settings.psr_version = DC_PSR_VERSION_1;
link->psr_settings.psr_feature_enabled = true;
}
*/
program_hpd_filter(link);
- link->psr_settings.psr_version = PSR_VERSION_UNSUPPORTED;
+ link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
return true;
device_tag_fail:
struct psr_settings {
bool psr_feature_enabled; // PSR is supported by sink
bool psr_allow_active; // PSR is currently active
- enum psr_version psr_version; // Internal PSR version, determined based on DPCD
+ enum dc_psr_version psr_version; // Internal PSR version, determined based on DPCD
/* These parameters are calculated in Driver,
* based on display timing and Sink capabilities.
uint32_t branch_max_line_width;
};
+enum dc_psr_version {
+ DC_PSR_VERSION_1 = 0,
+ DC_PSR_VERSION_UNSUPPORTED = 0xFFFFFFFF,
+};
+
#endif /* DC_TYPES_H_ */
union dmub_rb_cmd cmd;
struct dc_context *dc = dmub->ctx;
- if (stream->link->psr_settings.psr_version == PSR_VERSION_UNSUPPORTED)
+ if (stream->link->psr_settings.psr_version == DC_PSR_VERSION_UNSUPPORTED)
return false;
cmd.psr_set_version.header.type = DMUB_CMD__PSR;
cmd.psr_set_version.header.sub_type = DMUB_CMD__PSR_SET_VERSION;
- cmd.psr_set_version.psr_set_version_data.version = stream->link->psr_settings.psr_version;
+ switch (stream->link->psr_settings.psr_version) {
+ case DC_PSR_VERSION_1:
+ cmd.psr_set_version.psr_set_version_data.version = PSR_VERSION_1;
+ break;
+ case DC_PSR_VERSION_UNSUPPORTED:
+ default:
+ cmd.psr_set_version.psr_set_version_data.version = PSR_VERSION_UNSUPPORTED;
+ break;
+ }
cmd.psr_set_version.header.payload_bytes = sizeof(struct dmub_cmd_psr_set_version_data);
dc_dmub_srv_cmd_queue(dc->dmub_srv, &cmd);
}
/*VSC packet set to 2 when DP revision >= 1.2*/
- if (stream->link->psr_settings.psr_version != PSR_VERSION_UNSUPPORTED)
+ if (stream->link->psr_settings.psr_version != DC_PSR_VERSION_UNSUPPORTED)
vsc_packet_revision = vsc_packet_rev2;
/* Update to revision 5 for extended colorimetry support */