[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab0fc6e0-a358-42e7-92e5-77ceea53a546@linaro.org>
Date: Wed, 29 Nov 2023 17:43:45 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Vinod Koul <vkoul@...nel.org>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Sanyog Kale <sanyog.r.kale@...el.com>,
linux-arm-msm@...r.kernel.org, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Cc: Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH] soundwire: qcom: allow multi-link on newer devices
On 28/11/2023 16:35, Pierre-Louis Bossart wrote:
>> static enum sdw_command_response qcom_swrm_xfer_msg(struct sdw_bus *bus,
>> struct sdw_msg *msg)
>> {
>> @@ -1078,6 +1090,7 @@ static const struct sdw_master_port_ops qcom_swrm_port_ops = {
>> };
>>
>> static const struct sdw_master_ops qcom_swrm_ops = {
>> + .read_prop = qcom_swrm_read_prop,
>
> nit-pick: read_prop() literally means "read platform properties".
>
> The functionality implemented in this callback looks more like an
> initialization done in a probe, no?
Yes, but multi_link is being set by sdw_bus_master_add() just before
calling read_prop(). It looks a bit odd, because "bus" comes from the
caller and is probably zero-ed already. Therefore I assumed the code did
it on purpose - ignored multi_link set before sdw_bus_master_add(),
>
>> .xfer_msg = qcom_swrm_xfer_msg,
>> .pre_bank_switch = qcom_swrm_pre_bank_switch,
>> .post_bank_switch = qcom_swrm_post_bank_switch,
>> @@ -1196,6 +1209,15 @@ static int qcom_swrm_stream_alloc_ports(struct qcom_swrm_ctrl *ctrl,
>>
>> mutex_lock(&ctrl->port_lock);
>> list_for_each_entry(m_rt, &stream->master_list, stream_node) {
>
> just realizing this now, are you sure the 'port_lock' is the proper
> means to protecting the stream->master_list? I don't see this used
> anywhere else in stream.c. I think you need to use bus_lock.
This is from ctrl, internal driver structure:
struct qcom_swrm_ctrl *ctrl
Best regards,
Krzysztof
Powered by blists - more mailing lists