kernel_samsung_a53x/drivers/soundwire
Krzysztof Kozlowski b3c3ea14b3 soundwire: stream: fix programming slave ports for non-continous port maps
commit ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 upstream.

Two bitmasks in 'struct sdw_slave_prop' - 'source_ports' and
'sink_ports' - define which ports to program in
sdw_program_slave_port_params().  The masks are used to get the
appropriate data port properties ('struct sdw_get_slave_dpn_prop') from
an array.

Bitmasks can be non-continuous or can start from index different than 0,
thus when looking for matching port property for given port, we must
iterate over mask bits, not from 0 up to number of ports.

This fixes allocation and programming slave ports, when a source or sink
masks start from further index.

Fixes: f8101c74aa54 ("soundwire: Add Master and Slave port programming")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240729140157.326450-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:20:54 +01:00
..
bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus_type.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cadence_master.c soundwire: cadence: fix invalid PDI offset 2024-11-19 12:27:00 +01:00
cadence_master.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic_bandwidth_allocation.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel_init.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
master.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mipi_disco.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
slave.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stream.c soundwire: stream: fix programming slave ports for non-continous port maps 2024-11-23 23:20:54 +01:00
sysfs_local.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysfs_slave.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysfs_slave_dpn.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00