From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Jessica Zhang <quic_jesszhan@quicinc.com>
Cc: 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>,
quic_abhinavk@quicinc.com, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/4] drm/msm/dpu: Enable widebus for DSI INTF
Date: Thu, 17 Aug 2023 20:07:04 +0300 [thread overview]
Message-ID: <f1b89b4c-bf6c-42c9-8a62-acc41747cb1e@linaro.org> (raw)
In-Reply-To: <34598a37-7431-4f7e-7809-928bce65d237@quicinc.com>
On 08/08/2023 00:40, Jessica Zhang wrote:
>
>
> On 8/2/2023 11:20 AM, Dmitry Baryshkov wrote:
>> On Wed, 2 Aug 2023 at 21:09, Jessica Zhang <quic_jesszhan@quicinc.com>
>> wrote:
>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
>>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
>>> index df88358e7037..dace6168be2d 100644
>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
>>> @@ -69,8 +69,10 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg(
>>> phys_enc->hw_intf,
>>> phys_enc->hw_pp->idx);
>>>
>>> - if (intf_cfg.dsc != 0)
>>> + if (intf_cfg.dsc != 0) {
>>> cmd_mode_cfg.data_compress = true;
>>> + cmd_mode_cfg.wide_bus_en =
>>> dpu_encoder_is_widebus_enabled(phys_enc->parent);
>>> + }
>>
>> This embeds the knowledge that a wide bus can only be enabled when DSC
>> is in use. Please move the wide_bus_en assignment out of conditional
>> code.
>
> Wide bus for DSI will only be enabled if DSC is enabled, so this is
> technically not wrong, as DP will use the video mode path.
>
>>
>>>
>>> if (phys_enc->hw_intf->ops.program_intf_cmd_cfg)
>>>
>>> phys_enc->hw_intf->ops.program_intf_cmd_cfg(phys_enc->hw_intf,
>>> &cmd_mode_cfg);
>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
>>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
>>> index 8ec6505d9e78..dc6f3febb574 100644
>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
>>> @@ -521,6 +521,9 @@ static void
>>> dpu_hw_intf_program_intf_cmd_cfg(struct dpu_hw_intf *ctx,
>>
>> This function is only enabled for DPU >= 7.0, while IIRC wide bus can
>> be enabled even for some of the earlier chipsets.
>
> The command mode path is only called for DSI, which only supports wide
> bus for DPU 7.0+.
After second consideration, let's ignore this part, as wide bus will
only be enabled for DSI / CMD after 7.0. If we ever have SoC that has
CMD + wide_bus earlier than 5.0, we can reconsider this code pice.
Can you please add a comment that the register itself is present earlier
(5.0), but it doesn't have to be programmed since the flags will not be
set anyway.
>
>>
>>> if (cmd_mode_cfg->data_compress)
>>> intf_cfg2 |= INTF_CFG2_DCE_DATA_COMPRESS;
>>>
>>> + if (cmd_mode_cfg->wide_bus_en)
>>> + intf_cfg2 |= INTF_CFG2_DATABUS_WIDEN;
>>> +
>>> DPU_REG_WRITE(&ctx->hw, INTF_CONFIG2, intf_cfg2);
>>> }
>>>
--
With best wishes
Dmitry
next prev parent reply other threads:[~2023-08-17 17:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 18:08 [PATCH v3 0/4] drm/msm: Enable widebus for DSI Jessica Zhang
2023-08-02 18:08 ` [PATCH v3 1/4] drm/msm/dpu: Move DPU encoder wide_bus_en setting Jessica Zhang
2023-08-02 18:22 ` Dmitry Baryshkov
2023-08-02 19:32 ` Marijn Suijten
2023-08-07 23:17 ` Jessica Zhang
2023-08-02 18:08 ` [PATCH v3 2/4] drm/msm/dpu: Enable widebus for DSI INTF Jessica Zhang
2023-08-02 18:20 ` Dmitry Baryshkov
2023-08-07 21:40 ` Jessica Zhang
2023-08-17 17:07 ` Dmitry Baryshkov [this message]
2023-08-02 19:39 ` Marijn Suijten
2023-08-07 22:21 ` Jessica Zhang
2023-08-02 18:08 ` [PATCH v3 3/4] drm/msm/dsi: Add DATABUS_WIDEN MDP_CTRL2 bit Jessica Zhang
2023-08-02 18:26 ` Dmitry Baryshkov
2023-08-02 18:08 ` [PATCH v3 4/4] drm/msm/dsi: Enable widebus for DSI Jessica Zhang
2023-08-02 18:25 ` 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=f1b89b4c-bf6c-42c9-8a62-acc41747cb1e@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=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®