All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 17/17] drm/i915: Split out load time interface registration
Date: Fri, 11 Mar 2016 22:51:22 +0200	[thread overview]
Message-ID: <1457729482.2935.14.camel@intel.com> (raw)
In-Reply-To: <20160311203841.GQ14143@nuc-i3427.alporthouse.com>

On Fri, 2016-03-11 at 20:38 +0000, Chris Wilson wrote:
> On Fri, Mar 11, 2016 at 10:11:20PM +0200, Imre Deak wrote:
> > On Fri, 2016-03-11 at 19:55 +0000, Chris Wilson wrote:
> > > On Fri, Mar 11, 2016 at 06:31:42PM +0200, Imre Deak wrote:
> > > > According to the new init phases scheme we should register the
> > > > device
> > > > making it available via some kernel internal or user space
> > > > interface as
> > > > the last step in the init sequence, so move the corresponding
> > > > code
> > > > to a
> > > > separate function.
> > > > 
> > > > Also add a TODO comment about code that still needs to be moved
> > > > around
> > > > to one of the init phases functions depending on what the role
> > > > and
> > > > effect
> > > > of that code is.
> > > > 
> > > > No functional change, except for the reordering of the unload
> > > > time
> > > > unregistration steps of sysfs wrt. acpi and opregion.
> > > > 
> > > > Suggested by Chris.
> > > > 
> > > > CC: Chris Wilson <chris@chris-wilson.co.uk>
> > > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/i915_dma.c | 83
> > > > +++++++++++++++++++++++++++
> > > > --------------
> > > >  1 file changed, 54 insertions(+), 29 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/i915_dma.c
> > > > b/drivers/gpu/drm/i915/i915_dma.c
> > > > index aaf1b17..43dcb5a 100644
> > > > --- a/drivers/gpu/drm/i915/i915_dma.c
> > > > +++ b/drivers/gpu/drm/i915/i915_dma.c
> > > > @@ -1209,6 +1209,53 @@ static void
> > > > i915_driver_cleanup_hw(struct
> > > > drm_i915_private *dev_priv)
> > > >  }
> > > >  
> > > >  /**
> > > > + * i915_driver_init_register - register the driver with the
> > > > rest
> > > > of the system
> > > > + * @dev_priv: device private
> > > > + *
> > > > + * Perform any steps necessary to make the driver available
> > > > via
> > > > kernel
> > > > + * internal or userspace interfaces.
> > > > + */
> > > > +static void i915_driver_init_register(struct drm_i915_private
> > > > *dev_priv)
> > > 
> > > This is the only one I didn't like. The problem with _register is
> > > that
> > > it makes me think of mmio register (yes, I know that's too
> > > driver-centric and the use of register_callback_interface is
> > > widespread.) A compromise would be
> > > 
> > > i915_driver_init_frameworks()
> > 
> > Ok, can rename it.
> > 
> > > Other than I got to here without spotting anything obnoxious or
> > > troublematic wrt to mmio/gem. The only thing we lack is fault
> > > injection
> > > into igt/drv_module_reload, maybe we can do
> > > 	i915.inject_fault = LOAD_MMIO | LOAD_FRAMEWORK etc
> > > The other tricky part is deciding on what the failure should be.
> > > For
> > > critical faults we just expect the module to fail to load, but
> > > for
> > > aspects like GEM, we just want to the GPU to be disabled but
> > > modesetting
> > > still work.
> > 
> > Yep sounds useful, but can we do it as a follow-up?
> 
> I'd rather not. The question is how much of this churn is covered by
> igt? I think the answer is scarily low, since half of this is error
> path
> during init. Adding a module paramter and then checking bits in each
> of
> the new phase functions is going to be a relatively simple job and
> lets
> us have a little more confidence that the changes + fixes are solid.

Yes not much coverage, but that means that probably there are already
existing issues. I specifically avoided touching any of the problematic
parts (in the modesetting init function) and I don't see anything in
this patchset that would make things worse (as you also pointed out).
Realistically, fixing up all the error path handling in the modesetting
path would be quite a bit of work. Otoh, this patchset is a dependency
on other PM related stuff that is quite late already, so I'd like to
progress with that. That's why I suggested to fix up the other parts
later.

--Imre

> The tricker part would be adding the loop over insmod i915.ko into
> drv_module_reload_basic, but well worth the bugs it is likely to
> uncover.
> -Chris
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-03-11 20:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 16:31 [PATCH 00/17] drm/i915: Split driver init step to phases Imre Deak
2016-03-11 16:31 ` [PATCH v2 01/17] Fix MCHBAR cleanup on the driver init error path Imre Deak
2016-03-15  6:30   ` David Weinehall
2016-03-11 16:31 ` [PATCH v2 02/17] drm/i915: Move load time PCH detect, DPIO, power domain SW init earlier Imre Deak
2016-03-11 16:31 ` [PATCH v2 03/17] drm/i915: Move load time IRQ " Imre Deak
2016-03-11 16:31 ` [PATCH v2 04/17] drm/i915: Move load time init of display/audio hooks earlier Imre Deak
2016-03-11 16:31 ` [PATCH v2 05/17] drm/i915: Move load time init of clock gating " Imre Deak
2016-03-11 19:57   ` Chris Wilson
2016-03-11 20:12     ` Imre Deak
2016-03-11 20:28   ` [PATCH v3] " Imre Deak
2016-03-11 16:31 ` [PATCH v2 06/17] drm/i915: Move load time runtime device info init earlier Imre Deak
2016-03-11 16:31 ` [PATCH v2 07/17] drm/i915: Move load time gem_load_init earlier Imre Deak
2016-03-11 16:31 ` [PATCH v2 08/17] drm/i915: Move load time runtime PM get later Imre Deak
2016-03-11 16:31 ` [PATCH v2 09/17] drm/i915: Move load time shrinker registration later Imre Deak
2016-03-11 16:31 ` [PATCH v2 10/17] drm/i915: Move load time audio component registration earlier Imre Deak
2016-03-11 16:31 ` [PATCH v2 11/17] drm/i915: Move unload time display power domain uninit later Imre Deak
2016-03-11 16:31 ` [PATCH v2 12/17] drm/i915: Move unload time GTT, MSI IRQ cleanup later Imre Deak
2016-03-11 16:31 ` [PATCH v2 13/17] drm/i915: Move unload time opregion unregistration earlier Imre Deak
2016-03-11 16:31 ` [PATCH v2 14/17] drm/i915: Split out load time early initialization Imre Deak
2016-03-11 16:31 ` [PATCH v2 15/17] drm/i915: Split out load time MMIO initialization Imre Deak
2016-03-11 16:31 ` [PATCH v2 16/17] drm/i915: Split out load time HW initialization Imre Deak
2016-03-11 16:31 ` [PATCH v2 17/17] drm/i915: Split out load time interface registration Imre Deak
2016-03-11 19:55   ` Chris Wilson
2016-03-11 20:11     ` Imre Deak
2016-03-11 20:38       ` Chris Wilson
2016-03-11 20:51         ` Imre Deak [this message]
2016-03-11 20:34   ` [PATCH v3 " Imre Deak
2016-03-14 11:00     ` [PATCH v4 " Imre Deak
2016-03-15  8:45       ` Daniel Vetter
2016-03-12  7:31 ` ✗ Fi.CI.BAT: failure for drm/i915: Split driver init step to phases (rev3) Patchwork
2016-03-14 11:33 ` ✗ Fi.CI.BAT: failure for drm/i915: Split driver init step to phases (rev4) Patchwork

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=1457729482.2935.14.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.