From: Kuogee Hsieh <quic_khsieh@quicinc.com>
To: <dri-devel@lists.freedesktop.org>, <robdclark@gmail.com>,
<sean@poorly.run>, <swboyd@chromium.org>, <dianders@chromium.org>,
<vkoul@kernel.org>, <daniel@ffwll.ch>, <airlied@linux.ie>,
<agross@kernel.org>, <dmitry.baryshkov@linaro.org>,
<bjorn.andersson@linaro.org>
Cc: <quic_abhinavk@quicinc.com>, <quic_aravindh@quicinc.com>,
<quic_sbillaka@quicinc.com>, <freedreno@lists.freedesktop.org>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/2] drm/msm: enable msm irq after all initializations are done successfully at msm_drm_init()
Date: Mon, 6 Jun 2022 10:40:36 -0700 [thread overview]
Message-ID: <68c6f375-5b11-98f2-83f5-1b481ea09ebd@quicinc.com> (raw)
In-Reply-To: <1654291716-6603-2-git-send-email-quic_khsieh@quicinc.com>
I will drop this patch since the problem had been fixed by Dmitry
Baryshkov patch.
https://gitlab.freedesktop.org/drm/msm/-/commit/577e2a9dfc8fba7938aaf75db63fae7e328cc3cb
On 6/3/2022 2:28 PM, Kuogee Hsieh wrote:
> At msm initialize phase, msm_drm_init() is called to initialize modules
> sequentially. It will call msm_drm_uninit() to clean up initialized phase
> if any module initialization return failed. This patch move msm_irq_install()
> to the last step of msm_drm_init() after all modules are initialized successfully
> so that no msm_irq_unistall() required at msm_drm_uninit() if any module
> initialization failed happen at msm_drm_init().
>
> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 29 ++++++-----------------------
> 1 file changed, 6 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 6665c5a..ab42e9a 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -132,15 +132,6 @@ static int msm_irq_install(struct drm_device *dev, unsigned int irq)
> return 0;
> }
>
> -static void msm_irq_uninstall(struct drm_device *dev)
> -{
> - struct msm_drm_private *priv = dev->dev_private;
> - struct msm_kms *kms = priv->kms;
> -
> - kms->funcs->irq_uninstall(kms);
> - free_irq(kms->irq, dev);
> -}
> -
> struct msm_vblank_work {
> struct work_struct work;
> int crtc_id;
> @@ -232,10 +223,6 @@ static int msm_drm_uninit(struct device *dev)
>
> drm_mode_config_cleanup(ddev);
>
> - pm_runtime_get_sync(dev);
> - msm_irq_uninstall(ddev);
> - pm_runtime_put_sync(dev);
> -
> if (kms && kms->funcs)
> kms->funcs->destroy(kms);
>
> @@ -437,16 +424,6 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
> goto err_msm_uninit;
> }
>
> - if (kms) {
> - pm_runtime_get_sync(dev);
> - ret = msm_irq_install(ddev, kms->irq);
> - pm_runtime_put_sync(dev);
> - if (ret < 0) {
> - DRM_DEV_ERROR(dev, "failed to install IRQ handler\n");
> - goto err_msm_uninit;
> - }
> - }
> -
> ret = drm_dev_register(ddev, 0);
> if (ret)
> goto err_msm_uninit;
> @@ -467,6 +444,12 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
> if (ret)
> goto err_msm_uninit;
>
> + if (kms) {
> + pm_runtime_get_sync(dev);
> + msm_irq_install(ddev, kms->irq);
> + pm_runtime_put_sync(dev);
> + }
> +
> drm_kms_helper_poll_init(ddev);
>
> return 0;
next prev parent reply other threads:[~2022-06-06 17:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 21:28 [PATCH v1 0/2] Fix NOC fatal error if msm_drm_init() failed Kuogee Hsieh
2022-06-03 21:28 ` [PATCH v1 1/2] drm/msm: enable msm irq after all initializations are done successfully at msm_drm_init() Kuogee Hsieh
2022-06-06 17:40 ` Kuogee Hsieh [this message]
2022-06-03 21:28 ` [PATCH v1 2/2] drm/msm/dp: check core_initialized before disable interrupts at dp_display_unbind() Kuogee Hsieh
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=68c6f375-5b11-98f2-83f5-1b481ea09ebd@quicinc.com \
--to=quic_khsieh@quicinc.com \
--cc=agross@kernel.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--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=quic_abhinavk@quicinc.com \
--cc=quic_aravindh@quicinc.com \
--cc=quic_sbillaka@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
--cc=vkoul@kernel.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
all inboxes | Powered by JetHome®