Skip to content

Commit 06490bc

Browse files
Gabe Teegermehmetb0
authored andcommitted
drm/amd/display: Revert Avoid overflow assignment
BugLink: https://bugs.launchpad.net/bugs/2089884 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]> Signed-off-by: Koichiro Den <[email protected]> Signed-off-by: Roxana Nicolescu <[email protected]>
1 parent 49c8334 commit 06490bc

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
@@ -722,7 +722,7 @@ struct dp_audio_test_data_flags {
722722
struct dp_audio_test_data {
723723

724724
struct dp_audio_test_data_flags flags;
725-
uint32_t sampling_rate;
725+
uint8_t sampling_rate;
726726
uint8_t channel_count;
727727
uint8_t pattern_type;
728728
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
@@ -787,8 +787,7 @@ bool dp_set_test_pattern(
787787
core_link_read_dpcd(link, DP_TRAINING_PATTERN_SET,
788788
&training_pattern.raw,
789789
sizeof(training_pattern));
790-
if (pattern <= PHY_TEST_PATTERN_END_DP11)
791-
training_pattern.v1_3.LINK_QUAL_PATTERN_SET = pattern;
790+
training_pattern.v1_3.LINK_QUAL_PATTERN_SET = pattern;
792791
core_link_write_dpcd(link, DP_TRAINING_PATTERN_SET,
793792
&training_pattern.raw,
794793
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)