Skip to content

Commit e3ea56e

Browse files
Timur Kristófalexdeucher
authored andcommitted
drm/amd/display: Don't try to enable/disable HPD when unavailable
VGA connectors don't have HPD (hotplug detection), so don't touch any HPD related registers for VGA. Determine whether hotplug detection is available by checking that the interrupt source is invalid. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 8c8df54 commit e3ea56e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,7 @@ static ssize_t dp_phy_test_pattern_debugfs_write(struct file *f, const char __us
759759
int max_param_num = 11;
760760
enum dp_test_pattern test_pattern = DP_TEST_PATTERN_UNSUPPORTED;
761761
bool disable_hpd = false;
762+
bool supports_hpd = link->irq_source_hpd != DC_IRQ_SOURCE_INVALID;
762763
bool valid_test_pattern = false;
763764
uint8_t param_nums = 0;
764765
/* init with default 80bit custom pattern */
@@ -850,7 +851,7 @@ static ssize_t dp_phy_test_pattern_debugfs_write(struct file *f, const char __us
850851
* because it might have been disabled after a test pattern was set.
851852
* AUX depends on HPD * sequence dependent, do not move!
852853
*/
853-
if (!disable_hpd)
854+
if (supports_hpd && !disable_hpd)
854855
dc_link_enable_hpd(link);
855856

856857
prefer_link_settings.lane_count = link->verified_link_cap.lane_count;
@@ -888,7 +889,7 @@ static ssize_t dp_phy_test_pattern_debugfs_write(struct file *f, const char __us
888889
* Need disable interrupt to avoid SW driver disable DP output. This is
889890
* done after the test pattern is set.
890891
*/
891-
if (valid_test_pattern && disable_hpd)
892+
if (valid_test_pattern && supports_hpd && disable_hpd)
892893
dc_link_disable_hpd(link);
893894

894895
kfree(wr_buf);

0 commit comments

Comments
 (0)