Skip to content

DRM Reliable Minor-IDs

David Herrmann dri-devel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13drm: group dev-lifetime related membersinclude/drm/drmP.h+12 -90 replies
2/13drm: skip redundant minor-lookup in open pathdrivers/gpu/drm/drm_fops.c+7 -120 replies
3/13drm: remove unused DRM_MINOR_UNASSIGNEDinclude/drm/drmP.h+0 -10 replies
4/13drm: turn DRM_MINOR_* into enuminclude/drm/drmP.h+6 -30 replies
5/13drm: provide device-refcountdrivers/gpu/drm/drm_pci.c drivers/gpu/drm/drm_platform.c drivers/gpu/drm/drm_stub.c +3 more+56 -149 replies
6/13drm: add minor-lookup/release helpersdrivers/gpu/drm/drm_fops.c drivers/gpu/drm/drm_stub.c include/drm/drmP.h+70 -233 replies
7/13drm: allocate minors earlydrivers/gpu/drm/drm_stub.c+71 -390 replies
8/13drm: move drm_put_minor() to drm_minor_free()drivers/gpu/drm/drm_stub.c+18 -270 replies
9/13drm: rename drm_unplug/get_minor() to drm_minor_register/unregister()drivers/gpu/drm/drm_stub.c+17 -372 replies
10/13drm: remove unneeded #ifdef CONFIG_DEBUGFSdrivers/gpu/drm/drm_stub.c+0 -70 replies
11/13drm: remove redundant minor->device fielddrivers/gpu/drm/drm_drv.c drivers/gpu/drm/drm_fops.c drivers/gpu/drm/drm_stub.c +1 more+3 -53 replies
12/13drm: make minor-IDs reliabledrivers/gpu/drm/drm_fops.c drivers/gpu/drm/drm_stub.c include/drm/drmP.h+111 -420 replies
13/13drm: remove redundant minor->indexdrivers/gpu/drm/drm_fops.c drivers/gpu/drm/drm_info.c drivers/gpu/drm/drm_pci.c +13 more+43 -290 replies

Reviews trailers per patch

1 of 13 patches has a Reviewed-by or Acked-by.

PatchDaniel VetterThierry Reding
SeriesT-b
1/13
2/13
3/13
4/13
5/13
6/13
7/13
8/13
9/13
10/13
11/13R-b
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/13] DRM Reliable Minor-IDs

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(-)
Signature · 1 line
1.8.5.3