From: David Herrmann <dh.herrmann@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 00/13] DRM Reliable Minor-IDs
Date: Wed, 29 Jan 2014 15:01:47 +0100 [thread overview]
Message-ID: <1391004120-687-1-git-send-email-dh.herrmann@gmail.com> (raw)
Hi
I was looking into our minor-allocation code and it has one major drawback:
char-dev minor-IDs are unreliable. The <id>+128 hacks we use in user-space to
calculate render-node IDs based on the original card just does not work.
Instead of allocating dummy IDs for each driver, I went ahead and tried to fix
it properly. So this series changes the minor-ID management to just allocate a
single dev->minor_base ID instead of one ID per "drm_minor". Now we can use this
base to calculate the correct offset minor-ID for each existing DRM-minor.
While at it, I introduced drm-refcounts to make minor-lookup independent of
drm_global_mutex. This is still not finished (and dev->open_count still exists)
but I already have the next patches waiting here.
Comments welcome!
Branch is also available here:
http://cgit.freedesktop.org/~dvdhrm/linux/log/?h=minor
If someone could pull this into their tree and push to Fengguang's
test-framework, I'd appreciate it a lot! I'm still waiting for a reply from him.
Thanks
David
David Herrmann (13):
drm: group dev-lifetime related members
drm: skip redundant minor-lookup in open path
drm: remove unused DRM_MINOR_UNASSIGNED
drm: turn DRM_MINOR_* into enum
drm: provide device-refcount
drm: add minor-lookup/release helpers
drm: allocate minors early
drm: move drm_put_minor() to drm_minor_free()
drm: rename drm_unplug/get_minor() to drm_minor_register/unregister()
drm: remove unneeded #ifdef CONFIG_DEBUGFS
drm: remove redundant minor->device field
drm: make minor-IDs reliable
drm: remove redundant minor->index
drivers/gpu/drm/drm_drv.c | 4 +-
drivers/gpu/drm/drm_fops.c | 74 ++---
drivers/gpu/drm/drm_info.c | 2 +-
drivers/gpu/drm/drm_pci.c | 4 +-
drivers/gpu/drm/drm_platform.c | 4 +-
drivers/gpu/drm/drm_stub.c | 418 ++++++++++++++++--------
drivers/gpu/drm/drm_sysfs.c | 8 +-
drivers/gpu/drm/drm_usb.c | 4 +-
drivers/gpu/drm/i915/i915_gpu_error.c | 2 +-
drivers/gpu/drm/i915/i915_trace.h | 20 +-
drivers/gpu/drm/msm/msm_fbdev.c | 2 +-
drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +-
drivers/gpu/drm/radeon/atombios_encoders.c | 2 +-
drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 2 +-
drivers/gpu/drm/radeon/radeon_trace.h | 2 +-
drivers/gpu/drm/tegra/bus.c | 4 +-
include/drm/drmP.h | 44 ++-
17 files changed, 382 insertions(+), 216 deletions(-)
--
1.8.5.3
next reply other threads:[~2014-01-29 14:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 14:01 David Herrmann [this message]
2014-01-29 14:01 ` [PATCH 01/13] drm: group dev-lifetime related members David Herrmann
2014-01-29 14:01 ` [PATCH 02/13] drm: skip redundant minor-lookup in open path David Herrmann
2014-01-29 14:01 ` [PATCH 03/13] drm: remove unused DRM_MINOR_UNASSIGNED David Herrmann
2014-01-29 14:01 ` [PATCH 04/13] drm: turn DRM_MINOR_* into enum David Herrmann
2014-01-29 14:01 ` [PATCH 05/13] drm: provide device-refcount David Herrmann
2014-02-12 13:25 ` Daniel Vetter
2014-02-12 14:44 ` David Herrmann
2014-02-12 16:26 ` Daniel Vetter
2014-02-12 16:40 ` Greg KH
2014-02-12 17:48 ` David Herrmann
2014-02-12 18:31 ` Daniel Vetter
2014-02-12 18:38 ` Greg KH
2014-02-21 7:01 ` Thierry Reding
2014-02-24 13:51 ` David Herrmann
2014-01-29 14:01 ` [PATCH 06/13] drm: add minor-lookup/release helpers David Herrmann
2014-02-21 7:09 ` Thierry Reding
2014-02-21 7:34 ` David Herrmann
2014-02-21 7:37 ` Thierry Reding
2014-01-29 14:01 ` [PATCH 07/13] drm: allocate minors early David Herrmann
2014-01-29 14:01 ` [PATCH 08/13] drm: move drm_put_minor() to drm_minor_free() David Herrmann
2014-01-29 14:01 ` [PATCH 09/13] drm: rename drm_unplug/get_minor() to drm_minor_register/unregister() David Herrmann
2014-02-21 7:21 ` Thierry Reding
2014-02-24 13:52 ` David Herrmann
2014-01-29 14:01 ` [PATCH 10/13] drm: remove unneeded #ifdef CONFIG_DEBUGFS David Herrmann
2014-01-29 14:01 ` [PATCH 11/13] drm: remove redundant minor->device field David Herrmann
2014-02-12 13:36 ` Daniel Vetter
2014-02-21 7:30 ` Thierry Reding
2014-02-21 20:07 ` David Herrmann
2014-01-29 14:01 ` [PATCH 12/13] drm: make minor-IDs reliable David Herrmann
2014-01-29 14:02 ` [PATCH 13/13] drm: remove redundant minor->index David Herrmann
2014-02-21 7:30 ` [PATCH 00/13] DRM Reliable Minor-IDs Thierry Reding
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=1391004120-687-1-git-send-email-dh.herrmann@gmail.com \
--to=dh.herrmann@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox