Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
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>,
	Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: Re: [PATCH 7/8] drm/msm/dpu: drop dpu_core_perf_destroy()
Date: Mon, 3 Jul 2023 17:19:40 -0700	[thread overview]
Message-ID: <9c13ecf8-c093-e145-3a79-d0686fc5d6e7@quicinc.com> (raw)
In-Reply-To: <CAA8EJpq43fKi=L11cyfBddcP+n994bhFchHcNprnR=Vu823BiA@mail.gmail.com>



On 7/3/2023 3:59 PM, Dmitry Baryshkov wrote:
> On Tue, 4 Jul 2023 at 01:57, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>>
>>
>> On 6/19/2023 5:08 PM, Dmitry Baryshkov wrote:
>>> This function does nothing, just clears several data pointers. Drop it
>>> now.
>>>
>>
>> This will undo what dpu_core_perf_init() did when an error happens.
>>
>> Why can we drop that?
> 
> Because nothing will use this data in an error case. There is no need
> to clean it.
> 

Usage is one thing for sure but I am still inclined to keep it symmetric 
with dpu_core_perf_init().

>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>>>    drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 12 ------------
>>>    drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h |  6 ------
>>>    drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c       |  1 -
>>>    3 files changed, 19 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
>>> index 78a7e3ea27a4..f779ad544347 100644
>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
>>> @@ -394,18 +394,6 @@ int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent)
>>>    }
>>>    #endif
>>>
>>> -void dpu_core_perf_destroy(struct dpu_core_perf *perf)
>>> -{
>>> -     if (!perf) {
>>> -             DPU_ERROR("invalid parameters\n");
>>> -             return;
>>> -     }
>>> -
>>> -     perf->max_core_clk_rate = 0;
>>> -     perf->core_clk = NULL;
>>> -     perf->dev = NULL;
>>> -}
>>> -
>>>    int dpu_core_perf_init(struct dpu_core_perf *perf,
>>>                struct drm_device *dev,
>>>                const struct dpu_perf_cfg *perf_cfg,
>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h
>>> index e8a7916b6f71..e1198c104b5e 100644
>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h
>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h
>>> @@ -69,12 +69,6 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
>>>     */
>>>    void dpu_core_perf_crtc_release_bw(struct drm_crtc *crtc);
>>>
>>> -/**
>>> - * dpu_core_perf_destroy - destroy the given core performance context
>>> - * @perf: Pointer to core performance context
>>> - */
>>> -void dpu_core_perf_destroy(struct dpu_core_perf *perf);
>>> -
>>>    /**
>>>     * dpu_core_perf_init - initialize the given core performance context
>>>     * @perf: Pointer to core performance context
>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>> index 6e62606e32de..4439147d2c35 100644
>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>> @@ -1162,7 +1162,6 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
>>>        return 0;
>>>
>>>    drm_obj_init_err:
>>> -     dpu_core_perf_destroy(&dpu_kms->perf);
>>>    hw_intr_init_err:
>>>    perf_err:
>>>    power_error:
> 
> 
> 

  reply	other threads:[~2023-07-04  0:19 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  0:08 [PATCH 0/8] drm/msm/dpu: cleanup dpu_core_perf module Dmitry Baryshkov
2023-06-20  0:08 ` [PATCH 1/8] drm/msm/dpu: drop enum dpu_core_perf_data_bus_id Dmitry Baryshkov
2023-06-20 10:35   ` Konrad Dybcio
2023-07-03 21:30   ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 2/8] drm/msm/dpu: drop performance tuning modes Dmitry Baryshkov
2023-06-20 10:45   ` Konrad Dybcio
2023-07-03 21:40   ` Abhinav Kumar
2023-07-03 22:20     ` Dmitry Baryshkov
2023-07-03 22:26       ` Abhinav Kumar
2023-07-03 22:36         ` Dmitry Baryshkov
2023-06-20  0:08 ` [PATCH 3/8] drm/msm/dpu: drop dpu_core_perf_params::max_per_pipe_ib Dmitry Baryshkov
2023-06-20 10:46   ` Konrad Dybcio
2023-06-20 10:53     ` Dmitry Baryshkov
2023-07-03 21:53   ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 4/8] drm/msm/dpu: rework indentation in dpu_core_perf Dmitry Baryshkov
2023-06-20 10:47   ` Konrad Dybcio
2023-07-03 22:01   ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 5/8] drm/msm/dpu: drop the dpu_core_perf_crtc_update()'s stop_req param Dmitry Baryshkov
2023-07-03 22:37   ` Abhinav Kumar
2023-07-03 22:53     ` Dmitry Baryshkov
2023-07-03 22:55       ` Abhinav Kumar
2023-07-03 23:01         ` Dmitry Baryshkov
2023-07-03 23:16           ` Abhinav Kumar
2023-07-04  0:28             ` Dmitry Baryshkov
2023-07-04  0:31               ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 6/8] drm/msm/dpu: use dpu_perf_cfg in DPU core_perf code Dmitry Baryshkov
2023-06-20 10:55   ` Konrad Dybcio
2023-06-20 11:18     ` Dmitry Baryshkov
2023-06-20 11:31       ` Konrad Dybcio
2023-07-04  0:46         ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 7/8] drm/msm/dpu: drop dpu_core_perf_destroy() Dmitry Baryshkov
2023-06-20 10:56   ` Konrad Dybcio
2023-07-03 22:57   ` Abhinav Kumar
2023-07-03 22:59     ` Dmitry Baryshkov
2023-07-04  0:19       ` Abhinav Kumar [this message]
2023-07-04 14:31         ` Dmitry Baryshkov
2023-06-20  0:08 ` [PATCH 8/8] drm/msm/dpu: remove unused fields from struct dpu_core_perf Dmitry Baryshkov
2023-06-20 10:56   ` Konrad Dybcio
2023-07-04  0:25   ` 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=9c13ecf8-c093-e145-3a79-d0686fc5d6e7@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=konrad.dybcio@linaro.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