From: Ayan Halder <Ayan.Halder@arm.com>
To: "james qian wang (Arm Technology China)"
<james.qian.wang@arm.com>, Liviu Dudau <Liviu.Dudau@arm.com>,
Brian Starkey <Brian.Starkey@arm.com>,
"airlied@linux.ie" <airlied@linux.ie>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
nd <nd@arm.com>
Subject: Re: [PATCH] drm/komeda: Enable/Disable vblank interrupts
Date: Thu, 13 Jun 2019 14:27:41 +0000 [thread overview]
Message-ID: <20190613142740.GA32394@arm.com> (raw)
In-Reply-To: <20190607181856.GK21222@phenom.ffwll.local>
On Fri, Jun 07, 2019 at 08:18:56PM +0200, Daniel Vetter wrote:
Hi Daniel,
> On Fri, Jun 07, 2019 at 03:03:39PM +0000, Ayan Halder wrote:
> > One needs to set "(struct drm_device *)->irq_enabled = true" to signal drm core
> > to enable vblank interrupts after the hardware has been initialized.
> > Correspondingly, one needs to disable vblank interrupts by setting
> > "(struct drm_device *)->irq_enabled = false" at the beginning of the
> > de-initializing routine.
>
> Only if you don't use the drm_irq_install helper. Quoting the kerneldoc in
> full:
>
> /**
> * @irq_enabled:
> *
> * Indicates that interrupt handling is enabled, specifically vblank
> * handling. Drivers which don't use drm_irq_install() need to set this
> * to true manually.
> */
> bool irq_enabled;
>
> Not entirely sure where you've found your quote, but it's not complete.
>
> Cheers, Daniel
Thanks for your review.
That was my quote which reflects my half-baked understanding of the
issue :(. I had missed reading the header files.
That said, I will squash my previous patch "drm/komeda: Avoid using
DRIVER_IRQ_SHARED" into this one as the current patch is a consequence
of the changes made in the previous patch.
Regards,
Ayan Kumar Halder
>
> >
> > Signed-off-by: Ayan Kumar halder <ayan.halder@arm.com>
> > ---
> > drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> > index 7b5cde14e3ba..b4fd8ee0d05f 100644
> > --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> > @@ -204,6 +204,8 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
> > if (err)
> > goto uninstall_irq;
> >
> > +drm->irq_enabled = true;
> > +
> > err = drm_dev_register(drm, 0);
> > if (err)
> > goto uninstall_irq;
> > @@ -211,6 +213,7 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
> > return kms;
> >
> > uninstall_irq:
> > +drm->irq_enabled = false;
> > drm_irq_uninstall(drm);
> > cleanup_mode_config:
> > drm_mode_config_cleanup(drm);
> > @@ -225,6 +228,7 @@ void komeda_kms_detach(struct komeda_kms_dev *kms)
> > struct drm_device *drm = &kms->base;
> > struct komeda_dev *mdev = drm->dev_private;
> >
> > +drm->irq_enabled = false;
> > mdev->funcs->disable_irq(mdev);
> > drm_dev_unregister(drm);
> > drm_irq_uninstall(drm);
> > --
> > 2.21.0
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
prev parent reply other threads:[~2019-06-13 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 15:03 [PATCH] drm/komeda: Enable/Disable vblank interrupts Ayan Halder
2019-06-07 18:18 ` Daniel Vetter
2019-06-13 14:27 ` Ayan Halder [this message]
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=20190613142740.GA32394@arm.com \
--to=ayan.halder@arm.com \
--cc=Brian.Starkey@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=james.qian.wang@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nd@arm.com \
/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