1. 16 10月, 2015 1 次提交
  2. 30 9月, 2015 1 次提交
    • D
      drm/doc: Update docs about device instance setup · 6e3f797c
      Daniel Vetter 提交于
      ->load is deprecated, bus functions are deprecated and everyone
      should use drm_dev_alloc&register.
      
      So update the .tmpl (and pull a bunch of the overview docs into the
      sourcecode to increase chances that it'll stay in sync in the future)
      and add notes to functions which are deprecated. I didn't bother to
      clean up and document the unload sequence similarly since that one is
      still a bit a mess: drm_dev_unregister does way too much,
      drm_unplug_dev does what _unregister should be doing but then has the
      complication of promising something it doesn't actually do (it doesn't
      unplug existing open fds for instance, only prevents new ones).
      
      Motivated since I don't want to hunt every new driver for usage of
      drm_platform_init any more ;-)
      
      v2: Reword the deprecation note for ->load a bit, using Laurent's
      suggestion as an example (but making the wording a bit stronger even).
      Fix spelling in commit message.
      
      v3: More spelling fixes from Laurent.
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Acked-by: David Herrmann <dh.herrmann@gmail.com> (v2)
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6e3f797c
  3. 09 9月, 2015 1 次提交
    • D
      drm: move drm_class into drm_sysfs.c · fcc90213
      David Herrmann 提交于
      Right now, drm_sysfs_create() returns the newly allocated "struct class"
      to the caller (which is drm_core_init()), which then has to set the
      global variable 'drm_class'. During cleanup, though, we call
      drm_sysfs_destroy() which implicitly uses the global 'drm_class'. This is
      confusing, as ownership of the global 'drm_class' is non-obvious.
      
      This patch changes drm_sysfs_create() to drm_sysfs_init() and makes it
      initialize the 'drm_class' object directly, rather than returning it.
      This way, both drm_sysfs_init() and drm_sysfs_destroy() work in a similar
      fashion and manage the global drm class.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fcc90213
  4. 08 9月, 2015 1 次提交
  5. 22 7月, 2015 1 次提交
  6. 02 7月, 2015 2 次提交
    • D
      drm: Convert drm_legacy_ctxbitmap_init to void return type · ba6976c1
      Daniel Vetter 提交于
      It can't fail really.
      
      Also remove the redundant kms check Peter added.
      
      Cc: Peter Antoine <peter.antoine@intel.com>
      Reviewed-by: NPeter Antoine <peter.antoine@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      ba6976c1
    • P
      drm: Turn off Legacy Context Functions · 0e975980
      Peter Antoine 提交于
      The context functions are not used by the i915 driver and should not
      be used by modeset drivers. These driver functions contain several bugs
      and security holes. This change makes these functions optional can be
      turned on by a setting, they are turned off by default for modeset
      driver with the exception of the nouvea driver that may require them with
      an old version of libdrm.
      
      The previous attempt was
      
      commit 7c510133
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Aug 8 15:41:21 2013 +0200
      
          drm: mark context support as a legacy subsystem
      
      but this had to be reverted
      
      commit c21eb21c
      Author: Dave Airlie <airlied@redhat.com>
      Date:   Fri Sep 20 08:32:59 2013 +1000
      
          Revert "drm: mark context support as a legacy subsystem"
      
      v2: remove returns from void function, and formatting (Daniel Vetter)
      
      v3:
      - s/Nova/nouveau/ in the commit message, and add references to the
        previous attempts
      - drop the part touching the drm hw lock, that should be a separate
        patch.
      
      Signed-off-by: Peter Antoine <peter.antoine@intel.com> (v2)
      Cc: Peter Antoine <peter.antoine@intel.com> (v2)
      Reviewed-by: NPeter Antoine <peter.antoine@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0e975980
  7. 24 6月, 2015 1 次提交
  8. 05 5月, 2015 3 次提交
  9. 13 3月, 2015 1 次提交
  10. 05 1月, 2015 1 次提交
    • R
      drm: add atomic properties · 88a48e29
      Rob Clark 提交于
      Once a driver is using atomic helpers for modeset, the next step is to
      switch over to atomic properties.  To do this, make sure that any
      modeset objects have their ->atomic_{get,set}_property() vfuncs suitably
      populated if they have custom properties (you did already remember to
      plug in atomic-helper func for the legacy ->set_property() vfuncs,
      right?), and then set DRIVER_ATOMIC bit in driver_features flag.
      
      A new cap is introduced, DRM_CLIENT_CAP_ATOMIC, for the purposes of
      shielding legacy userspace from atomic properties.  Mostly for the
      benefit of legacy DDX drivers that do silly things like getting/setting
      each property at startup (since some of the new atomic properties will
      be able to trigger modeset).
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      [danvet: Squash in fixup patch to check for DRM_MODE_PROP_ATOMIC
      instaed of the CAP define when filtering properties. Reported by
      Tvrtko Uruslin, acked by Rob.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88a48e29
  11. 25 11月, 2014 1 次提交
  12. 13 10月, 2014 1 次提交
  13. 03 10月, 2014 1 次提交
  14. 24 9月, 2014 1 次提交
  15. 12 9月, 2014 3 次提交
  16. 10 9月, 2014 2 次提交
  17. 08 8月, 2014 1 次提交
    • D
      Revert "drm: drop redundant drm_file->is_master" · 7963e9db
      Dave Airlie 提交于
      This reverts commit 48ba8137.
      
      Thanks to Chris:
      "drm_file->is_master is not synomous with having drm_file->master ==
      drm_file->minor->master. This is because drm_file->master is the same
      for all drm_files of the same generation and so when there is a master,
      every drm_file believes itself to be the master. Confusion ensues and
      things go pear shaped when one file is closed and there is no master
      anymore."
      
      Conflicts:
      	drivers/gpu/drm/drm_drv.c
      	drivers/gpu/drm/drm_stub.c
      7963e9db
  18. 07 8月, 2014 1 次提交
  19. 06 8月, 2014 2 次提交
  20. 05 8月, 2014 4 次提交
    • D
      drm: make sysfs device always available for minors · e1728075
      David Herrmann 提交于
      For each minor we allocate a sysfs device as minor->kdev. Currently, this
      is allocated and registered in drm_minor_register(). This makes it
      impossible to add sysfs-attributes to the device before it is registered.
      Therefore, they are not added atomically, nor can we move device_add()
      *after* ->load() is called.
      
      This patch makes minor->kdev available early, but only adds the device
      during minor-registration. Note that the registration is still called
      before ->load() as debugfs needs to be split, too. This will be fixed in
      follow-ups.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      e1728075
    • D
      drm: make minor->index available early · f1b85962
      David Herrmann 提交于
      Instead of allocating the minor-index during registration, we now do this
      during allocation. This way, debug-messages between minor-allocation and
      minor-registration will now use the correct minor instead of 0. Same is
      done for unregistration vs. free, so debug-messages between
      device-shutdown and device-destruction show proper indices.
      
      Even though minor-indices are allocated early, we don't enable minor
      lookup early. Instead, we keep the entry set to NULL and replace it during
      registration / unregistration. This way, the index is allocated but lookup
      only works if registered.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      f1b85962
    • D
      drm: move module initialization to drm_stub.c · 1b7199fe
      David Herrmann 提交于
      Most of the new DRM management functions are nowadays in drm_stub.c. By
      moving the core module initialization to drm_stub.c we can make several
      global variables static and keep the stub-open helper local.
      
      The core files now look like this:
        drm_stub.c: Core management
         drm_drv.c: Ioctl dispatcher
       drm_ioctl.c: Actual ioctl backends
        drm_fops.c: Char-dev file-operations
      
      A follow-up patch will move what is left from drm_drv.c into drm_ioctl.c.
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      1b7199fe
    • D
      drm: drop redundant drm_file->is_master · 48ba8137
      David Herrmann 提交于
      The drm_file->is_master field is redundant as it's equivalent to:
          drm_file->master && drm_file->master == drm_file->minor->master
      
      1) "=>"
        Whenever we set drm_file->is_master, we also set:
            drm_file->minor->master = drm_file->master;
      
        Whenever we clear drm_file->is_master, we also call:
            drm_master_put(&drm_file->minor->master);
        which implicitly clears it to NULL.
      
      2) "<="
        minor->master cannot be set if it is non-NULL. Therefore, it stays as
        is unless a file drops it.
      
        If minor->master is NULL, it is only set by places that also adjust
        drm_file->is_master.
      
      Therefore, we can safely drop is_master and replace it by an inline helper
      that matches:
          drm_file->master && drm_file->master == drm_file->minor->master
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      48ba8137
  21. 08 7月, 2014 2 次提交
  22. 18 6月, 2014 1 次提交
    • D
      drm: Don't export internal module variables · a1bc07c5
      Daniel Vetter 提交于
      Drivers really have no business touching these. Noticed because
      exynose _did_ touch the vblank off delay, which could potentially
      affect other drivers.
      
      drm_debug is an exception since it's used in macros and inline
      functions.
      
      Note that this reduces the timeout on exynos from 50s to 5s.
      Apparently this was done to paper over a vblank get/put race in
      exynos, but really should be fixed properly somewhere else. Spotted by
      David.
      
      v2: Drop bonghits changes. Note to self: Don't submit patches
      before first coffee.
      
      Cc: Inki Dae <inki.dae@samsung.com>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a1bc07c5
  23. 06 6月, 2014 2 次提交
  24. 16 5月, 2014 1 次提交
  25. 23 4月, 2014 2 次提交
  26. 22 4月, 2014 1 次提交
  27. 02 4月, 2014 1 次提交