From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
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 2/7] drm/msm/dpu: drop dpu_encoder_early_unregister
Date: Tue, 2 May 2023 13:59:25 -0700 [thread overview]
Message-ID: <1953c899-b034-52d7-9ff0-914ca0bb5196@quicinc.com> (raw)
In-Reply-To: <CAA8EJprD6biRhcx5pAJvb4Jfz_L-88_=zeySReN2Y5Nrtq+_Lw@mail.gmail.com>
On 5/2/2023 1:54 PM, Dmitry Baryshkov wrote:
> On Tue, 2 May 2023 at 23:45, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>>
>>
>> On 4/30/2023 4:57 PM, Dmitry Baryshkov wrote:
>>> There is no need to clean up debugfs manually, it will be done by the
>>> DRM core on device deregistration.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>>
>> There are two reasons to have the debugfs removed in the early_unregister:
>>
>> 1) Today, registration happens in late_register(), hence to balance the
>> the call in _dpu_encoder_init_debugfs(), this one is present.
>>
>> 2) In drm_modeset_register_all(), if drm_connector_register_all() fails,
>> it calls drm_encoder_unregister_all() first which calls early_unregister().
>>
>> So to balance these out, dont we need to keep it?
>
> Please correct me if I'm wrong, drm_debugfs_cleanup() should take care of that.
>
Not from what I am seeing, drm_debugfs_cleanup() is getting called from
the error handling path of drm_dev_register() and separately from
drm_dev_unregister() but not from the error handling path of
drm_modeset_register_all().
So that case will be unbalanced with this change.
>>> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 8 --------
>>> 1 file changed, 8 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>>> index 32785cb1b079..8c45c949ec39 100644
>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>>> @@ -2154,13 +2154,6 @@ static int dpu_encoder_late_register(struct drm_encoder *encoder)
>>> return _dpu_encoder_init_debugfs(encoder);
>>> }
>>>
>>> -static void dpu_encoder_early_unregister(struct drm_encoder *encoder)
>>> -{
>>> - struct dpu_encoder_virt *dpu_enc = to_dpu_encoder_virt(encoder);
>>> -
>>> - debugfs_remove_recursive(dpu_enc->debugfs_root);
>>> -}
>>> -
>>> static int dpu_encoder_virt_add_phys_encs(
>>> struct msm_display_info *disp_info,
>>> struct dpu_encoder_virt *dpu_enc,
>>> @@ -2374,7 +2367,6 @@ static const struct drm_encoder_helper_funcs dpu_encoder_helper_funcs = {
>>> static const struct drm_encoder_funcs dpu_encoder_funcs = {
>>> .destroy = dpu_encoder_destroy,
>>> .late_register = dpu_encoder_late_register,
>>> - .early_unregister = dpu_encoder_early_unregister,
>>> };
>>>
>>> struct drm_encoder *dpu_encoder_init(struct drm_device *dev,
>
next prev parent reply other threads:[~2023-05-02 20:59 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-30 23:57 [PATCH 0/7] drm/msm/dpu: simplify DPU encoder init Dmitry Baryshkov
2023-04-30 23:57 ` [PATCH 1/7] drm/msm/dpu: merge dpu_encoder_init() and dpu_encoder_setup() Dmitry Baryshkov
2023-05-01 19:58 ` Abhinav Kumar
2023-05-01 20:45 ` Dmitry Baryshkov
2023-05-01 21:22 ` Abhinav Kumar
2023-05-01 21:27 ` Dmitry Baryshkov
2023-05-02 20:27 ` Abhinav Kumar
2023-04-30 23:57 ` [PATCH 2/7] drm/msm/dpu: drop dpu_encoder_early_unregister Dmitry Baryshkov
2023-05-02 20:45 ` Abhinav Kumar
2023-05-02 20:54 ` Dmitry Baryshkov
2023-05-02 20:59 ` Abhinav Kumar [this message]
2023-05-02 21:04 ` Dmitry Baryshkov
2023-04-30 23:57 ` [PATCH 3/7] drm/msm/dpu: separate common function to init physical encoder Dmitry Baryshkov
2023-05-02 21:33 ` Abhinav Kumar
2023-05-02 21:36 ` Dmitry Baryshkov
2023-04-30 23:57 ` [PATCH 4/7] drm/msm/dpu: drop duplicated intf/wb indices from encoder structs Dmitry Baryshkov
2023-05-02 23:04 ` Abhinav Kumar
2023-05-02 23:15 ` Dmitry Baryshkov
2023-05-02 23:19 ` Abhinav Kumar
2023-05-02 23:53 ` Dmitry Baryshkov
2023-04-30 23:57 ` [PATCH 5/7] drm/msm/dpu: inline dpu_encoder_get_wb() Dmitry Baryshkov
2023-05-02 23:51 ` Abhinav Kumar
2023-05-02 23:54 ` Dmitry Baryshkov
2023-05-02 23:58 ` Abhinav Kumar
2023-05-02 23:59 ` Dmitry Baryshkov
2023-04-30 23:57 ` [PATCH 6/7] drm/msm/dpu: call dpu_rm_get_intf() from dpu_encoder_get_intf() Dmitry Baryshkov
2023-05-02 23:57 ` Abhinav Kumar
2023-05-02 23:58 ` Dmitry Baryshkov
2023-05-03 0:04 ` [Freedreno] " Abhinav Kumar
2023-04-30 23:57 ` [PATCH 7/7] drm/msm/dpu: drop dpu_encoder_phys_ops.atomic_mode_set Dmitry Baryshkov
2023-05-03 0:01 ` Dmitry Baryshkov
2023-05-03 22:42 ` [PATCH 0/7] drm/msm/dpu: simplify DPU encoder init Abhinav Kumar
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=1953c899-b034-52d7-9ff0-914ca0bb5196@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=daniel@ffwll.ch \
--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=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