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

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/ltphy: Program the rest of the PORT_CLOCK_CTL steps

Program the rest of the steps with regards to PORT_CLOCK_CTL in
Non-TBT PLL enable sequence.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patch.msgid.link/20251101032513.4171255-15-suraj.kandpal@intel.com

+26
+25
drivers/gpu/drm/i915/display/intel_lt_phy.c
··· 1506 1506 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); 1507 1507 bool lane_reversal = dig_port->lane_reversal; 1508 1508 u8 owned_lane_mask = intel_lt_phy_get_owned_lane_mask(encoder); 1509 + enum phy phy = intel_encoder_to_phy(encoder); 1510 + enum port port = encoder->port; 1509 1511 intel_wakeref_t wakeref = 0; 1510 1512 1511 1513 wakeref = intel_lt_phy_transaction_begin(encoder); ··· 1548 1546 LT_PHY_PCLKIN_GATE); 1549 1547 1550 1548 /* 7. Program PORT_CLOCK_CTL[PCLK PLL Request LN0] = 0. */ 1549 + intel_de_rmw(display, XELPDP_PORT_CLOCK_CTL(display, port), 1550 + XELPDP_LANE_PCLK_PLL_REQUEST(0), 0); 1551 + 1551 1552 /* 8. Poll for PORT_CLOCK_CTL[PCLK PLL Ack LN0]= 0. */ 1553 + if (intel_de_wait_custom(display, XELPDP_PORT_CLOCK_CTL(display, port), 1554 + XELPDP_LANE_PCLK_PLL_ACK(0), 0, 1555 + XE3PLPD_MACCLK_TURNOFF_LATENCY_US, 0, NULL)) 1556 + drm_warn(display->drm, "PHY %c PLL MacCLK Ack deassertion Timeout after %dus.\n", 1557 + phy_name(phy), XE3PLPD_MACCLK_TURNOFF_LATENCY_US); 1558 + 1552 1559 /* 1553 1560 * 9. Follow the Display Voltage Frequency Switching - Sequence Before Frequency 1554 1561 * Change. We handle this step in bxt_set_cdclk(). 1555 1562 */ 1556 1563 /* 10. Program DDI_CLK_VALFREQ to match intended DDI clock frequency. */ 1557 1564 /* 11. Program PORT_CLOCK_CTL[PCLK PLL Request LN0] = 1. */ 1565 + intel_de_rmw(display, XELPDP_PORT_CLOCK_CTL(display, port), 1566 + XELPDP_LANE_PCLK_PLL_REQUEST(0), 1567 + XELPDP_LANE_PCLK_PLL_REQUEST(0)); 1568 + 1558 1569 /* 12. Poll for PORT_CLOCK_CTL[PCLK PLL Ack LN0]= 1. */ 1570 + if (intel_de_wait_custom(display, XELPDP_PORT_CLOCK_CTL(display, port), 1571 + XELPDP_LANE_PCLK_PLL_ACK(0), 1572 + XELPDP_LANE_PCLK_PLL_ACK(0), 1573 + XE3PLPD_MACCLK_TURNON_LATENCY_US, 2, NULL)) 1574 + drm_warn(display->drm, "PHY %c PLL MacCLK Ack assertion Timeout after %dus.\n", 1575 + phy_name(phy), XE3PLPD_MACCLK_TURNON_LATENCY_US); 1559 1576 } else { 1560 1577 intel_de_write(display, DDI_CLK_VALFREQ(encoder->port), crtc_state->port_clock); 1561 1578 } 1562 1579 1563 1580 /* 13. Ungate the forward clock by setting PORT_CLOCK_CTL[Forward Clock Ungate] = 1. */ 1581 + intel_de_rmw(display, XELPDP_PORT_CLOCK_CTL(display, port), 1582 + XELPDP_FORWARD_CLOCK_UNGATE, 1583 + XELPDP_FORWARD_CLOCK_UNGATE); 1584 + 1564 1585 /* 14. SW clears PORT_BUF_CTL2 [PHY Pulse Status]. */ 1565 1586 /* 1566 1587 * 15. Clear the PHY VDR register 0xCC4[Rate Control VDR Update] over PHY message bus for
+1
drivers/gpu/drm/i915/display/intel_lt_phy_regs.h
··· 9 9 #define XE3PLPD_MSGBUS_TIMEOUT_FAST_US 500 10 10 #define XE3PLPD_MACCLK_TURNON_LATENCY_MS 1 11 11 #define XE3PLPD_MACCLK_TURNON_LATENCY_US 21 12 + #define XE3PLPD_MACCLK_TURNOFF_LATENCY_US 1 12 13 #define XE3PLPD_RATE_CALIB_DONE_LATENCY_US 50 13 14 #define XE3PLPD_RESET_START_LATENCY_US 10 14 15 #define XE3PLPD_RESET_END_LATENCY_US 200