mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
drm/i915/tc: Pass intel_tc_port to internal lane mask/count helpers
Pass the intel_tc_port pointer instead of intel_digital_port to all lane mask and count query helpers internal to intel_tc.c, to avoid the redundant intel_digital_port -> intel_tc_port conversions. While at it shorten the function names, keeping the intel_tc_port_ prefix only for exported functions and use the mtl_, icl_ prefixes making it clear which platforms a given query function is specific for. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Link: https://lore.kernel.org/r/20250805073700.642107-17-imre.deak@intel.com Signed-off-by: Imre Deak <imre.deak@intel.com>
This commit is contained in:
parent
70435fce32
commit
76ed3b0226
|
|
@ -260,10 +260,9 @@ assert_tc_port_power_enabled(struct intel_tc_port *tc)
|
|||
!intel_display_power_is_enabled(display, tc_port_power_domain(tc)));
|
||||
}
|
||||
|
||||
static u32 intel_tc_port_get_lane_mask(struct intel_digital_port *dig_port)
|
||||
static u32 get_lane_mask(struct intel_tc_port *tc)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(dig_port);
|
||||
struct intel_tc_port *tc = to_tc_port(dig_port);
|
||||
struct intel_display *display = to_intel_display(tc->dig_port);
|
||||
intel_wakeref_t wakeref;
|
||||
u32 lane_mask;
|
||||
|
||||
|
|
@ -322,9 +321,8 @@ get_pin_assignment(struct intel_tc_port *tc)
|
|||
return pin_assignment;
|
||||
}
|
||||
|
||||
static int mtl_tc_port_get_max_lane_count(struct intel_digital_port *dig_port)
|
||||
static int mtl_get_max_lane_count(struct intel_tc_port *tc)
|
||||
{
|
||||
struct intel_tc_port *tc = to_tc_port(dig_port);
|
||||
enum intel_tc_pin_assignment pin_assignment;
|
||||
|
||||
pin_assignment = get_pin_assignment(tc);
|
||||
|
|
@ -343,11 +341,11 @@ static int mtl_tc_port_get_max_lane_count(struct intel_digital_port *dig_port)
|
|||
}
|
||||
}
|
||||
|
||||
static int intel_tc_port_get_max_lane_count(struct intel_digital_port *dig_port)
|
||||
static int icl_get_max_lane_count(struct intel_tc_port *tc)
|
||||
{
|
||||
u32 lane_mask = 0;
|
||||
|
||||
lane_mask = intel_tc_port_get_lane_mask(dig_port);
|
||||
lane_mask = get_lane_mask(tc);
|
||||
|
||||
switch (lane_mask) {
|
||||
default:
|
||||
|
|
@ -369,15 +367,14 @@ static int intel_tc_port_get_max_lane_count(struct intel_digital_port *dig_port)
|
|||
static int get_max_lane_count(struct intel_tc_port *tc)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(tc->dig_port);
|
||||
struct intel_digital_port *dig_port = tc->dig_port;
|
||||
|
||||
if (tc->mode != TC_PORT_DP_ALT)
|
||||
return 4;
|
||||
|
||||
if (DISPLAY_VER(display) >= 14)
|
||||
return mtl_tc_port_get_max_lane_count(dig_port);
|
||||
return mtl_get_max_lane_count(tc);
|
||||
|
||||
return intel_tc_port_get_max_lane_count(dig_port);
|
||||
return icl_get_max_lane_count(tc);
|
||||
}
|
||||
|
||||
static void read_pin_configuration(struct intel_tc_port *tc)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user