From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Marijn Suijten <marijn.suijten@somainline.org>
Cc: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Stephen Boyd <swboyd@chromium.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Bjorn Andersson <andersson@kernel.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH 1/7] drm/msm/dpu: enable PINGPONG TE operations only when supported by HW
Date: Sun, 30 Jul 2023 02:18:10 +0300 [thread overview]
Message-ID: <bd59cd28-b3ba-1805-da2c-8ec6b0b2f1b0@linaro.org> (raw)
In-Reply-To: <sul276fwfmniat5dlkdj4rlw3dxjmqrg254iteblwbdlhwfxmg@4orla7ystkp4>
On 29/07/2023 21:31, Marijn Suijten wrote:
> On 2023-07-29 02:59:32, Dmitry Baryshkov wrote:
>> On 27/07/2023 23:03, Marijn Suijten wrote:
>>> On 2023-07-27 19:20:58, Dmitry Baryshkov wrote:
>>>> The DPU_PINGPONG_TE bit is set for all PINGPONG blocks on DPU < 5.0.
>>>> Rather than checking for the flag, check for the presense of the
>>>> corresponding interrupt line.
>>>>
>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>
>>> That's a smart use of the interrupt field. I both like it, and I do
>>> not. While we didn't do any validation for consistency previously, this
>>> means we now have multiple ways of controlling available "features":
>>>
>>> - Feature flags on hardware blocks;
>>> - Presence of certain IRQs;
>>> - DPU core revision.
>>
>> I hesitated here too. For INTF it is clear that there is no other good
>> way to check for the TE feature. For PP we can just check for the DPU
>> revision.
>
> For both we could additionally check the DPU revision, and for INTF we
> could check for TYPE_DSI. Both would aid in extra validation, if we
> require the IRQ to be present or absent under these conditions.
Yep, maybe that's better.
>
> It might also help to document this, either here and on the respective
> struct fields so that catalog implementers know when they should supply
> or leave out an IRQ?
Probably a WARN_ON would be enough.
>
> - Marijn
>
>>> Maybe that is more confusing to follow? Regardless of that I'm
>>> convinced that this patch does what it's supposed to and gets rid of
>>> some ambiguity. Maybe a comment above the IF explaining the "PP TE"
>>> feature could alleviate the above concerns thoo. Hence:
>>>
>>> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
>>>
>>>> ---
>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
>>>> index 9298c166b213..912a3bdf8ad4 100644
>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
>>>> @@ -296,7 +296,7 @@ struct dpu_hw_pingpong *dpu_hw_pingpong_init(const struct dpu_pingpong_cfg *cfg,
>>>> c->idx = cfg->id;
>>>> c->caps = cfg;
>>>>
>>>> - if (test_bit(DPU_PINGPONG_TE, &cfg->features)) {
>>>> + if (cfg->intr_rdptr) {
>>>> c->ops.enable_tearcheck = dpu_hw_pp_enable_te;
>>>> c->ops.disable_tearcheck = dpu_hw_pp_disable_te;
>>>> c->ops.connect_external_te = dpu_hw_pp_connect_external_te;
>>>> --
>>>> 2.39.2
>>>>
>>
>> --
>> With best wishes
>> Dmitry
>>
--
With best wishes
Dmitry
next prev parent reply other threads:[~2023-07-29 23:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 16:20 [PATCH 0/7] drm/msm/dpu: drop DPU_INTF_TE and DPU_PINGPONG_TE Dmitry Baryshkov
2023-07-27 16:20 ` [PATCH 1/7] drm/msm/dpu: enable PINGPONG TE operations only when supported by HW Dmitry Baryshkov
2023-07-27 20:03 ` Marijn Suijten
2023-07-28 23:59 ` Dmitry Baryshkov
2023-07-29 18:31 ` Marijn Suijten
2023-07-29 23:18 ` Dmitry Baryshkov [this message]
2023-07-30 19:26 ` Marijn Suijten
2023-07-27 20:05 ` Marijn Suijten
2023-07-28 23:46 ` Dmitry Baryshkov
2023-07-27 16:20 ` [PATCH 2/7] drm/msm/dpu: drop the DPU_PINGPONG_TE flag Dmitry Baryshkov
2023-07-27 20:08 ` Marijn Suijten
2023-07-27 16:21 ` [PATCH 3/7] drm/msm/dpu: inline _setup_intf_ops() Dmitry Baryshkov
2023-07-27 20:10 ` Marijn Suijten
2023-07-28 23:45 ` Dmitry Baryshkov
2023-07-29 18:28 ` Marijn Suijten
2023-07-29 18:45 ` Dmitry Baryshkov
2023-07-27 16:21 ` [PATCH 4/7] drm/msm/dpu: enable INTF TE operations only when supported by HW Dmitry Baryshkov
2023-07-27 20:12 ` Marijn Suijten
2023-07-30 0:22 ` Dmitry Baryshkov
2023-07-30 19:29 ` Marijn Suijten
2023-07-27 16:21 ` [PATCH 5/7] drm/msm/dpu: drop DPU_INTF_TE feature flag Dmitry Baryshkov
2023-07-27 20:14 ` Marijn Suijten
2023-07-27 20:16 ` Dmitry Baryshkov
2023-07-27 20:24 ` Marijn Suijten
2023-07-27 16:21 ` [PATCH 6/7] drm/msm/dpu: drop useless check from dpu_encoder_phys_cmd_te_rd_ptr_irq() Dmitry Baryshkov
2023-07-27 20:16 ` Marijn Suijten
2023-07-27 16:21 ` [PATCH 7/7] drm/msm/dpu: move INTF tearing checks to dpu_encoder_phys_cmd_init Dmitry Baryshkov
2023-07-27 20:22 ` Marijn Suijten
2023-07-27 20:25 ` Marijn Suijten
2023-07-30 0:16 ` Dmitry Baryshkov
2023-07-30 19:28 ` Marijn Suijten
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=bd59cd28-b3ba-1805-da2c-8ec6b0b2f1b0@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--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