From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Daniel Vetter <daniel@ffwll.ch>,
Paulo Zanoni <przanoni@gmail.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 07/14] drm/i915: s/pm._irqs_disabled/pm.irqs_enabled/
Date: Fri, 3 Oct 2014 13:49:25 +0200 [thread overview]
Message-ID: <20141003114925.GF16117@phenom.ffwll.local> (raw)
In-Reply-To: <20141003092726.GY19278@nuc-i3427.alporthouse.com>
On Fri, Oct 03, 2014 at 10:27:26AM +0100, Chris Wilson wrote:
> On Fri, Oct 03, 2014 at 11:19:26AM +0200, Daniel Vetter wrote:
> > On Thu, Oct 02, 2014 at 05:36:11PM -0300, Paulo Zanoni wrote:
> > > 2014-09-30 5:56 GMT-03:00 Daniel Vetter <daniel.vetter@ffwll.ch>:
> > > > Double negations just parse harder. Also this allows us to ditch some
> > > > init code since clearing to 0 dtrt. Also ditch the assignment in
> > > > intel_pm_setup, that's not redundant since we do the assignement now
> > > > while setting up interrupts.
> > > >
> > > > While at it do engage in a bit of OCD and wrap up the few lines of
> > > > setup/teardown code into little helper functions: intel_irq_fini for
> > > > cleanup and intel_irq_init_hw for hw setup.
> > >
> > > So the werid thing is that we now have:
> > > - intel_irq_init
> > > - intel_irq_init_hw
> > > - intel_irq_fini
> > >
> > > But the intel_irq_fini doesn't finish what intel_irq_init started, it
> > > finishes what intel_irq_init_hw started. Since the functions you
> > > introduced are basically wrappers to drm_irq_{un,}install, my bikeshed
> > > would be to call the new functions simply intel_irq_install and
> > > intel_irq_uninstall.
> >
> > I like this idea, so changed the names while merging.
>
> Is it worth the divergence? I think the right pattern for other areas of
> the driver is:
>
> init
> while :
> resume
> suspend
> fini
>
> That becomes something like
>
> intel_irq_init
> i915_gem_init
> ...
> while :
> intel_irq_resume
> i915_gem_resume (formerly i95_gem_init_hw)
> ...
> i915_gem_suspend
> intel_irq_suspend
> ...
> i915_gem_fini
> intel_irq_fini
irq_install/uninstall is only done a driver load/unload time, so doesn't
really fit into the pattern. At runtime (for system suspend/resume and
anything else) we now disable/enable interrupts using the runtime pm
functions.
Unfoturnately that part is hand-rolled since runtime pm is still
completely orthogonal to system s/r.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-10-03 11:49 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 8:56 [PATCH 00/14] i915 kerneldocs part 1 Daniel Vetter
2014-09-30 8:56 ` [PATCH 01/14] drm/i915: Remove intel_modeset_suspend_hw Daniel Vetter
2014-09-30 8:56 ` [PATCH 02/14] drm/i915: Extract intel_runtime_pm.c Daniel Vetter
2014-09-30 12:22 ` Imre Deak
2014-09-30 8:56 ` [PATCH 03/14] drm/i915: Bikeshed rpm functions name a bit Daniel Vetter
2014-09-30 8:56 ` [PATCH 04/14] drm/i915: Move intel_display_set_init_power to intel_runtime_pm.c Daniel Vetter
2014-09-30 8:56 ` [PATCH 05/14] drm/i915: Call runtime_pm_disable directly Daniel Vetter
2014-09-30 12:46 ` Imre Deak
2014-09-30 8:56 ` [PATCH 06/14] drm/i915: Kerneldoc for intel_runtime_pm.c Daniel Vetter
2014-09-30 13:11 ` Imre Deak
2014-09-30 8:56 ` [PATCH 07/14] drm/i915: s/pm._irqs_disabled/pm.irqs_enabled/ Daniel Vetter
2014-10-02 20:36 ` Paulo Zanoni
2014-10-03 9:19 ` Daniel Vetter
2014-10-03 9:27 ` Chris Wilson
2014-10-03 11:49 ` Daniel Vetter [this message]
2014-09-30 8:56 ` [PATCH 08/14] drm/i915: Use dev_priv instead of dev in irq setup functions Daniel Vetter
2014-10-02 20:46 ` Paulo Zanoni
2014-09-30 8:56 ` [PATCH 09/14] drm/i915: kerneldoc for interrupt enable/disable functions Daniel Vetter
2014-10-02 20:55 ` Paulo Zanoni
2014-09-30 8:56 ` [PATCH 10/14] drm/i915: Extract intel_fifo_underrun.c Daniel Vetter
2014-09-30 8:56 ` [PATCH 11/14] drm/i915: Use dev_priv in public intel_fifo_underrun.c functions Daniel Vetter
2014-09-30 8:56 ` [PATCH 12/14] drm/i915: Add wrappers to handle fifo underrun interrupts Daniel Vetter
2014-09-30 8:56 ` [PATCH 13/14] drm/i915: Filter gmch fifo underruns in the shared handler Daniel Vetter
2014-09-30 8:56 ` [PATCH 14/14] drm/i915: kerneldoc for intel_fifo_underrun.c Daniel Vetter
2014-10-03 18:00 ` Paulo Zanoni
2014-10-03 20:51 ` Daniel Vetter
2014-09-30 13:16 ` [PATCH 00/14] i915 kerneldocs part 1 Imre Deak
2014-10-01 8:42 ` Daniel Vetter
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=20141003114925.GF16117@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=przanoni@gmail.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