mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
![Imre Deak](/assets/img/avatar_default.png)
During system resume DP MST requires AUX to be working already before the HW state readout of the given encoder. Since AUX requires the encoder/PHY TypeC mode to be initialized, which atm only happens during HW state readout, these AUX transfers can change the TypeC mode incorrectly (disconnecting the PHY for an enabled encoder) and trigger the state check WARNs in intel_tc_port_sanitize(). Fix this by initializing the TypeC mode earlier both during driver loading and system resume and making sure that the mode can't change until the encoder's state is read out. While at it add the missing DocBook comments and rename intel_tc_port_sanitize()->intel_tc_port_sanitize_mode() for consistency. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220922172148.2913088-1-imre.deak@intel.com
41 lines
1.5 KiB
C
41 lines
1.5 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __INTEL_TC_H__
|
|
#define __INTEL_TC_H__
|
|
|
|
#include <linux/mutex.h>
|
|
#include <linux/types.h>
|
|
|
|
struct intel_digital_port;
|
|
struct intel_encoder;
|
|
|
|
bool intel_tc_port_in_tbt_alt_mode(struct intel_digital_port *dig_port);
|
|
bool intel_tc_port_in_dp_alt_mode(struct intel_digital_port *dig_port);
|
|
bool intel_tc_port_in_legacy_mode(struct intel_digital_port *dig_port);
|
|
|
|
bool intel_tc_port_connected(struct intel_encoder *encoder);
|
|
|
|
u32 intel_tc_port_get_lane_mask(struct intel_digital_port *dig_port);
|
|
u32 intel_tc_port_get_pin_assignment_mask(struct intel_digital_port *dig_port);
|
|
int intel_tc_port_fia_max_lane_count(struct intel_digital_port *dig_port);
|
|
void intel_tc_port_set_fia_lane_count(struct intel_digital_port *dig_port,
|
|
int required_lanes);
|
|
|
|
void intel_tc_port_init_mode(struct intel_digital_port *dig_port);
|
|
void intel_tc_port_sanitize_mode(struct intel_digital_port *dig_port);
|
|
void intel_tc_port_lock(struct intel_digital_port *dig_port);
|
|
void intel_tc_port_unlock(struct intel_digital_port *dig_port);
|
|
void intel_tc_port_flush_work(struct intel_digital_port *dig_port);
|
|
void intel_tc_port_get_link(struct intel_digital_port *dig_port,
|
|
int required_lanes);
|
|
void intel_tc_port_put_link(struct intel_digital_port *dig_port);
|
|
bool intel_tc_port_ref_held(struct intel_digital_port *dig_port);
|
|
|
|
void intel_tc_port_init(struct intel_digital_port *dig_port, bool is_legacy);
|
|
|
|
bool intel_tc_cold_requires_aux_pw(struct intel_digital_port *dig_port);
|
|
|
|
#endif /* __INTEL_TC_H__ */
|