All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/8] drm/i915: Register debugfs interface last
Date: Tue, 21 Jun 2016 15:20:38 +0200	[thread overview]
Message-ID: <20160621132038.GB23520@phenom.ffwll.local> (raw)
In-Reply-To: <1466499228-30290-6-git-send-email-chris@chris-wilson.co.uk>

On Tue, Jun 21, 2016 at 09:53:45AM +0100, Chris Wilson wrote:
> Currently debugfs files are created before the driver is even loads.
> This gives the opportunity for userspace to open that interface and poke
> around before the backing data structures are initialised - with the
> possibility of oopsing or worse.
> 
> Move the creation of the debugfs files to our registration phase, where
> we announce our presence to the world when we are ready, i.e the
> sequence changes from
> 
> 	drm_dev_register()
> 	 -> drm_minor_register()
> 	  -> drm_debugfs_init()
> 	   -> i915_debugfs_init()
> 	 -> i915_driver_load()
> 
> to
> 
> 	drm_dev_register()
> 	 -> drm_minor_register()
> 	  -> drm_debugfs_init()
> 	 -> i915_driver_load()
> 	  -> i915_debugfs_register()
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

->debugfs_init/cleanup() is another midlayer thing we probably should nuke
over the next decade or so, like with ->load/unload() ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-06-21 13:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21  8:53 Demidlayer i915 loading Chris Wilson
2016-06-21  8:53 ` [PATCH 1/8] drm/i915: Move panel's backlight setup next to panel init Chris Wilson
2016-06-21  8:53 ` [PATCH 2/8] drm/i915: Move registration actions to connector->late_register Chris Wilson
2016-06-21  8:53 ` [PATCH 3/8] drm/i915: Move backlight registration to connector registration Chris Wilson
2016-06-21  8:53 ` [PATCH 4/8] drm/i915: Move connector registration to driver registration Chris Wilson
2016-06-21 13:18   ` Daniel Vetter
2016-06-21 13:29     ` Chris Wilson
2016-06-21  8:53 ` [PATCH 5/8] drm/i915: Register debugfs interface last Chris Wilson
2016-06-21 13:20   ` Daniel Vetter [this message]
2016-06-21  8:53 ` [PATCH 6/8] drm/i915: Demidlayer driver loading Chris Wilson
2016-06-21 13:27   ` Daniel Vetter
2016-06-21 13:32     ` Chris Wilson
2016-06-21  8:53 ` [PATCH 7/8] drm/i915: Demidlayer driver unloading Chris Wilson
2016-06-21  8:53 ` [PATCH 8/8] drm/i915: Remove redundant drm_connector_register_all() Chris Wilson
2016-06-21 13:28   ` Daniel Vetter
2016-06-21 10:03 ` ✗ Ro.CI.BAT: failure for series starting with [1/8] drm/i915: Move panel's backlight setup next to panel init 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=20160621132038.GB23520@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --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.