1. 26 3月, 2014 3 次提交
    • M
      drm/nouveau: fix small thinko in vblank timestamping. · 6c3252bc
      Mario Kleiner 提交于
      *hpos horizontal scanout position doesn't need to be corrected
      to count the pixels between hactive end and htotal negative.
      That is only needed for *vpos to count lines until end of
      vblank for the vblank timestamping.
      
      Use hpos as is without correction.
      
      Removes occassional spikes in timestamps of up to 1 scanline
      duration, thereby improves accuracy to about +/- 2 usecs instead
      of +/- 12 usecs, wrt. true onset time as measured with high
      precision equipment on NV-A5.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      6c3252bc
    • A
      support for platform devices · 420b9469
      Alexandre Courbot 提交于
      Upcoming mobile Kepler GPUs (such as GK20A) use the platform bus instead
      of PCI to which Nouveau is tightly dependent. This patch allows Nouveau
      to handle platform devices by:
      
      - abstracting PCI-dependent functions that were typically used for
        resource querying and page mapping,
      - introducing a nv_device_is_pci() function that allows to make
        PCI-dependent code conditional,
      - providing a nouveau_drm_platform_probe() function that takes a GPU
        platform device to be probed.
      
      Core code as well as engine/subdev drivers are updated wherever possible
      to make use of these functions. Some older drivers are too dependent on
      PCI to be properly updated, but all newer code on which future chips may
      depend should at least be runnable with platform devices.
      Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      420b9469
    • B
      drm/nouveau: support modesetting on GM107 · 0b681687
      Ben Skeggs 提交于
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      0b681687
  2. 30 1月, 2014 2 次提交
  3. 23 1月, 2014 3 次提交
  4. 08 1月, 2014 1 次提交
  5. 03 12月, 2013 2 次提交
  6. 14 11月, 2013 4 次提交
  7. 08 11月, 2013 2 次提交
  8. 09 10月, 2013 1 次提交
    • D
      drm/nouveau: embed gem object in nouveau_bo · 55fb74ad
      David Herrmann 提交于
      There is no reason to keep the gem object separately allocated. nouveau is
      the last user of gem_obj->driver_private, so if we embed it, we can get
      rid of 8bytes per gem-object.
      
      The implementation follows the radeon driver. bo->gem is only valid, iff
      the bo was created via the gem helpers _and_ iff the user holds a valid
      gem reference. That is, as the gem object holds a reference to the
      nouveau_bo. If you use nouveau_ref() to gain a bo reference, you are not
      guaranteed to also hold a gem reference. The gem object might get
      destroyed after the last user drops the gem-ref via
      drm_gem_object_unreference(). Use drm_gem_object_reference() to gain a
      gem-reference.
      
      For debugging, we can use bo->gem.filp != NULL to test whether a gem-bo is
      valid. However, this shouldn't be used for real functionality to avoid
      gem-internal dependencies.
      
      Note that the implementation follows the previous style. However, we no
      longer can check for bo->gem != NULL to test for a valid gem object. This
      wasn't done before, so we should be safe now.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NMaarten Lankhorst <maarten.lankhorst@canonical.com>
      Reviewed-by: NBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      55fb74ad
  9. 17 9月, 2013 1 次提交
  10. 04 9月, 2013 1 次提交
  11. 30 8月, 2013 1 次提交
  12. 29 8月, 2013 1 次提交
    • D
      nouveau: add runtime PM support (v0.9) · 5addcf0a
      Dave Airlie 提交于
      This hooks nouveau up to the runtime PM system to enable
      dynamic power management for secondary GPUs in switchable
      and optimus laptops.
      
      a) rewrite suspend/resume printks to hide them during dynamic s/r
      to avoid cluttering logs
      b) add runtime pm suspend to irq handler, crtc display, ioctl handler,
      connector status,
      c) handle hdmi audio dynamic power on/off using magic register.
      
      v0.5:
      make sure we hit D3 properly
      fix fbdev_set_suspend locking interaction, we only will poweroff if we have no
      active crtcs/fbcon anyways.
      add reference for active crtcs.
      sprinkle mark last busy for autosuspend timeout
      
      v0.6:
      allow more flexible debugging - to avoid log spam
      add option to enable/disable dynpm
      got to D3Cold
      
      v0.7:
      add hdmi audio support.
      
      v0.8:
      call autosuspend from idle, so pci config space access doesn't go straight
      back to sleep, this makes starting X faster.
      only signal usage if we actually handle the irq, otherwise usb keeps us awake.
      fix nv50 display active powerdown
      
      v0.9:
      use masking function to enable hdmi audio
      set busy when we fail to suspend
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5addcf0a
  13. 21 8月, 2013 1 次提交
  14. 07 8月, 2013 1 次提交
  15. 25 7月, 2013 1 次提交
    • D
      drm/ttm: convert to unified vma offset manager · 72525b3f
      David Herrmann 提交于
      Use the new vma-manager infrastructure. This doesn't change any
      implementation details as the vma-offset-manager is nearly copied 1-to-1
      from TTM.
      
      The vm_lock is moved into the offset manager so we can drop it from TTM.
      During lookup, we use the vma locking helpers to take a reference to the
      found object.
      In all other scenarios, locking stays the same as before. We always
      guarantee that drm_vma_offset_remove() is called only during destruction.
      Hence, helpers like drm_vma_node_offset_addr() are always safe as long as
      the node has a valid offset.
      
      This also drops the addr_space_offset member as it is a copy of vm_start
      in vma_node objects. Use the accessor functions instead.
      
      v4:
       - remove vm_lock
       - use drm_vma_offset_lock_lookup() to protect lookup (instead of vm_lock)
      
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      Cc: Martin Peres <martin.peres@labri.fr>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@gmail.com>
      72525b3f
  16. 10 7月, 2013 2 次提交
  17. 01 7月, 2013 1 次提交
  18. 28 6月, 2013 1 次提交
  19. 22 5月, 2013 1 次提交
  20. 26 4月, 2013 1 次提交
    • B
      drm/nv04/disp: hide all the cruft away in its own little hole · 1a646342
      Ben Skeggs 提交于
      It'd be pretty awesome if someone would care enough to port this all
      properly to a class interface, perhaps submitting a command stream to
      the core via a sw object on PFIFO (emulating how EVO works basically,
      and also what nvidia have done forever..)..
      
      But, this seems unlikely given how old this hardware is now, so, lets
      just hide it away.
      
      There's a heap of other bits and pieces laying around that are still
      tangled.  I'll (re)move them in pieces.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      1a646342
  21. 20 2月, 2013 5 次提交
  22. 20 1月, 2013 1 次提交
    • D
      drm/<drivers>: reorder framebuffer init sequence · c7d73f6a
      Daniel Vetter 提交于
      With more fine-grained locking we can no longer rely on the big
      mode_config lock to prevent concurrent access to mode resources
      like framebuffers. Instead a framebuffer becomes accessible to
      other threads as soon as it is added to the relevant lookup
      structures. Hence it needs to be fully set up by the time drivers
      call drm_framebuffer_init.
      
      This patch here is the drivers part of that reorg. Nothing really fancy
      going on safe for three special cases.
      
      - exynos needs to be careful to properly unref all handles.
      - nouveau gets a resource leak fixed for free: one of the error
        cases didn't cleanup the framebuffer, which is now moot since
        the framebuffer is only registered once it is fully set up.
      - vmwgfx requires a slight reordering of operations, I'm hoping I didn't
        break anything (but it's refcount management only, so should be safe).
      
      v2: Split out exynos, since it's a bit more hairy than expected.
      
      v3: Drop bogus cirrus hunk noticed by Richard Wilbur.
      
      v4: Split out vmwgfx since there's a small change in return values.
      
      Reviewed-by: Rob Clark <rob@ti.com> (core + omapdrm)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c7d73f6a
  23. 13 1月, 2013 1 次提交
    • B
      drm/nouveau: do not forcibly power on lvds panels · 1a1841d3
      Ben Skeggs 提交于
      This fix was put in place to fix a bug where the eDP panel on certain
      laptops fails to respond over the aux channel after suspend.
      
      It appears that on some systems (Dell M6600, with LVDS panel) there's a
      very bad interaction with the eDP init table that causes the SOR to get
      very confused and not drive the panel correctly, leading to bleed.
      
      A DPMS off/on cycle is enough to bring it back, but, this will avoid the
      problem by not touching the panel GPIOs at times we're not meant to.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      1a1841d3
  24. 29 11月, 2012 2 次提交