Skip to content

Commit 2eeab8e

Browse files
mattropejlahtine-intel
authored andcommitted
drm/i915/ehl: Define EHL powerwells independently of ICL
Outputs C and D on EHL are combo PHY outputs and thus should not be using the same TC AUX power well handlers as ICL. And even though icl_combo_phy_aux_power_well_ops works okay for EHL/JSL combo PHYs none of its special handling is actually necessary for this platform: * EHL/JSL don't actually need to program PORT_CL_DW12 * Display WA raspberrypi#1178 does not apply to EHL/JSL Thus we can simply drop back to using our standard "hsw-style" power well ops for EHL AUX power wells. Bspec: 4301 Fixes: f722b8c ("drm/i915/ehl: All EHL ports are combo phys") Cc: Jose Souza <[email protected]> Cc: Bob Paauwe <[email protected]> Cc: Vivek Kasireddy <[email protected]> Cc: Lucas De Marchi <[email protected]> Signed-off-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Lucas De Marchi <[email protected]> (cherry picked from commit e8ab8d6) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 242bff7 commit 2eeab8e

File tree

1 file changed

+147
-0
lines changed

1 file changed

+147
-0
lines changed

drivers/gpu/drm/i915/display/intel_display_power.c

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3688,6 +3688,151 @@ static const struct i915_power_well_desc icl_power_wells[] = {
36883688
},
36893689
};
36903690

