From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Tian Tao <tiantao6@hisilicon.com>, Jyri Sarha <jsarha@ti.com>,
Dave Airlie <airlied@linux.ie>,
dri-devel <dri-devel@lists.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/tidss: Use the new api devm_drm_irq_install
Date: Wed, 9 Dec 2020 14:41:18 +0200 [thread overview]
Message-ID: <0eb3f134-877e-4518-2185-8e97cddbfb4d@ti.com> (raw)
In-Reply-To: <CAKMK7uH25qMZy0fLVTAu+Um5r0A-iCQtGc5yFFwNHXd3KZ3VBQ@mail.gmail.com>
On 09/12/2020 14:08, Daniel Vetter wrote:
> On Wed, Dec 9, 2020 at 1:06 PM Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>>
>> On 09/12/2020 13:56, Daniel Vetter wrote:
>>> On Wed, Dec 9, 2020 at 12:29 PM Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>>>>
>>>> On 09/12/2020 02:48, Daniel Vetter wrote:
>>>>> On Tue, Dec 08, 2020 at 03:50:59PM +0800, Tian Tao wrote:
>>>>>> Use devm_drm_irq_install to register interrupts so that
>>>>>> drm_irq_uninstall is not needed to be called.
>>>>>>
>>>>>> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
>>>>>
>>>>> There's another drm_irq_install in the error path. But I'm not sure this
>>>>> is safe since you're chaning the order in which things get cleaned up now.
>>>>> So leaving this up to Tomi.
>>>>
>>>> Right, I don't think this works. tidss irq_uninstall uses runtime_get/put, which needs to happen
>>>> before pm_runtime_disable. With devm_drm_irq_install that's not the case.
>>>
>>> Hm I don't spot devm_ versions of these, surely we're not the only
>>> ones with this problem?
>>
>> drm-misc-next has these. hisilicon uses it, but doesn't have an irq_uninstall hook, so possibly late
>> uninstall is fine there.
>
> I meant a devm_ version of pm_runtime_enable. Or some other way to
> make this just work.
I see. No, I don't think we have.
Also, I feel a bit uncomfortable with devm'ified irq request/free. devm is fine for allocs and
reserving stuff, but this one affects the HW state, and your irq handler could get called until devm
frees the irq at some late point of time.
Well, it can be made to work, but just need to be careful. I've had my irq handlers getting called
too early or too late so many times that I'm a bit paranoid about it =).
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
prev parent reply other threads:[~2020-12-09 12:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 7:50 Tian Tao
2020-12-08 11:21 ` kernel test robot
2020-12-09 0:48 ` Daniel Vetter
2020-12-09 11:29 ` Tomi Valkeinen
2020-12-09 11:56 ` Daniel Vetter
2020-12-09 12:06 ` Tomi Valkeinen
2020-12-09 12:08 ` Daniel Vetter
2020-12-09 12:41 ` Tomi Valkeinen [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=0eb3f134-877e-4518-2185-8e97cddbfb4d@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiantao6@hisilicon.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
all inboxes | Powered by JetHome®