From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <freedreno@lists.freedesktop.org>,
Bjorn Andersson <andersson@kernel.org>,
<dri-devel@lists.freedesktop.org>,
Stephen Boyd <swboyd@chromium.org>,
<linux-arm-msm@vger.kernel.org>,
Marijn Suijten <marijn.suijten@somainline.org>,
Sean Paul <sean@poorly.run>
Subject: Re: [PATCH 5/6] drm/msm/dpu: use MDSS data for programming SSPP
Date: Fri, 28 Jul 2023 12:24:55 -0700 [thread overview]
Message-ID: <e9f9c27d-e3a1-0e47-6fc0-27d3755b853c@quicinc.com> (raw)
In-Reply-To: <ddb70b1e-57bb-a72f-018a-75da62cedb3a@linaro.org>
On 7/27/2023 8:26 AM, Dmitry Baryshkov wrote:
> On 27/07/2023 18:24, Abhinav Kumar wrote:
>>
>>
>> On 7/27/2023 1:39 AM, Dmitry Baryshkov wrote:
>>> On Thu, 27 Jul 2023 at 02:20, Abhinav Kumar
>>> <quic_abhinavk@quicinc.com> wrote:
>>>>
>>>>
>>>>
>>>> On 5/21/2023 10:10 AM, Dmitry Baryshkov wrote:
>>>>> Switch to using data from MDSS driver to program the SSPP fetch and
>>>>> UBWC
>>>>> configuration.
>>>>>
>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>> ---
>>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 18 +++++++++++-------
>>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 7 +++++--
>>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 16 +++++++++++++++-
>>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 +
>>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 3 ++-
>>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 2 ++
>>>>> 6 files changed, 36 insertions(+), 11 deletions(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
>>>>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
>>>>> index cf70a9bd1034..bfd82c2921af 100644
>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
>>>>> @@ -8,6 +8,8 @@
>>>>> #include "dpu_hw_sspp.h"
>>>>> #include "dpu_kms.h"
>>>>>
>>>>> +#include "msm_mdss.h"
>>>>> +
>>>>> #include <drm/drm_file.h>
>>>>>
>>>>> #define DPU_FETCH_CONFIG_RESET_VALUE 0x00000087
>>>>> @@ -308,26 +310,26 @@ static void dpu_hw_sspp_setup_format(struct
>>>>> dpu_sw_pipe *pipe,
>>>>> DPU_REG_WRITE(c, SSPP_FETCH_CONFIG,
>>>>> DPU_FETCH_CONFIG_RESET_VALUE |
>>>>> ctx->ubwc->highest_bank_bit << 18);
>>>>
>>>> Does this needs to be protected with if ctx->ubwc check?
>>>
>>> Yes... And it should have been already.
>>>
>>>>
>>>>> - switch (ctx->ubwc->ubwc_version) {
>>>>> - case DPU_HW_UBWC_VER_10:
>>>>> + switch (ctx->ubwc->ubwc_enc_version) {
>>>>> + case UBWC_1_0:
>>>>
>>>> The values of UBWC_x_x dont match the values of DPU_HW_UBWC_VER_xx.
>>>> What was the reason for the catalog to go with DPU_HW_UBWC_VER_xx in
>>>> the
>>>> catalog for the encoder version in the first place? Because looking at
>>>> the registers UBWC_x_x is the correct value.
>>>>
>>>> If we cannot find the reason why, it should be noted in the commit text
>>>> that the values we are using did change.
>>>
>>> Huh? This is just an enum. It isn't a part of uABI, nor it is written
>>> to the hardware.
>>>
>>
>> The reason is that, this switch case is moving from comparing one set
>> of values to totally different ones. So atleast that should be noted.
>>
>> First thing that struck me was this point because the enums UBWC_x_x
>> and DPU_HW_UBWC_VER_xx dont match.
>>
>
> Do you have any proposed text in mind?
>
I was doing some checking about this. The issue was that when this enum
was made, it missed using the SDE_HW_UBWC_VER macro
75 enum {
76 DPU_HW_UBWC_VER_10 = 0x100,
77 DPU_HW_UBWC_VER_20 = 0x200,
78 DPU_HW_UBWC_VER_30 = 0x300,
79 DPU_HW_UBWC_VER_40 = 0x400,
80 };
81
so something like this:
183 */
184 enum {
185 SDE_HW_UBWC_VER_10 = SDE_HW_UBWC_VER(0x100),
186 SDE_HW_UBWC_VER_20 = SDE_HW_UBWC_VER(0x200),
187 SDE_HW_UBWC_VER_30 = SDE_HW_UBWC_VER(0x300),
188 SDE_HW_UBWC_VER_40 = SDE_HW_UBWC_VER(0x400),
189 SDE_HW_UBWC_VER_43 = SDE_HW_UBWC_VER(0x431),
190 };
This macro handles that conversion under the hood.
So I would write something like this
"This also corrects the usage of UBWC version which was incorrect from
the beginning because of the enum storing the DPU_HW_UBWC_*** missed out
the conversion to the full UBWC version"
next prev parent reply other threads:[~2023-07-28 19:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-21 17:10 [PATCH 0/6] drm/msm/dpu: use UBWC data from MDSS driver Dmitry Baryshkov
2023-05-21 17:10 ` [PATCH 1/6] drm/msm/mdss: correct UBWC programming for SM8550 Dmitry Baryshkov
2023-05-21 17:10 ` [PATCH 2/6] drm/msm/mdss: rename ubwc_version to ubwc_enc_version Dmitry Baryshkov
2023-07-26 21:07 ` Abhinav Kumar
2023-05-21 17:10 ` [PATCH 3/6] drm/msm/mdss: export UBWC data Dmitry Baryshkov
2023-07-26 21:21 ` Abhinav Kumar
2023-07-26 21:32 ` Dmitry Baryshkov
2023-05-21 17:10 ` [PATCH 4/6] drm/msm/mdss: populate missing data Dmitry Baryshkov
2023-07-26 22:30 ` Abhinav Kumar
2023-07-26 22:58 ` Dmitry Baryshkov
2023-07-26 23:14 ` Abhinav Kumar
2023-07-27 8:37 ` Dmitry Baryshkov
2023-05-21 17:10 ` [PATCH 5/6] drm/msm/dpu: use MDSS data for programming SSPP Dmitry Baryshkov
2023-07-26 23:20 ` Abhinav Kumar
2023-07-27 8:39 ` Dmitry Baryshkov
2023-07-27 15:24 ` Abhinav Kumar
2023-07-27 15:26 ` Dmitry Baryshkov
2023-07-28 19:24 ` Abhinav Kumar [this message]
2023-07-28 19:29 ` Dmitry Baryshkov
2023-05-21 17:10 ` [PATCH 6/6] drm/msm/dpu: drop UBWC configuration Dmitry Baryshkov
2023-07-26 23:23 ` Abhinav Kumar
2023-05-21 21:50 ` [PATCH 0/6] drm/msm/dpu: use UBWC data from MDSS driver Steev Klimaszewski
2023-05-21 21:51 ` Dmitry Baryshkov
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=e9f9c27d-e3a1-0e47-6fc0-27d3755b853c@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
/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