drm/i915/mtl: Add C10 phy support
Subsystems (3)
cover drm/i915/mtl: Add C10 phy support
PHY programming support for message bus and phy programming. Updates for HDMI programming and vswing tables.
Radhakrishna Sripada (5):
drm/i915/mtl: Add Support for C10,C20 PHY Message Bus drm/i915/mtl: Add PLL programming support for C10 phy drm/i915/mtl: Add support for C10 phy programming drm/i915/mtl: Add C10 phy programming for HDMI drm/i915/mtl: Add vswing programming for C10 phys
drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_cx0_phy.c | 1300 +++++++++++++++++ drivers/gpu/drm/i915/display/intel_cx0_phy.h | 155 ++ drivers/gpu/drm/i915/display/intel_ddi.c | 26 +- .../drm/i915/display/intel_ddi_buf_trans.c | 36 +- .../drm/i915/display/intel_ddi_buf_trans.h | 6 + drivers/gpu/drm/i915/display/intel_display.c | 1 + .../drm/i915/display/intel_display_power.c | 3 +- .../i915/display/intel_display_power_map.c | 1 + .../i915/display/intel_display_power_well.c | 2 +- .../drm/i915/display/intel_display_types.h | 6 + drivers/gpu/drm/i915/display/intel_dp.c | 15 +- drivers/gpu/drm/i915/display/intel_dpll.c | 22 +- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +- .../drm/i915/display/intel_modeset_verify.c | 2 + drivers/gpu/drm/i915/i915_reg.h | 142 ++ 17 files changed, 1716 insertions(+), 9 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_cx0_phy.c create mode 100644 drivers/gpu/drm/i915/display/intel_cx0_phy.h
Signature · 1 line
2.34.1
PATCH 1/5 drm/i915/mtl: Add Support for C10, C20 PHY Message Bus
From: Radhakrishna Sripada <[email protected]>
XELPDP has C10 and C20 phys from Synopsys to drive displays. Each phy has a dedicated PIPE 5.2 Message bus for configuration. This message bus is used to configure the phy internal registers.
Bspec: 64599, 65100, 65101, 67610, 67636
--- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 179 +++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_cx0_phy.c
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +179 -0
@@ -0,0 +1,179 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2021 Intel Corporation +*/ + +#include "intel_de.h" +#include "intel_uncore.h" + +static void intel_cx0_bus_reset (struct drm_i915_private *i915,enum port port,int lane) +{ +enum phy phy =intel_port_to_phy (i915, port); + +/* Bring the phy to idle. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_RESET ); + +/* Wait for Idle Clear. */ +if (intel_de_wait_for_clear (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_RESET , +XELPDP_MSGBUS_TIMEOUT_SLOW )) { +drm_err_once (&i915->drm,"Failed to bring PHY %c to idle. \n" ,phy_name (phy)); +return ; + } + +intel_de_write (i915,XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), ~0 ); +return ; +} + +__maybe_unused static u8 intel_cx0_read (struct drm_i915_private *i915,enum port port, +int lane,u16 addr) +{ +enum phy phy =intel_port_to_phy (i915, port); +u32 val =0 ; +int attempts =0 ; + +retry: +if (attempts ==3 ) { +drm_err_once (&i915->drm,"PHY %c Read %04x failed after %d retries. Status: 0x%x\n" ,phy_name (phy), addr, attempts, val ?:0 ); +return 0 ; + } + +/* Wait for pending transactions.*/ +if (intel_de_wait_for_clear (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING , +XELPDP_MSGBUS_TIMEOUT_SLOW )) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for previous transaction to complete. Reset the bus and retry.\n" ,phy_name (phy)); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Issue the read command. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING | +XELPDP_PORT_M2P_COMMAND_READ | +XELPDP_PORT_M2P_ADDRESS (addr)); + +/* Wait for response ready. And read response.*/ +if (__intel_wait_for_register (&i915->uncore, +XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_MSGBUS_TIMEOUT_FAST_US , +XELPDP_MSGBUS_TIMEOUT_SLOW , &val)) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for Read response ACK. Status: 0x%x\n" ,phy_name (phy), val); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Check for error. */ +if (val &XELPDP_PORT_P2M_ERROR_SET ) { +drm_dbg (&i915->drm,"PHY %c Error occurred during read command. Status: 0x%x\n" ,phy_name (phy), val); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Check for Read Ack. */ +if (REG_FIELD_GET (XELPDP_PORT_P2M_COMMAND_TYPE_MASK , val) != +XELPDP_PORT_P2M_COMMAND_READ_ACK ) { +drm_dbg (&i915->drm,"PHY %c Not a Read response. MSGBUS Status: 0x%x.\n" ,phy_name (phy), val); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Clear Response Ready flag.*/ +intel_de_write (i915,XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), ~0 ); +return (u8 )REG_FIELD_GET (XELPDP_PORT_P2M_DATA_MASK , val); +} + +static int intel_cx0_wait_cwrite_ack (struct drm_i915_private *i915, +enum port port,int lane) +{ +enum phy phy =intel_port_to_phy (i915, port); +u32 val; + +/* Check for write ack. */ +if (__intel_wait_for_register (&i915->uncore, +XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_MSGBUS_TIMEOUT_FAST_US , +XELPDP_MSGBUS_TIMEOUT_SLOW , &val)) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for Committed message ACK. Status: 0x%x\n" ,phy_name (phy), val); +return -ETIMEDOUT ; + } + +if ((REG_FIELD_GET (XELPDP_PORT_P2M_COMMAND_TYPE_MASK , val) != +XELPDP_PORT_P2M_COMMAND_WRITE_ACK ) || val &XELPDP_PORT_P2M_ERROR_SET ) { +drm_dbg (&i915->drm,"PHY %c Unexpected ACK received. MSGBUS STATUS: 0x%x.\n" ,phy_name (phy), val); +return -EINVAL ; + } + +return 0 ; +} + +__maybe_unused static void intel_cx0_write (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 data,bool committed) +{ +enum phy phy =intel_port_to_phy (i915, port); +int attempts =0 ; + +retry: +if (attempts ==3 ) { +drm_err_once (&i915->drm,"PHY %c Write %04x failed after %d retries.\n" ,phy_name (phy), addr, attempts); +return ; + } + +/* Wait for pending transactions.*/ +if (intel_de_wait_for_clear (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING , +XELPDP_MSGBUS_TIMEOUT_SLOW )) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for previous transaction to complete. Reset the bus and retry.\n" ,phy_name (phy)); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Issue the write command. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING | + (committed ?XELPDP_PORT_M2P_COMMAND_WRITE_COMMITTED : +XELPDP_PORT_M2P_COMMAND_WRITE_UNCOMMITTED ) | +XELPDP_PORT_M2P_DATA (data) | +XELPDP_PORT_M2P_ADDRESS (addr)); + +/* Check for error. */ +if (committed) { +if (intel_cx0_wait_cwrite_ack (i915, port, lane) <0 ) { + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + }else if ((intel_de_read (i915,XELPDP_PORT_P2M_MSGBUS_STATUS (phy, lane)) & +XELPDP_PORT_P2M_ERROR_SET )) { +drm_dbg (&i915->drm,"PHY %c Error occurred during write command.\n" ,phy_name (phy)); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +intel_de_write (i915,XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), ~0 ); + +return ; +} + +__maybe_unused static void intel_cx0_rmw (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 clear,u8 set,bool committed) +{ +u8 old, val; + + old =intel_cx0_read (i915, port, lane, addr); + val = (old & ~clear) | set; + +if (val != old) +intel_cx0_write (i915, port, lane, addr, val, committed); +}
Signature · 1 line
2.34.1
Jani Nikula
maintainerRe: [Intel-gfx] [PATCH 1/5] drm/i915/mtl: Add Support for C10, C20 PHY Message Bus
Quoted 5 lines · Mika Kahola
From: Radhakrishna Sripada <[email protected]>
XELPDP has C10 and C20 phys from Synopsys to drive displays. Each phy has a dedicated PIPE 5.2 Message bus for configuration. This message bus is used to configure the phy internal registers.
This looks like a silly intermediate step, adding a bunch of static functions with __maybe_unused, just to be modified again in the next patch.
Quoted 19 lines
Bspec: 64599, 65100, 65101, 67610, 67636
Cc Mika Kahola <[email protected]>Cc Imre Deak <[email protected]>Cc Uma Shankar <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>Signed-off-by Mika Kahola <[email protected]> (v4)--- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 179 +++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_cx0_phy.cdrivers/gpu/drm/i915/display/intel_cx0_phy.c new file +0
-0
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 7
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +7
-0@@ -0,0 +1,179 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2021 Intel Corporation +*/ + +#include "intel_de.h" +#include "intel_uncore.h"
Do you use anything from intel_uncore.h directly, or is it just intel_de.h?
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +9
-0+ +static void intel_cx0_bus_reset (struct drm_i915_private *i915,enum port port,int lane) +{ +enum phy phy =intel_port_to_phy (i915, port); + +/* Bring the phy to idle. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_RESET ); +
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 26
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +10
-0+/* Wait for Idle Clear. */ +if (intel_de_wait_for_clear (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_RESET , +XELPDP_MSGBUS_TIMEOUT_SLOW )) { +drm_err_once (&i915->drm,"Failed to bring PHY %c to idle. \n" ,phy_name (phy)); +return ; + } + +intel_de_write (i915,XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), ~0 ); +return ;
Unnecessary return statement.
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +4
-0+} + +__maybe_unused static u8 intel_cx0_read (struct drm_i915_private *i915,enum port port, +int lane,u16 addr)
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 40
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +10
-0+{ +enum phy phy =intel_port_to_phy (i915, port); +u32 val =0 ; +int attempts =0 ; + +retry: +if (attempts ==3 ) { +drm_err_once (&i915->drm,"PHY %c Read %04x failed after %d retries. Status: 0x%x\n" ,phy_name (phy), addr, attempts, val ?:0 ); +return 0 ; + }
The code looks like it would benefit from abstracting a non-retrying read function that returns errors, with this function doing the retry loop using a conventional for loop.
There's four copy-pasted bits of error handling here that's just error prone.
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 46
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +6
-0+ +/* Wait for pending transactions.*/ +if (intel_de_wait_for_clear (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING , +XELPDP_MSGBUS_TIMEOUT_SLOW )) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for previous transaction to complete. Reset the bus and retry.\n" ,phy_name (phy));
drm_dbg_kms() throughout.
Quoted 33 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +33
-0+ attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Issue the read command. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING | +XELPDP_PORT_M2P_COMMAND_READ | +XELPDP_PORT_M2P_ADDRESS (addr)); + +/* Wait for response ready. And read response.*/ +if (__intel_wait_for_register (&i915->uncore, +XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_MSGBUS_TIMEOUT_FAST_US , +XELPDP_MSGBUS_TIMEOUT_SLOW , &val)) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for Read response ACK. Status: 0x%x\n" ,phy_name (phy), val); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Check for error. */ +if (val &XELPDP_PORT_P2M_ERROR_SET ) { +drm_dbg (&i915->drm,"PHY %c Error occurred during read command. Status: 0x%x\n" ,phy_name (phy), val); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Check for Read Ack. */
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 89
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +10
-0+if (REG_FIELD_GET (XELPDP_PORT_P2M_COMMAND_TYPE_MASK , val) != +XELPDP_PORT_P2M_COMMAND_READ_ACK ) { +drm_dbg (&i915->drm,"PHY %c Not a Read response. MSGBUS Status: 0x%x.\n" ,phy_name (phy), val); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Clear Response Ready flag.*/ +intel_de_write (i915,XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), ~0 );
Blank line before return.
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 90
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +1
-0+return (u8 )REG_FIELD_GET (XELPDP_PORT_P2M_DATA_MASK , val);
Unnecessary cast.
Quoted 14 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +14
-0+} + +static int intel_cx0_wait_cwrite_ack (struct drm_i915_private *i915, +enum port port,int lane) +{ +enum phy phy =intel_port_to_phy (i915, port); +u32 val; + +/* Check for write ack. */ + if (__intel_wait_for_register(&i915->uncore, + XELPDP_PORT_P2M_MSGBUS_STATUS(port, lane), + XELPDP_PORT_P2M_RESPONSE_READY, + XELPDP_PORT_P2M_RESPONSE_READY, + XELPDP_MSGBUS_TIMEOUT_FAST_US,
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 114
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +10
-0+ XELPDP_MSGBUS_TIMEOUT_SLOW, &val)) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for Committed message ACK. Status: 0x%x\n" ,phy_name (phy), val); +return -ETIMEDOUT ; + } + +if ((REG_FIELD_GET (XELPDP_PORT_P2M_COMMAND_TYPE_MASK , val) != +XELPDP_PORT_P2M_COMMAND_WRITE_ACK ) || val &XELPDP_PORT_P2M_ERROR_SET ) { +drm_dbg (&i915->drm,"PHY %c Unexpected ACK received. MSGBUS STATUS: 0x%x.\n" ,phy_name (phy), val); +return -EINVAL ; + }
This is also copy-paste duplicating the stuff in the previous function. So why isn't this function used there?
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +5
-0+ +return 0 ; +} + +__maybe_unused static void intel_cx0_write(struct drm_i915_private *i915, enum port port,
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 129
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +10
-0+ int lane, u16 addr, u8 data, bool committed) +{ + enum phy phy = intel_port_to_phy(i915, port); +int attempts =0 ; + +retry: +if (attempts ==3 ) { +drm_err_once (&i915->drm,"PHY %c Write %04x failed after %d retries.\n" ,phy_name (phy), addr, attempts); +return ; + }
Same here with the retries as in the write. Have a lower level non-retrying write function, and handle the rewrites at a different abstraction level.
Quoted 27 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +27
-0+ +/* Wait for pending transactions.*/ +if (intel_de_wait_for_clear (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING , +XELPDP_MSGBUS_TIMEOUT_SLOW )) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for previous transaction to complete. Reset the bus and retry.\n" ,phy_name (phy)); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Issue the write command. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING | + (committed ?XELPDP_PORT_M2P_COMMAND_WRITE_COMMITTED : +XELPDP_PORT_M2P_COMMAND_WRITE_UNCOMMITTED ) | +XELPDP_PORT_M2P_DATA (data) | +XELPDP_PORT_M2P_ADDRESS (addr)); + +/* Check for error. */ +if (committed) { +if (intel_cx0_wait_cwrite_ack (i915, port, lane) <0 ) { + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + } else if ((intel_de_read(i915, XELPDP_PORT_P2M_MSGBUS_STATUS(phy, lane)) &
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 166
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +10
-0+ XELPDP_PORT_P2M_ERROR_SET)) { +drm_dbg (&i915->drm,"PHY %c Error occurred during write command.\n" ,phy_name (phy)); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +intel_de_write (i915,XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), ~0 ); + +return ;
Unnecessary return statement.
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +13
-0+} + +__maybe_unused static void intel_cx0_rmw (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 clear,u8 set,bool committed) +{ +u8 old, val; + + old =intel_cx0_read (i915, port, lane, addr); + val = (old & ~clear) | set; + +if (val != old) +intel_cx0_write (i915, port, lane, addr, val, committed); +}
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 1/5] drm/i915/mtl: Add Support for C10, C20 PHY Message Bus
Quoted 8 lines
-----Original Message-----
From: Jani Nikula <[email protected]>
Sent: Friday, September 30, 2022 12:05 PM
To: Kahola, Mika <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH 1/5] drm/i915/mtl: Add Support for C10, C20 PHY Message BusOn Thu, 29 Sep 2022, Mika Kahola <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines
From: Radhakrishna Sripada <[email protected]>
XELPDP has C10 and C20 phys from Synopsys to drive displays. Each phy has a dedicated PIPE 5.2 Message bus for configuration. This message bus is used to configure the phy internal registers.
This looks like a silly intermediate step, adding a bunch of static functions with
__maybe_unused, just to be modified again in the next patch.
Yes, this was an intermediate step to get around gcc warn on unused functions.
Quoted 15 lines
Quoted 15 lines
Bspec: 64599, 65100, 65101, 67610, 67636
Cc Mika Kahola <[email protected]>Cc Imre Deak <[email protected]>Cc Uma Shankar <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>Signed-off-by Mika Kahola <[email protected]> (v4)--- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 179 +++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 15 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 6
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +6
-0@@ -0,0 +1,179 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2021 Intel Corporation */ + +#include "intel_de.h" +#include "intel_uncore.h" Do you use anything from
intel_uncore.hdirectly, or is it justintel_de.h?
I don't think this C10 patch series use intel_uncore.h directly. I have to double check that though. If not this intel_uncore.h is not needed.
Quoted 17 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +11
-0+ +static void intel_cx0_bus_reset (struct drm_i915_private *i915,enum +port port,int lane) { +enum phy phy =intel_port_to_phy (i915, port); + +/* Bring the phy to idle. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_RESET ); + +/* Wait for Idle Clear. */ + if (intel_de_wait_for_clear(i915,
XELPDP_PORT_M2P_MSGBUS_CTL(port, lane),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +3
-0+ XELPDP_PORT_M2P_TRANSACTION_RESET, + XELPDP_MSGBUS_TIMEOUT_SLOW)) { + drm_err_once(&i915->drm, "Failed to bring PHY %c to idle. \n",
phy_name(phy));
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +4
-0+return ; + } + + intel_de_write(i915, XELPDP_PORT_P2M_MSGBUS_STATUS(port, lane),~0);
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 25
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +1
-0+return ;
Yeah, true.
Quoted 17 lines
Unnecessary return statement.
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +3
-0+} + +__maybe_unused static u8 intel_cx0_read(struct drm_i915_private *i915,enum port port,
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +9
-0+ int lane, u16 addr) +{ +enum phy phy =intel_port_to_phy (i915, port); +u32 val =0 ; +int attempts =0 ; + +retry: +if (attempts ==3 ) { + drm_err_once(&i915->drm, "PHY %c Read %04x failed after %dretries. Status: 0x%x\n",
phy_name(phy), addr, attempts, val ?: 0);
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 39
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +2
-0+return 0 ; + }The code looks like it would benefit from abstracting a non-retrying read function that returns errors, with this function doing the retry loop using a conventional for loop.
Yes, I could do some tidying up here
Quoted 65 lines
There's four copy-pasted bits of error handling here that's just error prone.
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +3
-0+ +/* Wait for pending transactions.*/ + if (intel_de_wait_for_clear(i915,
XELPDP_PORT_M2P_MSGBUS_CTL(port, lane),drivers/gpu/drm/i915/display/intel_cx0_phy.c line 43
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +1
-0+
XELPDP_PORT_M2P_TRANSACTION_PENDING,drivers/gpu/drm/i915/display/intel_cx0_phy.c line 46
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +3
-0+ XELPDP_MSGBUS_TIMEOUT_SLOW)) { + drm_dbg(&i915->drm, "PHY %c Timeout waiting for previous +transaction to complete. Reset the bus and retry.\n", phy_name(phy));
drm_dbg_kms()throughout.Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +4
-0+ attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + }drivers/gpu/drm/i915/display/intel_cx0_phy.c line 70
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +10
-0+ +/* Issue the read command. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING | +XELPDP_PORT_M2P_COMMAND_READ | +XELPDP_PORT_M2P_ADDRESS (addr)); + +/* Wait for response ready. And read response.*/ + if (__intel_wait_for_register(&i915->uncore, +
XELPDP_PORT_P2M_MSGBUS_STATUS(port, lane),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +5
-0+ XELPDP_PORT_P2M_RESPONSE_READY, + XELPDP_PORT_P2M_RESPONSE_READY, + XELPDP_MSGBUS_TIMEOUT_FAST_US, + XELPDP_MSGBUS_TIMEOUT_SLOW, &val)) { + drm_dbg(&i915->drm, "PHY %c Timeout waiting for Readresponse ACK. Status: 0x%x\n",
phy_name(phy), val);drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +8
-0+ attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Check for error. */ +if (val &XELPDP_PORT_P2M_ERROR_SET ) { + drm_dbg(&i915->drm, "PHY %c Error occurred during readcommand. Status: 0x%x\n",
phy_name(phy), val);drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +7
-0+ attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Check for Read Ack. */ + if (REG_FIELD_GET(XELPDP_PORT_P2M_COMMAND_TYPE_MASK, val)!=
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 82
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +2
-0+ XELPDP_PORT_P2M_COMMAND_READ_ACK) { + drm_dbg(&i915->drm, "PHY %c Not a Read response. MSGBUSStatus: 0x%x.\n",
phy_name(phy), val);drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +7
-0+ attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Clear Response Ready flag.*/ + intel_de_write(i915, XELPDP_PORT_P2M_MSGBUS_STATUS(port, lane),~0);
Quoted 1 line
Blank line before return.
I will delete this line
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 90
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +1
-0+return (u8 )REG_FIELD_GET (XELPDP_PORT_P2M_DATA_MASK , val);Unnecessary cast.
Fixing it with next set of patches.
Quoted 26 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 109
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +11
-0+} + +static int intel_cx0_wait_cwrite_ack (struct drm_i915_private *i915, +enum port port,int lane) +{ +enum phy phy =intel_port_to_phy (i915, port); +u32 val; + +/* Check for write ack. */ + if (__intel_wait_for_register(&i915->uncore, +
XELPDP_PORT_P2M_MSGBUS_STATUS(port, lane),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +5
-0+ XELPDP_PORT_P2M_RESPONSE_READY, + XELPDP_PORT_P2M_RESPONSE_READY, + XELPDP_MSGBUS_TIMEOUT_FAST_US, + XELPDP_MSGBUS_TIMEOUT_SLOW, &val)) { + drm_dbg(&i915->drm, "PHY %c Timeout waiting for Committedmessage ACK. Status: 0x%x\n",
phy_name(phy), val);drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +4
-0+return -ETIMEDOUT ; + } + + if ((REG_FIELD_GET(XELPDP_PORT_P2M_COMMAND_TYPE_MASK, val)!=
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 111
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +1
-0+ XELPDP_PORT_P2M_COMMAND_WRITE_ACK) || val &
XELPDP_PORT_P2M_ERROR_SET) {
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 112
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +1
-0+ drm_dbg(&i915->drm, "PHY %c Unexpected ACK received.MSGBUS STATUS: 0x%x.\n",
phy_name(phy), val);drivers/gpu/drm/i915/display/intel_cx0_phy.c line 114
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +2
-0+return -EINVAL ; + }This is also copy-paste duplicating the stuff in the previous function. So why isn't this function used there?
This would benefit an own function. I will fix that in the next series of patches.
Quoted 15 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +5
-0+ +return 0 ; +} + +__maybe_unused static void intel_cx0_write(struct drm_i915_private *i915,enum port port,
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +7
-0+ int lane, u16 addr, u8 data, bool committed) { + enum phy phy = intel_port_to_phy(i915, port); +int attempts =0 ; + +retry: +if (attempts ==3 ) { + drm_err_once(&i915->drm, "PHY %c Write %04x failed after %dretries.\n",
phy_name(phy), addr, attempts);
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 128
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +2
-0+return ; + }Same here with the retries as in the write. Have a lower level non-retrying write function, and handle the rewrites at a different abstraction level.
I'll try to rephrase these.
Quoted 44 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +3
-0+ +/* Wait for pending transactions.*/ + if (intel_de_wait_for_clear(i915,
XELPDP_PORT_M2P_MSGBUS_CTL(port, lane),drivers/gpu/drm/i915/display/intel_cx0_phy.c line 132
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +1
-0+
XELPDP_PORT_M2P_TRANSACTION_PENDING,drivers/gpu/drm/i915/display/intel_cx0_phy.c line 134
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +2
-0+ XELPDP_MSGBUS_TIMEOUT_SLOW)) { + drm_dbg(&i915->drm, "PHY %c Timeout waiting for previoustransaction to complete. Reset the bus and retry.\n",
phy_name(phy));drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +9
-0+ attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Issue the write command. */ + intel_de_write(i915, XELPDP_PORT_M2P_MSGBUS_CTL(port, lane), + XELPDP_PORT_M2P_TRANSACTION_PENDING | + (committed ?
XELPDP_PORT_M2P_COMMAND_WRITE_COMMITTED:drivers/gpu/drm/i915/display/intel_cx0_phy.c line 144
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +1
-0+ XELPDP_PORT_M2P_COMMAND_WRITE_UNCOMMITTED)|
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +11
-0+XELPDP_PORT_M2P_DATA (data) | + XELPDP_PORT_M2P_ADDRESS(addr)); + +/* Check for error. */ +if (committed) { +if (intel_cx0_wait_cwrite_ack (i915, port, lane) <0 ) { + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + } else if ((intel_de_read(i915,
XELPDP_PORT_P2M_MSGBUS_STATUS(phy, lane)) &drivers/gpu/drm/i915/display/intel_cx0_phy.c line 157
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +2
-0+ XELPDP_PORT_P2M_ERROR_SET)) { + drm_dbg(&i915->drm, "PHY %c Error occurred during writecommand.\n",
phy_name(phy));drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +6
-0+ attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + + intel_de_write(i915, XELPDP_PORT_P2M_MSGBUS_STATUS(port, lane),~0);
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 165
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +2
-0+ +return ;Unnecessary return statement.
Yes.
Thanks for the comments and a review. I will try to address these finding with the next iteration of this patch series.
-Mika-
Quoted 16 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +3
-0+} + +__maybe_unused static void intel_cx0_rmw(struct drm_i915_private *i915,enum port port,
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +8
-0+ int lane, u16 addr, u8 clear, u8 set, bool committed) { + u8 old, val; + + old =intel_cx0_read (i915, port, lane, addr); + val = (old & ~clear) | set; + +if (val != old) +intel_cx0_write (i915, port, lane, addr, val, committed); }--
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 1/5] drm/i915/mtl: Add Support for C10, C20 PHY Message Bus
In reply to Mika KaholaQuoted 170 lines · Mika Kahola
From: Radhakrishna Sripada <[email protected]>
XELPDP has C10 and C20 phys from Synopsys to drive displays. Each phy has a dedicated PIPE 5.2 Message bus for configuration. This message bus is used to configure the phy internal registers.
Bspec: 64599, 65100, 65101, 67610, 67636
Cc Mika Kahola <[email protected]>Cc Imre Deak <[email protected]>Cc Uma Shankar <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>Signed-off-by Mika Kahola <[email protected]> (v4)---
drivers/gpu/drm/i915/display/intel_cx0_phy.c| 179 +++++++++++++++++++1 file changed, 179 insertions(+)create mode 100644
drivers/gpu/drm/i915/display/intel_cx0_phy.cdrivers/gpu/drm/i915/display/intel_cx0_phy.c new file +146
-0@@ -0,0 +1,179 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2021 Intel Corporation +*/ + +#include "intel_de.h" +#include "intel_uncore.h" + +static void intel_cx0_bus_reset (struct drm_i915_private *i915,enum port port,int lane) +{ +enum phy phy =intel_port_to_phy (i915, port); + +/* Bring the phy to idle. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_RESET ); + +/* Wait for Idle Clear. */ +if (intel_de_wait_for_clear (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_RESET , +XELPDP_MSGBUS_TIMEOUT_SLOW )) { +drm_err_once (&i915->drm,"Failed to bring PHY %c to idle. \n" ,phy_name (phy)); +return ; + } + +intel_de_write (i915,XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), ~0 ); +return ; +} + +__maybe_unused static u8 intel_cx0_read (struct drm_i915_private *i915,enum port port, +int lane,u16 addr) +{ +enum phy phy =intel_port_to_phy (i915, port); +u32 val =0 ; +int attempts =0 ; + +retry: +if (attempts ==3 ) { +drm_err_once (&i915->drm,"PHY %c Read %04x failed after %d retries. Status: 0x%x\n" ,phy_name (phy), addr, attempts, val ?:0 ); +return 0 ; + } + +/* Wait for pending transactions.*/ +if (intel_de_wait_for_clear (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING , +XELPDP_MSGBUS_TIMEOUT_SLOW )) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for previous transaction to complete. Reset the bus and retry.\n" ,phy_name (phy)); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Issue the read command. */ +intel_de_write (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING | +XELPDP_PORT_M2P_COMMAND_READ | +XELPDP_PORT_M2P_ADDRESS (addr)); + +/* Wait for response ready. And read response.*/ +if (__intel_wait_for_register (&i915->uncore, +XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_MSGBUS_TIMEOUT_FAST_US , +XELPDP_MSGBUS_TIMEOUT_SLOW , &val)) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for Read response ACK. Status: 0x%x\n" ,phy_name (phy), val); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Check for error. */ +if (val &XELPDP_PORT_P2M_ERROR_SET ) { +drm_dbg (&i915->drm,"PHY %c Error occurred during read command. Status: 0x%x\n" ,phy_name (phy), val); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Check for Read Ack. */ +if (REG_FIELD_GET (XELPDP_PORT_P2M_COMMAND_TYPE_MASK , val) != +XELPDP_PORT_P2M_COMMAND_READ_ACK ) { +drm_dbg (&i915->drm,"PHY %c Not a Read response. MSGBUS Status: 0x%x.\n" ,phy_name (phy), val); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Clear Response Ready flag.*/ +intel_de_write (i915,XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), ~0 ); +return (u8 )REG_FIELD_GET (XELPDP_PORT_P2M_DATA_MASK , val); +} + +static int intel_cx0_wait_cwrite_ack (struct drm_i915_private *i915, +enum port port,int lane) +{ +enum phy phy =intel_port_to_phy (i915, port); +u32 val; + +/* Check for write ack. */ +if (__intel_wait_for_register (&i915->uncore, +XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane), +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_PORT_P2M_RESPONSE_READY , +XELPDP_MSGBUS_TIMEOUT_FAST_US , +XELPDP_MSGBUS_TIMEOUT_SLOW , &val)) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for Committed message ACK. Status: 0x%x\n" ,phy_name (phy), val); +return -ETIMEDOUT ; + } + +if ((REG_FIELD_GET (XELPDP_PORT_P2M_COMMAND_TYPE_MASK , val) != +XELPDP_PORT_P2M_COMMAND_WRITE_ACK ) || val &XELPDP_PORT_P2M_ERROR_SET ) { +drm_dbg (&i915->drm,"PHY %c Unexpected ACK received. MSGBUS STATUS: 0x%x.\n" ,phy_name (phy), val); +return -EINVAL ; + } + +return 0 ; +} + +__maybe_unused static void intel_cx0_write (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 data,bool committed) +{ +enum phy phy =intel_port_to_phy (i915, port); +int attempts =0 ; + +retry: +if (attempts ==3 ) { +drm_err_once (&i915->drm,"PHY %c Write %04x failed after %d retries.\n" ,phy_name (phy), addr, attempts); +return ; + } + +/* Wait for pending transactions.*/ +if (intel_de_wait_for_clear (i915,XELPDP_PORT_M2P_MSGBUS_CTL (port, lane), +XELPDP_PORT_M2P_TRANSACTION_PENDING , +XELPDP_MSGBUS_TIMEOUT_SLOW )) { +drm_dbg (&i915->drm,"PHY %c Timeout waiting for previous transaction to complete. Reset the bus and retry.\n" ,phy_name (phy)); + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + +/* Issue the write command. */ + intel_de_write(i915, XELPDP_PORT_M2P_MSGBUS_CTL(port, lane), + XELPDP_PORT_M2P_TRANSACTION_PENDING | + (committed ? XELPDP_PORT_M2P_COMMAND_WRITE_COMMITTED : + XELPDP_PORT_M2P_COMMAND_WRITE_UNCOMMITTED) | + XELPDP_PORT_M2P_DATA(data) |
drivers/gpu/drm/i915/display/intel_cx0_phy.c line 156
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c new file +10
-0+ XELPDP_PORT_M2P_ADDRESS(addr)); + +/* Check for error. */ +if (committed) { +if (intel_cx0_wait_cwrite_ack (i915, port, lane) <0 ) { + attempts++; +intel_cx0_bus_reset (i915, port, lane); + goto retry; + } + } else if ((intel_de_read(i915, XELPDP_PORT_P2M_MSGBUS_STATUS(phy, lane)) &
wrong argument here to XELPDP_PORT_P2M_MSGBUS_STATUS(). It should be port, not phy.
Lucas De Marchi
PATCH 2/5 drm/i915/mtl: Add PLL programming support for C10 phy
In reply to Mika KaholaFrom: Radhakrishna Sripada <[email protected]>
XELPDP has C10 phys to drive output to the EDP and the native output from the display engine. Add structures, programming hardware state readout logic. Port clock calculations are similar to DG2. Use the DG2 formulae to calculate the port clock but use the relevant pll signals.
Note: PHY lane 0 is always used for PLL programming.
Bspec: 64568, 64539, 67636
--- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 516 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 128 +++++ drivers/gpu/drm/i915/display/intel_ddi.c | 20 +- drivers/gpu/drm/i915/display/intel_display.c | 1 + .../drm/i915/display/intel_display_power.c | 3 +- .../i915/display/intel_display_power_well.c | 2 +- .../drm/i915/display/intel_display_types.h | 6 + drivers/gpu/drm/i915/display/intel_dpll.c | 20 +- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +- .../drm/i915/display/intel_modeset_verify.c | 2 + 10 files changed, 690 insertions(+), 10 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_cx0_phy.h
drivers/gpu/drm/i915/display/intel_cx0_phy.c +511 -5
@@ -3,7 +3,11 @@* Copyright © 2021 Intel Corporation */ +#include "intel_cx0_phy.h" #include "intel_de.h" +#include "intel_display_types.h" +#include "intel_dp.h" +#include "intel_panel.h" #include "intel_uncore.h" static void intel_cx0_bus_reset (struct drm_i915_private *i915,enum port port,int lane)
@@ -26,7 +30,7 @@ static void intel_cx0_bus_reset(struct drm_i915_private *i915, enum port port, ireturn ; } -__maybe_unused static u8 intel_cx0_read (struct drm_i915_private *i915,enum port port, +static u8 intel_cx0_read (struct drm_i915_private *i915,enum port port,int lane,u16 addr) {enum phy phy =intel_port_to_phy (i915, port);
@@ -116,8 +120,8 @@ static int intel_cx0_wait_cwrite_ack(struct drm_i915_private *i915,return 0 ; } -__maybe_unused static void intel_cx0_write (struct drm_i915_private *i915,enum port port, -int lane,u16 addr,u8 data,bool committed) +static void __intel_cx0_write (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 data,bool committed) {enum phy phy =intel_port_to_phy (i915, port);int attempts =0 ;
@@ -166,8 +170,19 @@ __maybe_unused static void intel_cx0_write(struct drm_i915_private *i915, enum preturn ; } -__maybe_unused static void intel_cx0_rmw (struct drm_i915_private *i915,enum port port, -int lane,u16 addr,u8 clear,u8 set,bool committed) +static void intel_cx0_write (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 data,bool committed) +{ +if (lane ==INTEL_CX0_BOTH_LANES ) { +__intel_cx0_write (i915, port,INTEL_CX0_LANE0 , addr, data, committed); +__intel_cx0_write (i915, port,INTEL_CX0_LANE1 , addr, data, committed); + }else { +__intel_cx0_write (i915, port, lane, addr, data, committed); + } +} + +static void __intel_cx0_rmw (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 clear,u8 set,bool committed) {u8 old, val;
@@ -177,3 +192,494 @@ __maybe_unused static void intel_cx0_rmw(struct drm_i915_private *i915, enum porif (val != old)intel_cx0_write (i915, port, lane, addr, val, committed); } + +static void intel_cx0_rmw (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 clear,u8 set,bool committed) +{ +if (lane ==INTEL_CX0_BOTH_LANES ) { +__intel_cx0_rmw (i915, port,INTEL_CX0_LANE0 , addr, clear, set, committed); +__intel_cx0_rmw (i915, port,INTEL_CX0_LANE1 , addr, clear, set, committed); + }else { +__intel_cx0_rmw (i915, port, lane, addr, clear, set, committed); + } +} + +/* +* Basic DP link rates with 38.4 MHz reference clock. +* Note: The tables below are with SSC. In non-ssc +* registers 0xC04 to 0xC08(pll[4] to pll[8]) will be +* programmed 0. +*/ + +static const struct intel_c10mpllb_state mtl_c10_dp_rbr = { + .clock =162000 , + .pll[0 ] =0xB4 , + .pll[1 ] =0 , + .pll[2 ] =0x30 , + .pll[3 ] =0x1 , + .pll[4 ] =0x26 , + .pll[5 ] =0x0C , + .pll[6 ] =0x98 , + .pll[7 ] =0x46 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xC0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x2 , + .pll[16 ] =0x84 , + .pll[17 ] =0x4F , + .pll[18 ] =0xE5 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r216 = { + .clock =216000 , + .pll[0 ] =0x4 , + .pll[1 ] =0 , + .pll[2 ] =0xA2 , + .pll[3 ] =0x1 , + .pll[4 ] =0x33 , + .pll[5 ] =0x10 , + .pll[6 ] =0x75 , + .pll[7 ] =0xB3 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x2 , + .pll[16 ] =0x85 , + .pll[17 ] =0x0F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r243 = { + .clock =243000 , + .pll[0 ] =0x34 , + .pll[1 ] =0 , + .pll[2 ] =0xDA , + .pll[3 ] =0x1 , + .pll[4 ] =0x39 , + .pll[5 ] =0x12 , + .pll[6 ] =0xE3 , + .pll[7 ] =0xE9 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0x20 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x2 , + .pll[16 ] =0x85 , + .pll[17 ] =0x8F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_dp_hbr1 = { + .clock =270000 , + .pll[0 ] =0xF4 , + .pll[1 ] =0 , + .pll[2 ] =0xF8 , + .pll[3 ] =0x0 , + .pll[4 ] =0x20 , + .pll[5 ] =0x0A , + .pll[6 ] =0x29 , + .pll[7 ] =0x10 , + .pll[8 ] =0x1 ,/* Verify */ + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xA0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x1 , + .pll[16 ] =0x84 , + .pll[17 ] =0x4F , + .pll[18 ] =0xE5 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r324 = { + .clock =324000 , + .pll[0 ] =0xB4 , + .pll[1 ] =0 , + .pll[2 ] =0x30 , + .pll[3 ] =0x1 , + .pll[4 ] =0x26 , + .pll[5 ] =0x0C , + .pll[6 ] =0x98 , + .pll[7 ] =0x46 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xC0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x1 , + .pll[16 ] =0x85 , + .pll[17 ] =0x4F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r432 = { + .clock =432000 , + .pll[0 ] =0x4 , + .pll[1 ] =0 , + .pll[2 ] =0xA2 , + .pll[3 ] =0x1 , + .pll[4 ] =0x33 , + .pll[5 ] =0x10 , + .pll[6 ] =0x75 , + .pll[7 ] =0xB3 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x1 , + .pll[16 ] =0x85 , + .pll[17 ] =0x0F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_dp_hbr2 = { + .clock =540000 , + .pll[0 ] =0xF4 , + .pll[1 ] =0 , + .pll[2 ] =0xF8 , + .pll[3 ] =0 , + .pll[4 ] =0x20 , + .pll[5 ] =0x0A , + .pll[6 ] =0x29 , + .pll[7 ] =0x10 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xA0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0 , + .pll[16 ] =0x84 , + .pll[17 ] =0x4F , + .pll[18 ] =0xE5 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r675 = { + .clock =675000 , + .pll[0 ] =0xB4 , + .pll[1 ] =0 , + .pll[2 ] =0x3E , + .pll[3 ] =0x1 , + .pll[4 ] =0xA8 , + .pll[5 ] =0x0C , + .pll[6 ] =0x33 , + .pll[7 ] =0x54 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xC8 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0 , + .pll[16 ] =0x85 , + .pll[17 ] =0x8F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_dp_hbr3 = { + .clock =810000 , + .pll[0 ] =0x34 , + .pll[1 ] =0 , + .pll[2 ] =0x84 , + .pll[3 ] =0x1 , + .pll[4 ] =0x30 , + .pll[5 ] =0x0F , + .pll[6 ] =0x3D , + .pll[7 ] =0x98 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xF0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0 , + .pll[16 ] =0x84 , + .pll[17 ] =0x0F , + .pll[18 ] =0xE5 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state *const mtl_c10_dp_tables[] = { + &mtl_c10_dp_rbr, + &mtl_c10_dp_hbr1, + &mtl_c10_dp_hbr2, + &mtl_c10_dp_hbr3, +NULL , +}; + +static const struct intel_c10mpllb_state *const mtl_c10_edp_tables[] = { + &mtl_c10_dp_rbr, + &mtl_c10_edp_r216, + &mtl_c10_edp_r243, + &mtl_c10_dp_hbr1, + &mtl_c10_edp_r324, + &mtl_c10_edp_r432, + &mtl_c10_dp_hbr2, + &mtl_c10_edp_r675, + &mtl_c10_dp_hbr3, +NULL , +}; + +static const struct intel_c10mpllb_state *const * +intel_c10_mpllb_tables_get (struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) +{ +if (intel_crtc_has_dp_encoder (crtc_state)) { +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_EDP )) +return mtl_c10_edp_tables; +else +return mtl_c10_dp_tables; + } + +/* TODO: Add HDMI Support */ +MISSING_CASE (encoder->type); +return NULL ; +} + +static int intel_c10mpllb_calc_state (struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) +{ +const struct intel_c10mpllb_state *const *tables; +int i; + + tables =intel_c10_mpllb_tables_get (crtc_state, encoder); +if (!tables) +return -EINVAL ; + +for (i =0 ; tables[i]; i++) { +if (crtc_state->port_clock <= tables[i]->clock) { + crtc_state->c10mpllb_state = *tables[i]; +return 0 ; + } + } + +return -EINVAL ; +} + +int intel_cx0mpllb_calc_state (struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); + +drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy)); + +return intel_c10mpllb_calc_state (crtc_state, encoder); +} + +void intel_c10mpllb_readout_hw_state (struct intel_encoder *encoder, +struct intel_c10mpllb_state *pll_state) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +bool lane_reversal = dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; +enum intel_cx0_lanes lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; +enum phy phy =intel_port_to_phy (i915, encoder->port); +int i; +u8 cmn, tx0; + +/* +* According to C10 VDR Register programming Sequence we need +* to do this to read PHY internal registers from MsgBus. +*/ +intel_cx0_rmw (i915, encoder->port, lane,PHY_C10_VDR_CONTROL (1 ),0 , +C10_VDR_CTRL_MSGBUS_ACCESS ,MB_WRITE_COMMITTED ); + +for (i =0 ; i <20 ; i++) + pll_state->pll[i] =intel_cx0_read (i915, encoder->port, lane, +PHY_C10_VDR_PLL (i)); + + cmn =intel_cx0_read (i915, encoder->port, lane,PHY_C10_VDR_CMN (0 )); + tx0 =intel_cx0_read (i915, encoder->port, lane,PHY_C10_VDR_TX (0 )); + +if (tx0 !=C10_TX0_VAL || cmn !=C10_CMN0_DP_VAL ) +drm_warn (&i915->drm,"Unexpected tx: %x or cmn: %x for phy: %c.\n" , + tx0, cmn,phy_name (phy)); +} + +__maybe_unused static void intel_c10_pll_program (struct drm_i915_private *i915, +const struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) +{ +const struct intel_c10mpllb_state *pll_state = &crtc_state->c10mpllb_state; +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +bool lane_reversal = dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; +enum intel_cx0_lanes master_lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; +enum intel_cx0_lanes follower_lane = lane_reversal ?INTEL_CX0_LANE0 : +INTEL_CX0_LANE1 ; + +int i; +struct intel_dp *intel_dp; +bool use_ssc = false; +u8 cmn0 =0 ; + +if (intel_crtc_has_dp_encoder (crtc_state)) { + intel_dp =enc_to_intel_dp (encoder); + use_ssc = (intel_dp->dpcd[DP_MAX_DOWNSPREAD ] & +DP_MAX_DOWNSPREAD_0_5 ); + +if (intel_dp_is_edp (intel_dp) && !intel_panel_use_ssc (i915)) + use_ssc = false; + + cmn0 =C10_CMN0_DP_VAL ; + } + +intel_cx0_write (i915, encoder->port,INTEL_CX0_BOTH_LANES ,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MSGBUS_ACCESS ,MB_WRITE_COMMITTED ); +/* Custom width needs to be programmed to 0 for both the phy lanes */ +intel_cx0_rmw (i915, encoder->port,INTEL_CX0_BOTH_LANES , +PHY_C10_VDR_CUSTOM_WIDTH ,0x3 ,0 ,MB_WRITE_COMMITTED ); +intel_cx0_rmw (i915, encoder->port, follower_lane,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MASTER_LANE ,C10_VDR_CTRL_UPDATE_CFG , +MB_WRITE_COMMITTED ); + +/* Program the pll values only for the master lane */ +for (i =0 ; i <20 ; i++) +/* If not using ssc pll[4] through pll[8] must be 0*/ +intel_cx0_write (i915, encoder->port, master_lane,PHY_C10_VDR_PLL (i), + (!use_ssc && (i >3 && i <9 )) ?0 : pll_state->pll[i], + (i %4 ) ?MB_WRITE_UNCOMMITTED :MB_WRITE_COMMITTED ); + +intel_cx0_write (i915, encoder->port, master_lane,PHY_C10_VDR_CMN (0 ), cmn0,MB_WRITE_COMMITTED ); +intel_cx0_write (i915, encoder->port, master_lane,PHY_C10_VDR_TX (0 ),C10_TX0_VAL ,MB_WRITE_COMMITTED ); +intel_cx0_rmw (i915, encoder->port, master_lane,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MSGBUS_ACCESS ,C10_VDR_CTRL_MASTER_LANE | +C10_VDR_CTRL_UPDATE_CFG ,MB_WRITE_COMMITTED ); +} + +void intel_c10mpllb_dump_hw_state (struct drm_i915_private *dev_priv, +const struct intel_c10mpllb_state *hw_state) +{ +bool fracen; +int i; +unsigned int frac_quot =0 , frac_rem =0 , frac_den =1 ; +unsigned int multiplier, tx_clk_div; + + fracen = hw_state->pll[0 ] &C10_PLL0_FRACEN ; +drm_dbg_kms (&dev_priv->drm,"c10pll_hw_state: fracen: %s, " , +str_yes_no (fracen)); + +if (fracen) { + frac_quot = hw_state->pll[12 ] <<8 | hw_state->pll[11 ]; + frac_rem = hw_state->pll[14 ] <<8 | hw_state->pll[13 ]; + frac_den = hw_state->pll[10 ] <<8 | hw_state->pll[9 ]; +drm_dbg_kms (&dev_priv->drm,"quot: %u, rem: %u, den: %u,\n" , + frac_quot, frac_rem, frac_den); + } + + multiplier = (REG_FIELD_GET8 (C10_PLL3_MULTIPLIERH_MASK , hw_state->pll[3 ]) <<8 | + hw_state->pll[2 ]) /2 +16 ; + tx_clk_div =REG_FIELD_GET8 (C10_PLL15_TXCLKDIV_MASK , hw_state->pll[15 ]); +drm_dbg_kms (&dev_priv->drm, +"multiplier: %u, tx_clk_div: %u.\n" , multiplier, tx_clk_div); + +drm_dbg_kms (&dev_priv->drm,"c10pll_rawhw_state:" ); + +for (i =0 ; i <20 ; i = i +4 ) +drm_dbg_kms (&dev_priv->drm,"pll[%d] = 0x%x, pll[%d] = 0x%x, pll[%d] = 0x%x, pll[%d] = 0x%x\n" , + i, hw_state->pll[i], i +1 , hw_state->pll[i+1 ], + i +2 , hw_state->pll[i +2 ], i +3 , hw_state->pll[i +3 ]); +} + +int intel_c10mpllb_calc_port_clock (struct intel_encoder *encoder, +const struct intel_c10mpllb_state *pll_state) +{ +unsigned int frac_quot =0 , frac_rem =0 , frac_den =1 ; +unsigned int multiplier, tx_clk_div, refclk =38400 ; + +if (pll_state->pll[0 ] &C10_PLL0_FRACEN ) { + frac_quot = pll_state->pll[12 ] <<8 | pll_state->pll[11 ]; + frac_rem = pll_state->pll[14 ] <<8 | pll_state->pll[13 ]; + frac_den = pll_state->pll[10 ] <<8 | pll_state->pll[9 ]; + } + + multiplier = (REG_FIELD_GET8 (C10_PLL3_MULTIPLIERH_MASK , pll_state->pll[3 ]) <<8 | + pll_state->pll[2 ]) /2 +16 ; + + tx_clk_div =REG_FIELD_GET8 (C10_PLL15_TXCLKDIV_MASK , pll_state->pll[15 ]); + +return DIV_ROUND_CLOSEST_ULL (mul_u32_u32 (refclk, (multiplier <<16 ) + frac_quot) + +DIV_ROUND_CLOSEST (refclk * frac_rem, frac_den), +10 << (tx_clk_div +16 )); +} + +void intel_c10mpllb_state_verify (struct intel_atomic_state *state, +struct intel_crtc_state *new_crtc_state) +{ +struct drm_i915_private *i915 =to_i915 (state->base.dev); +struct intel_c10mpllb_state mpllb_hw_state = {0 }; +struct intel_c10mpllb_state *mpllb_sw_state = &new_crtc_state->c10mpllb_state; +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct intel_encoder *encoder; +struct intel_dp *intel_dp; +enum phy phy; +int i; +bool use_ssc = false; + +if (DISPLAY_VER (i915) <14 ) +return ; + +if (!new_crtc_state->hw.active) +return ; + + encoder =intel_get_crtc_new_encoder (state, new_crtc_state); + phy =intel_port_to_phy (i915, encoder->port); + +if (intel_crtc_has_dp_encoder (new_crtc_state)) { + intel_dp =enc_to_intel_dp (encoder); + use_ssc = (intel_dp->dpcd[DP_MAX_DOWNSPREAD ] & +DP_MAX_DOWNSPREAD_0_5 ); + +if (intel_dp_is_edp (intel_dp) && !intel_panel_use_ssc (i915)) + use_ssc = false; + } + +if (!intel_is_c10phy (i915, phy)) +return ; + +intel_c10mpllb_readout_hw_state (encoder, &mpllb_hw_state); + +for (i =0 ; i <20 ; i++) { +u8 expected; + +if (!use_ssc && i >3 && i <9 ) + expected =0 ; +else + expected = mpllb_sw_state->pll[i]; + +I915_STATE_WARN (mpllb_hw_state.pll[i] != expected, +"[CRTC:%d:%s] mismatch in C10MPLLB: Register[%d] (expected 0x%02x, found 0x%02x)" , + crtc->base.base.id, crtc->base.name, + i, expected, mpllb_hw_state.pll[i]); + } +}
drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +128 -0
128 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_ddi.c +19 -1
@@ -38,6 +38,7 @@#include "intel_combo_phy_regs.h" #include "intel_connector.h" #include "intel_crtc.h" +#include "intel_cx0_phy.h" #include "intel_ddi.h" #include "intel_ddi_buf_trans.h" #include "intel_de.h"
@@ -3487,6 +3488,21 @@ void intel_ddi_get_clock(struct intel_encoder *encoder, &crtc_state->dpll_hw_state); } +static void mtl_ddi_get_config (struct intel_encoder *encoder, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); + +drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy)); + +intel_c10mpllb_readout_hw_state (encoder, &crtc_state->c10mpllb_state); +intel_c10mpllb_dump_hw_state (i915, &crtc_state->c10mpllb_state); + crtc_state->port_clock =intel_c10mpllb_calc_port_clock (encoder, &crtc_state->c10mpllb_state); + +intel_ddi_get_config (encoder, crtc_state); +} +static void dg2_ddi_get_config (struct intel_encoder *encoder,struct intel_crtc_state *crtc_state) {
@@ -4367,7 +4383,9 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) encoder->cloneable =0 ; encoder->pipe_mask = ~0 ; -if (IS_DG2 (dev_priv)) { +if (DISPLAY_VER (dev_priv) >=14 ) { + encoder->get_config = mtl_ddi_get_config; + }else if (IS_DG2 (dev_priv)) { encoder->enable_clock = intel_mpllb_enable; encoder->disable_clock = intel_mpllb_disable; encoder->get_config = dg2_ddi_get_config;
drivers/gpu/drm/i915/display/intel_display.c +1 -0
@@ -47,6 +47,7 @@#include "display/intel_audio.h" #include "display/intel_crt.h" +#include "display/intel_cx0_phy.h" #include "display/intel_ddi.h" #include "display/intel_display_debugfs.h" #include "display/intel_display_power.h"
drivers/gpu/drm/i915/display/intel_display_power.c +2 -1
@@ -1626,7 +1626,8 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,return ;/* 2. Initialize all combo phys */ -intel_combo_phy_init (dev_priv); +if (DISPLAY_VER (dev_priv) <14 ) +intel_combo_phy_init (dev_priv);/* * 3. Enable Power Well 1 (PG1).
drivers/gpu/drm/i915/display/intel_display_power_well.c +1 -1
@@ -980,7 +980,7 @@ void gen9_disable_dc_states(struct drm_i915_private *dev_priv)if (IS_GEMINILAKE (dev_priv) ||IS_BROXTON (dev_priv))bxt_verify_ddi_phy_power_wells (dev_priv); -if (DISPLAY_VER (dev_priv) >=11 ) +if (DISPLAY_VER (dev_priv) >=11 &&DISPLAY_VER (dev_priv) <14 )/* * DMC retains HW context only for port A, the other combo * PHY's HW context for port B is lost after DC transitions,
drivers/gpu/drm/i915/display/intel_display_types.h +6 -0
@@ -969,6 +969,11 @@ struct intel_mpllb_state {u32 mpllb_sscstep; }; +struct intel_c10mpllb_state { +u32 clock;/* in KHz */ +u8 pll[20 ]; +}; +struct intel_crtc_state {/* * uapi (drm) state. This is the software state shown to userspace.
@@ -1108,6 +1113,7 @@ struct intel_crtc_state {union {struct intel_dpll_hw_state dpll_hw_state;struct intel_mpllb_state mpllb_state; +struct intel_c10mpllb_state c10mpllb_state; };/*
drivers/gpu/drm/i915/display/intel_dpll.c +19 -1
@@ -7,6 +7,7 @@#include <linux/string_helpers.h> #include "intel_crtc.h" +#include "intel_cx0_phy.h" #include "intel_de.h" #include "intel_display.h" #include "intel_display_types.h"
@@ -993,6 +994,17 @@ static int dg2_crtc_compute_clock(struct intel_atomic_state *state,return 0 ; } +static int mtl_crtc_compute_clock (struct intel_atomic_state *state, +struct intel_crtc *crtc) +{ +struct intel_crtc_state *crtc_state = +intel_atomic_get_new_crtc_state (state, crtc); +struct intel_encoder *encoder = +intel_get_crtc_new_encoder (state, crtc_state); + +return intel_cx0mpllb_calc_state (crtc_state, encoder); +} +static bool ilk_needs_fb_cb_tune (const struct dpll *dpll,int factor) {return dpll->m < factor * dpll->n;
@@ -1421,6 +1433,10 @@ static int i8xx_crtc_compute_clock(struct intel_atomic_state *state,return 0 ; } +static const struct intel_dpll_funcs mtl_dpll_funcs = { + .crtc_compute_clock = mtl_crtc_compute_clock, +}; +static const struct intel_dpll_funcs dg2_dpll_funcs = { .crtc_compute_clock = dg2_crtc_compute_clock, };
@@ -1515,7 +1531,9 @@ int intel_dpll_crtc_get_shared_dpll(struct intel_atomic_state *state,void intel_dpll_init_clock_hook (struct drm_i915_private *dev_priv) { -if (IS_DG2 (dev_priv)) +if (DISPLAY_VER (dev_priv) >=14 ) + dev_priv->display.funcs.dpll = &mtl_dpll_funcs; +else if (IS_DG2 (dev_priv)) dev_priv->display.funcs.dpll = &dg2_dpll_funcs;else if (DISPLAY_VER (dev_priv) >=9 ||HAS_DDI (dev_priv)) dev_priv->display.funcs.dpll = &hsw_dpll_funcs;
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +1 -1
@@ -4173,7 +4173,7 @@ void intel_shared_dpll_init(struct drm_i915_private *dev_priv)mutex_init (&dev_priv->display.dpll.lock); -if (IS_DG2 (dev_priv)) +if (DISPLAY_VER (dev_priv) >=14 ||IS_DG2 (dev_priv))/* No shared DPLLs on DG2; port PLLs are part of the PHY */ dpll_mgr =NULL ;else if (IS_ALDERLAKE_P (dev_priv))
drivers/gpu/drm/i915/display/intel_modeset_verify.c +2 -0
@@ -11,6 +11,7 @@#include "intel_atomic.h" #include "intel_crtc.h" #include "intel_crtc_state_dump.h" +#include "intel_cx0_phy.h" #include "intel_display.h" #include "intel_display_types.h" #include "intel_fdi.h"
@@ -235,6 +236,7 @@ void intel_modeset_verify_crtc(struct intel_crtc *crtc,verify_crtc_state (crtc, old_crtc_state, new_crtc_state);intel_shared_dpll_state_verify (crtc, old_crtc_state, new_crtc_state);intel_mpllb_state_verify (state, new_crtc_state); +intel_c10mpllb_state_verify (state, new_crtc_state); } void intel_modeset_verify_disabled(struct drm_i915_private *dev_priv,
Signature · 1 line
2.34.1
Jani Nikula
maintainerRe: [Intel-gfx] [PATCH 2/5] drm/i915/mtl: Add PLL programming support for C10 phy
Quoted 45 lines · Mika Kahola
From: Radhakrishna Sripada <[email protected]>
XELPDP has C10 phys to drive output to the EDP and the native output from the display engine. Add structures, programming hardware state readout logic. Port clock calculations are similar to DG2. Use the DG2 formulae to calculate the port clock but use the relevant pll signals.
Note: PHY lane 0 is always used for PLL programming.Bspec: 64568, 64539, 67636
Cc Mika Kahola <[email protected]>Cc Imre Deak <[email protected]>Cc Uma Shankar <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>--- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 516 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 128 +++++ drivers/gpu/drm/i915/display/intel_ddi.c | 20 +- drivers/gpu/drm/i915/display/intel_display.c | 1 + .../drm/i915/display/intel_display_power.c | 3 +- .../i915/display/intel_display_power_well.c | 2 +- .../drm/i915/display/intel_display_types.h | 6 + drivers/gpu/drm/i915/display/intel_dpll.c | 20 +- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +- .../drm/i915/display/intel_modeset_verify.c | 2 + 10 files changed, 690 insertions(+), 10 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_cx0_phy.hdrivers/gpu/drm/i915/display/intel_cx0_phy.c +4
-0@@ -3,7 +3,11 @@* Copyright © 2021 Intel Corporation */ +#include "intel_cx0_phy.h" #include "intel_de.h" +#include "intel_display_types.h" +#include "intel_dp.h" +#include "intel_panel.h" #include "intel_uncore.h" static void intel_cx0_bus_reset (struct drm_i915_private *i915,enum port port,int lane)
drivers/gpu/drm/i915/display/intel_cx0_phy.c static void intel_cx0_bus_reset(struct drm_i915_private *i915, enum port port, i · line 34
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-1@@ -26,7 +30,7 @@ static void intel_cx0_bus_reset(struct drm_i915_private *i915, enum port port, ireturn ; } -__maybe_unused static u8 intel_cx0_read (struct drm_i915_private *i915,enum port port, +static u8 intel_cx0_read (struct drm_i915_private *i915,enum port port,int lane,u16 addr)
Better just squash patch 1 here I think to avoid this.
Quoted 19 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +2
-4{enum phy phy =intel_port_to_phy (i915, port);@@ -116,8 +120,8 @@ static int intel_cx0_wait_cwrite_ack(struct drm_i915_private *i915,return 0 ; } -__maybe_unused static void intel_cx0_write (struct drm_i915_private *i915,enum port port, -int lane,u16 addr,u8 data,bool committed) +static void __intel_cx0_write (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 data,bool committed) {enum phy phy =intel_port_to_phy (i915, port);int attempts =0 ;@@ -166,8 +170,19 @@ __maybe_unused static void intel_cx0_write(struct drm_i915_private *i915, enum preturn ; } -__maybe_unused static void intel_cx0_rmw (struct drm_i915_private *i915,enum port port, -int lane,u16 addr,u8 clear,u8 set,bool committed)
drivers/gpu/drm/i915/display/intel_cx0_phy.c __maybe_unused static void intel_cx0_write(struct drm_i915_private *i915, enum p · line 182
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+static void intel_cx0_write (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 data,bool committed) +{ +if (lane ==INTEL_CX0_BOTH_LANES ) { +__intel_cx0_write (i915, port,INTEL_CX0_LANE0 , addr, data, committed); +__intel_cx0_write (i915, port,INTEL_CX0_LANE1 , addr, data, committed); + }else { +__intel_cx0_write (i915, port, lane, addr, data, committed); + } +}
Usually this kind of stuff is handled with a bitmask describing the lanes, and having a for loop over the bits.
The enum does not seem very well thought out. Even the naming becomes cumbersome, with "enum intel_cx0_lanes lane" confusing plural and singular. And the function at hand has int parameter instead, with the singular.
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +4
-0+ +static void __intel_cx0_rmw (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 clear,u8 set,bool committed) {u8 old, val;@@ -177,3 +192,494 @@ __maybe_unused static void intel_cx0_rmw(struct drm_i915_private *i915, enum porif (val != old)intel_cx0_write (i915, port, lane, addr, val, committed); } +
drivers/gpu/drm/i915/display/intel_cx0_phy.c __maybe_unused static void intel_cx0_rmw(struct drm_i915_private *i915, enum por · line 205
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+static void intel_cx0_rmw (struct drm_i915_private *i915,enum port port, +int lane,u16 addr,u8 clear,u8 set,bool committed) +{ +if (lane ==INTEL_CX0_BOTH_LANES ) { +__intel_cx0_rmw (i915, port,INTEL_CX0_LANE0 , addr, clear, set, committed); +__intel_cx0_rmw (i915, port,INTEL_CX0_LANE1 , addr, clear, set, committed); + }else { +__intel_cx0_rmw (i915, port, lane, addr, clear, set, committed); + } +}
Ditto.
Quoted 302 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +302
-0+ +/* +* Basic DP link rates with 38.4 MHz reference clock. +* Note: The tables below are with SSC. In non-ssc +* registers 0xC04 to 0xC08(pll[4] to pll[8]) will be +* programmed 0. +*/ + +static const struct intel_c10mpllb_state mtl_c10_dp_rbr = { + .clock =162000 , + .pll[0 ] =0xB4 , + .pll[1 ] =0 , + .pll[2 ] =0x30 , + .pll[3 ] =0x1 , + .pll[4 ] =0x26 , + .pll[5 ] =0x0C , + .pll[6 ] =0x98 , + .pll[7 ] =0x46 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xC0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x2 , + .pll[16 ] =0x84 , + .pll[17 ] =0x4F , + .pll[18 ] =0xE5 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r216 = { + .clock =216000 , + .pll[0 ] =0x4 , + .pll[1 ] =0 , + .pll[2 ] =0xA2 , + .pll[3 ] =0x1 , + .pll[4 ] =0x33 , + .pll[5 ] =0x10 , + .pll[6 ] =0x75 , + .pll[7 ] =0xB3 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x2 , + .pll[16 ] =0x85 , + .pll[17 ] =0x0F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r243 = { + .clock =243000 , + .pll[0 ] =0x34 , + .pll[1 ] =0 , + .pll[2 ] =0xDA , + .pll[3 ] =0x1 , + .pll[4 ] =0x39 , + .pll[5 ] =0x12 , + .pll[6 ] =0xE3 , + .pll[7 ] =0xE9 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0x20 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x2 , + .pll[16 ] =0x85 , + .pll[17 ] =0x8F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_dp_hbr1 = { + .clock =270000 , + .pll[0 ] =0xF4 , + .pll[1 ] =0 , + .pll[2 ] =0xF8 , + .pll[3 ] =0x0 , + .pll[4 ] =0x20 , + .pll[5 ] =0x0A , + .pll[6 ] =0x29 , + .pll[7 ] =0x10 , + .pll[8 ] =0x1 ,/* Verify */ + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xA0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x1 , + .pll[16 ] =0x84 , + .pll[17 ] =0x4F , + .pll[18 ] =0xE5 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r324 = { + .clock =324000 , + .pll[0 ] =0xB4 , + .pll[1 ] =0 , + .pll[2 ] =0x30 , + .pll[3 ] =0x1 , + .pll[4 ] =0x26 , + .pll[5 ] =0x0C , + .pll[6 ] =0x98 , + .pll[7 ] =0x46 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xC0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x1 , + .pll[16 ] =0x85 , + .pll[17 ] =0x4F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r432 = { + .clock =432000 , + .pll[0 ] =0x4 , + .pll[1 ] =0 , + .pll[2 ] =0xA2 , + .pll[3 ] =0x1 , + .pll[4 ] =0x33 , + .pll[5 ] =0x10 , + .pll[6 ] =0x75 , + .pll[7 ] =0xB3 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x1 , + .pll[16 ] =0x85 , + .pll[17 ] =0x0F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_dp_hbr2 = { + .clock =540000 , + .pll[0 ] =0xF4 , + .pll[1 ] =0 , + .pll[2 ] =0xF8 , + .pll[3 ] =0 , + .pll[4 ] =0x20 , + .pll[5 ] =0x0A , + .pll[6 ] =0x29 , + .pll[7 ] =0x10 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xA0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0 , + .pll[16 ] =0x84 , + .pll[17 ] =0x4F , + .pll[18 ] =0xE5 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_edp_r675 = { + .clock =675000 , + .pll[0 ] =0xB4 , + .pll[1 ] =0 , + .pll[2 ] =0x3E , + .pll[3 ] =0x1 , + .pll[4 ] =0xA8 , + .pll[5 ] =0x0C , + .pll[6 ] =0x33 , + .pll[7 ] =0x54 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xC8 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0 , + .pll[16 ] =0x85 , + .pll[17 ] =0x8F , + .pll[18 ] =0xE6 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_dp_hbr3 = { + .clock =810000 , + .pll[0 ] =0x34 , + .pll[1 ] =0 , + .pll[2 ] =0x84 , + .pll[3 ] =0x1 , + .pll[4 ] =0x30 , + .pll[5 ] =0x0F , + .pll[6 ] =0x3D , + .pll[7 ] =0x98 , + .pll[8 ] =0x1 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0xF0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0 , + .pll[16 ] =0x84 , + .pll[17 ] =0x0F , + .pll[18 ] =0xE5 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state *const mtl_c10_dp_tables[] = { + &mtl_c10_dp_rbr, + &mtl_c10_dp_hbr1, + &mtl_c10_dp_hbr2, + &mtl_c10_dp_hbr3, +NULL , +}; + +static const struct intel_c10mpllb_state *const mtl_c10_edp_tables[] = { + &mtl_c10_dp_rbr, + &mtl_c10_edp_r216, + &mtl_c10_edp_r243, + &mtl_c10_dp_hbr1, + &mtl_c10_edp_r324, + &mtl_c10_edp_r432, + &mtl_c10_dp_hbr2, + &mtl_c10_edp_r675, + &mtl_c10_dp_hbr3, +NULL , +}; + +static const struct intel_c10mpllb_state *const * +intel_c10_mpllb_tables_get (struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) +{ +if (intel_crtc_has_dp_encoder (crtc_state)) { +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_EDP )) +return mtl_c10_edp_tables; +else +return mtl_c10_dp_tables; + } + +/* TODO: Add HDMI Support */ +MISSING_CASE (encoder->type); +return NULL ; +} + +static int intel_c10mpllb_calc_state (struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) +{ +const struct intel_c10mpllb_state *const *tables; +int i; + + tables =intel_c10_mpllb_tables_get (crtc_state, encoder); +if (!tables) +return -EINVAL ; + +for (i =0 ; tables[i]; i++) { +if (crtc_state->port_clock <= tables[i]->clock) { + crtc_state->c10mpllb_state = *tables[i]; +return 0 ; + } + } + +return -EINVAL ; +} + +int intel_cx0mpllb_calc_state (struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); + +drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy)); + +return intel_c10mpllb_calc_state (crtc_state, encoder); +} + +void intel_c10mpllb_readout_hw_state (struct intel_encoder *encoder, +struct intel_c10mpllb_state *pll_state) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +bool lane_reversal = dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; +enum intel_cx0_lanes lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; +enum phy phy =intel_port_to_phy (i915, encoder->port); +int i;
drivers/gpu/drm/i915/display/intel_cx0_phy.c __maybe_unused static void intel_cx0_rmw(struct drm_i915_private *i915, enum por · line 517
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+u8 cmn, tx0; + +/* +* According to C10 VDR Register programming Sequence we need +* to do this to read PHY internal registers from MsgBus. +*/ +intel_cx0_rmw (i915, encoder->port, lane,PHY_C10_VDR_CONTROL (1 ),0 , +C10_VDR_CTRL_MSGBUS_ACCESS ,MB_WRITE_COMMITTED ); + +for (i =0 ; i <20 ; i++)
ARRAY_SIZE()
Quoted 44 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +44
-0+ pll_state->pll[i] =intel_cx0_read (i915, encoder->port, lane, +PHY_C10_VDR_PLL (i)); + + cmn =intel_cx0_read (i915, encoder->port, lane,PHY_C10_VDR_CMN (0 )); + tx0 =intel_cx0_read (i915, encoder->port, lane,PHY_C10_VDR_TX (0 )); + +if (tx0 !=C10_TX0_VAL || cmn !=C10_CMN0_DP_VAL ) +drm_warn (&i915->drm,"Unexpected tx: %x or cmn: %x for phy: %c.\n" , + tx0, cmn,phy_name (phy)); +} + +__maybe_unused static void intel_c10_pll_program (struct drm_i915_private *i915, +const struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) +{ +const struct intel_c10mpllb_state *pll_state = &crtc_state->c10mpllb_state; +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +bool lane_reversal = dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; +enum intel_cx0_lanes master_lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; +enum intel_cx0_lanes follower_lane = lane_reversal ?INTEL_CX0_LANE0 : +INTEL_CX0_LANE1 ; + +int i; +struct intel_dp *intel_dp; +bool use_ssc = false; +u8 cmn0 =0 ; + +if (intel_crtc_has_dp_encoder (crtc_state)) { + intel_dp =enc_to_intel_dp (encoder); + use_ssc = (intel_dp->dpcd[DP_MAX_DOWNSPREAD ] & +DP_MAX_DOWNSPREAD_0_5 ); + +if (intel_dp_is_edp (intel_dp) && !intel_panel_use_ssc (i915)) + use_ssc = false; + + cmn0 =C10_CMN0_DP_VAL ; + } + +intel_cx0_write (i915, encoder->port,INTEL_CX0_BOTH_LANES ,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MSGBUS_ACCESS ,MB_WRITE_COMMITTED ); +/* Custom width needs to be programmed to 0 for both the phy lanes */ +intel_cx0_rmw (i915, encoder->port,INTEL_CX0_BOTH_LANES , +PHY_C10_VDR_CUSTOM_WIDTH ,0x3 ,0 ,MB_WRITE_COMMITTED );
drivers/gpu/drm/i915/display/intel_cx0_phy.c __maybe_unused static void intel_cx0_rmw(struct drm_i915_private *i915, enum por · line 571
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+intel_cx0_rmw (i915, encoder->port, follower_lane,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MASTER_LANE ,C10_VDR_CTRL_UPDATE_CFG , +MB_WRITE_COMMITTED ); + +/* Program the pll values only for the master lane */ +for (i =0 ; i <20 ; i++) +/* If not using ssc pll[4] through pll[8] must be 0*/ +intel_cx0_write (i915, encoder->port, master_lane,PHY_C10_VDR_PLL (i), + (!use_ssc && (i >3 && i <9 )) ?0 : pll_state->pll[i], + (i %4 ) ?MB_WRITE_UNCOMMITTED :MB_WRITE_COMMITTED );
This might benefit from adding intermediate variables. See state_verify below.
Quoted 27 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +27
-0+ +intel_cx0_write (i915, encoder->port, master_lane,PHY_C10_VDR_CMN (0 ), cmn0,MB_WRITE_COMMITTED ); +intel_cx0_write (i915, encoder->port, master_lane,PHY_C10_VDR_TX (0 ),C10_TX0_VAL ,MB_WRITE_COMMITTED ); +intel_cx0_rmw (i915, encoder->port, master_lane,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MSGBUS_ACCESS ,C10_VDR_CTRL_MASTER_LANE | +C10_VDR_CTRL_UPDATE_CFG ,MB_WRITE_COMMITTED ); +} + +void intel_c10mpllb_dump_hw_state (struct drm_i915_private *dev_priv, +const struct intel_c10mpllb_state *hw_state) +{ +bool fracen; +int i; +unsigned int frac_quot =0 , frac_rem =0 , frac_den =1 ; +unsigned int multiplier, tx_clk_div; + + fracen = hw_state->pll[0 ] &C10_PLL0_FRACEN ; +drm_dbg_kms (&dev_priv->drm,"c10pll_hw_state: fracen: %s, " , +str_yes_no (fracen)); + +if (fracen) { + frac_quot = hw_state->pll[12 ] <<8 | hw_state->pll[11 ]; + frac_rem = hw_state->pll[14 ] <<8 | hw_state->pll[13 ]; + frac_den = hw_state->pll[10 ] <<8 | hw_state->pll[9 ]; +drm_dbg_kms (&dev_priv->drm,"quot: %u, rem: %u, den: %u,\n" , + frac_quot, frac_rem, frac_den); + }
drivers/gpu/drm/i915/display/intel_cx0_phy.c __maybe_unused static void intel_cx0_rmw(struct drm_i915_private *i915, enum por · line 608
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+ + multiplier = (REG_FIELD_GET8 (C10_PLL3_MULTIPLIERH_MASK , hw_state->pll[3 ]) <<8 | + hw_state->pll[2 ]) /2 +16 ; + tx_clk_div =REG_FIELD_GET8 (C10_PLL15_TXCLKDIV_MASK , hw_state->pll[15 ]); +drm_dbg_kms (&dev_priv->drm, +"multiplier: %u, tx_clk_div: %u.\n" , multiplier, tx_clk_div); + +drm_dbg_kms (&dev_priv->drm,"c10pll_rawhw_state:" ); + +for (i =0 ; i <20 ; i = i +4 )
Lots of duplication of magic 20 here.
Quoted 87 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +77
-0+drm_dbg_kms (&dev_priv->drm,"pll[%d] = 0x%x, pll[%d] = 0x%x, pll[%d] = 0x%x, pll[%d] = 0x%x\n" , + i, hw_state->pll[i], i +1 , hw_state->pll[i+1 ], + i +2 , hw_state->pll[i +2 ], i +3 , hw_state->pll[i +3 ]); +} + +int intel_c10mpllb_calc_port_clock (struct intel_encoder *encoder, +const struct intel_c10mpllb_state *pll_state) +{ +unsigned int frac_quot =0 , frac_rem =0 , frac_den =1 ; +unsigned int multiplier, tx_clk_div, refclk =38400 ; + +if (pll_state->pll[0 ] &C10_PLL0_FRACEN ) { + frac_quot = pll_state->pll[12 ] <<8 | pll_state->pll[11 ]; + frac_rem = pll_state->pll[14 ] <<8 | pll_state->pll[13 ]; + frac_den = pll_state->pll[10 ] <<8 | pll_state->pll[9 ]; + } + + multiplier = (REG_FIELD_GET8 (C10_PLL3_MULTIPLIERH_MASK , pll_state->pll[3 ]) <<8 | + pll_state->pll[2 ]) /2 +16 ; + + tx_clk_div =REG_FIELD_GET8 (C10_PLL15_TXCLKDIV_MASK , pll_state->pll[15 ]); + +return DIV_ROUND_CLOSEST_ULL (mul_u32_u32 (refclk, (multiplier <<16 ) + frac_quot) + +DIV_ROUND_CLOSEST (refclk * frac_rem, frac_den), +10 << (tx_clk_div +16 )); +} + +void intel_c10mpllb_state_verify (struct intel_atomic_state *state, +struct intel_crtc_state *new_crtc_state) +{ +struct drm_i915_private *i915 =to_i915 (state->base.dev); +struct intel_c10mpllb_state mpllb_hw_state = {0 }; +struct intel_c10mpllb_state *mpllb_sw_state = &new_crtc_state->c10mpllb_state; +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct intel_encoder *encoder; +struct intel_dp *intel_dp; +enum phy phy; +int i; +bool use_ssc = false; + +if (DISPLAY_VER (i915) <14 ) +return ; + +if (!new_crtc_state->hw.active) +return ; + + encoder =intel_get_crtc_new_encoder (state, new_crtc_state); + phy =intel_port_to_phy (i915, encoder->port); + +if (intel_crtc_has_dp_encoder (new_crtc_state)) { + intel_dp =enc_to_intel_dp (encoder); + use_ssc = (intel_dp->dpcd[DP_MAX_DOWNSPREAD ] & +DP_MAX_DOWNSPREAD_0_5 ); + +if (intel_dp_is_edp (intel_dp) && !intel_panel_use_ssc (i915)) + use_ssc = false; + } + +if (!intel_is_c10phy (i915, phy)) +return ; + +intel_c10mpllb_readout_hw_state (encoder, &mpllb_hw_state); + +for (i =0 ; i <20 ; i++) { +u8 expected; + +if (!use_ssc && i >3 && i <9 ) + expected =0 ; +else + expected = mpllb_sw_state->pll[i]; + +I915_STATE_WARN (mpllb_hw_state.pll[i] != expected, +"[CRTC:%d:%s] mismatch in C10MPLLB: Register[%d] (expected 0x%02x, found 0x%02x)" , + crtc->base.base.id, crtc->base.name, + i, expected, mpllb_hw_state.pll[i]); + } +}drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +4
-0@@ -0,0 +1,128 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2021 Intel Corporation +*/
drivers/gpu/drm/i915/display/intel_cx0_phy.h line 14
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +10
-0+ +#ifndef __INTEL_CX0_PHY_H__ +#define __INTEL_CX0_PHY_H__ + +#include <linux/types.h> +#include <linux/bitfield.h> +#include <linux/bits.h> + +#include "i915_drv.h" +#include "intel_display_types.h"
Please use forward declarations instead of including these headers.
Quoted 52 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +52
-0+ +/** +* REG_BIT8() - Prepare a u8 bit value +* @__n: 0-based bit number +* +* Local wrapper for BIT() to force u8, with compile time checks. +* +* @return: Value with bit @__n set. +*/ +#define REG_BIT8 (__n) \ + ((u8)(BIT(__n) + \ + BUILD_BUG_ON_ZERO(__is_constexpr(__n) && \ + ((__n) < 0 || (__n) > 7)))) + +/** +* REG_GENMASK8() - Prepare a continuous u8 bitmask +* @__high: 0-based high bit +* @__low: 0-based low bit +* +* Local wrapper for GENMASK() to force u8, with compile time checks. +* +* @return: Continuous bitmask from @__high to @__low, inclusive. +*/ +#define REG_GENMASK8 (__high, __low) \ + ((u8)(GENMASK(__high, __low) + \ + BUILD_BUG_ON_ZERO(__is_constexpr(__high) && \ + __is_constexpr(__low) && \ + ((__low) < 0 || (__high) > 7 || (__low) > (__high))))) + +/* +* Local integer constant expression version of is_power_of_2(). +*/ +#define IS_POWER_OF_2 (__x) ((__x) && (((__x) & ((__x) - 1)) == 0)) + +/** +* REG_FIELD_PREP8() - Prepare a u8 bitfield value +* @__mask: shifted mask defining the field's length and position +* @__val: value to put in the field +* +* Local copy of FIELD_PREP8() to generate an integer constant expression, force +* u8 and for consistency with REG_FIELD_GET8(), REG_BIT8() and REG_GENMASK8(). +* +* @return: @__val masked and shifted into the field defined by @__mask. +*/ +#define REG_FIELD_PREP8 (__mask, __val) \ + ((u8)((((typeof(__mask))(__val) << __bf_shf(__mask)) & (__mask)) + \ + BUILD_BUG_ON_ZERO(!__is_constexpr(__mask)) + \ + BUILD_BUG_ON_ZERO((__mask) == 0 || (__mask) > U8_MAX) + \ + BUILD_BUG_ON_ZERO(!IS_POWER_OF_2((__mask) + (1ULL << __bf_shf(__mask)))) + \ + BUILD_BUG_ON_ZERO(__builtin_choose_expr(__is_constexpr(__val), (~((__mask) >> __bf_shf(__mask)) & (__val)), 0)))) + +/**
drivers/gpu/drm/i915/display/intel_cx0_phy.h line 76
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +10
-0+* REG_FIELD_GET8() - Extract a u8 bitfield value +* @__mask: shifted mask defining the field's length and position +* @__val: value to extract the bitfield value from +* +* Local wrapper for FIELD_GET() to force u8 and for consistency with +* REG_FIELD_PREP(), REG_BIT() and REG_GENMASK(). +* +* @return: Masked and shifted value of the field defined by @__mask in @__val. +*/ +#define REG_FIELD_GET8 (__mask, __val) ((u8)FIELD_GET(__mask, __val))
So that there's no confusion here: NAK on adding any of the above to a phy specific header. They have no place here. i915_reg_defs.h is the place.
drivers/gpu/drm/i915/display/intel_cx0_phy.h line 87
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +11
-0+ +struct drm_i915_private ; +struct intel_encoder ; +struct intel_crtc_state ; +enum phy ; + +enum intel_cx0_lanes { +INTEL_CX0_LANE0 , +INTEL_CX0_LANE1 , +INTEL_CX0_BOTH_LANES , +};
Now that's ugly. A bitmask on the lanes is probably the way to go.
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +10
-0+ +#define MB_WRITE_COMMITTED 1 +#define MB_WRITE_UNCOMMITTED 0 + +/* C10 Vendor Registers */ +#define PHY_C10_VDR_PLL (idx) (0xC00 + (idx)) +#define C10_PLL0_FRACEN REG_BIT8(4) +#define C10_PLL3_MULTIPLIERH_MASK REG_GENMASK8(3, 0) +#define C10_PLL15_TXCLKDIV_MASK REG_GENMASK8(2, 0) +#define PHY_C10_VDR_CMN (idx) (0xC20 + (idx))
drivers/gpu/drm/i915/display/intel_cx0_phy.h line 107
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +10
-0+#define C10_CMN0_DP_VAL 0x21 +#define C10_CMN3_TXVBOOST_MASK REG_GENMASK8(7, 5) +#define C10_CMN3_TXVBOOST (val) REG_FIELD_PREP8(C10_CMN3_TXVBOOST_MASK, val) +#define PHY_C10_VDR_TX (idx) (0xC30 + (idx)) +#define C10_TX0_VAL 0x10 +#define PHY_C10_VDR_CONTROL (idx) (0xC70 + (idx) - 1) +#define C10_VDR_CTRL_MSGBUS_ACCESS REG_BIT8(2) +#define C10_VDR_CTRL_MASTER_LANE REG_BIT8(1) +#define C10_VDR_CTRL_UPDATE_CFG REG_BIT8(0) +#define PHY_C10_VDR_CUSTOM_WIDTH 0xD02
Register macros don't belong here. Add a file just for the registers, intel_cx0_phy_regs.h.
drivers/gpu/drm/i915/display/intel_cx0_phy.h line 115
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +8
-0+ +static inline bool intel_is_c10phy (struct drm_i915_private *dev_priv,enum phy phy) +{ +if (!IS_METEORLAKE (dev_priv)) +return false; +else +return (phy <PHY_C ); +}
Please don't add new static inlines that require you to pull in i915_drv.h into a new header.
If you have a simple if-else, please don't do if (!something), just reverse the branches.
Quoted 29 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h new file +13
-0+ +void intel_c10mpllb_readout_hw_state (struct intel_encoder *encoder, +struct intel_c10mpllb_state *pll_state); +int intel_cx0mpllb_calc_state (struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder); +void intel_c10mpllb_dump_hw_state (struct drm_i915_private *dev_priv, +const struct intel_c10mpllb_state *hw_state); +int intel_c10mpllb_calc_port_clock (struct intel_encoder *encoder, +const struct intel_c10mpllb_state *pll_state); +void intel_c10mpllb_state_verify (struct intel_atomic_state *state, +struct intel_crtc_state *new_crtc_state); + +#endif /* __INTEL_CX0_PHY_H__ */ drivers/gpu/drm/i915/display/intel_ddi.c +1
-0@@ -38,6 +38,7 @@#include "intel_combo_phy_regs.h" #include "intel_connector.h" #include "intel_crtc.h" +#include "intel_cx0_phy.h" #include "intel_ddi.h" #include "intel_ddi_buf_trans.h" #include "intel_de.h" @@ -3487,6 +3488,21 @@ void intel_ddi_get_clock(struct intel_encoder *encoder, &crtc_state->dpll_hw_state); }
drivers/gpu/drm/i915/display/intel_ddi.c void intel_ddi_get_clock(struct intel_encoder *encoder, · line 3500
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_ddi.c +10
-0+static void mtl_ddi_get_config (struct intel_encoder *encoder, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); + +drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy)); + +intel_c10mpllb_readout_hw_state (encoder, &crtc_state->c10mpllb_state); +intel_c10mpllb_dump_hw_state (i915, &crtc_state->c10mpllb_state);
Whoa, do we want this noise? Let's just dump the state if it does not match the sw state, and that gets done elsewhere.
Quoted 167 lines
drivers/gpu/drm/i915/display/intel_ddi.c +8
-1+ crtc_state->port_clock =intel_c10mpllb_calc_port_clock (encoder, &crtc_state->c10mpllb_state); + +intel_ddi_get_config (encoder, crtc_state); +} +static void dg2_ddi_get_config (struct intel_encoder *encoder,struct intel_crtc_state *crtc_state) {@@ -4367,7 +4383,9 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) encoder->cloneable =0 ; encoder->pipe_mask = ~0 ; -if (IS_DG2 (dev_priv)) { +if (DISPLAY_VER (dev_priv) >=14 ) { + encoder->get_config = mtl_ddi_get_config; + }else if (IS_DG2 (dev_priv)) { encoder->enable_clock = intel_mpllb_enable; encoder->disable_clock = intel_mpllb_disable; encoder->get_config = dg2_ddi_get_config;drivers/gpu/drm/i915/display/intel_display.c +1
-0@@ -47,6 +47,7 @@#include "display/intel_audio.h" #include "display/intel_crt.h" +#include "display/intel_cx0_phy.h" #include "display/intel_ddi.h" #include "display/intel_display_debugfs.h" #include "display/intel_display_power.h" drivers/gpu/drm/i915/display/intel_display_power.c +2
-1@@ -1626,7 +1626,8 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,return ;/* 2. Initialize all combo phys */ -intel_combo_phy_init (dev_priv); +if (DISPLAY_VER (dev_priv) <14 ) +intel_combo_phy_init (dev_priv);/* * 3. Enable Power Well 1 (PG1). drivers/gpu/drm/i915/display/intel_display_power_well.c +1
-1@@ -980,7 +980,7 @@ void gen9_disable_dc_states(struct drm_i915_private *dev_priv)if (IS_GEMINILAKE (dev_priv) ||IS_BROXTON (dev_priv))bxt_verify_ddi_phy_power_wells (dev_priv); -if (DISPLAY_VER (dev_priv) >=11 ) +if (DISPLAY_VER (dev_priv) >=11 &&DISPLAY_VER (dev_priv) <14 )/* * DMC retains HW context only for port A, the other combo * PHY's HW context for port B is lost after DC transitions, drivers/gpu/drm/i915/display/intel_display_types.h +6
-0@@ -969,6 +969,11 @@ struct intel_mpllb_state {u32 mpllb_sscstep; }; +struct intel_c10mpllb_state { +u32 clock;/* in KHz */ +u8 pll[20 ]; +}; +struct intel_crtc_state {/* * uapi (drm) state. This is the software state shown to userspace. @@ -1108,6 +1113,7 @@ struct intel_crtc_state {union {struct intel_dpll_hw_state dpll_hw_state;struct intel_mpllb_state mpllb_state; +struct intel_c10mpllb_state c10mpllb_state; };/* drivers/gpu/drm/i915/display/intel_dpll.c +19
-1@@ -7,6 +7,7 @@#include <linux/string_helpers.h> #include "intel_crtc.h" +#include "intel_cx0_phy.h" #include "intel_de.h" #include "intel_display.h" #include "intel_display_types.h" @@ -993,6 +994,17 @@ static int dg2_crtc_compute_clock(struct intel_atomic_state *state,return 0 ; } +static int mtl_crtc_compute_clock (struct intel_atomic_state *state, +struct intel_crtc *crtc) +{ +struct intel_crtc_state *crtc_state = +intel_atomic_get_new_crtc_state (state, crtc); +struct intel_encoder *encoder = +intel_get_crtc_new_encoder (state, crtc_state); + +return intel_cx0mpllb_calc_state (crtc_state, encoder); +} +static bool ilk_needs_fb_cb_tune (const struct dpll *dpll,int factor) {return dpll->m < factor * dpll->n;@@ -1421,6 +1433,10 @@ static int i8xx_crtc_compute_clock(struct intel_atomic_state *state,return 0 ; } +static const struct intel_dpll_funcs mtl_dpll_funcs = { + .crtc_compute_clock = mtl_crtc_compute_clock, +}; +static const struct intel_dpll_funcs dg2_dpll_funcs = { .crtc_compute_clock = dg2_crtc_compute_clock, };@@ -1515,7 +1531,9 @@ int intel_dpll_crtc_get_shared_dpll(struct intel_atomic_state *state,void intel_dpll_init_clock_hook (struct drm_i915_private *dev_priv) { -if (IS_DG2 (dev_priv)) +if (DISPLAY_VER (dev_priv) >=14 ) + dev_priv->display.funcs.dpll = &mtl_dpll_funcs; +else if (IS_DG2 (dev_priv)) dev_priv->display.funcs.dpll = &dg2_dpll_funcs;else if (DISPLAY_VER (dev_priv) >=9 ||HAS_DDI (dev_priv)) dev_priv->display.funcs.dpll = &hsw_dpll_funcs;drivers/gpu/drm/i915/display/intel_dpll_mgr.c +1
-1@@ -4173,7 +4173,7 @@ void intel_shared_dpll_init(struct drm_i915_private *dev_priv)mutex_init (&dev_priv->display.dpll.lock); -if (IS_DG2 (dev_priv)) +if (DISPLAY_VER (dev_priv) >=14 ||IS_DG2 (dev_priv))/* No shared DPLLs on DG2; port PLLs are part of the PHY */ dpll_mgr =NULL ;else if (IS_ALDERLAKE_P (dev_priv))drivers/gpu/drm/i915/display/intel_modeset_verify.c +2
-0@@ -11,6 +11,7 @@#include "intel_atomic.h" #include "intel_crtc.h" #include "intel_crtc_state_dump.h" +#include "intel_cx0_phy.h" #include "intel_display.h" #include "intel_display_types.h" #include "intel_fdi.h" @@ -235,6 +236,7 @@ void intel_modeset_verify_crtc(struct intel_crtc *crtc,verify_crtc_state (crtc, old_crtc_state, new_crtc_state);intel_shared_dpll_state_verify (crtc, old_crtc_state, new_crtc_state);intel_mpllb_state_verify (state, new_crtc_state); +intel_c10mpllb_state_verify (state, new_crtc_state); } void intel_modeset_verify_disabled(struct drm_i915_private *dev_priv,
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
PATCH 3/5 drm/i915/mtl: Add support for C10 phy programming
In reply to Mika KaholaFrom: Radhakrishna Sripada <[email protected]>
Add sequences for C10 phy enable/disable phy lane reset, powerdown change sequence and phy lane programming.
Bspec: 64539, 67636, 65451, 65450, 64568
--- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_cx0_phy.c | 352 ++++++++++++++++++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 17 + drivers/gpu/drm/i915/display/intel_ddi.c | 2 + drivers/gpu/drm/i915/display/intel_dp.c | 15 +- drivers/gpu/drm/i915/display/intel_dpll.c | 2 + drivers/gpu/drm/i915/i915_reg.h | 141 ++++++++ 7 files changed, 526 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/Makefile +1 -0
@@ -279,6 +279,7 @@ i915-y += \ display/icl_dsi.o \ display/intel_backlight.o \ display/intel_crt.o \ + display/intel_cx0_phy.o \ display/intel_ddi.o \ display/intel_ddi_buf_trans.o \ display/intel_display_trace.o \
drivers/gpu/drm/i915/display/intel_cx0_phy.c +349 -3
364 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_cx0_phy.h +17 -0
@@ -106,6 +106,19 @@ enum intel_cx0_lanes {#define C10_VDR_CTRL_UPDATE_CFG REG_BIT8(0)#define PHY_C10_VDR_CUSTOM_WIDTH 0xD02 +#define CX0_P0_STATE_ACTIVE 0x0 +#define CX0_P2_STATE_READY 0x2 +#define CX0_P2PG_STATE_DISABLE 0x9 +#define CX0_P4PG_STATE_DISABLE 0xC +#define CX0_P2_STATE_RESET 0x2 + +/* PHY_C10_VDR_PLL0 */ +#define PLL_C10_MPLL_SSC_EN REG_BIT8(0) + +/* PIPE SPEC Defined Registers */ +#define PHY_CX0_TX_CONTROL (tx, control) (0x400 + ((tx) - 1) * 0x200 + (control)) +#define CONTROL2_DISABLE_SINGLE_TX REG_BIT(6) +static inline bool intel_is_c10phy (struct drm_i915_private *dev_priv,enum phy phy) {if (!IS_METEORLAKE (dev_priv))
@@ -114,6 +127,10 @@ static inline bool intel_is_c10phy(struct drm_i915_private *dev_priv, enum phy preturn (phy <PHY_C ); } +void intel_cx0pll_enable (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state); +void intel_cx0pll_disable (struct intel_encoder *encoder); +void intel_c10mpllb_readout_hw_state (struct intel_encoder *encoder,struct intel_c10mpllb_state *pll_state); int intel_cx0mpllb_calc_state(struct intel_crtc_state *crtc_state,
drivers/gpu/drm/i915/display/intel_ddi.c +2 -0
@@ -4384,6 +4384,8 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) encoder->pipe_mask = ~0 ;if (DISPLAY_VER (dev_priv) >=14 ) { + encoder->enable_clock = intel_cx0pll_enable; + encoder->disable_clock = intel_cx0pll_disable; encoder->get_config = mtl_ddi_get_config; }else if (IS_DG2 (dev_priv)) { encoder->enable_clock = intel_mpllb_enable;
drivers/gpu/drm/i915/display/intel_dp.c +14 -1
@@ -420,6 +420,11 @@ static int ehl_max_source_rate(struct intel_dp *intel_dp)return 810000 ; } +static int mtl_max_source_rate (struct intel_dp *intel_dp) +{ +return intel_dp_is_edp (intel_dp) ?675000 :810000 ; +} +static int vbt_max_link_rate (struct intel_dp *intel_dp) {struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base;
@@ -444,6 +449,10 @@ static void intel_dp_set_source_rates(struct intel_dp *intel_dp) {/* The values must be in increasing order */ +static const int mtl_rates[] = { +162000 ,216000 ,243000 ,270000 ,324000 ,432000 ,540000 ,675000 , +810000 , + };static const int icl_rates[] = {162000 ,216000 ,270000 ,324000 ,432000 ,540000 ,648000 ,810000 ,1000000 ,1350000 ,
@@ -469,7 +478,11 @@ intel_dp_set_source_rates(struct intel_dp *intel_dp)drm_WARN_ON (&dev_priv->drm, intel_dp->source_rates || intel_dp->num_source_rates); -if (DISPLAY_VER (dev_priv) >=11 ) { +if (DISPLAY_VER (dev_priv) >=14 ) { + source_rates = mtl_rates; + size =ARRAY_SIZE (mtl_rates); + max_rate =mtl_max_source_rate (intel_dp); + }else if (DISPLAY_VER (dev_priv) >=11 ) { source_rates = icl_rates; size =ARRAY_SIZE (icl_rates);if (IS_DG2 (dev_priv))
drivers/gpu/drm/i915/display/intel_dpll.c +2 -0
@@ -1533,6 +1533,8 @@ intel_dpll_init_clock_hook(struct drm_i915_private *dev_priv) {if (DISPLAY_VER (dev_priv) >=14 ) dev_priv->display.funcs.dpll = &mtl_dpll_funcs; +else if (DISPLAY_VER (dev_priv) >=14 ) + dev_priv->display.funcs.dpll = &mtl_dpll_funcs;else if (IS_DG2 (dev_priv)) dev_priv->display.funcs.dpll = &dg2_dpll_funcs;else if (DISPLAY_VER (dev_priv) >=9 ||HAS_DDI (dev_priv))
drivers/gpu/drm/i915/i915_reg.h +141 -0
151 lines not on this page · raw message
Signature · 1 line
2.34.1
Jani Nikula
maintainerRe: [Intel-gfx] [PATCH 3/5] drm/i915/mtl: Add support for C10 phy programming
Quoted 27 lines · Mika Kahola
From: Radhakrishna Sripada <[email protected]>
Add sequences for C10 phy enable/disable phy lane reset, powerdown change sequence and phy lane programming.
Bspec: 64539, 67636, 65451, 65450, 64568
Cc Imre Deak <[email protected]>Cc Mika Kahola <[email protected]>Cc Uma Shankar <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>Signed-off-by Mika Kahola <[email protected]> (v9)--- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_cx0_phy.c | 352 ++++++++++++++++++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 17 + drivers/gpu/drm/i915/display/intel_ddi.c | 2 + drivers/gpu/drm/i915/display/intel_dp.c | 15 +- drivers/gpu/drm/i915/display/intel_dpll.c | 2 + drivers/gpu/drm/i915/i915_reg.h | 141 ++++++++ 7 files changed, 526 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/Makefile +0
-0
drivers/gpu/drm/i915/Makefile i915-y += \ · line 282
Quoted 4 lines
drivers/gpu/drm/i915/Makefile +1
-0@@ -279,6 +279,7 @@ i915-y += \ display/icl_dsi.o \ display/intel_backlight.o \ display/intel_crt.o \ + display/intel_cx0_phy.o \
This belongs where intel_cx0_phy.c is added.
Quoted 39 lines
drivers/gpu/drm/i915/Makefile +0
-0display/intel_ddi.o \ display/intel_ddi_buf_trans.o \ display/intel_display_trace.o \drivers/gpu/drm/i915/display/intel_cx0_phy.c +18
-3@@ -526,9 +526,9 @@ void intel_c10mpllb_readout_hw_state(struct intel_encoder *encoder, tx0, cmn, phy_name(phy)); } -__maybe_unused static void intel_c10_pll_program (struct drm_i915_private *i915, -const struct intel_crtc_state *crtc_state, -struct intel_encoder *encoder) +static void intel_c10_pll_program (struct drm_i915_private *i915, +const struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) {const struct intel_c10mpllb_state *pll_state = &crtc_state->c10mpllb_state;struct intel_digital_port *dig_port =enc_to_dig_port (encoder);@@ -633,6 +633,352 @@ int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder, 10 << (tx_clk_div + 16)); } +#define PHY_LANES_VAL_ARG (FIELD , lanes, arg) ({u32 __val; switch(lanes) {\ + case INTEL_CX0_BOTH_LANES: \ + __val = ((XELPDP_LANE0_##FIELD(arg)) |\ + (XELPDP_LANE1_##FIELD(arg))); \ + break; \ + case INTEL_CX0_LANE0: \ + __val = (XELPDP_LANE0_##FIELD(arg));\ + break; \ + case INTEL_CX0_LANE1: \ + __val = (XELPDP_LANE1_##FIELD(arg));\ + break; \ + }; __val; }) + +#define PHY_LANES_VAL (FIELD , lanes) ({u32 __val; switch(lanes) {\ + case INTEL_CX0_BOTH_LANES: \
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder, · line 660
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+ __val = (XELPDP_LANE0_##FIELD | \ + XELPDP_LANE1_##FIELD); \ + break; \ + case INTEL_CX0_LANE0: \ + __val = (XELPDP_LANE0_##FIELD); \ + break; \ + case INTEL_CX0_LANE1: \ + __val = (XELPDP_LANE1_##FIELD);\ + break; \ + }; __val; })
Ugh that's ugly. I'll try to look the other way.
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +13
-0+ +static void intel_program_port_clock_ctl (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state, +bool lane_reversal) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +struct intel_dp *intel_dp; +bool ssc_enabled; +u32 val =0 ; + +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL1 (encoder->port),XELPDP_PORT_REVERSAL , + lane_reversal ?XELPDP_PORT_REVERSAL :0 ); +
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder, · line 683
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+if (lane_reversal) + val |=XELPDP_LANE1_PHY_CLOCK_SELECT ; + + val |=XELPDP_FORWARD_CLOCK_UNGATE ; + val |=XELPDP_DDI_CLOCK_SELECT (XELPDP_DDI_CLOCK_SELECT_MAXPCLK ); + +if (intel_crtc_has_dp_encoder (crtc_state)) { + intel_dp =enc_to_intel_dp (encoder); + ssc_enabled = intel_dp->dpcd[DP_MAX_DOWNSPREAD ] & +DP_MAX_DOWNSPREAD_0_5 ;
It is almost certainly the wrong thing to do to look at sink DPCD register values at the low level PHY code. Smells like something that should be added to crtc state.
Quoted 312 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +298
-0+ +/* TODO: DP2.0 10G and 20G rates enable MPLLA*/ + val |= ssc_enabled ?XELPDP_SSC_ENABLE_PLLB :0 ; + } +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port), +XELPDP_LANE1_PHY_CLOCK_SELECT | +XELPDP_FORWARD_CLOCK_UNGATE | +XELPDP_DDI_CLOCK_SELECT_MASK | +XELPDP_SSC_ENABLE_PLLB , val); +} + +static void intel_cx0_powerdown_change_sequence (struct drm_i915_private *i915, +enum port port, +enum intel_cx0_lanes lane,u8 state) +{ +enum phy phy =intel_port_to_phy (i915, port); + +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (POWERDOWN_NEW_STATE_MASK , lane), +PHY_LANES_VAL_ARG (POWERDOWN_NEW_STATE , lane, state)); +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (POWERDOWN_UPDATE , lane), +PHY_LANES_VAL (POWERDOWN_UPDATE , lane)); + +/* Update Timeout Value */ +if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (POWERDOWN_UPDATE , lane),0 , +XELPDP_PORT_RESET_START_TIMEOUT_US ,0 ,NULL )) +drm_warn (&i915->drm,"PHY %c failed to bring out of Lane reset after %dus.\n" , +phy_name (phy),XELPDP_PORT_RESET_START_TIMEOUT_US ); +} + +static void intel_cx0_setup_powerdown (struct drm_i915_private *i915,enum port port) +{ +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), +XELPDP_POWER_STATE_READY_MASK , +XELPDP_POWER_STATE_READY (CX0_P2_STATE_READY )); +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL3 (port), +XELPDP_POWER_STATE_ACTIVE_MASK | +XELPDP_PLL_LANE_STAGGERING_DELAY_MASK , +XELPDP_POWER_STATE_ACTIVE (CX0_P0_STATE_ACTIVE ) | +XELPDP_PLL_LANE_STAGGERING_DELAY (0 )); +} + +/* FIXME: Some Type-C cases need not reset both the lanes. Handle those cases. */ +static void intel_cx0_phy_lane_reset (struct drm_i915_private *i915,enum port port, +bool lane_reversal) +{ +enum phy phy =intel_port_to_phy (i915, port); +enum intel_cx0_lanes lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; + +if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_BUF_CTL1 (port), +XELPDP_PORT_BUF_SOC_PHY_READY , +XELPDP_PORT_BUF_SOC_PHY_READY , +XELPDP_PORT_BUF_SOC_READY_TIMEOUT_US ,0 ,NULL )) +drm_warn (&i915->drm,"PHY %c failed to bring out of SOC reset after %dus.\n" , +phy_name (phy),XELPDP_PORT_BUF_SOC_READY_TIMEOUT_US ); + +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (PIPE_RESET ,INTEL_CX0_BOTH_LANES ), +PHY_LANES_VAL (PIPE_RESET ,INTEL_CX0_BOTH_LANES )); + +if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (PHY_CURRENT_STATUS ,INTEL_CX0_BOTH_LANES ), +PHY_LANES_VAL (PHY_CURRENT_STATUS ,INTEL_CX0_BOTH_LANES ), +XELPDP_PORT_RESET_START_TIMEOUT_US ,0 ,NULL )) +drm_warn (&i915->drm,"PHY %c failed to bring out of Lane reset after %dus.\n" , +phy_name (phy),XELPDP_PORT_RESET_START_TIMEOUT_US ); + +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (port), +PHY_LANES_VAL (PCLK_REFCLK_REQUEST , lane), +PHY_LANES_VAL (PCLK_REFCLK_REQUEST , lane)); + +if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_CLOCK_CTL (port), +PHY_LANES_VAL (PCLK_REFCLK_ACK , lane), +PHY_LANES_VAL (PCLK_REFCLK_ACK , lane), +XELPDP_REFCLK_ENABLE_TIMEOUT_US ,0 ,NULL )) +drm_warn (&i915->drm,"PHY %c failed to request refclk after %dus.\n" , +phy_name (phy),XELPDP_REFCLK_ENABLE_TIMEOUT_US ); + +intel_cx0_powerdown_change_sequence (i915, port,INTEL_CX0_BOTH_LANES , +CX0_P2_STATE_RESET ); +intel_cx0_setup_powerdown (i915, port); + +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (PIPE_RESET ,INTEL_CX0_BOTH_LANES ),0 ); + +if (intel_de_wait_for_clear (i915,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (PHY_CURRENT_STATUS , +INTEL_CX0_BOTH_LANES ), +XELPDP_PORT_RESET_END_TIMEOUT )) +drm_warn (&i915->drm,"PHY %c failed to bring out of Lane reset after %dms.\n" , +phy_name (phy),XELPDP_PORT_RESET_END_TIMEOUT ); +} + +static void intel_c10_program_phy_lane (struct drm_i915_private *i915, +enum port port,int lane_count, +bool lane_reversal) +{ +u8 l0t1, l0t2, l1t1, l1t2; + +intel_cx0_rmw (i915, port,INTEL_CX0_BOTH_LANES ,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MSGBUS_ACCESS ,C10_VDR_CTRL_MSGBUS_ACCESS , +MB_WRITE_COMMITTED ); + + l0t1 =intel_cx0_read (i915, port,0 ,PHY_CX0_TX_CONTROL (1 ,2 )); + l0t2 =intel_cx0_read (i915, port,0 ,PHY_CX0_TX_CONTROL (2 ,2 )); + l1t1 =intel_cx0_read (i915, port,1 ,PHY_CX0_TX_CONTROL (1 ,2 )); + l1t2 =intel_cx0_read (i915, port,1 ,PHY_CX0_TX_CONTROL (2 ,2 )); + +if (lane_reversal) { +switch (lane_count) { +case 1 : +/* Disable MLs 1(lane0), 2(lane0), 3(lane1) */ +intel_cx0_write (i915, port,1 ,PHY_CX0_TX_CONTROL (1 ,2 ), + l1t1 |CONTROL2_DISABLE_SINGLE_TX , +MB_WRITE_COMMITTED ); + fallthrough; +case 2 : +/* Disable MLs 1(lane0), 2(lane0) */ +intel_cx0_write (i915, port,0 ,PHY_CX0_TX_CONTROL (2 ,2 ), + l0t2 |CONTROL2_DISABLE_SINGLE_TX , +MB_WRITE_COMMITTED ); + fallthrough; +case 3 : +/* Disable MLs 1(lane0) */ +intel_cx0_write (i915, port,0 ,PHY_CX0_TX_CONTROL (1 ,2 ), + l0t1 |CONTROL2_DISABLE_SINGLE_TX , +MB_WRITE_COMMITTED ); +break ; + } + }else { +switch (lane_count) { +case 1 : +/* Disable MLs 2(lane0), 3(lane1), 4(lane1) */ +intel_cx0_write (i915, port,0 ,PHY_CX0_TX_CONTROL (2 ,2 ), + l0t2 |CONTROL2_DISABLE_SINGLE_TX , +MB_WRITE_COMMITTED ); + fallthrough; +case 2 : +/* Disable MLs 3(lane1), 4(lane1) */ +intel_cx0_write (i915, port,1 ,PHY_CX0_TX_CONTROL (1 ,2 ), + l1t1 |CONTROL2_DISABLE_SINGLE_TX , +MB_WRITE_COMMITTED ); + fallthrough; +case 3 : +/* Disable MLs 4(lane1) */ +intel_cx0_write (i915, port,1 ,PHY_CX0_TX_CONTROL (2 ,2 ), + l1t2 |CONTROL2_DISABLE_SINGLE_TX , +MB_WRITE_COMMITTED ); +break ; + } + } + +intel_cx0_rmw (i915, port,INTEL_CX0_BOTH_LANES ,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_UPDATE_CFG ,C10_VDR_CTRL_UPDATE_CFG ,MB_WRITE_COMMITTED ); +} + +static void intel_c10pll_enable (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +bool lane_reversal = dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; +enum intel_cx0_lanes maxpclk_lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; + +/* +* 1. Program PORT_CLOCK_CTL REGISTER to configure +* clock muxes, gating and SSC +*/ +intel_program_port_clock_ctl (encoder, crtc_state, lane_reversal); + +/* 2. Bring PHY out of reset. */ +intel_cx0_phy_lane_reset (i915, encoder->port, lane_reversal); + +/* +* 3. Change Phy power state to Ready. +* TODO: For DP alt mode use only one lane. +*/ +intel_cx0_powerdown_change_sequence (i915, encoder->port,INTEL_CX0_BOTH_LANES , +CX0_P2_STATE_READY ); + +/* 4. Program PHY internal PLL internal registers. */ +intel_c10_pll_program (i915, crtc_state, encoder); + +/* +* 5. Program the enabled and disabled owned PHY lane +* transmitters over message bus +*/ +intel_c10_program_phy_lane (i915, encoder->port, crtc_state->lane_count, lane_reversal); + +/* +* 6. Follow the Display Voltage Frequency Switching - Sequence +* Before Frequency Change. We handle this step in bxt_set_cdclk(). +*/ + +/* +* 7. Program DDI_CLK_VALFREQ to match intended DDI +* clock frequency. +*/ +intel_de_write (i915,DDI_CLK_VALFREQ (encoder->port), + crtc_state->port_clock); +/* +* 8. Set PORT_CLOCK_CTL register PCLK PLL Request +* LN<Lane for maxPCLK> to "1" to enable PLL. +*/ +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port),0 , +PHY_LANES_VAL (PCLK_PLL_REQUEST , maxpclk_lane)); + +/* 9. Poll on PORT_CLOCK_CTL PCLK PLL Ack LN<Lane for maxPCLK> == "1". */ +if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_CLOCK_CTL (encoder->port), +PHY_LANES_VAL (PCLK_PLL_ACK , maxpclk_lane), +PHY_LANES_VAL (PCLK_PLL_ACK , maxpclk_lane), +XELPDP_PCLK_PLL_ENABLE_TIMEOUT_US ,0 ,NULL )) +drm_warn (&i915->drm,"Port %c PLL not locked after %dus.\n" , +phy_name (phy),XELPDP_PCLK_PLL_ENABLE_TIMEOUT_US ); + +/* +* 10. Follow the Display Voltage Frequency Switching Sequence After +* Frequency Change. We handle this step in bxt_set_cdclk(). +*/ +} + +void intel_cx0pll_enable (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); + +drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy)); +intel_c10pll_enable (encoder, crtc_state); +} + +static void intel_c10pll_disable (struct intel_encoder *encoder) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +bool lane_reversal = dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; +enum intel_cx0_lanes lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; + +/* 1. Change owned PHY lane power to Disable state. */ +intel_cx0_powerdown_change_sequence (i915, encoder->port,INTEL_CX0_BOTH_LANES , +CX0_P2PG_STATE_DISABLE ); + +/* +* 2. Follow the Display Voltage Frequency Switching Sequence Before +* Frequency Change. We handle this step in bxt_set_cdclk(). +*/ + +/* +* 3. Set PORT_CLOCK_CTL register PCLK PLL Request LN<Lane for maxPCLK> +* to "0" to disable PLL. +*/ +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port), +PHY_LANES_VAL (PCLK_PLL_REQUEST ,INTEL_CX0_BOTH_LANES ) | +PHY_LANES_VAL (PCLK_REFCLK_REQUEST ,INTEL_CX0_BOTH_LANES ),0 ); + +/* 4. Program DDI_CLK_VALFREQ to 0. */ +intel_de_write (i915,DDI_CLK_VALFREQ (encoder->port),0 ); + +/* +* 5. Poll on PORT_CLOCK_CTL PCLK PLL Ack LN<Lane for maxPCLK**> == "0". +*/ +if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_CLOCK_CTL (encoder->port), +PHY_LANES_VAL (PCLK_PLL_ACK , lane) | +PHY_LANES_VAL (PCLK_REFCLK_ACK , lane),0 , +XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US ,0 ,NULL )) +drm_warn (&i915->drm,"Port %c PLL not unlocked after %dus.\n" , +phy_name (phy),XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US ); + +/* +* 6. Follow the Display Voltage Frequency Switching Sequence After +* Frequency Change. We handle this step in bxt_set_cdclk(). +*/ + +/* 7. Program PORT_CLOCK_CTL register to disable and gate clocks. */ +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port), +XELPDP_DDI_CLOCK_SELECT_MASK | +XELPDP_FORWARD_CLOCK_UNGATE ,0 ); +} + +void intel_cx0pll_disable (struct intel_encoder *encoder) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); + +drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy)); +intel_c10pll_disable (encoder); +} + +#undef PHY_LANES_VAL_ARG +#undef PHY_LANES_VAL +void intel_c10mpllb_state_verify (struct intel_atomic_state *state,struct intel_crtc_state *new_crtc_state) {drivers/gpu/drm/i915/display/intel_cx0_phy.h +3
-0@@ -106,6 +106,19 @@ enum intel_cx0_lanes {#define C10_VDR_CTRL_UPDATE_CFG REG_BIT8(0)#define PHY_C10_VDR_CUSTOM_WIDTH 0xD02 +#define CX0_P0_STATE_ACTIVE 0x0 +#define CX0_P2_STATE_READY 0x2 +#define CX0_P2PG_STATE_DISABLE 0x9
drivers/gpu/drm/i915/display/intel_cx0_phy.h enum intel_cx0_lanes { · line 121
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h +10
-0+#define CX0_P4PG_STATE_DISABLE 0xC +#define CX0_P2_STATE_RESET 0x2 + +/* PHY_C10_VDR_PLL0 */ +#define PLL_C10_MPLL_SSC_EN REG_BIT8(0) + +/* PIPE SPEC Defined Registers */ +#define PHY_CX0_TX_CONTROL (tx, control) (0x400 + ((tx) - 1) * 0x200 + (control)) +#define CONTROL2_DISABLE_SINGLE_TX REG_BIT(6) +
Again, register definitions don't belong here.
Quoted 57 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h +4
-0static inline bool intel_is_c10phy (struct drm_i915_private *dev_priv,enum phy phy) {if (!IS_METEORLAKE (dev_priv))@@ -114,6 +127,10 @@ static inline bool intel_is_c10phy(struct drm_i915_private *dev_priv, enum phy preturn (phy <PHY_C ); } +void intel_cx0pll_enable (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state); +void intel_cx0pll_disable (struct intel_encoder *encoder); +void intel_c10mpllb_readout_hw_state (struct intel_encoder *encoder,struct intel_c10mpllb_state *pll_state); int intel_cx0mpllb_calc_state(struct intel_crtc_state *crtc_state,drivers/gpu/drm/i915/display/intel_ddi.c +2
-0@@ -4384,6 +4384,8 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) encoder->pipe_mask = ~0 ;if (DISPLAY_VER (dev_priv) >=14 ) { + encoder->enable_clock = intel_cx0pll_enable; + encoder->disable_clock = intel_cx0pll_disable; encoder->get_config = mtl_ddi_get_config; }else if (IS_DG2 (dev_priv)) { encoder->enable_clock = intel_mpllb_enable;drivers/gpu/drm/i915/display/intel_dp.c +9
-0@@ -420,6 +420,11 @@ static int ehl_max_source_rate(struct intel_dp *intel_dp)return 810000 ; } +static int mtl_max_source_rate (struct intel_dp *intel_dp) +{ +return intel_dp_is_edp (intel_dp) ?675000 :810000 ; +} +static int vbt_max_link_rate (struct intel_dp *intel_dp) {struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base;@@ -444,6 +449,10 @@ static void intel_dp_set_source_rates(struct intel_dp *intel_dp) {/* The values must be in increasing order */ +static const int mtl_rates[] = { +162000 ,216000 ,243000 ,270000 ,324000 ,432000 ,540000 ,675000 , +810000 , + };static const int icl_rates[] = {162000 ,216000 ,270000 ,324000 ,432000 ,540000 ,648000 ,810000 ,1000000 ,1350000 ,@@ -469,7 +478,11 @@ intel_dp_set_source_rates(struct intel_dp *intel_dp)drm_WARN_ON (&dev_priv->drm, intel_dp->source_rates || intel_dp->num_source_rates);
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_set_source_rates(struct intel_dp *intel_dp) · line 488
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-1-if (DISPLAY_VER (dev_priv) >=11 ) { +if (DISPLAY_VER (dev_priv) >=14 ) { + source_rates = mtl_rates; + size =ARRAY_SIZE (mtl_rates); + max_rate =mtl_max_source_rate (intel_dp); + }else if (DISPLAY_VER (dev_priv) >=11 ) { source_rates = icl_rates; size =ARRAY_SIZE (icl_rates);if (IS_DG2 (dev_priv))
All of the changes to intel_dp.c should be a separate patch.
Quoted 39 lines
drivers/gpu/drm/i915/display/intel_dpll.c +2
-0@@ -1533,6 +1533,8 @@ intel_dpll_init_clock_hook(struct drm_i915_private *dev_priv) {if (DISPLAY_VER (dev_priv) >=14 ) dev_priv->display.funcs.dpll = &mtl_dpll_funcs; +else if (DISPLAY_VER (dev_priv) >=14 ) + dev_priv->display.funcs.dpll = &mtl_dpll_funcs;else if (IS_DG2 (dev_priv)) dev_priv->display.funcs.dpll = &dg2_dpll_funcs;else if (DISPLAY_VER (dev_priv) >=9 ||HAS_DDI (dev_priv))drivers/gpu/drm/i915/i915_reg.h +11
-0@@ -2121,6 +2121,11 @@#define TRANS_PUSH_EN REG_BIT(31)#define TRANS_PUSH_SEND REG_BIT(30) +/* DDI Buffer Control */ +#define _DDI_CLK_VALFREQ_A 0x64030 +#define _DDI_CLK_VALFREQ_B 0x64130 +#define DDI_CLK_VALFREQ (port) _MMIO_PORT(port, _DDI_CLK_VALFREQ_A, _DDI_CLK_VALFREQ_B) +/* * HSW+ eDP PSR registers * @@ -8375,4 +8380,140 @@ enum skl_power_gate {#define MTL_MEDIA_GSI_BASE 0x380000 +#define PUNIT_MMIO_CR_POC_STRAPS _MMIO(0x281078) +#define NUM_TILES_MASK REG_GENMASK(1, 0) +#define CD_ALIVE REG_BIT(2) +#define SOCKET_ID_MASK REG_GENMASK(7, 3) + +/* Define the BAR and offset for the accelerator fabric CSRs */
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8398
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +10
-0+#define CD_BASE_OFFSET 0x291000 +#define CD_BAR_SIZE (256 * 1024) + +/* +* In general, the i915 should not touch the IAF registers. The registers +* will be passed as an IO resource via the MFD interface. However, it +* is necessary to put the IRQ bits in a known state, before the MFD cell +* is registered. +* +* So define these registers for i915 usage.
These should probably be split to a separate _regs file, like we've been doing for other registers. Especially because "In general, the i915 should not touch the IAF registers."
Quoted 121 lines
drivers/gpu/drm/i915/i915_reg.h +120
-0+*/ +#define CPORT_MBDB_CSRS (CD_BASE_OFFSET + 0x6000) +#define CPORT_MBDB_CSRS_END (CPORT_MBDB_CSRS + 0x1000) +#define CPORT_MBDB_INT_ENABLE_MASK _MMIO(CPORT_MBDB_CSRS + 0x8) + +#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_A 0x64040 +#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_B 0x64140 +#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC1 0x16F240 +#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC2 0x16F440 +#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC3 0x16F640 +#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC4 0x16F840 +#define _XELPDP_PORT_M2P_MSGBUS_CTL (port, lane) (_PICK(port, \ + [PORT_A] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_A, \ + [PORT_B] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_B, \ + [PORT_TC1] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC1, \ + [PORT_TC2] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC2, \ + [PORT_TC3] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC3, \ + [PORT_TC4] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC4) + ((lane) * 4)) + +#define XELPDP_PORT_M2P_MSGBUS_CTL (port, lane) _MMIO(_XELPDP_PORT_M2P_MSGBUS_CTL(port, lane)) +#define XELPDP_PORT_M2P_TRANSACTION_PENDING REG_BIT(31) +#define XELPDP_PORT_M2P_COMMAND_TYPE_MASK REG_GENMASK(30, 27) +#define XELPDP_PORT_M2P_COMMAND_WRITE_UNCOMMITTED REG_FIELD_PREP(XELPDP_PORT_M2P_COMMAND_TYPE_MASK, 0x1) +#define XELPDP_PORT_M2P_COMMAND_WRITE_COMMITTED REG_FIELD_PREP(XELPDP_PORT_M2P_COMMAND_TYPE_MASK, 0x2) +#define XELPDP_PORT_M2P_COMMAND_READ REG_FIELD_PREP(XELPDP_PORT_M2P_COMMAND_TYPE_MASK, 0x3) +#define XELPDP_PORT_M2P_DATA_MASK REG_GENMASK(23, 16) +#define XELPDP_PORT_M2P_DATA (val) REG_FIELD_PREP(XELPDP_PORT_M2P_DATA_MASK, val) +#define XELPDP_PORT_M2P_TRANSACTION_RESET REG_BIT(15) +#define XELPDP_PORT_M2P_ADDRESS_MASK REG_GENMASK(11, 0) +#define XELPDP_PORT_M2P_ADDRESS (val) REG_FIELD_PREP(XELPDP_PORT_M2P_ADDRESS_MASK, val) + +#define XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane) _MMIO(_XELPDP_PORT_M2P_MSGBUS_CTL(port, lane) + 8) +#define XELPDP_PORT_P2M_RESPONSE_READY REG_BIT(31) +#define XELPDP_PORT_P2M_COMMAND_TYPE_MASK REG_GENMASK(30, 27) +#define XELPDP_PORT_P2M_COMMAND_READ_ACK 0x4 +#define XELPDP_PORT_P2M_COMMAND_WRITE_ACK 0x5 +#define XELPDP_PORT_P2M_DATA_MASK REG_GENMASK(23, 16) +#define XELPDP_PORT_P2M_DATA (val) REG_FIELD_PREP(XELPDP_PORT_P2M_DATA_MASK, val) +#define XELPDP_PORT_P2M_ERROR_SET REG_BIT(15) + +#define XELPDP_MSGBUS_TIMEOUT_SLOW 1 +#define XELPDP_MSGBUS_TIMEOUT_FAST_US 2 +#define XELPDP_PCLK_PLL_ENABLE_TIMEOUT_US 3200 +#define XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US 20 +#define XELPDP_PORT_BUF_SOC_READY_TIMEOUT_US 100 +#define XELPDP_PORT_RESET_START_TIMEOUT_US 5 +#define XELPDP_PORT_RESET_END_TIMEOUT 15 +#define XELPDP_REFCLK_ENABLE_TIMEOUT_US 1 + +#define _XELPDP_PORT_BUF_CTL1_LN0_A 0x64004 +#define _XELPDP_PORT_BUF_CTL1_LN0_B 0x64104 +#define _XELPDP_PORT_BUF_CTL1_LN0_USBC1 0x16F200 +#define _XELPDP_PORT_BUF_CTL1_LN0_USBC2 0x16F400 +#define _XELPDP_PORT_BUF_CTL1_LN0_USBC3 0x16F600 +#define _XELPDP_PORT_BUF_CTL1_LN0_USBC4 0x16F800 +#define _XELPDP_PORT_BUF_CTL1 (port) (_PICK(port, \ + [PORT_A] = _XELPDP_PORT_BUF_CTL1_LN0_A, \ + [PORT_B] = _XELPDP_PORT_BUF_CTL1_LN0_B, \ + [PORT_TC1] = _XELPDP_PORT_BUF_CTL1_LN0_USBC1, \ + [PORT_TC2] = _XELPDP_PORT_BUF_CTL1_LN0_USBC2, \ + [PORT_TC3] = _XELPDP_PORT_BUF_CTL1_LN0_USBC3, \ + [PORT_TC4] = _XELPDP_PORT_BUF_CTL1_LN0_USBC4)) + +#define XELPDP_PORT_BUF_CTL1 (port) _MMIO(_XELPDP_PORT_BUF_CTL1(port)) +#define XELPDP_PORT_BUF_SOC_PHY_READY REG_BIT(24) +#define XELPDP_PORT_REVERSAL REG_BIT(16) +#define XELPDP_PORT_WIDTH_MASK REG_GENMASK(3, 1) +#define XELPDP_PORT_WIDTH (val) REG_FIELD_PREP(XELPDP_PORT_WIDTH_MASK, val) + +#define XELPDP_PORT_BUF_CTL2 (port) _MMIO(_XELPDP_PORT_BUF_CTL1(port) + 4) +#define XELPDP_LANE0_PIPE_RESET REG_BIT(31) +#define XELPDP_LANE1_PIPE_RESET REG_BIT(30) +#define XELPDP_LANE0_PHY_CURRENT_STATUS REG_BIT(29) +#define XELPDP_LANE1_PHY_CURRENT_STATUS REG_BIT(28) +#define XELPDP_LANE0_POWERDOWN_UPDATE REG_BIT(25) +#define XELPDP_LANE1_POWERDOWN_UPDATE REG_BIT(24) +#define XELPDP_LANE0_POWERDOWN_NEW_STATE_MASK REG_GENMASK(23, 20) +#define XELPDP_LANE0_POWERDOWN_NEW_STATE (val) REG_FIELD_PREP(XELPDP_LANE0_POWERDOWN_NEW_STATE_MASK, val) +#define XELPDP_LANE1_POWERDOWN_NEW_STATE_MASK REG_GENMASK(19, 16) +#define XELPDP_LANE1_POWERDOWN_NEW_STATE (val) REG_FIELD_PREP(XELPDP_LANE1_POWERDOWN_NEW_STATE_MASK, val) +#define XELPDP_POWER_STATE_READY_MASK REG_GENMASK(7, 4) +#define XELPDP_POWER_STATE_READY (val) REG_FIELD_PREP(XELPDP_POWER_STATE_READY_MASK, val) + +#define XELPDP_PORT_BUF_CTL3 (port) _MMIO(_XELPDP_PORT_BUF_CTL1(port) + 8) +#define XELPDP_PLL_LANE_STAGGERING_DELAY_MASK REG_GENMASK(15, 8) +#define XELPDP_PLL_LANE_STAGGERING_DELAY (val) REG_FIELD_PREP(XELPDP_PLL_LANE_STAGGERING_DELAY_MASK, val) +#define XELPDP_POWER_STATE_ACTIVE_MASK REG_GENMASK(3, 0) +#define XELPDP_POWER_STATE_ACTIVE (val) REG_FIELD_PREP(XELPDP_POWER_STATE_ACTIVE_MASK, val) + +#define _XELPDP_PORT_CLOCK_CTL_A 0x640E0 +#define _XELPDP_PORT_CLOCK_CTL_B 0x641E0 +#define _XELPDP_PORT_CLOCK_CTL_USBC1 0x16F260 +#define _XELPDP_PORT_CLOCK_CTL_USBC2 0x16F460 +#define _XELPDP_PORT_CLOCK_CTL_USBC3 0x16F660 +#define _XELPDP_PORT_CLOCK_CTL_USBC4 0x16F860 +#define XELPDP_PORT_CLOCK_CTL (port) _MMIO(_PICK(port, \ + [PORT_A] = _XELPDP_PORT_CLOCK_CTL_A, \ + [PORT_B] = _XELPDP_PORT_CLOCK_CTL_B, \ + [PORT_TC1] = _XELPDP_PORT_CLOCK_CTL_USBC1, \ + [PORT_TC2] = _XELPDP_PORT_CLOCK_CTL_USBC2, \ + [PORT_TC3] = _XELPDP_PORT_CLOCK_CTL_USBC3, \ + [PORT_TC4] = _XELPDP_PORT_CLOCK_CTL_USBC4)) + +#define XELPDP_LANE0_PCLK_PLL_REQUEST REG_BIT(31) +#define XELPDP_LANE0_PCLK_PLL_ACK REG_BIT(30) +#define XELPDP_LANE0_PCLK_REFCLK_REQUEST REG_BIT(29) +#define XELPDP_LANE0_PCLK_REFCLK_ACK REG_BIT(28) +#define XELPDP_LANE1_PCLK_PLL_REQUEST REG_BIT(27) +#define XELPDP_LANE1_PCLK_PLL_ACK REG_BIT(26) +#define XELPDP_LANE1_PCLK_REFCLK_REQUEST REG_BIT(25) +#define XELPDP_LANE1_PCLK_REFCLK_ACK REG_BIT(24) +#define XELPDP_DDI_CLOCK_SELECT_MASK REG_GENMASK(15, 12) +#define XELPDP_DDI_CLOCK_SELECT (val) REG_FIELD_PREP(XELPDP_DDI_CLOCK_SELECT_MASK, val) +#define XELPDP_DDI_CLOCK_SELECT_NONE 0x0 +#define XELPDP_DDI_CLOCK_SELECT_MAXPCLK 0x8 +#define XELPDP_FORWARD_CLOCK_UNGATE REG_BIT(10) +#define XELPDP_LANE1_PHY_CLOCK_SELECT REG_BIT(8) +#define XELPDP_SSC_ENABLE_PLLA REG_BIT(1) +#define XELPDP_SSC_ENABLE_PLLB REG_BIT(0) +#endif /* _I915_REG_H_ */
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 3/5] drm/i915/mtl: Add support for C10 phy programming
Quoted 529 lines
-----Original Message-----
From: Jani Nikula <[email protected]>
Sent: Friday, September 30, 2022 12:32 PM
To: Kahola, Mika <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH 3/5] drm/i915/mtl: Add support for C10 phy programmingQuoted 28 lines · Mika Kahola
From: Radhakrishna Sripada <[email protected]>
Add sequences for C10 phy enable/disable phy lane reset, powerdown change sequence and phy lane programming.
Bspec: 64539, 67636, 65451, 65450, 64568
Cc Imre Deak <[email protected]>Cc Mika Kahola <[email protected]>Cc Uma Shankar <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>Signed-off-by Mika Kahola <[email protected]> (v9)--- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_cx0_phy.c | 352 ++++++++++++++++++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 17 + drivers/gpu/drm/i915/display/intel_ddi.c | 2 + drivers/gpu/drm/i915/display/intel_dp.c | 15 +- drivers/gpu/drm/i915/display/intel_dpll.c | 2 + drivers/gpu/drm/i915/i915_reg.h | 141 ++++++++ 7 files changed, 526 insertions(+), 4 deletions(-)(quoted diff) +0
-0b/drivers/gpu/drm/i915/Makefile index
a26edcdadc21..994f87a12782100644drivers/gpu/drm/i915/Makefile i915-y += \ · line 282
Quoted 4 lines
drivers/gpu/drm/i915/Makefile +1
-0@@ -279,6 +279,7 @@ i915-y += \ display/icl_dsi.o \ display/intel_backlight.o \ display/intel_crt.o \ + display/intel_cx0_phy.o \This belongs where
intel_cx0_phy.cis added.drivers/gpu/drm/i915/display/intel_cx0_phy.c void intel_c10mpllb_readout_hw_state(struct
Quoted 9 lines
drivers/gpu/drm/i915/Makefile +0
-0display/intel_ddi.o \ display/intel_ddi_buf_trans.o \ display/intel_display_trace.o \drivers/gpu/drm/i915/display/intel_cx0_phy.c +0
-0@@ -526,9 +526,9 @@ void intel_c10mpllb_readout_hw_state(struct
intel_encoder*encoder,drivers/gpu/drm/i915/display/intel_cx0_phy.c void intel_c10mpllb_readout_hw_state(struct intel_encoder *encoder,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +0
-1tx0, cmn, phy_name(phy)); } -__maybe_unused static void intel_c10_pll_program(struct drm_i915_private*i915,
drivers/gpu/drm/i915/display/intel_cx0_phy.c void intel_c10mpllb_readout_hw_state(struct · line 530
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +0
-1- const struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_cx0_phy.c void intel_c10mpllb_readout_hw_state(struct · line 531
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +0
-1-struct intel_encoder *encoder)
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +3
-0+static void intel_c10_pll_program (struct drm_i915_private *i915, +const struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) {const struct intel_c10mpllb_state *pll_state = &crtc_state- c10mpllb_state;struct
intel_digital_port*dig_port=enc_to_dig_port(encoder); @@
-633,6 +633,352 @@ int intel_c10mpllb_calc_port_clock(structintel_encoder*encoder,
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-010 << (tx_clk_div + 16)); } +#define PHY_LANES_VAL_ARG (FIELD , lanes, arg) ({u32 __val;switch(lanes) {\
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ case
INTEL_CX0_BOTH_LANES: \drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ __val =((XELPDP_LANE0_##FIELD(arg)) |\
Quoted 1 line
+
(XELPDP_LANE1_##FIELD(arg))); \
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+break ;\drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+case INTEL_CX0_LANE0 :\
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ __val =(XELPDP_LANE0_##FIELD(arg));\
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+break ;\drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+case INTEL_CX0_LANE1 :\
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ __val =(XELPDP_LANE1_##FIELD(arg));\
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +5
-0+break ; \ + }; __val; }) + +#define PHY_LANES_VAL (FIELD , lanes) ({u32 __val; switch(lanes) {\ + case
INTEL_CX0_BOTH_LANES: \drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ __val =(XELPDP_LANE0_##FIELD | \
Quoted 1 line
+
XELPDP_LANE1_##FIELD); \
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+break ;\drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+case INTEL_CX0_LANE0 :\
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ __val =(XELPDP_LANE0_##FIELD); \
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+break ;\drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+case INTEL_CX0_LANE1 :\
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ __val =(XELPDP_LANE1_##FIELD);\
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +2
-0+break ; \ + }; __val; })Ugh that's ugly. I'll try to look the other way.
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +3
-0+ +static void intel_program_port_clock_ctl (struct intel_encoder *encoder, + const struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +8
-0+ bool lane_reversal) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +struct intel_dp *intel_dp; +bool ssc_enabled; +u32 val =0 ; + + intel_de_rmw(i915, XELPDP_PORT_BUF_CTL1(encoder->port),
XELPDP_PORT_REVERSAL,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +7
-0+ lane_reversal ? XELPDP_PORT_REVERSAL : 0); + +if (lane_reversal) + val |=XELPDP_LANE1_PHY_CLOCK_SELECT ; + + val |=XELPDP_FORWARD_CLOCK_UNGATE ; + val |=
XELPDP_DDI_CLOCK_SELECT(XELPDP_DDI_CLOCK_SELECT_MAXPCLK);drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder, · line 683
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +5
-0+ +if (intel_crtc_has_dp_encoder (crtc_state)) { + intel_dp =enc_to_intel_dp (encoder); + ssc_enabled = intel_dp->dpcd[DP_MAX_DOWNSPREAD ] & +DP_MAX_DOWNSPREAD_0_5 ;It is almost certainly the wrong thing to do to look at sink DPCD register values at the low level PHY code. Smells like something that should be added to crtc state.
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +12
-0+ +/* TODO: DP2.0 10G and 20G rates enable MPLLA*/ + val |= ssc_enabled ?XELPDP_SSC_ENABLE_PLLB :0 ; + } +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port), +XELPDP_LANE1_PHY_CLOCK_SELECT | +XELPDP_FORWARD_CLOCK_UNGATE | +XELPDP_DDI_CLOCK_SELECT_MASK | +XELPDP_SSC_ENABLE_PLLB , val); +} + +static void intel_cx0_powerdown_change_sequence(struct drm_i915_private*i915,
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +2
-0+enum port port, + enum intel_cx0_lanes lane, u8state) {
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +5
-0+enum phy phy =intel_port_to_phy (i915, port); + + intel_de_rmw(i915, XELPDP_PORT_BUF_CTL2(port), + PHY_LANES_VAL(POWERDOWN_NEW_STATE_MASK, lane), + PHY_LANES_VAL_ARG(POWERDOWN_NEW_STATE, lane,state));
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +6
-0+intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (POWERDOWN_UPDATE , lane), +PHY_LANES_VAL (POWERDOWN_UPDATE , lane)); + +/* Update Timeout Value */ + if (__intel_wait_for_register(&i915->uncore,
XELPDP_PORT_BUF_CTL2(port),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ PHY_LANES_VAL(POWERDOWN_UPDATE,lane), 0,
Quoted 1 line
+
XELPDP_PORT_RESET_START_TIMEOUT_US, 0, NULL))drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ drm_warn(&i915->drm, "PHY %c failed to bring out of Lanereset after %dus.\n",
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ phy_name(phy),
XELPDP_PORT_RESET_START_TIMEOUT_US);Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +6
-0+} + +static void intel_cx0_setup_powerdown (struct drm_i915_private *i915, +enum port port) { + intel_de_rmw(i915, XELPDP_PORT_BUF_CTL2(port), + XELPDP_POWER_STATE_READY_MASK,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+ XELPDP_POWER_STATE_READY(CX0_P2_STATE_READY)); +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL3 (port), +XELPDP_POWER_STATE_ACTIVE_MASK | +XELPDP_PLL_LANE_STAGGERING_DELAY_MASK , +XELPDP_POWER_STATE_ACTIVE (CX0_P0_STATE_ACTIVE ) | +XELPDP_PLL_LANE_STAGGERING_DELAY (0 )); +} + +/* FIXME: Some Type-C cases need not reset both the lanes. Handle +those cases. */ static void intel_cx0_phy_lane_reset(struct drm_i915_private*i915, enum port port,
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +7
-0+ bool lane_reversal) +{ +enum phy phy =intel_port_to_phy (i915, port); +enum intel_cx0_lanes lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; + + if (__intel_wait_for_register(&i915->uncore,
XELPDP_PORT_BUF_CTL1(port),drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder, · line 742
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +3
-0+XELPDP_PORT_BUF_SOC_PHY_READY , + XELPDP_PORT_BUF_SOC_PHY_READY, +
XELPDP_PORT_BUF_SOC_READY_TIMEOUT_US, 0, NULL))drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ drm_warn(&i915->drm, "PHY %c failed to bring out of SOC resetafter %dus.\n",
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ phy_name(phy),
XELPDP_PORT_BUF_SOC_READY_TIMEOUT_US);drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +6
-0+ +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (PIPE_RESET ,INTEL_CX0_BOTH_LANES ), +PHY_LANES_VAL (PIPE_RESET ,INTEL_CX0_BOTH_LANES )); + + if (__intel_wait_for_register(&i915->uncore,
XELPDP_PORT_BUF_CTL2(port),drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder, · line 773
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ PHY_LANES_VAL(PHY_CURRENT_STATUS,
INTEL_CX0_BOTH_LANES),drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder, · line 773
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ PHY_LANES_VAL(PHY_CURRENT_STATUS,
INTEL_CX0_BOTH_LANES),Quoted 1 line
+
XELPDP_PORT_RESET_START_TIMEOUT_US, 0, NULL))drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ drm_warn(&i915->drm, "PHY %c failed to bring out of Lanereset after %dus.\n",
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ phy_name(phy),
XELPDP_PORT_RESET_START_TIMEOUT_US);drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +6
-0+ +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (port), +PHY_LANES_VAL (PCLK_REFCLK_REQUEST , lane), +PHY_LANES_VAL (PCLK_REFCLK_REQUEST , lane)); + + if (__intel_wait_for_register(&i915->uncore,
XELPDP_PORT_CLOCK_CTL(port),drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +3
-0+PHY_LANES_VAL (PCLK_REFCLK_ACK , lane), +PHY_LANES_VAL (PCLK_REFCLK_ACK , lane), + XELPDP_REFCLK_ENABLE_TIMEOUT_US, 0,NULL))
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ drm_warn(&i915->drm, "PHY %c failed to request refclk after%dus.\n",
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ phy_name(phy),
XELPDP_REFCLK_ENABLE_TIMEOUT_US);drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +2
-0+ + intel_cx0_powerdown_change_sequence(i915, port,
INTEL_CX0_BOTH_LANES,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +11
-0+ CX0_P2_STATE_RESET); +intel_cx0_setup_powerdown (i915, port); + +intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (PIPE_RESET ,INTEL_CX0_BOTH_LANES ),0 ); + +if (intel_de_wait_for_clear (i915,XELPDP_PORT_BUF_CTL2 (port), +PHY_LANES_VAL (PHY_CURRENT_STATUS , +INTEL_CX0_BOTH_LANES ), +XELPDP_PORT_RESET_END_TIMEOUT )) + drm_warn(&i915->drm, "PHY %c failed to bring out of Lanereset after %dms.\n",
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ phy_name(phy),
XELPDP_PORT_RESET_END_TIMEOUT); }drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +8
-0+ +static void intel_c10_program_phy_lane (struct drm_i915_private *i915, +enum port port,int lane_count, +bool lane_reversal) +{ +u8 l0t1, l0t2, l1t1, l1t2; + + intel_cx0_rmw(i915, port, INTEL_CX0_BOTH_LANES,
PHY_C10_VDR_CONTROL(1),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ C10_VDR_CTRL_MSGBUS_ACCESS,
C10_VDR_CTRL_MSGBUS_ACCESS,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +12
-0+ MB_WRITE_COMMITTED); + + l0t1 =intel_cx0_read (i915, port,0 ,PHY_CX0_TX_CONTROL (1 ,2 )); + l0t2 =intel_cx0_read (i915, port,0 ,PHY_CX0_TX_CONTROL (2 ,2 )); + l1t1 =intel_cx0_read (i915, port,1 ,PHY_CX0_TX_CONTROL (1 ,2 )); + l1t2 =intel_cx0_read (i915, port,1 ,PHY_CX0_TX_CONTROL (2 ,2 )); + +if (lane_reversal) { +switch (lane_count) { +case 1 : +/* Disable MLs 1(lane0), 2(lane0), 3(lane1) */ + intel_cx0_write(i915, port, 1,
PHY_CX0_TX_CONTROL(1, 2),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ l1t1 |
CONTROL2_DISABLE_SINGLE_TX,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +5
-0+ MB_WRITE_COMMITTED); + fallthrough; +case 2 : +/* Disable MLs 1(lane0), 2(lane0) */ + intel_cx0_write(i915, port, 0,
PHY_CX0_TX_CONTROL(2, 2),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ l0t2 |
CONTROL2_DISABLE_SINGLE_TX,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +5
-0+ MB_WRITE_COMMITTED); + fallthrough; +case 3 : +/* Disable MLs 1(lane0) */ + intel_cx0_write(i915, port, 0,
PHY_CX0_TX_CONTROL(1, 2),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ l0t1 |
CONTROL2_DISABLE_SINGLE_TX,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +8
-0+ MB_WRITE_COMMITTED); +break ; + } + }else { +switch (lane_count) { +case 1 : +/* Disable MLs 2(lane0), 3(lane1), 4(lane1) */ + intel_cx0_write(i915, port, 0,
PHY_CX0_TX_CONTROL(2, 2),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ l0t2 |
CONTROL2_DISABLE_SINGLE_TX,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +5
-0+ MB_WRITE_COMMITTED); + fallthrough; +case 2 : +/* Disable MLs 3(lane1), 4(lane1) */ + intel_cx0_write(i915, port, 1,
PHY_CX0_TX_CONTROL(1, 2),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ l1t1 |
CONTROL2_DISABLE_SINGLE_TX,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +5
-0+ MB_WRITE_COMMITTED); + fallthrough; +case 3 : +/* Disable MLs 4(lane1) */ + intel_cx0_write(i915, port, 1,
PHY_CX0_TX_CONTROL(2, 2),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ l1t2 |
CONTROL2_DISABLE_SINGLE_TX,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +6
-0+ MB_WRITE_COMMITTED); +break ; + } + } + + intel_cx0_rmw(i915, port, INTEL_CX0_BOTH_LANES,
PHY_C10_VDR_CONTROL(1),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ C10_VDR_CTRL_UPDATE_CFG,
C10_VDR_CTRL_UPDATE_CFG,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +8
-0+MB_WRITE_COMMITTED); } + +static void intel_c10pll_enable (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) { +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); + bool lane_reversal = dig_port->saved_port_bits &
DDI_BUF_PORT_REVERSAL;drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ enum intel_cx0_lanes maxpclk_lane = lane_reversal ?
INTEL_CX0_LANE1:Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +6
-0+INTEL_CX0_LANE0 ; + +/* +* 1. Program PORT_CLOCK_CTL REGISTER to configure +* clock muxes, gating and SSC +*/ drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+intel_program_port_clock_ctl (encoder, crtc_state, lane_reversal); + +/* 2. Bring PHY out of reset. */ +intel_cx0_phy_lane_reset (i915, encoder->port, lane_reversal); + +/* +* 3. Change Phy power state to Ready. +* TODO: For DP alt mode use only one lane. +*/ + intel_cx0_powerdown_change_sequence(i915, encoder->port,
INTEL_CX0_BOTH_LANES,Quoted 21 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +21
-0+ CX0_P2_STATE_READY); + +/* 4. Program PHY internal PLL internal registers. */ +intel_c10_pll_program (i915, crtc_state, encoder); + +/* +* 5. Program the enabled and disabled owned PHY lane +* transmitters over message bus +*/ +intel_c10_program_phy_lane (i915, encoder->port, +crtc_state->lane_count, lane_reversal); + +/* +* 6. Follow the Display Voltage Frequency Switching - Sequence +* Before Frequency Change. We handle this step in bxt_set_cdclk(). +*/ + +/* +* 7. Program DDI_CLK_VALFREQ to match intended DDI +* clock frequency. +*/ drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+intel_de_write (i915,DDI_CLK_VALFREQ (encoder->port), + crtc_state->port_clock); +/* +* 8. Set PORT_CLOCK_CTL register PCLK PLL Request +* LN<Lane for maxPCLK> to "1" to enable PLL. +*/ +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port),0 , +PHY_LANES_VAL (PCLK_PLL_REQUEST , maxpclk_lane)); + +/* 9. Poll on PORT_CLOCK_CTL PCLK PLL Ack LN<Lane for maxPCLK> == "1". */
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ if (__intel_wait_for_register(&i915->uncore,
XELPDP_PORT_CLOCK_CTL(encoder->port),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ PHY_LANES_VAL(PCLK_PLL_ACK,
maxpclk_lane),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ PHY_LANES_VAL(PCLK_PLL_ACK,
maxpclk_lane),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ XELPDP_PCLK_PLL_ENABLE_TIMEOUT_US,0, NULL))
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +2
-0+ drm_warn(&i915->drm, "Port %c PLL not locked after %dus.\n", + phy_name(phy),
XELPDP_PCLK_PLL_ENABLE_TIMEOUT_US);Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+ +/* +* 10. Follow the Display Voltage Frequency Switching Sequence After +* Frequency Change. We handle this step in bxt_set_cdclk(). +*/ +} + +void intel_cx0pll_enable (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) { +struct drm_i915_private *i915 =to_i915 (encoder->base.dev);drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +10
-0+enum phy phy =intel_port_to_phy (i915, encoder->port); + +drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy)); +intel_c10pll_enable (encoder, crtc_state); } + +static void intel_c10pll_disable (struct intel_encoder *encoder) { +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); + bool lane_reversal = dig_port->saved_port_bits &
DDI_BUF_PORT_REVERSAL;drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +5
-0+enum intel_cx0_lanes lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; + +/* 1. Change owned PHY lane power to Disable state. */ + intel_cx0_powerdown_change_sequence(i915, encoder->port,
INTEL_CX0_BOTH_LANES,drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +9
-0+ CX0_P2PG_STATE_DISABLE); + +/* +* 2. Follow the Display Voltage Frequency Switching Sequence Before +* Frequency Change. We handle this step in bxt_set_cdclk(). +*/ + +/* +* 3. Set PORT_CLOCK_CTL register PCLK PLL Request LN<Lane for maxPCLK>
drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +4
-0+* to "0" to disable PLL. +*/ + intel_de_rmw(i915, XELPDP_PORT_CLOCK_CTL(encoder->port), + PHY_LANES_VAL(PCLK_PLL_REQUEST,
INTEL_CX0_BOTH_LANES) |drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ PHY_LANES_VAL(PCLK_REFCLK_REQUEST,
INTEL_CX0_BOTH_LANES), 0);drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +6
-0+ +/* 4. Program DDI_CLK_VALFREQ to 0. */ +intel_de_write (i915,DDI_CLK_VALFREQ (encoder->port),0 ); + +/* +* 5. Poll on PORT_CLOCK_CTL PCLK PLL Ack LN<Lane for maxPCLK**> == "0".
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +2
-0+*/ + if (__intel_wait_for_register(&i915->uncore,
XELPDP_PORT_CLOCK_CTL(encoder->port),drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +2
-0+PHY_LANES_VAL (PCLK_PLL_ACK , lane) | + PHY_LANES_VAL(PCLK_REFCLK_ACK, lane),0,
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US,0, NULL))
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ drm_warn(&i915->drm, "Port %c PLL not unlocked after%dus.\n",
drivers/gpu/drm/i915/display/intel_cx0_phy.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_cx0_phy.c +1
-0+ phy_name(phy),
XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US);Quoted 14 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +14
-0+ +/* +* 6. Follow the Display Voltage Frequency Switching Sequence After +* Frequency Change. We handle this step in bxt_set_cdclk(). +*/ + +/* 7. Program PORT_CLOCK_CTL register to disable and gate clocks. */ +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port), +XELPDP_DDI_CLOCK_SELECT_MASK | +XELPDP_FORWARD_CLOCK_UNGATE ,0 ); } + +void intel_cx0pll_disable (struct intel_encoder *encoder) { +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +enum phy phy =intel_port_to_phy (i915, encoder->port);drivers/gpu/drm/i915/display/intel_cx0_phy.c int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.c +8
-0+ +drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy)); +intel_c10pll_disable (encoder); +} + +#undef PHY_LANES_VAL_ARG +#undef PHY_LANES_VAL +void intel_c10mpllb_state_verify (struct intel_atomic_state *state,struct intel_crtc_state *new_crtc_state) { diff--git
Quoted 10 lines
a/drivers/gpu/drm/i915/display/intel_cx0_phy.hb/drivers/gpu/drm/i915/display/intel_cx0_phy.h
indexcf1f300b6a7b..d12d2e2f02ee100644drivers/gpu/drm/i915/display/intel_cx0_phy.h +1
-0@@ -106,6 +106,19 @@ enum intel_cx0_lanes {#define C10_VDR_CTRL_UPDATE_CFG REG_BIT8(0)#define PHY_C10_VDR_CUSTOM_WIDTH 0xD02 +#define CX0_P0_STATE_ACTIVE 0x0drivers/gpu/drm/i915/display/intel_cx0_phy.h enum intel_cx0_lanes { · line 119
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h +10
-0+#define CX0_P2_STATE_READY 0x2 +#define CX0_P2PG_STATE_DISABLE 0x9 +#define CX0_P4PG_STATE_DISABLE 0xC +#define CX0_P2_STATE_RESET 0x2 + +/* PHY_C10_VDR_PLL0 */ +#define PLL_C10_MPLL_SSC_EN REG_BIT8(0) + +/* PIPE SPEC Defined Registers */ +#define PHY_CX0_TX_CONTROL (tx, control) (0x400 + ((tx) - 1) * 0x200 +(control))
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h enum intel_cx0_lanes { · line 121
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h +2
-0+#define CONTROL2_DISABLE_SINGLE_TX REG_BIT(6) +Again, register definitions don't belong here.
Yes, I will move these to a separate file.
Quoted 62 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h static inline bool intel_is_c10phy(struct
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h +0
-0static inline bool intel_is_c10phy (struct drm_i915_private *dev_priv,enum phy phy) {if (!IS_METEORLAKE (dev_priv))@@ -114,6 +127,10 @@ static inline bool intel_is_c10phy(struct
drm_i915_private*dev_priv, enum phy pdrivers/gpu/drm/i915/display/intel_ddi.c void intel_ddi_init(struct drm_i915_private
Quoted 16 lines
drivers/gpu/drm/i915/display/intel_cx0_phy.h +4
-0return (phy <PHY_C ); } +void intel_cx0pll_enable (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state);void +intel_cx0pll_disable (struct intel_encoder *encoder); +void intel_c10mpllb_readout_hw_state (struct intel_encoder *encoder,struct intel_c10mpllb_state *pll_state);int intel_cx0mpllb_calc_state(struct
intel_crtc_state*crtc_state, diff --gita/drivers/gpu/drm/i915/display/intel_ddi.cb/drivers/gpu/drm/i915/display/intel_ddi.c
indexaaa8846c3b18..639ec604babf100644drivers/gpu/drm/i915/display/intel_ddi.c +0
-0@@ -4384,6 +4384,8 @@ void intel_ddi_init(struct drm_i915_private
*dev_priv, enum port port)drivers/gpu/drm/i915/display/intel_dp.c static int ehl_max_source_rate(struct intel_dp
Quoted 14 lines
drivers/gpu/drm/i915/display/intel_ddi.c +2
-0encoder->pipe_mask = ~0 ;if (DISPLAY_VER (dev_priv) >=14 ) { + encoder->enable_clock = intel_cx0pll_enable; + encoder->disable_clock = intel_cx0pll_disable; encoder->get_config = mtl_ddi_get_config; }else if (IS_DG2 (dev_priv)) { encoder->enable_clock = intel_mpllb_enable; diff --git
a/drivers/gpu/drm/i915/display/intel_dp.cb/drivers/gpu/drm/i915/display/intel_dp.c
index70b06806ec0d..db32799b5f46100644drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -420,6 +420,11 @@ static int ehl_max_source_rate(struct intel_dp
*intel_dp)drivers/gpu/drm/i915/display/intel_dp.c static void
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_dp.c +3
-1return 810000 ; } +static int mtl_max_source_rate (struct intel_dp *intel_dp) { +return intel_dp_is_edp (intel_dp) ?675000 :810000 ; } +static int vbt_max_link_rate (struct intel_dp *intel_dp) { struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; @@ -444,6 +449,10 @@ static void intel_dp_set_source_rates(struct
intel_dp*intel_dp) {drivers/gpu/drm/i915/display/intel_dp.c +2
-0/* The values must be in increasing order */ +static const int mtl_rates[] = { +162000 ,216000 ,243000 ,270000 ,324000 ,432000 ,540000 ,675000,
drivers/gpu/drm/i915/display/intel_dp.c static void
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ 810000, + };static const int icl_rates[] = {162000 ,216000 ,270000 ,324000 ,432000 ,540000 ,648000 ,810000,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-01000000, 1350000,@@ -469,7 +478,11 @@ intel_dp_set_source_rates(struct intel_dp *intel_dp)drm_WARN_ON (&dev_priv->drm, intel_dp->source_rates || intel_dp->num_source_rates);
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_set_source_rates(struct intel_dp *intel_dp) · line 488
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-1-if (DISPLAY_VER (dev_priv) >=11 ) { +if (DISPLAY_VER (dev_priv) >=14 ) { + source_rates = mtl_rates; + size =ARRAY_SIZE (mtl_rates); + max_rate =mtl_max_source_rate (intel_dp); + }else if (DISPLAY_VER (dev_priv) >=11 ) { source_rates = icl_rates; size =ARRAY_SIZE (icl_rates);if (IS_DG2 (dev_priv))All of the changes to
intel_dp.cshould be a separate patch.
Ok. I will split this patch so this one is separated from this patch
Quoted 50 lines
Quoted 20 lines
drivers/gpu/drm/i915/display/intel_dpll.c +2
-0@@ -1533,6 +1533,8 @@ intel_dpll_init_clock_hook(struct drm_i915_private *dev_priv) {if (DISPLAY_VER (dev_priv) >=14 ) dev_priv->display.funcs.dpll = &mtl_dpll_funcs; +else if (DISPLAY_VER (dev_priv) >=14 ) + dev_priv->display.funcs.dpll = &mtl_dpll_funcs;else if (IS_DG2 (dev_priv)) dev_priv->display.funcs.dpll = &dg2_dpll_funcs; else if (DISPLAY_VER(dev_priv) >= 9 || HAS_DDI(dev_priv)) diff --git
a/drivers/gpu/drm/i915/i915_reg.hb/drivers/gpu/drm/i915/i915_reg.hindex5003a5ffbc6a..5e6ff9f2aa10100644drivers/gpu/drm/i915/i915_reg.h line 2127
Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +4
-0@@ -2121,6 +2121,11 @@#define TRANS_PUSH_EN REG_BIT(31)#define TRANS_PUSH_SEND REG_BIT(30) +/* DDI Buffer Control */ +#define _DDI_CLK_VALFREQ_A 0x64030 +#define _DDI_CLK_VALFREQ_B 0x64130 +#define DDI_CLK_VALFREQ (port) _MMIO_PORT(port,
_DDI_CLK_VALFREQ_A,_DDI_CLK_VALFREQ_B)Quoted 22 lines
drivers/gpu/drm/i915/i915_reg.h +15
-0+/* * HSW+ eDP PSR registers * @@ -8375,4 +8380,140 @@ enum skl_power_gate {#define MTL_MEDIA_GSI_BASE 0x380000 +#define PUNIT_MMIO_CR_POC_STRAPS _MMIO(0x281078) +#define NUM_TILES_MASK REG_GENMASK(1, 0) +#define CD_ALIVE REG_BIT(2) +#define SOCKET_ID_MASK REG_GENMASK(7, 3) + +/* Define the BAR and offset for the accelerator fabric CSRs */ +#define CD_BASE_OFFSET 0x291000 #define CD_BAR_SIZE (256 * 1024) + +/* +* In general, the i915 should not touch the IAF registers. The +registers +* will be passed as an IO resource via the MFD interface. However, +it +* is necessary to put the IRQ bits in a known state, before the MFD
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8398
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +4
-0+cell + * is registered. + * + * So define these registers for i915 usage.These should probably be split to a separate
_regsfile, like we've been doing for other registers. Especially because "In general, the i915 should not touch the IAF registers."
Maybe these could be moved into intel_cx0_reg_defs.h file?
Quoted 191 lines
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate {
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +8
-0+*/ +#define CPORT_MBDB_CSRS (CD_BASE_OFFSET + 0x6000) #define +CPORT_MBDB_CSRS_END (CPORT_MBDB_CSRS + 0x1000) #define +CPORT_MBDB_INT_ENABLE_MASK _MMIO(CPORT_MBDB_CSRS + 0x8) + +#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_A 0x64040 +#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_B 0x64140 +#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC10x16F240drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8409
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC20x16F440drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8410
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC30x16F640drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8411
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC40x16F840drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8412
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _XELPDP_PORT_M2P_MSGBUS_CTL (port, lane)(_PICK(port, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8413
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_A] =
_XELPDP_PORT_M2P_MSGBUS_CTL_LN0_A, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8414
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_B] =
_XELPDP_PORT_M2P_MSGBUS_CTL_LN0_B, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8415
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC1] =
_XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC1, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8416
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC2] =
_XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC2, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8417
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC3] =
_XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC3, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8418
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC4] =
_XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC4) + ((lane)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8421
Quoted 3 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0+* 4)) + +#define XELPDP_PORT_M2P_MSGBUS_CTL (port, lane)_MMIO(_XELPDP_PORT_M2P_MSGBUS_CTL(port, lane))drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8422
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_M2P_TRANSACTION_PENDING REG_BIT(31)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8423
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_M2P_COMMAND_TYPE_MASK REG_GENMASK(30, 27)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8424
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_M2P_COMMAND_WRITE_UNCOMMITTED REG_FIELD_PREP(XELPDP_PORT_M2P_COMMAND_TYPE_MASK, 0x1)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8425
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_M2P_COMMAND_WRITE_COMMITTED REG_FIELD_PREP(XELPDP_PORT_M2P_COMMAND_TYPE_MASK, 0x2)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8426
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_M2P_COMMAND_READ REG_FIELD_PREP(XELPDP_PORT_M2P_COMMAND_TYPE_MASK, 0x3)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8427
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_M2P_DATA_MASK REG_GENMASK(23, 16)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8428
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_M2P_DATA (val)
REG_FIELD_PREP(XELPDP_PORT_M2P_DATA_MASK, val)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8430
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define XELPDP_PORT_M2P_TRANSACTION_RESET REG_BIT(15) +#define XELPDP_PORT_M2P_ADDRESS_MASK REG_GENMASK(11, 0)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8431
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_M2P_ADDRESS (val)
REG_FIELD_PREP(XELPDP_PORT_M2P_ADDRESS_MASK, val)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8433
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+ +#define XELPDP_PORT_P2M_MSGBUS_STATUS (port, lane)_MMIO(_XELPDP_PORT_M2P_MSGBUS_CTL(port, lane) + 8)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8434
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_P2M_RESPONSE_READY REG_BIT(31)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8435
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_P2M_COMMAND_TYPE_MASK REG_GENMASK(30, 27)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate {
Quoted 3 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0+#define XELPDP_PORT_P2M_COMMAND_READ_ACK 0x4 +#define XELPDP_PORT_P2M_COMMAND_WRITE_ACK 0x5 +#define XELPDP_PORT_P2M_DATA_MASK REG_GENMASK(23, 16)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8439
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_P2M_DATA (val)
REG_FIELD_PREP(XELPDP_PORT_P2M_DATA_MASK, val)Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +4
-0+#define XELPDP_PORT_P2M_ERROR_SET REG_BIT(15) + +#define XELPDP_MSGBUS_TIMEOUT_SLOW 1 +#define XELPDP_MSGBUS_TIMEOUT_FAST_US 2drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate {
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +10
-0+#define XELPDP_PCLK_PLL_ENABLE_TIMEOUT_US 3200 +#define XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US 20 +#define XELPDP_PORT_BUF_SOC_READY_TIMEOUT_US 100 +#define XELPDP_PORT_RESET_START_TIMEOUT_US 5 +#define XELPDP_PORT_RESET_END_TIMEOUT 15 +#define XELPDP_REFCLK_ENABLE_TIMEOUT_US 1 + +#define _XELPDP_PORT_BUF_CTL1_LN0_A 0x64004 +#define _XELPDP_PORT_BUF_CTL1_LN0_B 0x64104 +#define _XELPDP_PORT_BUF_CTL1_LN0_USBC10x16F200drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8454
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _XELPDP_PORT_BUF_CTL1_LN0_USBC20x16F400drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8455
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _XELPDP_PORT_BUF_CTL1_LN0_USBC30x16F600drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8456
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _XELPDP_PORT_BUF_CTL1_LN0_USBC40x16F800drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8458
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define _XELPDP_PORT_BUF_CTL1 (port) (_PICK(port, \ + [PORT_A] =
_XELPDP_PORT_BUF_CTL1_LN0_A, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8459
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_B] =
_XELPDP_PORT_BUF_CTL1_LN0_B, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8460
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC1] =
_XELPDP_PORT_BUF_CTL1_LN0_USBC1, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8461
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC2] =
_XELPDP_PORT_BUF_CTL1_LN0_USBC2, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8462
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC3] =
_XELPDP_PORT_BUF_CTL1_LN0_USBC3, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8463
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC4] =
_XELPDP_PORT_BUF_CTL1_LN0_USBC4))drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8465
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+ +#define XELPDP_PORT_BUF_CTL1 (port)_MMIO(_XELPDP_PORT_BUF_CTL1(port))drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8466
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_BUF_SOC_PHY_READY REG_BIT(24)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8468
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define XELPDP_PORT_REVERSAL REG_BIT(16) +#define XELPDP_PORT_WIDTH_MASK REG_GENMASK(3, 1)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8469
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PORT_WIDTH (val)
REG_FIELD_PREP(XELPDP_PORT_WIDTH_MASK, val)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8471
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+ +#define XELPDP_PORT_BUF_CTL2 (port)_MMIO(_XELPDP_PORT_BUF_CTL1(port) + 4)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate {
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h +5
-0+#define XELPDP_LANE0_PIPE_RESET REG_BIT(31) +#define XELPDP_LANE1_PIPE_RESET REG_BIT(30) +#define XELPDP_LANE0_PHY_CURRENT_STATUS REG_BIT(29) +#define XELPDP_LANE1_PHY_CURRENT_STATUS REG_BIT(28) +#define XELPDP_LANE0_POWERDOWN_UPDATE REG_BIT(25)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8477
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_LANE1_POWERDOWN_UPDATE REG_BIT(24)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8478
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_LANE0_POWERDOWN_NEW_STATE_MASK REG_GENMASK(23, 20)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8479
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_LANE0_POWERDOWN_NEW_STATE (val)REG_FIELD_PREP(XELPDP_LANE0_POWERDOWN_NEW_STATE_MASK,
val)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8480
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_LANE1_POWERDOWN_NEW_STATE_MASK REG_GENMASK(19, 16)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8481
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_LANE1_POWERDOWN_NEW_STATE (val)REG_FIELD_PREP(XELPDP_LANE1_POWERDOWN_NEW_STATE_MASK,
val)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8482
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_POWER_STATE_READY_MASK REG_GENMASK(7, 4)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8483
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_POWER_STATE_READY (val)
REG_FIELD_PREP(XELPDP_POWER_STATE_READY_MASK, val)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8485
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+ +#define XELPDP_PORT_BUF_CTL3 (port)_MMIO(_XELPDP_PORT_BUF_CTL1(port) + 8)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8486
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PLL_LANE_STAGGERING_DELAY_MASK REG_GENMASK(15, 8)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8487
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_PLL_LANE_STAGGERING_DELAY (val)
REG_FIELD_PREP(XELPDP_PLL_LANE_STAGGERING_DELAY_MASK, val)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8488
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_POWER_STATE_ACTIVE_MASK REG_GENMASK(3, 0)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8489
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_POWER_STATE_ACTIVE (val)
REG_FIELD_PREP(XELPDP_POWER_STATE_ACTIVE_MASK, val)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate {
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h +8
-0+ +#define _XELPDP_PORT_CLOCK_CTL_A 0x640E0 +#define _XELPDP_PORT_CLOCK_CTL_B 0x641E0 +#define _XELPDP_PORT_CLOCK_CTL_USBC1 0x16F260 +#define _XELPDP_PORT_CLOCK_CTL_USBC2 0x16F460 +#define _XELPDP_PORT_CLOCK_CTL_USBC3 0x16F660 +#define _XELPDP_PORT_CLOCK_CTL_USBC4 0x16F860 +#define XELPDP_PORT_CLOCK_CTL (port)_MMIO(_PICK(port, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8498
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_A] =
_XELPDP_PORT_CLOCK_CTL_A, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8499
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_B] =
_XELPDP_PORT_CLOCK_CTL_B, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8500
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC1] =
_XELPDP_PORT_CLOCK_CTL_USBC1, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8501
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC2] =
_XELPDP_PORT_CLOCK_CTL_USBC2, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8502
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC3] =
_XELPDP_PORT_CLOCK_CTL_USBC3, \drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8503
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+ [PORT_TC4] =
_XELPDP_PORT_CLOCK_CTL_USBC4))drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate {
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +10
-0+ +#define XELPDP_LANE0_PCLK_PLL_REQUEST REG_BIT(31) +#define XELPDP_LANE0_PCLK_PLL_ACK REG_BIT(30) +#define XELPDP_LANE0_PCLK_REFCLK_REQUEST REG_BIT(29) +#define XELPDP_LANE0_PCLK_REFCLK_ACK REG_BIT(28) +#define XELPDP_LANE1_PCLK_PLL_REQUEST REG_BIT(27) +#define XELPDP_LANE1_PCLK_PLL_ACK REG_BIT(26) +#define XELPDP_LANE1_PCLK_REFCLK_REQUEST REG_BIT(25) +#define XELPDP_LANE1_PCLK_REFCLK_ACK REG_BIT(24) +#define XELPDP_DDI_CLOCK_SELECT_MASK REG_GENMASK(15, 12)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8514
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define XELPDP_DDI_CLOCK_SELECT (val)
REG_FIELD_PREP(XELPDP_DDI_CLOCK_SELECT_MASK, val)drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 8519
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h +7
-0+#define XELPDP_DDI_CLOCK_SELECT_NONE 0x0 +#define XELPDP_DDI_CLOCK_SELECT_MAXPCLK 0x8 +#define XELPDP_FORWARD_CLOCK_UNGATE REG_BIT(10) +#define XELPDP_LANE1_PHY_CLOCK_SELECT REG_BIT(8) +#define XELPDP_SSC_ENABLE_PLLA REG_BIT(1) +#define XELPDP_SSC_ENABLE_PLLB REG_BIT(0) +#endif /* _I915_REG_H_ */ --
Jani Nikula, Intel Open Source Graphics Center
Jani Nikula
maintainerRe: [Intel-gfx] [PATCH 3/5] drm/i915/mtl: Add support for C10 phy programming
Quoted 1 line · Mika
Maybe these could be moved into
intel_cx0_reg_defs.hfile?
Register definitions to intel_cx0_regs.h. See
$ find drivers/gpu/drm/i915/ -name "*_regs.h"
Any common helpers such as REG_FIELD_GET8() and friends to i915_reg_defs.h where we already have some other sized helpers.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
PATCH 4/5 drm/i915/mtl: Add C10 phy programming for HDMI
In reply to Mika KaholaFrom: Radhakrishna Sripada <[email protected]>
Like DG2, we still don't have a proper algorithm that can be used for calculating PHY settings, but we do have tables of register values for a handful of the more common link rates. Some support is better than none, so let's go ahead and add/use these tables when we can, and also add some logic to hdmi_port_clock_valid() to filter the modelist to just the modes we can actually support with these link rates.
Hopefully we'll have a proper / non-encumbered algorithm to calculate these registers by the time we upstream and we'll be able to replace this patch with something more general purpose.
Bspec: 64568
--- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 168 ++++++++++++++++++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 + drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +- 3 files changed, 170 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_cx0_phy.c +164 -4
@@ -448,6 +448,152 @@ static const struct intel_c10mpllb_state * const mtl_c10_edp_tables[] = { NULL, }; +/* +* HDMI link rates with 38.4 MHz reference clock. +*/ + +static const struct intel_c10mpllb_state mtl_c10_hdmi_25_175 = { + .clock =25175 , + .pll[0 ] =0x4 , + .pll[1 ] =0 , + .pll[2 ] =0xB2 , + .pll[3 ] =0 , + .pll[4 ] =0 , + .pll[5 ] =0 , + .pll[6 ] =0 , + .pll[7 ] =0 , + .pll[8 ] =0x20 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0xD , + .pll[16 ] =0x6 , + .pll[17 ] =0x8F , + .pll[18 ] =0x84 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_hdmi_27_0 = { + .clock =27000 , + .pll[0 ] =0x34 , + .pll[1 ] =0 , + .pll[2 ] =0xC0 , + .pll[3 ] =0 , + .pll[4 ] =0 , + .pll[5 ] =0 , + .pll[6 ] =0 , + .pll[7 ] =0 , + .pll[8 ] =0x20 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0x80 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0xD , + .pll[16 ] =0x6 , + .pll[17 ] =0xCF , + .pll[18 ] =0x84 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_hdmi_74_25 = { + .clock =74250 , + .pll[0 ] =0xF4 , + .pll[1 ] =0 , + .pll[2 ] =0x7A , + .pll[3 ] =0 , + .pll[4 ] =0 , + .pll[5 ] =0 , + .pll[6 ] =0 , + .pll[7 ] =0 , + .pll[8 ] =0x20 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0x58 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0xB , + .pll[16 ] =0x6 , + .pll[17 ] =0xF , + .pll[18 ] =0x85 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_hdmi_148_5 = { + .clock =148500 , + .pll[0 ] =0xF4 , + .pll[1 ] =0 , + .pll[2 ] =0x7A , + .pll[3 ] =0 , + .pll[4 ] =0 , + .pll[5 ] =0 , + .pll[6 ] =0 , + .pll[7 ] =0 , + .pll[8 ] =0x20 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0x58 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0xA , + .pll[16 ] =0x6 , + .pll[17 ] =0xF , + .pll[18 ] =0x85 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state mtl_c10_hdmi_594 = { + .clock =594000 , + .pll[0 ] =0xF4 , + .pll[1 ] =0 , + .pll[2 ] =0x7A , + .pll[3 ] =0 , + .pll[4 ] =0 , + .pll[5 ] =0 , + .pll[6 ] =0 , + .pll[7 ] =0 , + .pll[8 ] =0x20 , + .pll[9 ] =0x1 , + .pll[10 ] =0 , + .pll[11 ] =0 , + .pll[12 ] =0x58 , + .pll[13 ] =0 , + .pll[14 ] =0 , + .pll[15 ] =0x8 , + .pll[16 ] =0x6 , + .pll[17 ] =0xF , + .pll[18 ] =0x85 , + .pll[19 ] =0x23 , +}; + +static const struct intel_c10mpllb_state *const mtl_c10_hdmi_tables[] = { + &mtl_c10_hdmi_25_175, + &mtl_c10_hdmi_27_0, + &mtl_c10_hdmi_74_25, + &mtl_c10_hdmi_148_5, + &mtl_c10_hdmi_594, +NULL , +}; + +int intel_c10_phy_check_hdmi_link_rate (int clock) +{ +const struct intel_c10mpllb_state *const *tables = mtl_c10_hdmi_tables; +int i; + +for (i =0 ; tables[i]; i++) { +if (clock == tables[i]->clock) +return MODE_OK ; + } + +return MODE_CLOCK_RANGE ; +} +static const struct intel_c10mpllb_state *const *intel_c10_mpllb_tables_get (struct intel_crtc_state *crtc_state,struct intel_encoder *encoder)
@@ -457,9 +603,10 @@ intel_c10_mpllb_tables_get(struct intel_crtc_state *crtc_state,return mtl_c10_edp_tables; else return mtl_c10_dp_tables; + }else if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )) { +return mtl_c10_hdmi_tables; } -/* TODO: Add HDMI Support */ MISSING_CASE (encoder->type);return NULL ; }
@@ -467,9 +614,20 @@ intel_c10_mpllb_tables_get(struct intel_crtc_state *crtc_state,static int intel_c10mpllb_calc_state (struct intel_crtc_state *crtc_state,struct intel_encoder *encoder) { +struct drm_i915_private *i915 =to_i915 (encoder->base.dev);const struct intel_c10mpllb_state *const *tables; +enum phy phy =intel_port_to_phy (i915, encoder->port);int i; +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )) { +if (intel_c10_phy_check_hdmi_link_rate (crtc_state->port_clock) + !=MODE_OK ) { +drm_dbg_kms (&i915->drm,"Can't support HDMI link rate %d on phy %c.\n" , + crtc_state->port_clock,phy_name (phy)); +return -EINVAL ; + } + } + tables =intel_c10_mpllb_tables_get (crtc_state, encoder);if (!tables)return -EINVAL ;
@@ -521,7 +679,8 @@ void intel_c10mpllb_readout_hw_state(struct intel_encoder *encoder, cmn =intel_cx0_read (i915, encoder->port, lane,PHY_C10_VDR_CMN (0 )); tx0 =intel_cx0_read (i915, encoder->port, lane,PHY_C10_VDR_TX (0 )); -if (tx0 !=C10_TX0_VAL || cmn !=C10_CMN0_DP_VAL ) +if (tx0 !=C10_TX0_VAL || cmn != (intel_encoder_is_dp (encoder) ? +C10_CMN0_DP_VAL :C10_CMN0_HDMI_VAL ))drm_warn (&i915->drm,"Unexpected tx: %x or cmn: %x for phy: %c.\n" , tx0, cmn,phy_name (phy)); }
@@ -537,11 +696,10 @@ static void intel_c10_pll_program(struct drm_i915_private *i915,INTEL_CX0_LANE0 ;enum intel_cx0_lanes follower_lane = lane_reversal ?INTEL_CX0_LANE0 :INTEL_CX0_LANE1 ; -int i;struct intel_dp *intel_dp;bool use_ssc = false; -u8 cmn0 =0 ; +u8 cmn0;if (intel_crtc_has_dp_encoder (crtc_state)) { intel_dp =enc_to_intel_dp (encoder);
@@ -552,6 +710,8 @@ static void intel_c10_pll_program(struct drm_i915_private *i915, use_ssc = false; cmn0 =C10_CMN0_DP_VAL ; + }else { + cmn0 =C10_CMN0_HDMI_VAL ; } intel_cx0_write(i915, encoder->port, INTEL_CX0_BOTH_LANES, PHY_C10_VDR_CONTROL(1),
drivers/gpu/drm/i915/display/intel_cx0_phy.h +2 -0
@@ -96,6 +96,7 @@ enum intel_cx0_lanes {#define C10_PLL15_TXCLKDIV_MASK REG_GENMASK8(2, 0)#define PHY_C10_VDR_CMN (idx) (0xC20 + (idx))#define C10_CMN0_DP_VAL 0x21 +#define C10_CMN0_HDMI_VAL 0x1#define C10_CMN3_TXVBOOST_MASK REG_GENMASK8(7, 5)#define C10_CMN3_TXVBOOST (val) REG_FIELD_PREP8(C10_CMN3_TXVBOOST_MASK, val)#define PHY_C10_VDR_TX (idx) (0xC30 + (idx))
@@ -141,5 +142,6 @@ int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder, const struct intel_c10mpllb_state *pll_state);void intel_c10mpllb_state_verify (struct intel_atomic_state *state,struct intel_crtc_state *new_crtc_state); +int intel_c10_phy_check_hdmi_link_rate (int clock);#endif /* __INTEL_CX0_PHY_H__ */
drivers/gpu/drm/i915/display/intel_hdmi.c +4 -1
@@ -44,6 +44,7 @@#include "i915_drv.h" #include "intel_atomic.h" #include "intel_connector.h" +#include "intel_cx0_phy.h" #include "intel_ddi.h" #include "intel_de.h" #include "intel_display_types.h"
@@ -1875,7 +1876,9 @@ hdmi_port_clock_valid(struct intel_hdmi *hdmi,* FIXME: We will hopefully get an algorithmic way of programming * the MPLLB for HDMI in the future. */ -if (IS_DG2 (dev_priv)) +if (IS_METEORLAKE (dev_priv)) +return intel_c10_phy_check_hdmi_link_rate (clock); +else if (IS_DG2 (dev_priv))return intel_snps_phy_check_hdmi_link_rate (clock);return MODE_OK ;
Signature · 1 line
2.34.1
PATCH 5/5 drm/i915/mtl: Add vswing programming for C10 phys
In reply to Mika KaholaFrom: Radhakrishna Sripada <[email protected]>
C10 phys uses direct mapping internally for voltage and pre-emphasis levels. Program the levels directly to the fields in the VDR Registers.
Bspec: 65449
--- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 157 +++++++++++++++--- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 8 + drivers/gpu/drm/i915/display/intel_ddi.c | 4 +- .../drm/i915/display/intel_ddi_buf_trans.c | 36 +++- .../drm/i915/display/intel_ddi_buf_trans.h | 6 + .../i915/display/intel_display_power_map.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 1 + 7 files changed, 187 insertions(+), 26 deletions(-)
drivers/gpu/drm/i915/display/intel_cx0_phy.c +133 -24
@@ -4,12 +4,24 @@*/ #include "intel_cx0_phy.h" +#include "intel_ddi.h" +#include "intel_ddi_buf_trans.h" #include "intel_de.h" #include "intel_display_types.h" #include "intel_dp.h" #include "intel_panel.h" +#include "intel_psr.h" #include "intel_uncore.h" +static void +assert_dc_off (struct drm_i915_private *i915) +{ +bool enabled; + + enabled =intel_display_power_is_enabled (i915,POWER_DOMAIN_DC_OFF ); +drm_WARN_ON (&i915->drm, !enabled); +} +static void intel_cx0_bus_reset (struct drm_i915_private *i915,enum port port,int lane) {enum phy phy =intel_port_to_phy (i915, port);
@@ -37,6 +49,8 @@ static u8 intel_cx0_read(struct drm_i915_private *i915, enum port port,u32 val =0 ;int attempts =0 ; +assert_dc_off (i915); + retry:if (attempts ==3 ) {drm_err_once (&i915->drm,"PHY %c Read %04x failed after %d retries. Status: 0x%x\n" ,phy_name (phy), addr, attempts, val ?:0 );
@@ -126,6 +140,8 @@ static void __intel_cx0_write(struct drm_i915_private *i915, enum port port,enum phy phy =intel_port_to_phy (i915, port);int attempts =0 ; +assert_dc_off (i915); + retry:if (attempts ==3 ) {drm_err_once (&i915->drm,"PHY %c Write %04x failed after %d retries.\n" ,phy_name (phy), addr, attempts);
@@ -204,6 +220,76 @@ static void intel_cx0_rmw(struct drm_i915_private *i915, enum port port, } } +/* +* Prepare HW for CX0 phy transactions. +* +* It is required that PSR and DC5/6 are disabled before any CX0 message +* bus transaction is executed. +*/ +static intel_wakeref_t intel_cx0_phy_transaction_begin (struct intel_encoder *encoder) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); + +intel_psr_pause (intel_dp); +return intel_display_power_get (i915,POWER_DOMAIN_DC_OFF ); +} + +static void intel_cx0_phy_transaction_end (struct intel_encoder *encoder,intel_wakeref_t wakeref) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); + +intel_psr_resume (intel_dp); +intel_display_power_put (i915,POWER_DOMAIN_DC_OFF , wakeref); +} + +void intel_cx0_phy_set_signal_levels (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +bool lane_reversal = dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; +enum intel_cx0_lanes master_lane = lane_reversal ?INTEL_CX0_LANE1 : +INTEL_CX0_LANE0 ; +const struct intel_ddi_buf_trans *trans; +intel_wakeref_t wakeref; +int n_entries, ln; + + wakeref =intel_cx0_phy_transaction_begin (encoder); + + trans = encoder->get_buf_trans (encoder, crtc_state, &n_entries); +if (drm_WARN_ON_ONCE (&i915->drm, !trans)) +return ; + +intel_cx0_rmw (i915, encoder->port,INTEL_CX0_BOTH_LANES ,PHY_C10_VDR_CONTROL (1 ), +0 ,C10_VDR_CTRL_MSGBUS_ACCESS ,MB_WRITE_COMMITTED ); + +for (ln =0 ; ln <4 ; ln++) { +int level =intel_ddi_level (encoder, crtc_state, ln); +int lane, tx; + + lane = ln /2 ; + tx = ln %2 +1 ; + +intel_cx0_rmw (i915, encoder->port, lane,PHY_CX0_TX_CONTROL (tx,2 ), +C10_PHY_VSWING_PREEMPH_MASK , +C10_PHY_VSWING_PREEMPH (trans->entries[level].direct.preemph), +MB_WRITE_COMMITTED ); +intel_cx0_rmw (i915, encoder->port, lane,PHY_CX0_TX_CONTROL (tx,8 ), +C10_PHY_VSWING_LEVEL_MASK , +C10_PHY_VSWING_LEVEL (trans->entries[level].direct.level), +MB_WRITE_COMMITTED ); + } + +intel_cx0_write (i915, encoder->port, !master_lane,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_UPDATE_CFG ,MB_WRITE_COMMITTED ); +intel_cx0_write (i915, encoder->port, master_lane,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MASTER_LANE |C10_VDR_CTRL_UPDATE_CFG , +MB_WRITE_COMMITTED ); +intel_cx0_phy_transaction_end (encoder, wakeref); +} +/* * Basic DP link rates with 38.4 MHz reference clock. * Note: The tables below are with SSC. In non-ssc
@@ -662,9 +748,12 @@ void intel_c10mpllb_readout_hw_state(struct intel_encoder *encoder,enum intel_cx0_lanes lane = lane_reversal ?INTEL_CX0_LANE1 :INTEL_CX0_LANE0 ;enum phy phy =intel_port_to_phy (i915, encoder->port); +intel_wakeref_t wakeref;int i;u8 cmn, tx0; + wakeref =intel_cx0_phy_transaction_begin (encoder); +/* * According to C10 VDR Register programming Sequence we need * to do this to read PHY internal registers from MsgBus.
@@ -683,6 +772,8 @@ void intel_c10mpllb_readout_hw_state(struct intel_encoder *encoder, C10_CMN0_DP_VAL : C10_CMN0_HDMI_VAL)) drm_warn(&i915->drm, "Unexpected tx: %x or cmn: %x for phy: %c.\n", tx0, cmn, phy_name(phy)); + +intel_cx0_phy_transaction_end (encoder, wakeref); } static void intel_c10_pll_program(struct drm_i915_private *i915,
@@ -839,17 +930,20 @@ static void intel_program_port_clock_ctl(struct intel_encoder *encoder,if (intel_crtc_has_dp_encoder (crtc_state)) { intel_dp =enc_to_intel_dp (encoder); - ssc_enabled = intel_dp->dpcd[DP_MAX_DOWNSPREAD ] & -DP_MAX_DOWNSPREAD_0_5 ; + ssc_enabled = (intel_dp->dpcd[DP_MAX_DOWNSPREAD ] & +DP_MAX_DOWNSPREAD_0_5 ); + +if (intel_dp_is_edp (intel_dp) && !intel_panel_use_ssc (i915)) + ssc_enabled = false;/* TODO: DP2.0 10G and 20G rates enable MPLLA*/ val |= ssc_enabled ?XELPDP_SSC_ENABLE_PLLB :0 ; } +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port), -XELPDP_LANE1_PHY_CLOCK_SELECT | -XELPDP_FORWARD_CLOCK_UNGATE | +XELPDP_LANE1_PHY_CLOCK_SELECT |XELPDP_FORWARD_CLOCK_UNGATE |XELPDP_DDI_CLOCK_SELECT_MASK | -XELPDP_SSC_ENABLE_PLLB , val); +XELPDP_SSC_ENABLE_PLLA |XELPDP_SSC_ENABLE_PLLB , val); } static void intel_cx0_powerdown_change_sequence(struct drm_i915_private *i915,
@@ -859,16 +953,16 @@ static void intel_cx0_powerdown_change_sequence(struct drm_i915_private *i915,enum phy phy =intel_port_to_phy (i915, port);intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), -PHY_LANES_VAL (POWERDOWN_NEW_STATE_MASK , lane), +PHY_LANES_VAL (POWERDOWN_NEW_STATE_MASK ,INTEL_CX0_BOTH_LANES ),PHY_LANES_VAL_ARG (POWERDOWN_NEW_STATE , lane, state));intel_de_rmw (i915,XELPDP_PORT_BUF_CTL2 (port), -PHY_LANES_VAL (POWERDOWN_UPDATE , lane), +PHY_LANES_VAL (POWERDOWN_UPDATE ,INTEL_CX0_BOTH_LANES ),PHY_LANES_VAL (POWERDOWN_UPDATE , lane));/* Update Timeout Value */ if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_BUF_CTL2 (port),PHY_LANES_VAL (POWERDOWN_UPDATE , lane),0 , -XELPDP_PORT_RESET_START_TIMEOUT_US ,0 ,NULL )) +XELPDP_PORT_POWERDOWN_UPDATE_TIMEOUT_US ,0 ,NULL ))drm_warn (&i915->drm,"PHY %c failed to bring out of Lane reset after %dus.\n" ,phy_name (phy),XELPDP_PORT_RESET_START_TIMEOUT_US ); }
@@ -912,11 +1006,11 @@ static void intel_cx0_phy_lane_reset(struct drm_i915_private *i915, enum port po phy_name(phy), XELPDP_PORT_RESET_START_TIMEOUT_US);intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (port), -PHY_LANES_VAL (PCLK_REFCLK_REQUEST , lane), +PHY_LANES_VAL (PCLK_REFCLK_REQUEST ,INTEL_CX0_BOTH_LANES ),PHY_LANES_VAL (PCLK_REFCLK_REQUEST , lane));if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_CLOCK_CTL (port), -PHY_LANES_VAL (PCLK_REFCLK_ACK , lane), +PHY_LANES_VAL (PCLK_REFCLK_ACK ,INTEL_CX0_BOTH_LANES ),PHY_LANES_VAL (PCLK_REFCLK_ACK , lane),XELPDP_REFCLK_ENABLE_TIMEOUT_US ,0 ,NULL )) drm_warn(&i915->drm, "PHY %c failed to request refclk after %dus.\n",
@@ -943,9 +1037,12 @@ static void intel_c10_program_phy_lane(struct drm_i915_private *i915, {u8 l0t1, l0t2, l1t1, l1t2; -intel_cx0_rmw (i915, port,INTEL_CX0_BOTH_LANES ,PHY_C10_VDR_CONTROL (1 ), -C10_VDR_CTRL_MSGBUS_ACCESS ,C10_VDR_CTRL_MSGBUS_ACCESS , -MB_WRITE_COMMITTED ); +intel_cx0_rmw (i915, port,1 ,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MSGBUS_ACCESS |C10_VDR_CTRL_UPDATE_CFG , +C10_VDR_CTRL_MSGBUS_ACCESS ,MB_WRITE_COMMITTED ); +intel_cx0_rmw (i915, port,0 ,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_MSGBUS_ACCESS |C10_VDR_CTRL_UPDATE_CFG , +C10_VDR_CTRL_MASTER_LANE |C10_VDR_CTRL_MSGBUS_ACCESS ,MB_WRITE_COMMITTED ); l0t1 =intel_cx0_read (i915, port,0 ,PHY_CX0_TX_CONTROL (1 ,2 )); l0t2 =intel_cx0_read (i915, port,0 ,PHY_CX0_TX_CONTROL (2 ,2 ));
@@ -996,8 +1093,12 @@ static void intel_c10_program_phy_lane(struct drm_i915_private *i915, } } -intel_cx0_rmw (i915, port,INTEL_CX0_BOTH_LANES ,PHY_C10_VDR_CONTROL (1 ), -C10_VDR_CTRL_UPDATE_CFG ,C10_VDR_CTRL_UPDATE_CFG ,MB_WRITE_COMMITTED ); +intel_cx0_rmw (i915, port,1 ,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_UPDATE_CFG |C10_VDR_CTRL_MSGBUS_ACCESS , +C10_VDR_CTRL_UPDATE_CFG ,MB_WRITE_COMMITTED ); +intel_cx0_rmw (i915, port,0 ,PHY_C10_VDR_CONTROL (1 ), +C10_VDR_CTRL_UPDATE_CFG |C10_VDR_CTRL_MSGBUS_ACCESS , +C10_VDR_CTRL_MASTER_LANE |C10_VDR_CTRL_UPDATE_CFG ,MB_WRITE_COMMITTED ); } static void intel_c10pll_enable(struct intel_encoder *encoder,
@@ -1050,12 +1151,13 @@ static void intel_c10pll_enable(struct intel_encoder *encoder,* 8. Set PORT_CLOCK_CTL register PCLK PLL Request * LN<Lane for maxPCLK> to "1" to enable PLL. */ -intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port),0 , +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port), +PHY_LANES_VAL (PCLK_PLL_REQUEST ,INTEL_CX0_BOTH_LANES ),PHY_LANES_VAL (PCLK_PLL_REQUEST , maxpclk_lane));/* 9. Poll on PORT_CLOCK_CTL PCLK PLL Ack LN<Lane for maxPCLK> == "1". */ if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_CLOCK_CTL (encoder->port), -PHY_LANES_VAL (PCLK_PLL_ACK , maxpclk_lane), +PHY_LANES_VAL (PCLK_PLL_ACK ,INTEL_CX0_BOTH_LANES ),PHY_LANES_VAL (PCLK_PLL_ACK , maxpclk_lane),XELPDP_PCLK_PLL_ENABLE_TIMEOUT_US ,0 ,NULL )) drm_warn(&i915->drm, "Port %c PLL not locked after %dus.\n",
@@ -1072,19 +1174,20 @@ void intel_cx0pll_enable(struct intel_encoder *encoder, {struct drm_i915_private *i915 =to_i915 (encoder->base.dev);enum phy phy =intel_port_to_phy (i915, encoder->port); +intel_wakeref_t wakeref; + + wakeref =intel_cx0_phy_transaction_begin (encoder);drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy));intel_c10pll_enable (encoder, crtc_state); + +intel_cx0_phy_transaction_end (encoder, wakeref); }static void intel_c10pll_disable (struct intel_encoder *encoder) {struct drm_i915_private *i915 =to_i915 (encoder->base.dev);enum phy phy =intel_port_to_phy (i915, encoder->port); -struct intel_digital_port *dig_port =enc_to_dig_port (encoder); -bool lane_reversal = dig_port->saved_port_bits &DDI_BUF_PORT_REVERSAL ; -enum intel_cx0_lanes lane = lane_reversal ?INTEL_CX0_LANE1 : -INTEL_CX0_LANE0 ;/* 1. Change owned PHY lane power to Disable state. */ intel_cx0_powerdown_change_sequence(i915, encoder->port, INTEL_CX0_BOTH_LANES,
@@ -1110,8 +1213,8 @@ static void intel_c10pll_disable(struct intel_encoder *encoder)* 5. Poll on PORT_CLOCK_CTL PCLK PLL Ack LN<Lane for maxPCLK**> == "0". */ if (__intel_wait_for_register (&i915->uncore,XELPDP_PORT_CLOCK_CTL (encoder->port), -PHY_LANES_VAL (PCLK_PLL_ACK , lane) | -PHY_LANES_VAL (PCLK_REFCLK_ACK , lane),0 , +PHY_LANES_VAL (PCLK_PLL_ACK ,INTEL_CX0_BOTH_LANES ) | +PHY_LANES_VAL (PCLK_REFCLK_ACK ,INTEL_CX0_BOTH_LANES ),0 ,XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US ,0 ,NULL ))drm_warn (&i915->drm,"Port %c PLL not unlocked after %dus.\n" ,phy_name (phy),XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US );
@@ -1123,7 +1226,8 @@ static void intel_c10pll_disable(struct intel_encoder *encoder)/* 7. Program PORT_CLOCK_CTL register to disable and gate clocks. */ intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port), -XELPDP_DDI_CLOCK_SELECT_MASK | +XELPDP_DDI_CLOCK_SELECT_MASK ,0 ); +intel_de_rmw (i915,XELPDP_PORT_CLOCK_CTL (encoder->port),XELPDP_FORWARD_CLOCK_UNGATE ,0 ); }
@@ -1131,9 +1235,14 @@ void intel_cx0pll_disable(struct intel_encoder *encoder) {struct drm_i915_private *i915 =to_i915 (encoder->base.dev);enum phy phy =intel_port_to_phy (i915, encoder->port); +intel_wakeref_t wakeref; + + wakeref =intel_cx0_phy_transaction_begin (encoder);drm_WARN_ON (&i915->drm, !intel_is_c10phy (i915, phy));intel_c10pll_disable (encoder); + +intel_cx0_phy_transaction_end (encoder, wakeref); }#undef PHY_LANES_VAL_ARG
drivers/gpu/drm/i915/display/intel_cx0_phy.h +8 -0
@@ -120,6 +120,12 @@ enum intel_cx0_lanes {#define PHY_CX0_TX_CONTROL (tx, control) (0x400 + ((tx) - 1) * 0x200 + (control))#define CONTROL2_DISABLE_SINGLE_TX REG_BIT(6) +/* C10 Phy VSWING Masks */ +#define C10_PHY_VSWING_LEVEL_MASK REG_GENMASK8(2, 0) +#define C10_PHY_VSWING_LEVEL (val) REG_FIELD_PREP8(C10_PHY_VSWING_LEVEL_MASK, val) +#define C10_PHY_VSWING_PREEMPH_MASK REG_GENMASK8(1, 0) +#define C10_PHY_VSWING_PREEMPH (val) REG_FIELD_PREP8(C10_PHY_VSWING_PREEMPH_MASK, val) +static inline bool intel_is_c10phy (struct drm_i915_private *dev_priv,enum phy phy) {if (!IS_METEORLAKE (dev_priv))
@@ -143,5 +149,7 @@ int intel_c10mpllb_calc_port_clock(struct intel_encoder *encoder,void intel_c10mpllb_state_verify (struct intel_atomic_state *state,struct intel_crtc_state *new_crtc_state);int intel_c10_phy_check_hdmi_link_rate (int clock); +void intel_cx0_phy_set_signal_levels (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state);#endif /* __INTEL_CX0_PHY_H__ */
drivers/gpu/drm/i915/display/intel_ddi.c +3 -1
@@ -4445,7 +4445,9 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) encoder->get_config = hsw_ddi_get_config; } -if (IS_DG2 (dev_priv)) { +if (DISPLAY_VER (dev_priv) >=14 ) { + encoder->set_signal_levels = intel_cx0_phy_set_signal_levels; + }else if (IS_DG2 (dev_priv)) { encoder->set_signal_levels = intel_snps_phy_set_signal_levels; }else if (DISPLAY_VER (dev_priv) >=12 ) {if (intel_phy_is_combo (dev_priv, phy))
drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c +35 -1
@@ -1035,6 +1035,30 @@ static const struct intel_ddi_buf_trans dg2_snps_trans_uhbr = { .num_entries = ARRAY_SIZE(_dg2_snps_trans_uhbr), }; +/* +* Some platforms don't need a mapping table and only expect us to +* to program the vswing + preemphasis levels directly since the +* hardware will do its own mapping to tuning values internally. +*/ +static const union intel_ddi_buf_trans_entry direct_map_trans[] = { + { .direct = { .level =0 , .preemph =0 } }, + { .direct = { .level =0 , .preemph =1 } }, + { .direct = { .level =0 , .preemph =2 } }, + { .direct = { .level =0 , .preemph =3 } }, + { .direct = { .level =1 , .preemph =0 } }, + { .direct = { .level =1 , .preemph =0 } }, + { .direct = { .level =1 , .preemph =2 } }, + { .direct = { .level =2 , .preemph =0 } }, + { .direct = { .level =2 , .preemph =1 } }, + { .direct = { .level =3 , .preemph =0 } }, +}; + +static const struct intel_ddi_buf_trans mtl_cx0c10_trans = { + .entries = direct_map_trans, + .num_entries =ARRAY_SIZE (direct_map_trans), + .hdmi_default_entry =ARRAY_SIZE (direct_map_trans) -1 , +}; +bool is_hobl_buf_trans (const struct intel_ddi_buf_trans *table) {return table == &tgl_combo_phy_trans_edp_hbr2_hobl;
@@ -1606,12 +1630,22 @@ dg2_get_snps_buf_trans(struct intel_encoder *encoder,return intel_get_buf_trans (&dg2_snps_trans, n_entries); } +static const struct intel_ddi_buf_trans * +mtl_get_cx0_buf_trans (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state, +int *n_entries) +{ +return intel_get_buf_trans (&mtl_cx0c10_trans, n_entries); +} +void intel_ddi_buf_trans_init (struct intel_encoder *encoder) {struct drm_i915_private *i915 =to_i915 (encoder->base.dev);enum phy phy =intel_port_to_phy (i915, encoder->port); -if (IS_DG2 (i915)) { +if (DISPLAY_VER (i915) >=14 ) { + encoder->get_buf_trans = mtl_get_cx0_buf_trans; + }else if (IS_DG2 (i915)) { encoder->get_buf_trans = dg2_get_snps_buf_trans; }else if (IS_ALDERLAKE_P (i915)) {if (intel_phy_is_combo (i915, phy))
drivers/gpu/drm/i915/display/intel_ddi_buf_trans.h +6 -0
@@ -51,6 +51,11 @@ struct dg2_snps_phy_buf_trans {u8 post_cursor; }; +struct direct_phy_buf_trans { +u8 level; +u8 preemph; +}; +union intel_ddi_buf_trans_entry {struct hsw_ddi_buf_trans hsw;struct bxt_ddi_buf_trans bxt;
@@ -58,6 +63,7 @@ union intel_ddi_buf_trans_entry {struct icl_mg_phy_ddi_buf_trans mg;struct tgl_dkl_phy_ddi_buf_trans dkl;struct dg2_snps_phy_buf_trans snps; +struct direct_phy_buf_trans direct; };struct intel_ddi_buf_trans {
drivers/gpu/drm/i915/display/intel_display_power_map.c +1 -0
@@ -1374,6 +1374,7 @@ I915_DECL_PW_DOMAINS(xelpdp_pwdoms_dc_off,XELPDP_PW_2_POWER_DOMAINS ,POWER_DOMAIN_AUDIO_MMIO ,POWER_DOMAIN_MODESET , +POWER_DOMAIN_DC_OFF ,POWER_DOMAIN_AUX_A ,POWER_DOMAIN_AUX_B , POWER_DOMAIN_INIT);
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -8442,6 +8442,7 @@ enum skl_power_gate {#define XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US 20#define XELPDP_PORT_BUF_SOC_READY_TIMEOUT_US 100#define XELPDP_PORT_RESET_START_TIMEOUT_US 5 +#define XELPDP_PORT_POWERDOWN_UPDATE_TIMEOUT_US 100#define XELPDP_PORT_RESET_END_TIMEOUT 15#define XELPDP_REFCLK_ENABLE_TIMEOUT_US 1
Signature · 1 line
2.34.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/mtl: Add C10 phy support
In reply to Mika Kahola== Series Details ==
== Series Details ==
Series: drm/i915/mtl: Add C10 phy support
URL : https://patchwork.freedesktop.org/series/109248/
State : warning
== Summary ==
Error: dim checkpatch failed7a245d0165a3 drm/i915/mtl: Add Support for C10, C20 PHY Message Bus
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:19: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #19:
new file mode 100644
-:44: WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline #44: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:21:
+ drm_err_once(&i915->drm, "Failed to bring PHY %c to idle. \n", phy_name(phy));
-:50: WARNING:RETURN_VOID: void function return statements are not generally useful #50: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:27:
+ return;
+}
-:61: WARNING:LONG_LINE: line length of 142 exceeds 100 columns #61: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:38:
+ drm_err_once(&i915->drm, "PHY %c Read %04x failed after %d retries. Status: 0x%x\n", phy_name(phy), addr, attempts, val ?: 0);
-:69: WARNING:LONG_LINE: line length of 142 exceeds 100 columns #69: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:46:
+ drm_dbg(&i915->drm, "PHY %c Timeout waiting for previous transaction to complete. Reset the bus and retry.\n", phy_name(phy));
-:88: WARNING:LONG_LINE: line length of 120 exceeds 100 columns #88: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:65:
+ drm_dbg(&i915->drm, "PHY %c Timeout waiting for Read response ACK. Status: 0x%x\n", phy_name(phy), val);
-:96: WARNING:LONG_LINE: line length of 117 exceeds 100 columns #96: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:73:
+ drm_dbg(&i915->drm, "PHY %c Error occurred during read command. Status: 0x%x\n", phy_name(phy), val);
-:105: WARNING:LONG_LINE: line length of 110 exceeds 100 columns #105: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:82:
+ drm_dbg(&i915->drm, "PHY %c Not a Read response. MSGBUS Status: 0x%x.\n", phy_name(phy), val);
-:117: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #117: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:94:
+static int intel_cx0_wait_cwrite_ack(struct drm_i915_private *i915,
+ enum port port, int lane)
-:129: WARNING:LONG_LINE: line length of 124 exceeds 100 columns #129: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:106:
+ drm_dbg(&i915->drm, "PHY %c Timeout waiting for Committed message ACK. Status: 0x%x\n", phy_name(phy), val);
-:135: WARNING:LONG_LINE: line length of 114 exceeds 100 columns #135: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:112:
+ drm_dbg(&i915->drm, "PHY %c Unexpected ACK received. MSGBUS STATUS: 0x%x.\n", phy_name(phy), val);
-:150: WARNING:LONG_LINE: line length of 120 exceeds 100 columns #150: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:127:
+ drm_err_once(&i915->drm, "PHY %c Write %04x failed after %d retries.\n", phy_name(phy), addr, attempts);
-:158: WARNING:LONG_LINE: line length of 142 exceeds 100 columns #158: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:135:
+ drm_dbg(&i915->drm, "PHY %c Timeout waiting for previous transaction to complete. Reset the bus and retry.\n", phy_name(phy));
-:190: WARNING:RETURN_VOID: void function return statements are not generally useful #190: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:167:
+ return;
+}
total: 0 errors, 13 warnings, 1 checks, 179 lines checked afd046f59d87 drm/i915/mtl: Add PLL programming support for C10 phy -:444: ERROR:CODE_INDENT: code indent should use tabs where possible #444: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:558:
+^I^I C10_VDR_CTRL_MSGBUS_ACCESS, MB_WRITE_COMMITTED);$
-:444: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #444: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:558:
+ intel_cx0_write(i915, encoder->port, INTEL_CX0_BOTH_LANES, PHY_C10_VDR_CONTROL(1),
+ C10_VDR_CTRL_MSGBUS_ACCESS, MB_WRITE_COMMITTED);
-:459: WARNING:LONG_LINE: line length of 104 exceeds 100 columns #459: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:573:
+ intel_cx0_write(i915, encoder->port, master_lane, PHY_C10_VDR_CMN(0), cmn0, MB_WRITE_COMMITTED);
-:460: WARNING:LONG_LINE: line length of 110 exceeds 100 columns #460: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:574:
+ intel_cx0_write(i915, encoder->port, master_lane, PHY_C10_VDR_TX(0), C10_TX0_VAL, MB_WRITE_COMMITTED);
-:496: CHECK:SPACING: spaces preferred around that '+' (ctx:VxW) #496: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:610:
+ i, hw_state->pll[i], i + 1, hw_state->pll[i+ 1],
^
-:573: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #573:
new file mode 100644
-:578: WARNING:SPDX_LICENSE_TAG: Improper SPDX comment style for 'drivers/gpu/drm/i915/display/intel_cx0_phy.h', please use '/*' instead #578: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.h:1:
+// SPDX-License-Identifier: MIT
-:578: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #578: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.h:1:
+// SPDX-License-Identifier: MIT
-:601: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__n' - possible side-effects? #601: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.h:24:
+#define REG_BIT8(__n) \
+ ((u8)(BIT(__n) + \
+ BUILD_BUG_ON_ZERO(__is_constexpr(__n) && \
+ ((__n) < 0 || (__n) > 7))))
-:615: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__high' - possible side-effects? #615: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.h:38:
+#define REG_GENMASK8(__high, __low) \
+ ((u8)(GENMASK(__high, __low) + \
+ BUILD_BUG_ON_ZERO(__is_constexpr(__high) && \
+ __is_constexpr(__low) && \
+ ((__low) < 0 || (__high) > 7 || (__low) > (__high)))))
-:615: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__low' - possible side-effects? #615: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.h:38:
+#define REG_GENMASK8(__high, __low) \
+ ((u8)(GENMASK(__high, __low) + \
+ BUILD_BUG_ON_ZERO(__is_constexpr(__high) && \
+ __is_constexpr(__low) && \
+ ((__low) < 0 || (__high) > 7 || (__low) > (__high)))))
-:624: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__x' - possible side-effects? #624: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.h:47:
+#define IS_POWER_OF_2(__x) ((__x) && (((__x) & ((__x) - 1)) == 0))
-:636: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__mask' - possible side-effects? #636: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.h:59:
+#define REG_FIELD_PREP8(__mask, __val) \
+ ((u8)((((typeof(__mask))(__val) << __bf_shf(__mask)) & (__mask)) + \
+ BUILD_BUG_ON_ZERO(!__is_constexpr(__mask)) + \ + BUILD_BUG_ON_ZERO((__mask) == 0 || (__mask) > U8_MAX) + \ + BUILD_BUG_ON_ZERO(!IS_POWER_OF_2((__mask) + (1ULL << __bf_shf(__mask)))) + \ + BUILD_BUG_ON_ZERO(__builtin_choose_expr(__is_constexpr(__val), (~((__mask) >> __bf_shf(__mask)) & (__val)), 0))))
-:636: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__val' - possible side-effects? #636: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.h:59:
+#define REG_FIELD_PREP8(__mask, __val) \
+ ((u8)((((typeof(__mask))(__val) << __bf_shf(__mask)) & (__mask)) + \
+ BUILD_BUG_ON_ZERO(!__is_constexpr(__mask)) + \ + BUILD_BUG_ON_ZERO((__mask) == 0 || (__mask) > U8_MAX) + \ + BUILD_BUG_ON_ZERO(!IS_POWER_OF_2((__mask) + (1ULL << __bf_shf(__mask)))) + \ + BUILD_BUG_ON_ZERO(__builtin_choose_expr(__is_constexpr(__val), (~((__mask) >> __bf_shf(__mask)) & (__val)), 0))))
-:641: WARNING:LONG_LINE: line length of 128 exceeds 100 columns #641: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.h:64:
+ BUILD_BUG_ON_ZERO(__builtin_choose_expr(__is_constexpr(__val), (~((__mask) >> __bf_shf(__mask)) & (__val)), 0))))
-:732: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #732: FILE: drivers/gpu/drm/i915/display/intel_ddi.c:3501:
+ crtc_state->port_clock = intel_c10mpllb_calc_port_clock(encoder, &crtc_state->c10mpllb_state);
total: 1 errors, 7 warnings, 8 checks, 818 lines checked e6d269ba2195 drm/i915/mtl: Add support for C10 phy programming -:50: ERROR:SPACING: space required before the open parenthesis '(' #50: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:636:
+#define PHY_LANES_VAL_ARG(FIELD, lanes, arg) ({u32 __val; switch(lanes) {\
-:50: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'arg' - possible side-effects? #50: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:636:
+#define PHY_LANES_VAL_ARG(FIELD, lanes, arg) ({u32 __val; switch(lanes) {\
+ case INTEL_CX0_BOTH_LANES: \
+ __val = ((XELPDP_LANE0_##FIELD(arg)) |\
+ (XELPDP_LANE1_##FIELD(arg))); \
+ break; \
+ case INTEL_CX0_LANE0: \
+ __val = (XELPDP_LANE0_##FIELD(arg));\
+ break; \
+ case INTEL_CX0_LANE1: \
+ __val = (XELPDP_LANE1_##FIELD(arg));\
+ break; \
+ }; __val; })
-:51: WARNING:TABSTOP: Statements should start on a tabstop #51: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:637:
+ case INTEL_CX0_BOTH_LANES: \
-:53: ERROR:CODE_INDENT: code indent should use tabs where possible #53: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:639:
+^I^I^I^I^I^I^I (XELPDP_LANE1_##FIELD(arg))); \$
-:55: WARNING:TABSTOP: Statements should start on a tabstop #55: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:641:
+ case INTEL_CX0_LANE0: \
-:58: WARNING:TABSTOP: Statements should start on a tabstop #58: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:644:
+ case INTEL_CX0_LANE1: \
-:63: ERROR:SPACING: space required before the open parenthesis '(' #63: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:649:
+#define PHY_LANES_VAL(FIELD, lanes) ({u32 __val; switch(lanes) {\
-:64: WARNING:TABSTOP: Statements should start on a tabstop #64: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:650:
+ case INTEL_CX0_BOTH_LANES: \
-:66: ERROR:CODE_INDENT: code indent should use tabs where possible #66: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:652:
+^I^I^I^I^I^I^I XELPDP_LANE1_##FIELD); \$
-:68: WARNING:TABSTOP: Statements should start on a tabstop #68: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:654:
+ case INTEL_CX0_LANE0: \
-:71: WARNING:TABSTOP: Statements should start on a tabstop #71: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:657:
+ case INTEL_CX0_LANE1: \
-:548: WARNING:LONG_LINE: line length of 103 exceeds 100 columns #548: FILE: drivers/gpu/drm/i915/i915_reg.h:8411:
+ [PORT_A] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_A, \
-:549: WARNING:LONG_LINE: line length of 103 exceeds 100 columns #549: FILE: drivers/gpu/drm/i915/i915_reg.h:8412:
+ [PORT_B] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_B, \
-:550: WARNING:LONG_LINE: line length of 109 exceeds 100 columns #550: FILE: drivers/gpu/drm/i915/i915_reg.h:8413:
+ [PORT_TC1] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC1, \
-:551: WARNING:LONG_LINE: line length of 109 exceeds 100 columns #551: FILE: drivers/gpu/drm/i915/i915_reg.h:8414:
+ [PORT_TC2] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC2, \
-:552: WARNING:LONG_LINE: line length of 109 exceeds 100 columns #552: FILE: drivers/gpu/drm/i915/i915_reg.h:8415:
+ [PORT_TC3] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC3, \
-:553: WARNING:LONG_LINE: line length of 123 exceeds 100 columns #553: FILE: drivers/gpu/drm/i915/i915_reg.h:8416:
+ [PORT_TC4] = _XELPDP_PORT_M2P_MSGBUS_CTL_LN0_USBC4) + ((lane) * 4))
-:555: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #555: FILE: drivers/gpu/drm/i915/i915_reg.h:8418:
+#define XELPDP_PORT_M2P_MSGBUS_CTL(port, lane) _MMIO(_XELPDP_PORT_M2P_MSGBUS_CTL(port, lane))
-:558: WARNING:LONG_LINE: line length of 110 exceeds 100 columns #558: FILE: drivers/gpu/drm/i915/i915_reg.h:8421:
+#define XELPDP_PORT_M2P_COMMAND_WRITE_UNCOMMITTED REG_FIELD_PREP(XELPDP_PORT_M2P_COMMAND_TYPE_MASK, 0x1)
-:559: WARNING:LONG_LINE: line length of 110 exceeds 100 columns #559: FILE: drivers/gpu/drm/i915/i915_reg.h:8422:
+#define XELPDP_PORT_M2P_COMMAND_WRITE_COMMITTED REG_FIELD_PREP(XELPDP_PORT_M2P_COMMAND_TYPE_MASK, 0x2)
-:560: WARNING:LONG_LINE: line length of 110 exceeds 100 columns #560: FILE: drivers/gpu/drm/i915/i915_reg.h:8423:
+#define XELPDP_PORT_M2P_COMMAND_READ REG_FIELD_PREP(XELPDP_PORT_M2P_COMMAND_TYPE_MASK, 0x3)
-:562: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #562: FILE: drivers/gpu/drm/i915/i915_reg.h:8425:
+#define XELPDP_PORT_M2P_DATA(val) REG_FIELD_PREP(XELPDP_PORT_M2P_DATA_MASK, val)
-:565: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #565: FILE: drivers/gpu/drm/i915/i915_reg.h:8428:
+#define XELPDP_PORT_M2P_ADDRESS(val) REG_FIELD_PREP(XELPDP_PORT_M2P_ADDRESS_MASK, val)
-:567: WARNING:LONG_LINE: line length of 106 exceeds 100 columns #567: FILE: drivers/gpu/drm/i915/i915_reg.h:8430:
+#define XELPDP_PORT_P2M_MSGBUS_STATUS(port, lane) _MMIO(_XELPDP_PORT_M2P_MSGBUS_CTL(port, lane) + 8)
-:573: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #573: FILE: drivers/gpu/drm/i915/i915_reg.h:8436:
+#define XELPDP_PORT_P2M_DATA(val) REG_FIELD_PREP(XELPDP_PORT_P2M_DATA_MASK, val)
-:594: WARNING:LONG_LINE: line length of 103 exceeds 100 columns #594: FILE: drivers/gpu/drm/i915/i915_reg.h:8457:
+ [PORT_TC1] = _XELPDP_PORT_BUF_CTL1_LN0_USBC1, \
-:595: WARNING:LONG_LINE: line length of 103 exceeds 100 columns #595: FILE: drivers/gpu/drm/i915/i915_reg.h:8458:
+ [PORT_TC2] = _XELPDP_PORT_BUF_CTL1_LN0_USBC2, \
-:596: WARNING:LONG_LINE: line length of 103 exceeds 100 columns #596: FILE: drivers/gpu/drm/i915/i915_reg.h:8459:
+ [PORT_TC3] = _XELPDP_PORT_BUF_CTL1_LN0_USBC3, \
-:597: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #597: FILE: drivers/gpu/drm/i915/i915_reg.h:8460:
+ [PORT_TC4] = _XELPDP_PORT_BUF_CTL1_LN0_USBC4))
-:613: WARNING:LONG_LINE: line length of 114 exceeds 100 columns #613: FILE: drivers/gpu/drm/i915/i915_reg.h:8476:
+#define XELPDP_LANE0_POWERDOWN_NEW_STATE(val) REG_FIELD_PREP(XELPDP_LANE0_POWERDOWN_NEW_STATE_MASK, val)
-:615: WARNING:LONG_LINE: line length of 114 exceeds 100 columns #615: FILE: drivers/gpu/drm/i915/i915_reg.h:8478:
+#define XELPDP_LANE1_POWERDOWN_NEW_STATE(val) REG_FIELD_PREP(XELPDP_LANE1_POWERDOWN_NEW_STATE_MASK, val)
-:617: WARNING:LONG_LINE: line length of 106 exceeds 100 columns #617: FILE: drivers/gpu/drm/i915/i915_reg.h:8480:
+#define XELPDP_POWER_STATE_READY(val) REG_FIELD_PREP(XELPDP_POWER_STATE_READY_MASK, val)
-:621: WARNING:LONG_LINE: line length of 114 exceeds 100 columns #621: FILE: drivers/gpu/drm/i915/i915_reg.h:8484:
+#define XELPDP_PLL_LANE_STAGGERING_DELAY(val) REG_FIELD_PREP(XELPDP_PLL_LANE_STAGGERING_DELAY_MASK, val)
-:623: WARNING:LONG_LINE: line length of 107 exceeds 100 columns #623: FILE: drivers/gpu/drm/i915/i915_reg.h:8486:
+#define XELPDP_POWER_STATE_ACTIVE(val) REG_FIELD_PREP(XELPDP_POWER_STATE_ACTIVE_MASK, val)
-:648: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #648: FILE: drivers/gpu/drm/i915/i915_reg.h:8511:
+#define XELPDP_DDI_CLOCK_SELECT(val) REG_FIELD_PREP(XELPDP_DDI_CLOCK_SELECT_MASK, val)
total: 4 errors, 30 warnings, 1 checks, 600 lines checked c4154b7d3dd6 drm/i915/mtl: Add C10 phy programming for HDMI -:207: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #207: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:626:
+ drm_dbg_kms(&i915->drm, "Can't support HDMI link rate %d on phy %c.\n",
+ crtc_state->port_clock, phy_name(phy));
total: 0 errors, 0 warnings, 1 checks, 242 lines checkedad6f986d0965 drm/i915/mtl: Add vswing programming for C10 phys
-:6: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #6:
C10 phys uses direct mapping internally for voltage and pre-emphasis levels.
-:131: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #131: FILE: drivers/gpu/drm/i915/display/intel_cx0_phy.c:286:
+ intel_cx0_write(i915, encoder->port, !master_lane, PHY_C10_VDR_CONTROL(1),
+ C10_VDR_CTRL_UPDATE_CFG, MB_WRITE_COMMITTED);
-:381: WARNING:REPEATED_WORD: Possible repeated word: 'to' #381: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1040:
+ * Some platforms don't need a mapping table and only expect us to
+ * to program the vswing + preemphasis levels directly since the
-:385: WARNING:LEADING_SPACE: please, no spaces at the start of a line #385: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1044:
+ { .direct = { .level = 0, .preemph = 0 } },$
-:386: WARNING:LEADING_SPACE: please, no spaces at the start of a line #386: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1045:
+ { .direct = { .level = 0, .preemph = 1 } },$
-:387: WARNING:LEADING_SPACE: please, no spaces at the start of a line #387: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1046:
+ { .direct = { .level = 0, .preemph = 2 } },$
-:388: WARNING:LEADING_SPACE: please, no spaces at the start of a line #388: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1047:
+ { .direct = { .level = 0, .preemph = 3 } },$
-:389: WARNING:LEADING_SPACE: please, no spaces at the start of a line #389: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1048:
+ { .direct = { .level = 1, .preemph = 0 } },$
-:390: WARNING:LEADING_SPACE: please, no spaces at the start of a line #390: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1049:
+ { .direct = { .level = 1, .preemph = 0 } },$
-:391: WARNING:LEADING_SPACE: please, no spaces at the start of a line #391: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1050:
+ { .direct = { .level = 1, .preemph = 2 } },$
-:392: WARNING:LEADING_SPACE: please, no spaces at the start of a line #392: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1051:
+ { .direct = { .level = 2, .preemph = 0 } },$
-:393: WARNING:LEADING_SPACE: please, no spaces at the start of a line #393: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1052:
+ { .direct = { .level = 2, .preemph = 1 } },$
-:394: WARNING:LEADING_SPACE: please, no spaces at the start of a line #394: FILE: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:1053:
+ { .direct = { .level = 3, .preemph = 0 } },$
total: 0 errors, 12 warnings, 1 checks, 408 lines checked
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/mtl: Add C10 phy support
In reply to Mika Kahola== Series Details ==
== Series Details ==
Series: drm/i915/mtl: Add C10 phy support
URL : https://patchwork.freedesktop.org/series/109248/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12199 -> Patchwork_109248v1
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/index.html
Participating hosts (49 -> 44)
------------------------------
Missing (5): fi-hsw-4200u bat-dg1-5 fi-ctg-p8600 fi-hsw-4770 fi-bdw-samus
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_109248v1:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_selftest@live@slpc:
- {bat-rpls-2}: [DMESG-FAIL][1] ([i915#6367]) -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/bat-rpls-2/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/bat-rpls-2/igt@i915_selftest@[email protected]
- {bat-adln-1}: [PASS][3] -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/bat-adln-1/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/bat-adln-1/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in Patchwork_109248v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@gem_contexts:
- fi-icl-u2: [PASS][5] -> [INCOMPLETE][6] ([i915#4890])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/fi-icl-u2/igt@i915_selftest@live@gem_contexts.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/fi-icl-u2/igt@i915_selftest@live@gem_contexts.html
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-snb-2600: NOTRUN -> [SKIP][7] ([fdo#109271] / [fdo#111827])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/fi-snb-2600/igt@[email protected]
* igt@runner@aborted:
- fi-icl-u2: NOTRUN -> [FAIL][8] ([i915#4312])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/fi-icl-u2/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s0@smem:
- {bat-adlm-1}: [DMESG-WARN][9] ([i915#2867]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/bat-adlm-1/igt@gem_exec_suspend@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/bat-adlm-1/igt@gem_exec_suspend@[email protected]
* igt@i915_selftest@live@hangcheck:
- fi-snb-2600: [INCOMPLETE][11] ([i915#6992]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/fi-snb-2600/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/fi-snb-2600/igt@i915_selftest@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-kefka: [FAIL][13] ([i915#6298]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4890]: https://gitlab.freedesktop.org/drm/intel/issues/4890
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6471]: https://gitlab.freedesktop.org/drm/intel/issues/6471
[i915#6818]: https://gitlab.freedesktop.org/drm/intel/issues/6818
[i915#6992]: https://gitlab.freedesktop.org/drm/intel/issues/6992
Build changes
-------------
* Linux: CI_DRM_12199 -> Patchwork_109248v1
CI-20190529: 20190529
CI_DRM_12199: 6fa6bc62d3b91e5a70b8e4869436a0b03083abf5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6669: 3d2df081c14c251e0269e3510ddc4e9d26ffe925 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109248v1: 6fa6bc62d3b91e5a70b8e4869436a0b03083abf5 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
4d575208d033 drm/i915/mtl: Add vswing programming for C10 phys 4873a207ebd6 drm/i915/mtl: Add C10 phy programming for HDMI 925cd699312e drm/i915/mtl: Add support for C10 phy programming 233dc42b2d09 drm/i915/mtl: Add PLL programming support for C10 phy cee922f59024 drm/i915/mtl: Add Support for C10, C20 PHY Message Bus
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/index.html
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/mtl: Add C10 phy support
In reply to Mika Kahola== Series Details ==
== Series Details ==
Series: drm/i915/mtl: Add C10 phy support
URL : https://patchwork.freedesktop.org/series/109248/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12199_full -> Patchwork_109248v1_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (9 -> 9)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in Patchwork_109248v1_full that come from known issues:
### CI changes ###
#### Possible fixes ####
* boot:
- shard-glk: ([PASS][1], [PASS][2], [PASS][3], [PASS][4], [PASS][5], [PASS][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [FAIL][17], [PASS][18], [PASS][19], [FAIL][20], [PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25]) ([i915#4392]) -> ([PASS][26], [PASS][27], [PASS][28], [PASS][29], [PASS][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], [PASS][49])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk9/boot.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk9/boot.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk8/boot.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk8/boot.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk8/boot.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk7/boot.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk7/boot.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk7/boot.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk6/boot.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk6/boot.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk6/boot.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk5/boot.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk5/boot.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk5/boot.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk3/boot.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk3/boot.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk3/boot.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk3/boot.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk2/boot.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk2/boot.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk2/boot.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk2/boot.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk1/boot.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk1/boot.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk9/boot.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk9/boot.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk9/boot.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk9/boot.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk8/boot.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk8/boot.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk8/boot.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk7/boot.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk7/boot.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk6/boot.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk6/boot.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk6/boot.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk5/boot.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk5/boot.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk5/boot.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk5/boot.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk3/boot.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk3/boot.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk3/boot.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk2/boot.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk2/boot.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk2/boot.html
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk1/boot.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk1/boot.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk1/boot.html
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_sseu@invalid-sseu:
- shard-tglb: NOTRUN -> [SKIP][50] ([i915#280])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@gem_exec_balancer@parallel-bb-first:
- shard-iclb: [PASS][51] -> [SKIP][52] ([i915#4525]) +2 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb4/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb5/igt@[email protected]
* igt@gem_exec_fair@basic-pace@rcs0:
- shard-iclb: [PASS][53] -> [FAIL][54] ([i915#2842])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb7/igt@gem_exec_fair@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb1/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace@vcs0:
- shard-glk: [PASS][55] -> [FAIL][56] ([i915#2842]) +2 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk6/igt@gem_exec_fair@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk9/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace@vcs1:
- shard-iclb: NOTRUN -> [FAIL][57] ([i915#2842])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb1/igt@gem_exec_fair@[email protected]
* igt@gem_exec_params@rsvd2-dirt:
- shard-tglb: NOTRUN -> [SKIP][58] ([fdo#109283])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@gem_lmem_swapping@random:
- shard-tglb: NOTRUN -> [SKIP][59] ([i915#4613])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@gem_lmem_swapping@random-engines:
- shard-glk: NOTRUN -> [SKIP][60] ([fdo#109271] / [i915#4613]) +1 similar issue
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk8/igt@[email protected]
* igt@gem_pxp@fail-invalid-protected-context:
- shard-tglb: NOTRUN -> [SKIP][61] ([i915#4270])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@gem_userptr_blits@coherency-unsync:
- shard-tglb: NOTRUN -> [SKIP][62] ([i915#3297])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@gem_workarounds@suspend-resume:
- shard-apl: [PASS][63] -> [DMESG-WARN][64] ([i915#180]) +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-apl2/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl2/igt@[email protected]
* igt@gen9_exec_parse@batch-invalid-length:
- shard-tglb: NOTRUN -> [SKIP][65] ([i915#2527] / [i915#2856])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@i915_pm_rc6_residency@rc6-idle@rcs0:
- shard-tglb: NOTRUN -> [WARN][66] ([i915#2681]) +3 similar issues
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@i915_pm_rc6_residency@[email protected]
* igt@kms_addfb_basic@legacy-format:
- shard-tglb: [PASS][67] -> [INCOMPLETE][68] ([i915#6987])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-tglb5/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb5/igt@[email protected]
* igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180:
- shard-tglb: NOTRUN -> [SKIP][69] ([i915#5286])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_big_fb@y-tiled-8bpp-rotate-270:
- shard-tglb: NOTRUN -> [SKIP][70] ([fdo#111614]) +1 similar issue
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_big_fb@yf-tiled-addfb:
- shard-tglb: NOTRUN -> [SKIP][71] ([fdo#111615])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_big_joiner@basic:
- shard-tglb: NOTRUN -> [SKIP][72] ([i915#2705])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_ccs@pipe-a-bad-rotation-90-4_tiled_dg2_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][73] ([i915#6095])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@kms_ccs@pipe-a-bad-rotation-90-4_tiled_dg2_mc_ccs.html
* igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
- shard-glk: NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#3886]) +3 similar issues
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk8/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html
* igt@kms_ccs@pipe-b-crc-primary-basic-yf_tiled_ccs:
- shard-tglb: NOTRUN -> [SKIP][75] ([fdo#111615] / [i915#3689]) +1 similar issue
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@kms_ccs@pipe-b-crc-primary-basic-yf_tiled_ccs.html
* igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_ccs:
- shard-tglb: NOTRUN -> [SKIP][76] ([i915#3689]) +1 similar issue
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_ccs.html
* igt@kms_ccs@pipe-c-bad-pixel-format-4_tiled_dg2_rc_ccs_cc:
- shard-tglb: NOTRUN -> [SKIP][77] ([i915#3689] / [i915#6095])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@kms_ccs@pipe-c-bad-pixel-format-4_tiled_dg2_rc_ccs_cc.html
* igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_mc_ccs:
- shard-apl: NOTRUN -> [SKIP][78] ([fdo#109271] / [i915#3886]) +2 similar issues
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl6/igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_mc_ccs.html
* igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][79] ([i915#3689] / [i915#3886])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html
* igt@kms_chamelium@dp-hpd-fast:
- shard-tglb: NOTRUN -> [SKIP][80] ([fdo#109284] / [fdo#111827]) +2 similar issues
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_chamelium@dp-hpd-storm-disable:
- shard-glk: NOTRUN -> [SKIP][81] ([fdo#109271] / [fdo#111827]) +3 similar issues
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk8/igt@[email protected]
* igt@kms_color_chamelium@ctm-0-75:
- shard-apl: NOTRUN -> [SKIP][82] ([fdo#109271] / [fdo#111827])
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl1/igt@[email protected]
* igt@kms_content_protection@dp-mst-lic-type-1:
- shard-tglb: NOTRUN -> [SKIP][83] ([i915#3116] / [i915#3299])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_cursor_crc@cursor-suspend@pipe-c-edp-1:
- shard-iclb: [PASS][84] -> [DMESG-WARN][85] ([i915#2867])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb8/igt@kms_cursor_crc@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@kms_cursor_crc@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a1:
- shard-glk: [PASS][86] -> [FAIL][87] ([i915#79])
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk6/igt@kms_flip@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk7/igt@kms_flip@[email protected]
* igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-32bpp-yftileccs-downscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][88] ([i915#6375])
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-32bpp-yftileccs-downscaling@pipe-a-default-mode.html
* igt@kms_flip_scaled_crc@flip-32bpp-yftileccs-to-64bpp-yftile-upscaling@pipe-a-valid-mode:
- shard-iclb: NOTRUN -> [SKIP][89] ([i915#2587] / [i915#2672])
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb4/igt@kms_flip_scaled_crc@flip-32bpp-yftileccs-to-64bpp-yftile-upscaling@pipe-a-valid-mode.html
* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tile-downscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][90] ([i915#2672])
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tile-downscaling@pipe-a-default-mode.html
* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode:
- shard-tglb: NOTRUN -> [SKIP][91] ([i915#2587] / [i915#2672])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode.html
* igt@kms_flip_scaled_crc@flip-64bpp-linear-to-16bpp-linear-downscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][92] ([i915#3555])
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-linear-to-16bpp-linear-downscaling@pipe-a-default-mode.html
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-shrfb-pgflip-blt:
- shard-tglb: NOTRUN -> [SKIP][93] ([fdo#109280] / [fdo#111825]) +9 similar issues
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff:
- shard-iclb: [PASS][94] -> [FAIL][95] ([i915#1888] / [i915#2546])
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb6/igt@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-spr-indfb-draw-mmap-wc:
- shard-glk: NOTRUN -> [SKIP][96] ([fdo#109271]) +73 similar issues
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk8/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-spr-indfb-draw-mmap-wc.html
* igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-wc:
- shard-tglb: NOTRUN -> [SKIP][97] ([i915#6497]) +2 similar issues
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-rgb565-draw-pwrite:
- shard-apl: NOTRUN -> [SKIP][98] ([fdo#109271]) +42 similar issues
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl1/igt@[email protected]
* igt@kms_invalid_mode@clock-too-high@edp-1-pipe-d:
- shard-tglb: NOTRUN -> [SKIP][99] ([i915#6403]) +3 similar issues
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@kms_invalid_mode@[email protected]
* igt@kms_plane_lowres@tiling-yf:
- shard-tglb: NOTRUN -> [SKIP][100] ([fdo#112054] / [i915#5288])
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_psr2_sf@cursor-plane-update-sf:
- shard-glk: NOTRUN -> [SKIP][101] ([fdo#109271] / [i915#658]) +1 similar issue
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk8/igt@[email protected]
* igt@kms_psr2_sf@overlay-plane-move-continuous-sf:
- shard-tglb: NOTRUN -> [SKIP][102] ([i915#2920])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb:
- shard-apl: NOTRUN -> [SKIP][103] ([fdo#109271] / [i915#658]) +1 similar issue
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl6/igt@[email protected]
* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-tglb: NOTRUN -> [FAIL][104] ([i915#132] / [i915#3467])
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@kms_psr@psr2_cursor_plane_onoff.html
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [PASS][105] -> [SKIP][106] ([fdo#109441]) +2 similar issues
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb4/igt@kms_psr@psr2_sprite_plane_move.html
* igt@kms_setmode@invalid-clone-single-crtc:
- shard-tglb: NOTRUN -> [SKIP][107] ([i915#3555])
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@kms_writeback@writeback-invalid-parameters:
- shard-tglb: NOTRUN -> [SKIP][108] ([i915#2437])
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
* igt@perf_pmu@event-wait@rcs0:
- shard-tglb: NOTRUN -> [SKIP][109] ([fdo#112283])
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@perf_pmu@[email protected]
* igt@sysfs_clients@create:
- shard-apl: NOTRUN -> [SKIP][110] ([fdo#109271] / [i915#2994])
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl6/igt@[email protected]
* igt@sysfs_clients@sema-50:
- shard-tglb: NOTRUN -> [SKIP][111] ([i915#2994])
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb2/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_balancer@parallel-keep-submit-fence:
- shard-iclb: [SKIP][112] ([i915#4525]) -> [PASS][113]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb5/igt@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb1/igt@[email protected]
* igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [FAIL][114] ([i915#2842]) -> [PASS][115]
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-tglb8/igt@gem_exec_fair@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-tglb7/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-none@vcs0:
- shard-glk: [FAIL][116] ([i915#2842]) -> [PASS][117]
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk3/igt@gem_exec_fair@[email protected]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk6/igt@gem_exec_fair@[email protected]
* igt@gem_exec_reloc@basic-cpu-gtt-active:
- shard-apl: [DMESG-WARN][118] ([i915#62]) -> [PASS][119] +16 similar issues
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-apl2/igt@[email protected]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl2/igt@[email protected]
* igt@gen9_exec_parse@allowed-single:
- shard-apl: [DMESG-WARN][120] ([i915#5566] / [i915#716]) -> [PASS][121]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-apl7/igt@[email protected]
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl6/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][122] ([i915#3989] / [i915#454]) -> [PASS][123]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb7/igt@[email protected]
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb8/igt@[email protected]
* igt@kms_flip@2x-flip-vs-wf_vblank-interruptible@bc-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][124] ([i915#2122]) -> [PASS][125]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk6/igt@kms_flip@[email protected]
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk7/igt@kms_flip@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank@b-dp1:
- shard-apl: [FAIL][126] -> [PASS][127]
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-apl2/igt@kms_flip@[email protected]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl2/igt@kms_flip@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank@c-dp1:
- shard-apl: [DMESG-FAIL][128] ([i915#62]) -> [PASS][129]
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-apl2/igt@kms_flip@[email protected]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl2/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1:
- shard-glk: [FAIL][130] ([i915#79]) -> [PASS][131]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-glk6/igt@kms_flip@[email protected]
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-glk7/igt@kms_flip@[email protected]
* igt@kms_psr2_su@page_flip-xrgb8888:
- shard-iclb: [SKIP][132] ([fdo#109642] / [fdo#111068] / [i915#658]) -> [PASS][133]
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb8/igt@kms_psr2_su@page_flip-xrgb8888.html
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@kms_psr2_su@page_flip-xrgb8888.html
* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [SKIP][134] ([fdo#109441]) -> [PASS][135]
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb6/igt@kms_psr@psr2_sprite_mmap_gtt.html
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
* igt@perf_pmu@rc6-suspend:
- shard-apl: [DMESG-WARN][136] ([i915#180]) -> [PASS][137]
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-apl8/igt@[email protected]
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-apl1/igt@[email protected]
#### Warnings ####
* igt@gem_exec_balancer@parallel-ordering:
- shard-iclb: [SKIP][138] ([i915#4525]) -> [FAIL][139] ([i915#6117])
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb6/igt@[email protected]
[139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@[email protected]
* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-iclb: [SKIP][140] ([i915#658]) -> [SKIP][141] ([i915#588])
[140]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb6/igt@[email protected]
[141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@[email protected]
* igt@i915_pm_rpm@modeset-non-lpsp-stress:
- shard-iclb: [SKIP][142] ([fdo#110892]) -> [INCOMPLETE][143] ([i915#6604])
[142]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb4/igt@[email protected]
[143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb7/igt@[email protected]
* igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-sf:
- shard-iclb: [SKIP][144] ([i915#658]) -> [SKIP][145] ([i915#2920])
[144]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb6/igt@[email protected]
[145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@[email protected]
* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:
- shard-iclb: [SKIP][146] ([i915#2920]) -> [SKIP][147] ([fdo#111068] / [i915#658])
[146]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb2/igt@[email protected]
[147]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb5/igt@[email protected]
* igt@kms_psr2_sf@plane-move-sf-dmg-area:
- shard-iclb: [SKIP][148] ([fdo#111068] / [i915#658]) -> [SKIP][149] ([i915#2920])
[148]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb6/igt@[email protected]
[149]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@[email protected]
* igt@kms_psr2_su@page_flip-p010:
- shard-iclb: [SKIP][150] ([fdo#109642] / [fdo#111068] / [i915#658]) -> [FAIL][151] ([i915#5939])
[150]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12199/shard-iclb6/igt@kms_psr2_su@page_flip-p010.html
[151]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/shard-iclb2/igt@kms_psr2_su@page_flip-p010.html
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110892]: https://bugs.freedesktop.org/show_bug.cgi?id=110892
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2546]: https://gitlab.freedesktop.org/drm/intel/issues/2546
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3467]: https://gitlab.freedesktop.org/drm/intel/issues/3467
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4392]: https://gitlab.freedesktop.org/drm/intel/issues/4392
[i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
[i915#5939]: https://gitlab.freedesktop.org/drm/intel/issues/5939
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#6375]: https://gitlab.freedesktop.org/drm/intel/issues/6375
[i915#6403]: https://gitlab.freedesktop.org/drm/intel/issues/6403
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6604]: https://gitlab.freedesktop.org/drm/intel/issues/6604
[i915#6987]: https://gitlab.freedesktop.org/drm/intel/issues/6987
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
Build changes
-------------
* Linux: CI_DRM_12199 -> Patchwork_109248v1
CI-20190529: 20190529
CI_DRM_12199: 6fa6bc62d3b91e5a70b8e4869436a0b03083abf5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6669: 3d2df081c14c251e0269e3510ddc4e9d26ffe925 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109248v1: 6fa6bc62d3b91e5a70b8e4869436a0b03083abf5 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109248v1/index.html