@@ -905,6 +905,18 @@ static int qcom_swrm_init(struct qcom_swrm_ctrl *ctrl)
905
905
return 0 ;
906
906
}
907
907
908
+ static int qcom_swrm_read_prop (struct sdw_bus * bus )
909
+ {
910
+ struct qcom_swrm_ctrl * ctrl = to_qcom_sdw (bus );
911
+
912
+ if (ctrl -> version >= SWRM_VERSION_2_0_0 ) {
913
+ bus -> multi_link = true;
914
+ bus -> hw_sync_min_links = 3 ;
915
+ }
916
+
917
+ return 0 ;
918
+ }
919
+
908
920
static enum sdw_command_response qcom_swrm_xfer_msg (struct sdw_bus * bus ,
909
921
struct sdw_msg * msg )
910
922
{
@@ -1056,6 +1068,7 @@ static const struct sdw_master_port_ops qcom_swrm_port_ops = {
1056
1068
};
1057
1069
1058
1070
static const struct sdw_master_ops qcom_swrm_ops = {
1071
+ .read_prop = qcom_swrm_read_prop ,
1059
1072
.xfer_msg = qcom_swrm_xfer_msg ,
1060
1073
.pre_bank_switch = qcom_swrm_pre_bank_switch ,
1061
1074
};
@@ -1173,6 +1186,15 @@ static int qcom_swrm_stream_alloc_ports(struct qcom_swrm_ctrl *ctrl,
1173
1186
1174
1187
mutex_lock (& ctrl -> port_lock );
1175
1188
list_for_each_entry (m_rt , & stream -> master_list , stream_node ) {
1189
+ /*
1190
+ * For streams with multiple masters:
1191
+ * Allocate ports only for devices connected to this master.
1192
+ * Such devices will have ports allocated by their own master
1193
+ * and its qcom_swrm_stream_alloc_ports() call.
1194
+ */
1195
+ if (ctrl -> bus .id != m_rt -> bus -> id )
1196
+ continue ;
1197
+
1176
1198
if (m_rt -> direction == SDW_DATA_DIR_RX ) {
1177
1199
maxport = ctrl -> num_dout_ports ;
1178
1200
port_mask = & ctrl -> dout_port_mask ;
0 commit comments