1. 22 7月, 2014 1 次提交
  2. 18 7月, 2014 1 次提交
  3. 19 6月, 2014 1 次提交
  4. 05 6月, 2014 1 次提交
    • R
      drm: convert crtc and connection_mutex to ww_mutex (v5) · 51fd371b
      Rob Clark 提交于
      For atomic, it will be quite necessary to not need to care so much
      about locking order.  And 'state' gives us a convenient place to stash a
      ww_ctx for any sort of update that needs to grab multiple crtc locks.
      
      Because we will want to eventually make locking even more fine grained
      (giving locks to planes, connectors, etc), split out drm_modeset_lock
      and drm_modeset_acquire_ctx to track acquired locks.
      
      Atomic will use this to keep track of which locks have been acquired
      in a transaction.
      
      v1: original
      v2: remove a few things not needed until atomic, for now
      v3: update for v3 of connection_mutex patch..
      v4: squash in docbook
      v5: doc tweaks/fixes
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      51fd371b
  5. 01 5月, 2014 1 次提交
  6. 02 4月, 2014 1 次提交
    • M
      drm: Replace crtc fb with primary plane fb (v3) · f4510a27
      Matt Roper 提交于
      Now that CRTC's have a primary plane, there's no need to track the
      framebuffer in the CRTC.  Replace all references to the CRTC fb with the
      primary plane's fb.
      
      This patch was generated by the Coccinelle semantic patching tool using
      the following rules:
      
              @@ struct drm_crtc C; @@
              -   (C).fb
              +   C.primary->fb
      
              @@ struct drm_crtc *C; @@
              -   (C)->fb
              +   C->primary->fb
      
      v3: Generate patch via coccinelle.  Actual removal of crtc->fb has been
          moved to a subsequent patch.
      
      v2: Fixup several lingering crtc->fb instances that were missed in the
          first patch iteration.  [Rob Clark]
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      f4510a27
  7. 28 3月, 2014 1 次提交
  8. 17 1月, 2014 2 次提交
  9. 08 1月, 2014 1 次提交
    • R
      drivers: gpu: Mark functions as static in vmwgfx_kms.c · 847c5964
      Rashika Kheria 提交于
      Mark functions as static because they are not used outside the file
      drm/vmwgfx/vmwgfx_kms.c.
      
      This eliminates the following warnings in drm/vmwgfx/vmwgfx_kms.c:
      drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:43:6: warning: no previous prototype for ‘vmw_clip_cliprects’ [-Wmissing-prototypes]
      drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:426:6: warning: no previous prototype for ‘vmw_framebuffer_surface_destroy’ [-Wmissing-prototypes]
      drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:592:5: warning: no previous prototype for ‘vmw_framebuffer_surface_dirty’ [-Wmissing-prototypes]
      drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:757:6: warning: no previous prototype for ‘vmw_framebuffer_dmabuf_destroy’ [-Wmissing-prototypes]
      drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:943:5: warning: no previous prototype for ‘vmw_framebuffer_dmabuf_dirty’ [-Wmissing-prototypes]
      drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:1666:5: warning: no previous prototype for ‘vmw_du_update_layout’ [-Wmissing-prototypes]
      Signed-off-by: NRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Reviewed-by: NJakob Bornecrantz <jakob@vmware.com>
      847c5964
  10. 18 12月, 2013 1 次提交
  11. 05 12月, 2013 1 次提交
  12. 06 11月, 2013 1 次提交
  13. 30 8月, 2013 1 次提交
  14. 11 6月, 2013 1 次提交
  15. 21 1月, 2013 2 次提交
    • D
      drm: only take the crtc lock for ->cursor_move · dac35663
      Daniel Vetter 提交于
      ->cursor_move uses mostly the same facilities in drivers as
      ->cursor_set, so pretty much nothing to fix up:
      
      - ast/gma500/i915: They all use per-crtc registers to update the
        cursor position. ast again touches the global cursor cache, but
        that's ok since there's only one crtc.
      
      - nouveau: nv50+ is again special, updates happen through the per-crtc
        channel (without pushbufs), so it's not protected by the new evo
        lock introduced earlier. But since this channel is per-crtc, we
        should be fine anyway.
      
      - radeon: A bit a mess: avivo asics need a workaround when both output
        pipes are enabled, which means it'll access the crtc list. Just
        reading that flag is ok though as long as radeon _always_ grabs all
        locks when changing the crtc configuration. Which means with the
        current scheme it cannot do an optimized modeset which only locks
        the relevant crtcs. This can be fixed though by introducing a bit of
        global state with separate locks and ensure in the modeset code that
        the cursor will be updated appropriately when enabling the 2nd pipe
        (on affected asics).
      
      - vmwgfx: I still don't understand what it's doing exactly, so apply
        the same trick for now.
      
      v2: Fixup unlocking for the error cases, spotted by Richard Wilbur.
      
      v3: Another error-case fixup.
      Reviewed-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dac35663
    • D
      drm: only take the crtc lock for ->cursor_set · bfb89928
      Daniel Vetter 提交于
      First convert ->cursor_set to only take the crtc lock, since that
      seems to be the function with the least amount of state - the core
      ioctl function doesn't check anything which can change at runtime, so
      we don't have any object lifetime issues to contend.
      
      The only thing which is important is that the driver's implementation
      doesn't touch any state outside of that single crtc which is not yet
      properly protected by other locking:
      
      - ast: access the global ast->cache_kmap. Luckily we only have on crtc
        on this driver, so this is fine. Add a comment.
      
      - gma500: calls gma_power_begin|and and psb_gtt_pin|unpin, both which
        have their own locking to protect their state. Everything else is
        crtc-local.
      
      - i915: touches a bit of global gem state, all protected by the One
        Lock to Rule Them All (dev->struct_mutex).
      
      - nouveau: Pre-nv50 is all nice, nv50+ uses the evo channels to queue
        up all display changes. And some of these channels are device
        global. But this is fine now since the previous patch introduced an
        evo channel mutex.
      
      - radeon: Uses some indirect register access for cursor updates, but
        with the previous patches to protect these indirect 2-register
        access patterns with a spinlock, this should be fine now, too.
      
      - vmwgfx: I have no idea how that works - update_cursor_position
        doesn't take any per-crtc argument and I haven't figured out any
        other place where this could be set in some form of a side-channel.
        But vmwgfx definitely has more than one crtc (or at least can
        register more than one), so I have no idea how this is supposed to
        not fail with the current code already. Hence take the easy way out
        and simply acquire all locks (which requires dropping the crtc lock
        the core acquired for us). That way it's not worse off for
        consistency than the old code.
      Reviewed-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bfb89928
  16. 20 1月, 2013 2 次提交
    • D
      drm/<drivers>: Unified handling of unimplemented fb->create_handle · af26ef3b
      Daniel Vetter 提交于
      Some drivers don't have real ->create_handle callbacks.
      
      - cirrus/ast/mga200: Returns either 0 or -EINVAL.
      
      - udl: Didn't even bother with a callback, leading to a nice
        userspace-triggerable OOPS.
      
      - vmwgfx: This driver bothered with an implementation to return 0 as
        the handle (which is the canonical no-obj gem handle).
      
      All have in common that ->create_handle doesn't really make too much
      sense for them - that ioctl is used only for seamless fb takeover in
      the radeon/nouveau/i915 ddx drivers. So allow drivers to not implement
      this and return a consistent -ENODEV.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      af26ef3b
    • D
      drm/vmwgfx: reorder framebuffer init sequence · 80f0b5af
      Daniel Vetter 提交于
      vmwgfx has an oddity, when failing to reference the surface it'll
      return 0, since that's what the successfull drm_framebuffer_init will
      leave behind in ret. Fix this up by returning -EINVAL.
      
      Split out from all the other driver updates due to the above tiny
      semantic change. Shouldn't matter though since the reference grabbing
      seemingly can't fail.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      80f0b5af
  17. 13 9月, 2012 1 次提交
  18. 22 8月, 2012 1 次提交
  19. 22 5月, 2012 1 次提交
  20. 13 2月, 2012 3 次提交
  21. 30 1月, 2012 1 次提交
    • R
      vmwgfx: Fix assignment in vmw_framebuffer_create_handle · bf9c05d5
      Ryan Mallon 提交于
      The assignment of handle in vmw_framebuffer_create_handle doesn't actually do anything useful and is incorrectly assigning an integer value to a pointer argument. It appears that this is a typo and should be dereferencing handle rather than assigning to it directly. This fixes a bug where an undefined handle value is potentially returned to user-space.
      Signed-off-by: NRyan Mallon <rmallon@gmail.com>
      Reviewed-by: Jakob Bornecrantz<jakob@vmware.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      bf9c05d5
  22. 22 12月, 2011 1 次提交
    • X
      vmwgfx: fix incorrect VRAM size check in vmw_kms_fb_create() · 8a783896
      Xi Wang 提交于
      Commit e133e737 didn't correctly fix the integer overflow issue.
      
      -	unsigned int required_size;
      +	u64 required_size;
      	...
      	required_size = mode_cmd->pitch * mode_cmd->height;
      -	if (unlikely(required_size > dev_priv->vram_size)) {
      +	if (unlikely(required_size > (u64) dev_priv->vram_size)) {
      
      Note that both pitch and height are u32.  Their product is still u32 and
      would overflow before being assigned to required_size.  A correct way is
      to convert pitch and height to u64 before the multiplication.
      
      	required_size = (u64)mode_cmd->pitch * (u64)mode_cmd->height;
      
      This patch calls the existing vmw_kms_validate_mode_vram() for
      validation.
      Signed-off-by: NXi Wang <xi.wang@gmail.com>
      Reviewed-and-tested-by: NThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8a783896
  23. 20 12月, 2011 1 次提交
  24. 19 12月, 2011 4 次提交
  25. 02 12月, 2011 1 次提交
  26. 30 11月, 2011 1 次提交
  27. 16 11月, 2011 1 次提交
  28. 11 11月, 2011 3 次提交
  29. 07 11月, 2011 2 次提交