1. 19 1月, 2015 1 次提交
    • T
      drm/vmwgfx: Replace the hw mutex with a hw spinlock · 496eb6fd
      Thomas Hellstrom 提交于
      Fixes a case where we call vmw_fifo_idle() from within a wait function with
      task state !TASK_RUNNING, which is illegal.
      
      In addition, make the locking fine-grained, so that it is performed once
      for every read- and write operation. This is of course more costly, but we
      don't perform much register access in the timing critical paths anyway. Instead
      we have the extra benefit of being sure that we don't forget the hw lock around
      register accesses. I think currently the kms code was quite buggy w r t this.
      
      This fixes Red Hat Bugzilla Bug 1180796
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: NJakob Bornecrantz <jakob@vmware.com>
      496eb6fd
  2. 03 12月, 2014 1 次提交
  3. 21 11月, 2014 1 次提交
  4. 31 10月, 2014 1 次提交
  5. 10 9月, 2014 1 次提交
  6. 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
  7. 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
  8. 22 7月, 2014 1 次提交
  9. 04 7月, 2014 1 次提交
  10. 10 6月, 2014 1 次提交
  11. 23 4月, 2014 1 次提交
  12. 03 4月, 2014 1 次提交
  13. 28 3月, 2014 4 次提交
  14. 16 3月, 2014 2 次提交
    • D
      drm: init TTM dev_mapping in ttm_bo_device_init() · 44d847b7
      David Herrmann 提交于
      With dev->anon_inode we have a global address_space ready for operation
      right from the beginning. Therefore, there is no need to do a delayed
      setup with TTM. Instead, set dev_mapping during initialization in
      ttm_bo_device_init() and remove any "if (dev_mapping)" conditions.
      
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      44d847b7
    • D
      drm: use anon-inode instead of relying on cdevs · 6796cb16
      David Herrmann 提交于
      DRM drivers share a common address_space across all character-devices of a
      single DRM device. This allows simple buffer eviction and mapping-control.
      However, DRM core currently waits for the first ->open() on any char-dev
      to mark the underlying inode as backing inode of the device. This delayed
      initialization causes ugly conditions all over the place:
        if (dev->dev_mapping)
          do_sth();
      
      To avoid delayed initialization and to stop reusing the inode of the
      char-dev, we allocate an anonymous inode for each DRM device and reset
      filp->f_mapping to it on ->open().
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      6796cb16
  15. 12 2月, 2014 1 次提交
  16. 05 2月, 2014 1 次提交
  17. 21 1月, 2014 1 次提交
  18. 17 1月, 2014 11 次提交
  19. 18 11月, 2013 1 次提交
  20. 13 11月, 2013 1 次提交
  21. 08 11月, 2013 1 次提交
  22. 06 11月, 2013 1 次提交
  23. 16 10月, 2013 1 次提交
  24. 30 8月, 2013 1 次提交
  25. 19 8月, 2013 2 次提交
    • D
      drm/vmwgfx: remove ->firstopen callback · 0faa4a87
      Daniel Vetter 提交于
      So if we survey kms drivers there's a bunch of things they commonly do
      in ->lastclose
      - delayed processing of vga switcheroo requests (i915, nouveau,
        radeon)
      - force-restoring the fbcon (most)
      - resetting a bunch properties to make fbcon work better (omap)
      - disabling all outputs (vmwgfx)
      
      In short besides the semantically important vga switcheroo stuff they
      all try very hard to keep fbcon working in case X dies.
      
      But none of them try to not do this at driver unload time safe for
      vmwgfx, and digging through logs I couldn't find any reason for why
      vmwgfx is special.
      
      Since ->firstopen has lots of potential for abuse with kms drivers
      (like delaying driver setup to pamper over races in the load sequence)
      it's imo very much worth it to remove this logic so that we can
      stop using the ->firstopen callback for kms drivers.
      
      Also module unloading is rather a debug feature and developers should
      know how to restore the display to a sane configuration.
      
      Cc: Jakob Bornecrantz <jakob@vmware.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0faa4a87
    • D
      drm: remove FASYNC support · b0e898ac
      Daniel Vetter 提交于
      So I've stumbled over drm_fasync and wondered what it does. Digging
      that up is quite a story.
      
      First I've had to read up on what this does and ended up being rather
      bewildered why peopled loved signals so much back in the days that
      they've created SIGIO just for that ...
      
      Then I wondered how this ever works, and what that strange "No-op."
      comment right above it should mean. After all calling the core fasync
      helper is pretty obviously not a noop. After reading through the
      kernels FASYNC implementation I've noticed that signals are only sent
      out to the processes attached with FASYNC by calling kill_fasync.
      
      No merged drm driver has ever done that.
      
      After more digging I've found out that the only driver that ever used
      this is the so called GAMMA driver. I've frankly never heard of such a
      gpu brand ever before. Now FASYNC seems to not have been the only bad
      thing with that driver, since Dave Airlie removed it from the drm
      driver with prejudice:
      
      commit 1430163b4bbf7b00367ea1066c1c5fe85dbeefed
      Author: Dave Airlie <airlied@linux.ie>
      Date:   Sun Aug 29 12:04:35 2004 +0000
      
          Drop GAMMA DRM from a great height ...
      
      Long story short, the drm fasync support seems to be doing absolutely
      nothing. And the only user of it was never merged into the upstream
      kernel. And we don't need any fops->fasync callback since the fcntl
      implementation in the kernel already implements the noop case
      correctly.
      
      So stop this particular cargo-cult and rip it all out.
      
      v2: Kill drm_fasync assignments in rcar (newly added) and imx drivers
      (somehow I've missed that one in staging). Also drop the reference in
      the drm DocBook. ARM compile-fail reported by Rob Clark.
      
      v3: Move the removal of dev->buf_asnyc assignment in drm_setup to this
      patch here.
      
      v4: Actually git add ... tsk.
      
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      b0e898ac