Skip to content

Commit

Permalink
drm/amd/display: Revert Avoid overflow assignment
Browse files Browse the repository at this point in the history
commit e80f8f491df873ea2e07c941c747831234814612 upstream.

This reverts commit a15268787b79 ("drm/amd/display: Avoid overflow assignment in link_dp_cts")
Due to regression causing DPMS hang.

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Gabe Teeger <Gabe.Teeger@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Gabe Teeger authored and opsiff committed Oct 11, 2024
1 parent b837c18 commit 41be84d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/display/dc/dc_dp_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ struct dp_audio_test_data_flags {
struct dp_audio_test_data {

struct dp_audio_test_data_flags flags;
uint32_t sampling_rate;
uint8_t sampling_rate;
uint8_t channel_count;
uint8_t pattern_type;
uint8_t pattern_period[8];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,7 @@ bool dp_set_test_pattern(
core_link_read_dpcd(link, DP_TRAINING_PATTERN_SET,
&training_pattern.raw,
sizeof(training_pattern));
if (pattern <= PHY_TEST_PATTERN_END_DP11)
training_pattern.v1_3.LINK_QUAL_PATTERN_SET = pattern;
training_pattern.v1_3.LINK_QUAL_PATTERN_SET = pattern;
core_link_write_dpcd(link, DP_TRAINING_PATTERN_SET,
&training_pattern.raw,
sizeof(training_pattern));
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/display/include/dpcd_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ enum dpcd_phy_test_patterns {
PHY_TEST_PATTERN_D10_2,
PHY_TEST_PATTERN_SYMBOL_ERROR,
PHY_TEST_PATTERN_PRBS7,
PHY_TEST_PATTERN_END_DP11 = PHY_TEST_PATTERN_PRBS7,
PHY_TEST_PATTERN_80BIT_CUSTOM,/* For DP1.2 only */
PHY_TEST_PATTERN_CP2520_1,
PHY_TEST_PATTERN_CP2520_2,
Expand Down

0 comments on commit 41be84d

Please sign in to comment.