From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Abhinav Kumar <quic_abhinavk@quicinc.com>,
Ryan McCann <quic_rmccann@quicinc.com>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: Rob Clark <robdclark@chromium.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
quic_jesszhan@quicinc.com
Subject: Re: [PATCH v4 5/6] drm/msm/dpu: Refactor printing of main blocks in device core dump
Date: Fri, 7 Jul 2023 05:19:57 +0300 [thread overview]
Message-ID: <dc937077-91bd-8c4f-b220-82df11efd215@linaro.org> (raw)
In-Reply-To: <da04a824-b44c-d6a0-3dfc-f1b8e8272195@quicinc.com>
On 07/07/2023 03:16, Abhinav Kumar wrote:
>
>
> On 7/6/2023 5:07 PM, Dmitry Baryshkov wrote:
>> On 06/07/2023 23:48, Ryan McCann wrote:
>>> Currently, the names of main blocks are hardcoded into the
>>> msm_disp_snapshot_add_block function rather than using the name that
>>> already exists in the catalog. Change this to take the name directly
>>> from
>>> the catalog instead of hardcoding it.
>>>
>>> Signed-off-by: Ryan McCann <quic_rmccann@quicinc.com>
>>> ---
>>> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 32
>>> ++++++++++++++++----------------
>>> 1 file changed, 16 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>> index aa8499de1b9f..70dbb1204e6c 100644
>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>> @@ -899,38 +899,38 @@ static void dpu_kms_mdp_snapshot(struct
>>> msm_disp_state *disp_state, struct msm_k
>>> /* dump CTL sub-blocks HW regs info */
>>> for (i = 0; i < cat->ctl_count; i++)
>>> - msm_disp_snapshot_add_block(disp_state, cat->ctl[i].len,
>>> - dpu_kms->mmio + cat->ctl[i].base, "ctl_%d", i);
>>> + msm_disp_snapshot_add_block(disp_state, cat->ctl[i].len,
>>> dpu_kms->mmio +
>>> + cat->ctl[i].base, cat->ctl[i].name);
>>
>> Splitting on the `+' sign is a bad idea. It makes it harder to read
>> the code. Please keep the first line as is, it is perfectly fine on
>> its own, and do just what you have stated in the commit message:
>> change printed block name.
>>
>
> Actually, I asked Ryan to fix the indent here in the same patch as he
> was touching this code anyway.
>
> So you would prefer thats left untouched?
Yes. The current one was definitely better than splitting in the middle
of a statement.
>
>>> /* dump DSPP sub-blocks HW regs info */
>>> for (i = 0; i < cat->dspp_count; i++)
>>> - msm_disp_snapshot_add_block(disp_state, cat->dspp[i].len,
>>> - dpu_kms->mmio + cat->dspp[i].base, "dspp_%d", i);
>>> + msm_disp_snapshot_add_block(disp_state, cat->dspp[i].len,
>>> dpu_kms->mmio +
>>> + cat->dspp[i].base, cat->dspp[i].name);
>>> /* dump INTF sub-blocks HW regs info */
>>> for (i = 0; i < cat->intf_count; i++)
>>> - msm_disp_snapshot_add_block(disp_state, cat->intf[i].len,
>>> - dpu_kms->mmio + cat->intf[i].base, "intf_%d", i);
>>> + msm_disp_snapshot_add_block(disp_state, cat->intf[i].len,
>>> dpu_kms->mmio +
>>> + cat->intf[i].base, cat->intf[i].name);
>>> /* dump PP sub-blocks HW regs info */
>>> for (i = 0; i < cat->pingpong_count; i++)
>>> - msm_disp_snapshot_add_block(disp_state, cat->pingpong[i].len,
>>> - dpu_kms->mmio + cat->pingpong[i].base,
>>> "pingpong_%d", i);
>>> + msm_disp_snapshot_add_block(disp_state,
>>> cat->pingpong[i].len, dpu_kms->mmio +
>>> + cat->pingpong[i].base, cat->pingpong[i].name);
>>> /* dump SSPP sub-blocks HW regs info */
>>> for (i = 0; i < cat->sspp_count; i++)
>>> - msm_disp_snapshot_add_block(disp_state, cat->sspp[i].len,
>>> - dpu_kms->mmio + cat->sspp[i].base, "sspp_%d", i);
>>> + msm_disp_snapshot_add_block(disp_state, cat->sspp[i].len,
>>> dpu_kms->mmio +
>>> + cat->sspp[i].base, cat->sspp[i].name);
>>> /* dump LM sub-blocks HW regs info */
>>> for (i = 0; i < cat->mixer_count; i++)
>>> - msm_disp_snapshot_add_block(disp_state, cat->mixer[i].len,
>>> - dpu_kms->mmio + cat->mixer[i].base, "lm_%d", i);
>>> + msm_disp_snapshot_add_block(disp_state, cat->mixer[i].len,
>>> dpu_kms->mmio +
>>> + cat->mixer[i].base, cat->mixer[i].name);
>>> /* dump WB sub-blocks HW regs info */
>>> for (i = 0; i < cat->wb_count; i++)
>>> - msm_disp_snapshot_add_block(disp_state, cat->wb[i].len,
>>> - dpu_kms->mmio + cat->wb[i].base, "wb_%d", i);
>>> + msm_disp_snapshot_add_block(disp_state, cat->wb[i].len,
>>> dpu_kms->mmio +
>>> + cat->wb[i].base, cat->wb[i].name);
>>> if (cat->mdp[0].features & BIT(DPU_MDP_PERIPH_0_REMOVED)) {
>>> msm_disp_snapshot_add_block(disp_state, MDP_PERIPH_TOP0,
>>> @@ -944,8 +944,8 @@ static void dpu_kms_mdp_snapshot(struct
>>> msm_disp_state *disp_state, struct msm_k
>>> /* dump DSC sub-blocks HW regs info */
>>> for (i = 0; i < cat->dsc_count; i++)
>>> - msm_disp_snapshot_add_block(disp_state, cat->dsc[i].len,
>>> - dpu_kms->mmio + cat->dsc[i].base, "dsc_%d", i);
>>> + msm_disp_snapshot_add_block(disp_state, cat->dsc[i].len,
>>> dpu_kms->mmio +
>>> + cat->dsc[i].base, cat->dsc[i].name);
>>> pm_runtime_put_sync(&dpu_kms->pdev->dev);
>>> }
>>>
>>
--
With best wishes
Dmitry
next prev parent reply other threads:[~2023-07-07 2:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 20:48 [PATCH v4 0/6] Add support to print sub-block registers in dpu hw catalog Ryan McCann
2023-07-06 20:48 ` [PATCH v4 1/6] drm/msm: Update dev core dump to not print backwards Ryan McCann
2023-07-06 20:48 ` [PATCH v4 2/6] drm/msm/dpu: Drop unused num argument from relevant macros Ryan McCann
2023-07-06 20:48 ` [PATCH v4 3/6] drm/msm/dpu: Define names for unnamed sblks Ryan McCann
2023-07-06 20:48 ` [PATCH v4 4/6] drm/msm/dpu: Remove redundant prefix/suffix in name of sub-blocks Ryan McCann
2023-07-06 20:48 ` [PATCH v4 5/6] drm/msm/dpu: Refactor printing of main blocks in device core dump Ryan McCann
2023-07-07 0:07 ` Dmitry Baryshkov
2023-07-07 0:16 ` Abhinav Kumar
2023-07-07 2:19 ` Dmitry Baryshkov [this message]
2023-07-07 2:24 ` Abhinav Kumar
2023-07-06 20:48 ` [PATCH v4 6/6] drm/msm/dpu: Update dev core dump to dump registers of sub-blocks Ryan McCann
2023-07-07 0:24 ` Dmitry Baryshkov
2023-07-07 20:49 ` Ryan McCann
2023-07-07 21:58 ` 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=dc937077-91bd-8c4f-b220-82df11efd215@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_jesszhan@quicinc.com \
--cc=quic_rmccann@quicinc.com \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
/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
all inboxes | Powered by JetHome®