drm/amd/display: hpd rx irq not working with eDP interface
authorjsg <jsg@openbsd.org>
Fri, 16 Jun 2023 00:46:08 +0000 (00:46 +0000)
committerjsg <jsg@openbsd.org>
Fri, 16 Jun 2023 00:46:08 +0000 (00:46 +0000)
From Robin Chen
28ee628fff1e72ad9629168250071a05b7ba1043 in linux-6.1.y/6.1.31
eeefe7c4820b6baa0462a8b723ea0a3b5846ccae in mainline linux

sys/dev/pci/drm/amd/display/dc/core/dc_link.c
sys/dev/pci/drm/amd/display/dc/dc_types.h

index 5f285c5..13598a2 100644 (file)
@@ -1634,14 +1634,18 @@ static bool dc_link_construct_legacy(struct dc_link *link,
                                link->irq_source_hpd = DC_IRQ_SOURCE_INVALID;
 
                        switch (link->dc->config.allow_edp_hotplug_detection) {
-                       case 1: // only the 1st eDP handles hotplug
+                       case HPD_EN_FOR_ALL_EDP:
+                               link->irq_source_hpd_rx =
+                                               dal_irq_get_rx_source(link->hpd_gpio);
+                               break;
+                       case HPD_EN_FOR_PRIMARY_EDP_ONLY:
                                if (link->link_index == 0)
                                        link->irq_source_hpd_rx =
                                                dal_irq_get_rx_source(link->hpd_gpio);
                                else
                                        link->irq_source_hpd = DC_IRQ_SOURCE_INVALID;
                                break;
-                       case 2: // only the 2nd eDP handles hotplug
+                       case HPD_EN_FOR_SECONDARY_EDP_ONLY:
                                if (link->link_index == 1)
                                        link->irq_source_hpd_rx =
                                                dal_irq_get_rx_source(link->hpd_gpio);
@@ -1649,6 +1653,7 @@ static bool dc_link_construct_legacy(struct dc_link *link,
                                        link->irq_source_hpd = DC_IRQ_SOURCE_INVALID;
                                break;
                        default:
+                               link->irq_source_hpd = DC_IRQ_SOURCE_INVALID;
                                break;
                        }
                }
index ad90414..6050a34 100644 (file)
@@ -993,4 +993,10 @@ struct display_endpoint_id {
        enum display_endpoint_type ep_type;
 };
 
+enum dc_hpd_enable_select {
+       HPD_EN_FOR_ALL_EDP = 0,
+       HPD_EN_FOR_PRIMARY_EDP_ONLY,
+       HPD_EN_FOR_SECONDARY_EDP_ONLY,
+};
+
 #endif /* DC_TYPES_H_ */