[PATCH 0/4] RFC: drm: Allow driver-specific ioctls to be registered

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marius Vlad <marius.vlad0@xxxxxxxxx>

Currently driver-specific ioctls have to be declared static and are confined to
DRM core driver. This patch series provides the means to remove those constrains
and allow to register driver-specific ioctls dynamically by keeping a list of
registered ioctls in struct drm_driver, then each component of the driver can
then register its own specific ioctls using this interface.

The driver must assign ioctl_register/ioctl_deregister in
its drm_driver structure in order to make use of it. 

While SoC drivers benefit the most from this approach (by not polluting DRM core
driver and allowing sub drivers to implement and register driver-specific 
ioctls dynamically), further patches shows how easy is to convert drm/i915 to 
this approach by registering GEM and perf ioctls separately.

Marius Vlad (4):
  drm/gpu: Support registering driver-specific ioctls dynamically
  drm/i915: Convert i915 to use ioctl_register/ioctl_deregister.
  drm/i915: Register perf_ ioctls directly in i915_perf file.
  drm/i915: Register GEM ioctls directly in i915_gem file.

 drivers/gpu/drm/drm_drv.c        |   1 +
 drivers/gpu/drm/drm_ioctl.c      |  99 ++++++++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_drv.c  | 107 +++++++++++++++------------------------
 drivers/gpu/drm/i915/i915_gem.c  |  52 +++++++++++++++++++
 drivers/gpu/drm/i915/i915_perf.c |  21 ++++++++
 include/drm/drm_drv.h            |  34 +++++++++++++
 include/drm/drm_ioctl.h          |   6 +++
 7 files changed, 249 insertions(+), 71 deletions(-)

-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux