diff options
author | Imre Deak <imre.deak@intel.com> | 2023-03-23 16:20:19 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2023-04-03 11:35:30 +0300 |
commit | bd0fdd31c1023b9d94a470ed5bc301c3f9d80519 (patch) | |
tree | b2d7bc64270a57672fee51b19ea6486bd3110452 /drivers/gpu/drm/i915 | |
parent | 712f422ed70c6778018152896d6b4e5ff70fb2b4 (diff) | |
download | linux-stable-bd0fdd31c1023b9d94a470ed5bc301c3f9d80519.tar.gz linux-stable-bd0fdd31c1023b9d94a470ed5bc301c3f9d80519.tar.bz2 linux-stable-bd0fdd31c1023b9d94a470ed5bc301c3f9d80519.zip |
drm/i915/tc: Add TC PHY hooks to connect/disconnect the PHY
Add TC PHY hooks to connect/disconnect the PHY. A follow-up patch will
add the ADLP specific hooks for these.
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-14-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_tc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c index bf83e6794054..cdac808aac3c 100644 --- a/drivers/gpu/drm/i915/display/intel_tc.c +++ b/drivers/gpu/drm/i915/display/intel_tc.c @@ -29,6 +29,8 @@ struct intel_tc_phy_ops { bool (*is_ready)(struct intel_tc_port *tc); bool (*is_owned)(struct intel_tc_port *tc); void (*get_hw_state)(struct intel_tc_port *tc); + bool (*connect)(struct intel_tc_port *tc, int required_lanes); + void (*disconnect)(struct intel_tc_port *tc); }; struct intel_tc_port { @@ -523,6 +525,8 @@ static const struct intel_tc_phy_ops icl_tc_phy_ops = { .is_ready = icl_tc_phy_is_ready, .is_owned = icl_tc_phy_is_owned, .get_hw_state = icl_tc_phy_get_hw_state, + .connect = icl_tc_phy_connect, + .disconnect = icl_tc_phy_disconnect, }; /* @@ -605,6 +609,8 @@ static const struct intel_tc_phy_ops adlp_tc_phy_ops = { .is_ready = adlp_tc_phy_is_ready, .is_owned = adlp_tc_phy_is_owned, .get_hw_state = icl_tc_phy_get_hw_state, + .connect = icl_tc_phy_connect, + .disconnect = icl_tc_phy_disconnect, }; /* @@ -824,10 +830,10 @@ static void tc_phy_connect(struct intel_tc_port *tc, int required_lanes) tc->mode = tc_phy_get_target_mode(tc); - connected = icl_tc_phy_connect(tc, required_lanes); + connected = tc->phy_ops->connect(tc, required_lanes); if (!connected && tc->mode != default_tc_mode(tc)) { tc->mode = default_tc_mode(tc); - connected = icl_tc_phy_connect(tc, required_lanes); + connected = tc->phy_ops->connect(tc, required_lanes); } drm_WARN_ON(&i915->drm, !connected); @@ -836,7 +842,7 @@ static void tc_phy_connect(struct intel_tc_port *tc, int required_lanes) static void tc_phy_disconnect(struct intel_tc_port *tc) { if (tc->mode != TC_PORT_DISCONNECTED) { - icl_tc_phy_disconnect(tc); + tc->phy_ops->disconnect(tc); tc->mode = TC_PORT_DISCONNECTED; } } |