Skip to content

Commit

Permalink
drm/amd/display: Read replay data from sink
Browse files Browse the repository at this point in the history
Read DP_SINK_PR_PIXEL_DEVIATION_PER_LINE  and
DP_SINK_PR_MAX_NUMBER_OF_DEVIATION_LINE

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Bhawanpreet Lakha authored and Alex Deucher committed Aug 7, 2023
1 parent dede1fe commit 76bd347
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,16 @@ void detect_edp_sink_caps(struct dc_link *link)
core_link_read_dpcd(link, DP_RECEIVER_ALPM_CAP,
&link->dpcd_caps.alpm_caps.raw,
sizeof(link->dpcd_caps.alpm_caps.raw));

/*
* Read REPLAY info
*/
core_link_read_dpcd(link, DP_SINK_PR_PIXEL_DEVIATION_PER_LINE,
&link->dpcd_caps.pr_info.pixel_deviation_per_line,
sizeof(link->dpcd_caps.pr_info.pixel_deviation_per_line));
core_link_read_dpcd(link, DP_SINK_PR_MAX_NUMBER_OF_DEVIATION_LINE,
&link->dpcd_caps.pr_info.max_deviation_line,
sizeof(link->dpcd_caps.pr_info.max_deviation_line));
}

bool dp_get_max_link_enc_cap(const struct dc_link *link, struct dc_link_settings *max_link_enc_cap)
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/display/include/dpcd_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,7 @@ enum dpcd_psr_sink_states {
#define DP_SOURCE_BACKLIGHT_ENABLE 0x32F
#define DP_SOURCE_MINIMUM_HBLANK_SUPPORTED 0x340
#define DP_SINK_PR_REPLAY_STATUS 0x378
#define DP_SINK_PR_PIXEL_DEVIATION_PER_LINE 0x379
#define DP_SINK_PR_MAX_NUMBER_OF_DEVIATION_LINE 0x37A

#endif /* __DAL_DPCD_DEFS_H__ */

0 comments on commit 76bd347

Please sign in to comment.