Skip to content

Commit 9d16092

Browse files
Gabe Teegergregkh
Gabe Teeger
authored andcommitted
drm/amd/display: Revert Avoid overflow assignment
commit e80f8f4 upstream. This reverts commit a152687 ("drm/amd/display: Avoid overflow assignment in link_dp_cts") Due to regression causing DPMS hang. Reviewed-by: Alex Hung <[email protected]> Signed-off-by: Gabe Teeger <[email protected]> Signed-off-by: Wayne Lin <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5bbdfc7 commit 9d16092

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

drivers/gpu/drm/amd/display/dc/dc_dp_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ struct dp_audio_test_data_flags {
727727
struct dp_audio_test_data {
728728

729729
struct dp_audio_test_data_flags flags;
730-
uint32_t sampling_rate;
730+
uint8_t sampling_rate;
731731
uint8_t channel_count;
732732
uint8_t pattern_type;
733733
uint8_t pattern_period[8];

drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,8 +775,7 @@ bool dp_set_test_pattern(
775775
core_link_read_dpcd(link, DP_TRAINING_PATTERN_SET,
776776
&training_pattern.raw,
777777
sizeof(training_pattern));
778-
if (pattern <= PHY_TEST_PATTERN_END_DP11)
779-
training_pattern.v1_3.LINK_QUAL_PATTERN_SET = pattern;
778+
training_pattern.v1_3.LINK_QUAL_PATTERN_SET = pattern;
780779
core_link_write_dpcd(link, DP_TRAINING_PATTERN_SET,
781780
&training_pattern.raw,
782781
sizeof(training_pattern));

drivers/gpu/drm/amd/display/include/dpcd_defs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ enum dpcd_phy_test_patterns {
7676
PHY_TEST_PATTERN_D10_2,
7777
PHY_TEST_PATTERN_SYMBOL_ERROR,
7878
PHY_TEST_PATTERN_PRBS7,
79-
PHY_TEST_PATTERN_END_DP11 = PHY_TEST_PATTERN_PRBS7,
8079
PHY_TEST_PATTERN_80BIT_CUSTOM,/* For DP1.2 only */
8180
PHY_TEST_PATTERN_CP2520_1,
8281
PHY_TEST_PATTERN_CP2520_2,

0 commit comments

Comments
 (0)