interconnect: qcom: rpm: make QoS INVALID default
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Wed, 8 Mar 2023 21:40:07 +0000 (22:40 +0100)
committerGeorgi Djakov <djakov@kernel.org>
Wed, 5 Apr 2023 08:29:59 +0000 (11:29 +0300)
commit1d779317eb6529d89bfe6d7900a2cf9e03149aeb
tree2674600b402d7f95aa5a92772ee1dffbc7be323e
parent72b2720c18ecde92e6a36c4ac897dd5848e3f379
interconnect: qcom: rpm: make QoS INVALID default

Currently NOC_QOS_MODE_FIXED is defined as 0x0 which makes it the
default option (partial struct initialization). The default option
however should be NOC_QOS_MODE_INVALID.

That results in bogus QoS configurations being sent for port 0 (which
is used for the DRAM endpoint on BIMC, for example) coming from all nodes
with .qos.ap_owned = true and uninitialized .qos.qos_mode. It's also an
issue for newer SoCs where all nodes are treated as if they were ap_owned,
but not all of them have QoS configuration.

The NOC_QOS_MODEs are defined as preprocessor constants and are not used
anywhere outside qcom_icc_set_noc_qos(), which is easily worked around.
Separate the desc->type values from the values sent to msmbus in the
aforementioned function. Make the former an enum for better mainainability.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230228-topic-qos-v7-1-815606092fff@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
drivers/interconnect/qcom/icc-rpm.c
drivers/interconnect/qcom/icc-rpm.h