3691+
static const struct i915_power_well_desc ehl_power_wells[] = {
3692+
{
3693+
.name = "always-on",
3694+
.always_on = true,
3695+
.domains = POWER_DOMAIN_MASK,
3696+
.ops = &i9xx_always_on_power_well_ops,
3697+
.id = DISP_PW_ID_NONE,
3698+
},
3699+
{
3700+
.name = "power well 1",
3701+
/* Handled by the DMC firmware */
3702+
.always_on = true,
3703+
.domains = 0,
3704+
.ops = &hsw_power_well_ops,
3705+
.id = SKL_DISP_PW_1,
3706+
{
3707+
.hsw.regs = &hsw_power_well_regs,
3708+
.hsw.idx = ICL_PW_CTL_IDX_PW_1,
3709+
.hsw.has_fuses = true,
3710+
},
3711+
},
3712+
{
3713+
.name = "DC off",
3714+
.domains = ICL_DISPLAY_DC_OFF_POWER_DOMAINS,
3715+
.ops = &gen9_dc_off_power_well_ops,
3716+
.id = SKL_DISP_DC_OFF,
3717+
},
3718+
{
3719+
.name = "power well 2",
3720+
.domains = ICL_PW_2_POWER_DOMAINS,
3721+
.ops = &hsw_power_well_ops,
3722+
.id = SKL_DISP_PW_2,
3723+
{
3724+
.hsw.regs = &hsw_power_well_regs,
3725+
.hsw.idx = ICL_PW_CTL_IDX_PW_2,
3726+
.hsw.has_fuses = true,
3727+
},
3728+
},
3729+
{
3730+
.name = "power well 3",
3731+
.domains = ICL_PW_3_POWER_DOMAINS,
3732+
.ops = &hsw_power_well_ops,
3733+
.id = DISP_PW_ID_NONE,
3734+
{
3735+
.hsw.regs = &hsw_power_well_regs,
3736+
.hsw.idx = ICL_PW_CTL_IDX_PW_3,
3737+
.hsw.irq_pipe_mask = BIT(PIPE_B),
3738+
.hsw.has_vga = true,
3739+
.hsw.has_fuses = true,
3740+
},
3741+
},
3742+
{
3743+
.name = "DDI A IO",
3744+
.domains = ICL_DDI_IO_A_POWER_DOMAINS,
3745+
.ops = &hsw_power_well_ops,
3746+
.id = DISP_PW_ID_NONE,
3747+
{
3748+
.hsw.regs = &icl_ddi_power_well_regs,
3749+
.hsw.idx = ICL_PW_CTL_IDX_DDI_A,
3750+
},
3751+
},
3752+
{
3753+
.name = "DDI B IO",
3754+
.domains = ICL_DDI_IO_B_POWER_DOMAINS,
3755+
.ops = &hsw_power_well_ops,
3756+
.id = DISP_PW_ID_NONE,
3757+
{
3758+
.hsw.regs = &icl_ddi_power_well_regs,
3759+
.hsw.idx = ICL_PW_CTL_IDX_DDI_B,
3760+
},
3761+
},
3762+
{
3763+
.name = "DDI C IO",
3764+
.domains = ICL_DDI_IO_C_POWER_DOMAINS,
3765+
.ops = &hsw_power_well_ops,
3766+
.id = DISP_PW_ID_NONE,
3767+
{
3768+
.hsw.regs = &icl_ddi_power_well_regs,
3769+
.hsw.idx = ICL_PW_CTL_IDX_DDI_C,
3770+
},
3771+
},
3772+
{
3773+
.name = "DDI D IO",
3774+
.domains = ICL_DDI_IO_D_POWER_DOMAINS,
3775+
.ops = &hsw_power_well_ops,
3776+
.id = DISP_PW_ID_NONE,
3777+
{
3778+
.hsw.regs = &icl_ddi_power_well_regs,
3779+
.hsw.idx = ICL_PW_CTL_IDX_DDI_D,
3780+
},
3781+
},
3782+
{
3783+
.name = "AUX A",
3784+
.domains = ICL_AUX_A_IO_POWER_DOMAINS,
3785+
.ops = &hsw_power_well_ops,
3786+
.id = DISP_PW_ID_NONE,
3787+
{
3788+
.hsw.regs = &icl_aux_power_well_regs,
3789+
.hsw.idx = ICL_PW_CTL_IDX_AUX_A,
3790+
},
3791+
},
3792+
{
3793+
.name = "AUX B",
3794+
.domains = ICL_AUX_B_IO_POWER_DOMAINS,
3795+
.ops = &hsw_power_well_ops,
3796+
.id = DISP_PW_ID_NONE,
3797+
{
3798+
.hsw.regs = &icl_aux_power_well_regs,
3799+
.hsw.idx = ICL_PW_CTL_IDX_AUX_B,
3800+
},
3801+
},
3802+
{
3803+
.name = "AUX C",
3804+
.domains = ICL_AUX_C_TC1_IO_POWER_DOMAINS,
3805+
.ops = &hsw_power_well_ops,
3806+
.id = DISP_PW_ID_NONE,
3807+
{
3808+
.hsw.regs = &icl_aux_power_well_regs,
3809+
.hsw.idx = ICL_PW_CTL_IDX_AUX_C,
3810+
},
3811+
},
3812+
{
3813+
.name = "AUX D",
3814+
.domains = ICL_AUX_D_TC2_IO_POWER_DOMAINS,
3815+
.ops = &hsw_power_well_ops,
3816+
.id = DISP_PW_ID_NONE,
3817+
{
3818+
.hsw.regs = &icl_aux_power_well_regs,
3819+
.hsw.idx = ICL_PW_CTL_IDX_AUX_D,
3820+
},
3821+
},
3822+
{
3823+
.name = "power well 4",
3824+
.domains = ICL_PW_4_POWER_DOMAINS,
3825+
.ops = &hsw_power_well_ops,
3826+
.id = DISP_PW_ID_NONE,
3827+
{
3828+
.hsw.regs = &hsw_power_well_regs,
3829+
.hsw.idx = ICL_PW_CTL_IDX_PW_4,
3830+
.hsw.has_fuses = true,
3831+
.hsw.irq_pipe_mask = BIT(PIPE_C),
3832+
},
3833+
},
3834+
};
3835+
36913836
static const struct i915_power_well_desc tgl_power_wells[] = {
36923837
{
36933838
.name = "always-on",
@@ -4162,6 +4307,8 @@ int intel_power_domains_init(struct drm_i915_private *dev_priv)
41624307
*/
41634308
if (IS_GEN(dev_priv, 12)) {
41644309
err = set_power_wells(power_domains, tgl_power_wells);
4310+
} else if (IS_ELKHARTLAKE(dev_priv)) {
4311+
err = set_power_wells(power_domains, ehl_power_wells);
41654312
} else if (IS_GEN(dev_priv, 11)) {
41664313
err = set_power_wells(power_domains, icl_power_wells);
41674314
} else if (IS_CANNONLAKE(dev_priv)) {

0 commit comments

Comments
 (0)