]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soundwire: add lane field in sdw_port_runtime
authorBard Liao <yung-chuan.liao@linux.intel.com>
Wed, 18 Dec 2024 08:01:42 +0000 (16:01 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 23 Dec 2024 06:30:32 +0000 (12:00 +0530)
Currently, lane_ctrl is always 0. Add a lane field in sdw_port_runtime
to indicate the data lane of the data port.
They are 0 by default.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20241218080155.102405-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/amd_manager.c
drivers/soundwire/bus.h
drivers/soundwire/generic_bandwidth_allocation.c

index 5a4bfaef65fb2e6bc4228d2f7ed9a82e9ad75360..f47d4cd656ae77431ad7db8870f1c442b235ea63 100644 (file)
@@ -410,7 +410,7 @@ static int amd_sdw_compute_params(struct sdw_bus *bus)
                        sdw_fill_xport_params(&p_rt->transport_params, p_rt->num,
                                              false, SDW_BLK_GRP_CNT_1, sample_int,
                                              port_bo, port_bo >> 8, hstart, hstop,
-                                             SDW_BLK_PKG_PER_PORT, 0x0);
+                                             SDW_BLK_PKG_PER_PORT, p_rt->lane);
 
                        sdw_fill_port_params(&p_rt->port_params,
                                             p_rt->num, bps,
index fda6b24ac2da99c4de6e22db5a58b83c47d2f414..ff03b97f1d8b4e71245be5eb346c2592f94d973c 100644 (file)
@@ -90,6 +90,7 @@ int sdw_find_col_index(int col);
  * @transport_params: Transport parameters
  * @port_params: Port parameters
  * @port_node: List node for Master or Slave port_list
+ * @lane: Which lane is used
  *
  * SoundWire spec has no mention of ports for Master interface but the
  * concept is logically extended.
@@ -100,6 +101,7 @@ struct sdw_port_runtime {
        struct sdw_transport_params transport_params;
        struct sdw_port_params port_params;
        struct list_head port_node;
+       unsigned int lane;
 };
 
 /**
index b9316207c3ab210b2a4434a899471892028b93b0..abf9b85daa52dd47bdc1689c55626038f8ba013b 100644 (file)
@@ -56,7 +56,7 @@ void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt,
                                              sample_int, port_bo, port_bo >> 8,
                                              t_data->hstart,
                                              t_data->hstop,
-                                             SDW_BLK_PKG_PER_PORT, 0x0);
+                                             SDW_BLK_PKG_PER_PORT, p_rt->lane);
 
                        sdw_fill_port_params(&p_rt->port_params,
                                             p_rt->num, bps,
@@ -109,7 +109,7 @@ static void sdw_compute_master_ports(struct sdw_master_runtime *m_rt,
                sdw_fill_xport_params(&p_rt->transport_params, p_rt->num,
                                      false, SDW_BLK_GRP_CNT_1, sample_int,
                                      *port_bo, (*port_bo) >> 8, hstart, hstop,
-                                     SDW_BLK_PKG_PER_PORT, 0x0);
+                                     SDW_BLK_PKG_PER_PORT, p_rt->lane);
 
                sdw_fill_port_params(&p_rt->port_params,
                                     p_rt->num, bps,