git: drm: Stop using an embedded struct drm_device in driver softcs

Francois Tigeot ftigeot at crater.dragonflybsd.org
Tue Dec 10 09:52:20 PST 2019


commit bb916eedccae3a29e19c263eab72a41eaba1ac3d
Author: François Tigeot <ftigeot at wolfpond.org>
Date:   Tue Dec 10 18:45:22 2019 +0100

    drm: Stop using an embedded struct drm_device in driver softcs
    
    * All drm drivers use a struct drm_device record but are free to
      allocate it by themselves in different ways or let the generic
      drm subsystem code do it.
    
    * This drm_device record can even be part of another data structure,
      dynamically or statically allocated.
    
    * We cannot just assume the length of a drm_device structure in the
      softc memory block will be enough to store all driver private data.
    
    * Make the drm softc the equivalent of a void* pointer and let the
      upstream code behave as expected on Linux

Summary of changes:
 sys/dev/drm/drm_dragonfly.c     |  3 ++-
 sys/dev/drm/drm_drv.c           | 15 +++++++++------
 sys/dev/drm/drm_fops.c          | 21 ++++++++++++++++-----
 sys/dev/drm/i915/i915_drv.c     |  5 +++--
 sys/dev/drm/include/drm/drmP.h  |  4 ++++
 sys/dev/drm/radeon/radeon_drv.c | 20 +++++++-------------
 6 files changed, 41 insertions(+), 27 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bb916eedccae3a29e19c263eab72a41eaba1ac3d


-- 
DragonFly BSD source repository



More information about the Commits mailing list