Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/display: Add power well mapping for WCL

WCL has 3 pipes and two TC ports, create power well mapping to reflect
HW. Rest remains similar to Xe3 power well configuration.

v2: Remove TC3/4 ports as they do not exist.

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20250808081931.4101388-1-chaitanya.kumar.borah@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>

authored by

Chaitanya Kumar Borah and committed by
Gustavo Sousa
9465dd7c dcf10187

+56 -1
+56 -1
drivers/gpu/drm/i915/display/intel_display_power_map.c
··· 1717 1717 I915_PW_DESCRIPTORS(xe2lpd_power_wells_pica), 1718 1718 }; 1719 1719 1720 + static const struct i915_power_well_desc wcl_power_wells_main[] = { 1721 + { 1722 + .instances = &I915_PW_INSTANCES( 1723 + I915_PW("PW_2", &xe3lpd_pwdoms_pw_2, 1724 + .hsw.idx = ICL_PW_CTL_IDX_PW_2, 1725 + .id = SKL_DISP_PW_2), 1726 + ), 1727 + .ops = &hsw_power_well_ops, 1728 + .has_vga = true, 1729 + .has_fuses = true, 1730 + }, { 1731 + .instances = &I915_PW_INSTANCES( 1732 + I915_PW("PW_A", &xelpd_pwdoms_pw_a, 1733 + .hsw.idx = XELPD_PW_CTL_IDX_PW_A), 1734 + ), 1735 + .ops = &hsw_power_well_ops, 1736 + .irq_pipe_mask = BIT(PIPE_A), 1737 + .has_fuses = true, 1738 + }, { 1739 + .instances = &I915_PW_INSTANCES( 1740 + I915_PW("PW_B", &xe3lpd_pwdoms_pw_b, 1741 + .hsw.idx = XELPD_PW_CTL_IDX_PW_B), 1742 + ), 1743 + .ops = &hsw_power_well_ops, 1744 + .irq_pipe_mask = BIT(PIPE_B), 1745 + .has_fuses = true, 1746 + }, { 1747 + .instances = &I915_PW_INSTANCES( 1748 + I915_PW("PW_C", &xe3lpd_pwdoms_pw_c, 1749 + .hsw.idx = XELPD_PW_CTL_IDX_PW_C), 1750 + ), 1751 + .ops = &hsw_power_well_ops, 1752 + .irq_pipe_mask = BIT(PIPE_C), 1753 + .has_fuses = true, 1754 + }, { 1755 + .instances = &I915_PW_INSTANCES( 1756 + I915_PW("AUX_A", &icl_pwdoms_aux_a, .xelpdp.aux_ch = AUX_CH_A), 1757 + I915_PW("AUX_B", &icl_pwdoms_aux_b, .xelpdp.aux_ch = AUX_CH_B), 1758 + I915_PW("AUX_TC1", &xelpdp_pwdoms_aux_tc1, .xelpdp.aux_ch = AUX_CH_USBC1), 1759 + I915_PW("AUX_TC2", &xelpdp_pwdoms_aux_tc2, .xelpdp.aux_ch = AUX_CH_USBC2), 1760 + ), 1761 + .ops = &xelpdp_aux_power_well_ops, 1762 + }, 1763 + }; 1764 + 1765 + static const struct i915_power_well_desc_list wcl_power_wells[] = { 1766 + I915_PW_DESCRIPTORS(i9xx_power_wells_always_on), 1767 + I915_PW_DESCRIPTORS(icl_power_wells_pw_1), 1768 + I915_PW_DESCRIPTORS(xe3lpd_power_wells_dcoff), 1769 + I915_PW_DESCRIPTORS(wcl_power_wells_main), 1770 + I915_PW_DESCRIPTORS(xe2lpd_power_wells_pica), 1771 + }; 1772 + 1720 1773 static void init_power_well_domains(const struct i915_power_well_instance *inst, 1721 1774 struct i915_power_well *power_well) 1722 1775 { ··· 1877 1824 return 0; 1878 1825 } 1879 1826 1880 - if (DISPLAY_VER(display) >= 30) 1827 + if (DISPLAY_VERx100(display) == 3002) 1828 + return set_power_wells(power_domains, wcl_power_wells); 1829 + else if (DISPLAY_VER(display) >= 30) 1881 1830 return set_power_wells(power_domains, xe3lpd_power_wells); 1882 1831 else if (DISPLAY_VER(display) >= 20) 1883 1832 return set_power_wells(power_domains, xe2lpd_power_wells);