1. 05 8月, 2014 1 次提交
    • 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
  2. 22 7月, 2014 1 次提交
  3. 03 7月, 2014 1 次提交
  4. 25 6月, 2014 1 次提交
  5. 28 3月, 2014 3 次提交
  6. 16 3月, 2014 1 次提交
  7. 18 12月, 2013 2 次提交
  8. 31 10月, 2013 1 次提交
  9. 30 10月, 2013 1 次提交
  10. 18 10月, 2013 1 次提交
  11. 09 10月, 2013 2 次提交
  12. 01 10月, 2013 1 次提交
  13. 30 8月, 2013 1 次提交
    • D
      drm: implement experimental render nodes · 1793126f
      David Herrmann 提交于
      Render nodes provide an API for userspace to use non-privileged GPU
      commands without any running DRM-Master. It is useful for offscreen
      rendering, GPGPU clients, and normal render clients which do not perform
      modesetting.
      
      Compared to legacy clients, render clients no longer need any
      authentication to perform client ioctls. Instead, user-space controls
      render/client access to GPUs via filesystem access-modes on the
      render-node. Once a render-node was opened, a client has full access to
      the client/render operations on the GPU. However, no modesetting or ioctls
      that affect global state are allowed on render nodes.
      
      To prevent privilege-escalation, drivers must explicitly state that they
      support render nodes. They must mark their render-only ioctls as
      DRM_RENDER_ALLOW so render clients can use them. Furthermore, they must
      support clients without any attached master.
      
      If filesystem access-modes are not enough for fine-grained access control
      to render nodes (very unlikely, considering the versaitlity of FS-ACLs),
      you may still fall-back to fd-passing from server to client (which allows
      arbitrary access-control). However, note that revoking access is
      currently impossible and unlikely to get implemented.
      
      Note: Render clients no longer have any associated DRM-Master as they are
      supposed to be independent of any server state. DRM core highly depends on
      file_priv->master to be non-NULL for modesetting/ctx/etc. commands.
      Therefore, drivers must be very careful to not require DRM-Master if they
      support DRIVER_RENDER.
      
      So far render-nodes are protected by "drm_rnodes". As long as this
      module-parameter is not set to 1, a driver will not create render nodes.
      This allows us to experiment with the API a bit before we stabilize it.
      
      v2: drop insecure GEM_FLINK to force use of dmabuf
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      1793126f
  14. 19 8月, 2013 6 次提交
  15. 07 8月, 2013 1 次提交
  16. 23 7月, 2013 3 次提交
  17. 28 6月, 2013 1 次提交
    • D
      drm: add hotspot support for cursors. · 4c813d4d
      Dave Airlie 提交于
      So it looks like for virtual hw cursors on QXL we need to inform
      the "hw" device what the cursor hotspot parameters are. This
      makes sense if you think the host has to draw the cursor and interpret
      clicks from it. However the current modesetting interface doesn't support
      passing the hotspot information from userspace.
      
      This implements a new cursor ioctl, that takes the hotspot info as well,
      userspace can try calling the new interface and if it gets -ENOSYS it means
      its on an older kernel and can just fallback.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      4c813d4d
  18. 10 5月, 2013 1 次提交
    • C
      drm: Use names of ioctls in debug traces · b9434d0f
      Chris Cummins 提交于
      The intention here is to make the output of dmesg with full verbosity a
      bit easier for a human to parse. This commit transforms:
      
      [drm:drm_ioctl], pid=699, cmd=0x6458, nr=0x58, dev 0xe200, auth=1
      [drm:drm_ioctl], pid=699, cmd=0xc010645b, nr=0x5b, dev 0xe200, auth=1
      [drm:drm_ioctl], pid=699, cmd=0xc0106461, nr=0x61, dev 0xe200, auth=1
      [drm:drm_ioctl], pid=699, cmd=0xc01c64ae, nr=0xae, dev 0xe200, auth=1
      [drm:drm_mode_addfb], [FB:32]
      [drm:drm_ioctl], pid=699, cmd=0xc0106464, nr=0x64, dev 0xe200, auth=1
      [drm:drm_vm_open_locked], 0x7fd9302fe000,0x00a00000
      [drm:drm_ioctl], pid=699, cmd=0x400c645f, nr=0x5f, dev 0xe200, auth=1
      [drm:drm_ioctl], pid=699, cmd=0xc00464af, nr=0xaf, dev 0xe200, auth=1
      [drm:intel_crtc_set_config], [CRTC:3] [NOFB]
      
      into:
      
      [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_THROTTLE
      [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_CREATE
      [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_SET_TILING
      [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, IOCTL_MODE_ADDFB
      [drm:drm_mode_addfb], [FB:32]
      [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_MMAP_GTT
      [drm:drm_vm_open_locked], 0x7fd9302fe000,0x00a00000
      [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_SET_DOMAIN
      [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, DRM_IOCTL_MODE_RMFB
      [drm:intel_crtc_set_config], [CRTC:3] [NOFB]
      
      v2: drm_ioctls is now a constant (Ville Syrjälä)
      Signed-off-by: NChris Cummins <christopher.e.cummins@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      b9434d0f
  19. 30 4月, 2013 2 次提交
  20. 16 4月, 2013 1 次提交
  21. 28 2月, 2013 1 次提交
  22. 03 10月, 2012 1 次提交
  23. 02 10月, 2012 1 次提交
    • R
      drm: change ioctl permissions · 2216c9e7
      Rob Clark 提交于
      Previously read-only KMS ioctls had some somewhat inconsistent settings
      regarding whether mastership was required.  For example, GETRESOURCES
      did not require master, but GETPLANERESOURCES, GETPROPERTY, etc. did.
      
      At least for debugging, it is nice to be able to use modetest to dump
      property values while another process is master, and there seems to
      be no harm in allowing read-only access to the KMS state to other
      processes.
      Signed-off-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      2216c9e7
  24. 13 9月, 2012 1 次提交
    • D
      drm: make buffer management work without DRM_MASTER · fb30edf5
      David Herrmann 提交于
      DRM users should be able to create/destroy/manage dumb- and frame-buffers
      without DRM_MASTER. These ioctls do not affect modesetting so there is no
      reason to protect them by drm-master. Particularly, destroying buffers
      should always be possible as a client has only access to buffers that they
      created. Hence, there is no reason to prevent a client from destroying the
      buffers, considering a simple close() would destroy them, anyway.
      
      Furthermore, a display-server currently cannot shutdown correctly if it
      does not have DRM_MASTER. If some other display-server becomes active (or
      the kernel console), then the background display-server is unable to
      destroy its buffers.
      Under special curcumstances (like monitor reconfiguration) this might even
      happen during runtime.
      Signed-off-by: NDavid Herrmann <dh.herrmann@googlemail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      fb30edf5
  25. 20 7月, 2012 1 次提交
  26. 21 6月, 2012 1 次提交
  27. 17 5月, 2012 1 次提交
  28. 30 3月, 2012 1 次提交