From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
linux-arm-msm@vger.kernel.org, andersson@kernel.org,
agross@kernel.org, krzysztof.kozlowski@linaro.org
Cc: marijn.suijten@somainline.org, Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
Neil Armstrong <neil.armstrong@linaro.org>,
Vinod Koul <vkoul@kernel.org>,
Douglas Anderson <dianders@chromium.org>,
Loic Poulain <loic.poulain@linaro.org>,
Vladimir Lypak <vladimir.lypak@gmail.com>,
Archit Taneja <architt@codeaurora.org>,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/10] drm/msm/dsi: dsi_host: Fix DSI index detection when version clash occurs
Date: Mon, 13 Feb 2023 10:19:12 +0100 [thread overview]
Message-ID: <4eed93cd-e5dd-9988-fd8a-4070922aab28@linaro.org> (raw)
In-Reply-To: <94882ab1-1eb0-b9f1-af70-dc070c96fd11@linaro.org>
On 11.02.2023 14:26, Dmitry Baryshkov wrote:
> On 11/02/2023 13:51, Konrad Dybcio wrote:
>> Now that msm_dsi_config is ready to accept multiple sets of registers
>> (where array[n][idx] holds the base registers of DSI(idx) for the nth
>> entry), loop through all available configs to resolve hw version
>> clashes.
>>
>> Fixes: 32280d66fd44 ("drm/msm/dsi: Don't get DSI index from DT")
>
> Do we really want to backport this patch (and other patches from this series to older kernels?)
>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>> drivers/gpu/drm/msm/dsi/dsi_cfg.h | 1 +
>> drivers/gpu/drm/msm/dsi/dsi_host.c | 12 +++++++-----
>> 2 files changed, 8 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.h b/drivers/gpu/drm/msm/dsi/dsi_cfg.h
>> index 03493cc6b772..4a47705234bd 100644
>> --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.h
>> +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.h
>> @@ -43,6 +43,7 @@ struct msm_dsi_config {
>> const int num_bus_clks;
>> /* Allow + 1 entry for the zero-terminator */
>> const resource_size_t io_start[VARIANTS_MAX][DSI_MAX + 1];
>> + const int num_variants;
>> };
>> struct msm_dsi_host_cfg_ops {
>> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
>> index f5092b4d0757..8dfa69bcff77 100644
>> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
>> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
>> @@ -1862,16 +1862,18 @@ static int dsi_host_get_id(struct msm_dsi_host *msm_host)
>> struct platform_device *pdev = msm_host->pdev;
>> const struct msm_dsi_config *cfg = msm_host->cfg_hnd->cfg;
>> struct resource *res;
>> - int i;
>> + int i, j, num_variants;
>> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dsi_ctrl");
>> if (!res)
>> return -EINVAL;
>> - for (i = 0; cfg->io_start[0][i]; i++) {
>> - if (cfg->io_start[0][i] == res->start)
>> - return i;
>> - }
>> + num_variants = cfg->num_variants ? cfg->num_variants : 1;
>> +
>> + for (i = 0; i < num_variants; i++)
>> + for (j = 0; cfg->io_start[i][j]; j++)
>> + if (cfg->io_start[i][j] == res->start)
>> + return j;
>> return -EINVAL;
>> }
>
> Please squash this together with the patch 'drm/msm/dsi: Turn msm_dsi_config::io_start into a 2d array'.
Ack
Konrad
>
next prev parent reply other threads:[~2023-02-13 9:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230211115110.1462920-1-konrad.dybcio@linaro.org>
2023-02-11 11:51 ` [PATCH 01/10] dt-bindings: display/msm: dsi-controller-main: Fix deprecated QCM2290 compatible Konrad Dybcio
2023-02-11 11:51 ` [PATCH 02/10] drm/msm/dsi: Turn msm_dsi_config::io_start into a 2d array Konrad Dybcio
2023-02-11 13:17 ` Dmitry Baryshkov
2023-02-13 9:16 ` Konrad Dybcio
2023-02-11 11:51 ` [PATCH 03/10] drm/msm/dsi: Zero-terminate msm_dsi_config::io_start Konrad Dybcio
2023-02-11 13:19 ` Dmitry Baryshkov
2023-02-13 9:18 ` Konrad Dybcio
2023-02-13 11:41 ` Dmitry Baryshkov
2023-02-11 11:51 ` [PATCH 04/10] drm/msm/dsi: dsi_host: Fix DSI index detection when version clash occurs Konrad Dybcio
2023-02-11 13:26 ` Dmitry Baryshkov
2023-02-13 9:19 ` Konrad Dybcio [this message]
2023-02-11 11:51 ` [PATCH 05/10] drm/msm/dsi: dsi_cfg: Deduplicate identical structs Konrad Dybcio
2023-02-11 15:52 ` Dmitry Baryshkov
2023-02-13 9:20 ` Konrad Dybcio
2023-02-11 11:51 ` [PATCH 06/10] drm/msm/dsi: dsi_cfg: Merge SC7180 config into SDM845 Konrad Dybcio
2023-02-11 15:52 ` Dmitry Baryshkov
2023-02-13 9:20 ` Konrad Dybcio
2023-02-11 11:51 ` [PATCH 07/10] drm/msm/dsi: Switch the QCM2290-specific compatible to index autodetection Konrad Dybcio
2023-02-11 11:51 ` [PATCH 08/10] drm/msm/dsi: Remove custom DSI config handling Konrad Dybcio
2023-02-11 15:53 ` Dmitry Baryshkov
2023-02-11 11:51 ` [PATCH 09/10] dt-bindings: display/msm: dsi-controller-main: Add SM6115 Konrad Dybcio
2023-02-11 11:51 ` [PATCH 10/10] arm64: dts: qcom: sm6115: Use the correct DSI compatible Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4eed93cd-e5dd-9988-fd8a-4070922aab28@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=architt@codeaurora.org \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=marijn.suijten@somainline.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=vkoul@kernel.org \
--cc=vladimir.lypak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox