@@ -1618,75 +1618,130 @@ static bool dm_should_disable_stutter(struct pci_dev *pdev)
1618
1618
return false;
1619
1619
}
1620
1620
1621
- static const struct dmi_system_id hpd_disconnect_quirk_table [] = {
1621
+ struct amdgpu_dm_quirks {
1622
+ bool aux_hpd_discon ;
1623
+ bool support_edp0_on_dp1 ;
1624
+ };
1625
+
1626
+ static struct amdgpu_dm_quirks quirk_entries = {
1627
+ .aux_hpd_discon = false,
1628
+ .support_edp0_on_dp1 = false
1629
+ };
1630
+
1631
+ static int edp0_on_dp1_callback (const struct dmi_system_id * id )
1632
+ {
1633
+ quirk_entries .support_edp0_on_dp1 = true;
1634
+ return 0 ;
1635
+ }
1636
+
1637
+ static int aux_hpd_discon_callback (const struct dmi_system_id * id )
1638
+ {
1639
+ quirk_entries .aux_hpd_discon = true;
1640
+ return 0 ;
1641
+ }
1642
+
1643
+ static const struct dmi_system_id dmi_quirk_table [] = {
1622
1644
{
1645
+ .callback = aux_hpd_discon_callback ,
1623
1646
.matches = {
1624
1647
DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
1625
1648
DMI_MATCH (DMI_PRODUCT_NAME , "Precision 3660" ),
1626
1649
},
1627
1650
},
1628
1651
{
1652
+ .callback = aux_hpd_discon_callback ,
1629
1653
.matches = {
1630
1654
DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
1631
1655
DMI_MATCH (DMI_PRODUCT_NAME , "Precision 3260" ),
1632
1656
},
1633
1657
},
1634
1658
{
1659
+ .callback = aux_hpd_discon_callback ,
1635
1660
.matches = {
1636
1661
DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
1637
1662
DMI_MATCH (DMI_PRODUCT_NAME , "Precision 3460" ),
1638
1663
},
1639
1664
},
1640
1665
{
1666
+ .callback = aux_hpd_discon_callback ,
1641
1667
.matches = {
1642
1668
DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
1643
1669
DMI_MATCH (DMI_PRODUCT_NAME , "OptiPlex Tower Plus 7010" ),
1644
1670
},
1645
1671
},
1646
1672
{
1673
+ .callback = aux_hpd_discon_callback ,
1647
1674
.matches = {
1648
1675
DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
1649
1676
DMI_MATCH (DMI_PRODUCT_NAME , "OptiPlex Tower 7010" ),
1650
1677
},
1651
1678
},
1652
1679
{
1680
+ .callback = aux_hpd_discon_callback ,
1653
1681
.matches = {
1654
1682
DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
1655
1683
DMI_MATCH (DMI_PRODUCT_NAME , "OptiPlex SFF Plus 7010" ),
1656
1684
},
1657
1685
},
1658
1686
{
1687
+ .callback = aux_hpd_discon_callback ,
1659
1688
.matches = {
1660
1689
DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
1661
1690
DMI_MATCH (DMI_PRODUCT_NAME , "OptiPlex SFF 7010" ),
1662
1691
},
1663
1692
},
1664
1693
{
1694
+ .callback = aux_hpd_discon_callback ,
1665
1695
.matches = {
1666
1696
DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
1667
1697
DMI_MATCH (DMI_PRODUCT_NAME , "OptiPlex Micro Plus 7010" ),
1668
1698
},
1669
1699
},
1670
1700
{
1701
+ .callback = aux_hpd_discon_callback ,
1671
1702
.matches = {
1672
1703
DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
1673
1704
DMI_MATCH (DMI_PRODUCT_NAME , "OptiPlex Micro 7010" ),
1674
1705
},
1675
1706
},
1707
+ {
1708
+ .callback = edp0_on_dp1_callback ,
1709
+ .matches = {
1710
+ DMI_MATCH (DMI_SYS_VENDOR , "HP" ),
1711
+ DMI_MATCH (DMI_PRODUCT_NAME , "HP Elite mt645 G8 Mobile Thin Client" ),
1712
+ },
1713
+ },
1714
+ {
1715
+ .callback = edp0_on_dp1_callback ,
1716
+ .matches = {
1717
+ DMI_MATCH (DMI_SYS_VENDOR , "HP" ),
1718
+ DMI_MATCH (DMI_PRODUCT_NAME , "HP EliteBook 665 16 inch G11 Notebook PC" ),
1719
+ },
1720
+ },
1676
1721
{}
1677
1722
/* TODO: refactor this from a fixed table to a dynamic option */
1678
1723
};
1679
1724
1680
- static void retrieve_dmi_info (struct amdgpu_display_manager * dm )
1725
+ static void retrieve_dmi_info (struct amdgpu_display_manager * dm , struct dc_init_data * init_data )
1681
1726
{
1682
- const struct dmi_system_id * dmi_id ;
1727
+ int dmi_id ;
1728
+ struct drm_device * dev = dm -> ddev ;
1683
1729
1684
1730
dm -> aux_hpd_discon_quirk = false;
1731
+ init_data -> flags .support_edp0_on_dp1 = false;
1732
+
1733
+ dmi_id = dmi_check_system (dmi_quirk_table );
1685
1734
1686
- dmi_id = dmi_first_match (hpd_disconnect_quirk_table );
1687
- if (dmi_id ) {
1735
+ if (!dmi_id )
1736
+ return ;
1737
+
1738
+ if (quirk_entries .aux_hpd_discon ) {
1688
1739
dm -> aux_hpd_discon_quirk = true;
1689
- DRM_INFO ("aux_hpd_discon_quirk attached\n" );
1740
+ drm_info (dev , "aux_hpd_discon_quirk attached\n" );
1741
+ }
1742
+ if (quirk_entries .support_edp0_on_dp1 ) {
1743
+ init_data -> flags .support_edp0_on_dp1 = true;
1744
+ drm_info (dev , "aux_hpd_discon_quirk attached\n" );
1690
1745
}
1691
1746
}
1692
1747
@@ -1994,7 +2049,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
1994
2049
if (amdgpu_ip_version (adev , DCE_HWIP , 0 ) >= IP_VERSION (3 , 0 , 0 ))
1995
2050
init_data .num_virtual_links = 1 ;
1996
2051
1997
- retrieve_dmi_info (& adev -> dm );
2052
+ retrieve_dmi_info (& adev -> dm , & init_data );
1998
2053
1999
2054
if (adev -> dm .bb_from_dmub )
2000
2055
init_data .bb_from_dmub = adev -> dm .bb_from_dmub ;
0 commit comments