1. 19 5月, 2014 6 次提交
    • D
      drm/i915: Move fb pinning into __intel_set_mode · 4c10794f
      Daniel Vetter 提交于
      Our two ->crtc_mode_set callbacks really don't care whether the fb is
      pinned and set up already or not - all the state computation and
      handling which originally looked at the framebuffer is already using
      the indirection through the pipe configuration.
      
      Eventually we want to move this up a bit more, but as long as the crtc
      mode_set callback still exists (and as long as we don't need to pin an
      entire pile of planes due to atomic modesets) there's not much point
      in it. So I'll let this be for now.
      
      v2: Don't forget about haswell ...
      Reviewed-by: NAkash Goel <akash.goel@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4c10794f
    • D
      drm/i915: Inline set_base into crtc_mode_set · c8f7a0db
      Daniel Vetter 提交于
      A lot of the code in set_base is uncessary when the crtc is off, so we
      can get rid of it all. Also, we don't need to call the fbc/psr update
      functions since the crtc enable/disable hooks do that already.
      
      The only things we really need are:
      - Pin the new framebuffer and potentially unpin the old framebuffer
        (if the crtc has been on and we only change the configuration).
      - Update the plane registers.
      
      The first step will move out of platform code with the very next
      patch.
      
      v2: Don't forget about haswell ...
      Reviewed-by: NAkash Goel <akash.goel@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c8f7a0db
    • D
      drm/i915: Sprinkle intel_edp_psr_update over crtc_enable/disable · 71b1c373
      Daniel Vetter 提交于
      My plan here is to split up set_base into a prepare step, which does
      the pinning, and a commit stage, which updates the hw state. Eventually
      we should be able to move the prepare step at the beginning of any
      atomic update. For now I only want to move the commit step into the
      crtc_enable callbacks.
      
      As a prep step sprinkle intel_edp_psr_update all over the place so
      that we don't have to concern ourselves with that in the commit step.
      
      v2: Rebase on top of Ville's enable/disable functions for all planes.
      
      v3: Rebase more.
      
      Reviewed-by: Akash Goel <akash.goel@intel.com> (v2)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      71b1c373
    • D
      drm/i915: More cargo-culted locking for intel_update_fbc · efa9624e
      Daniel Vetter 提交于
      Just for consistency, this patch won't fix anything really.
      
      v2: Rebase over all the recent plane enabling shuffling.
      
      Reviewed-by: Akash Goel <akash.goel@intel.com> (v1)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      efa9624e
    • D
      drm/i915: Make ->update_primary_plane infallible · 29b9bde6
      Daniel Vetter 提交于
      Way back we've used this to reject framebuffers with unsupported
      pixel formats. But since the modesetting reorg with the compute
      config stage we reject those much earlier and just BUG() in this
      callback. So switch to a void return type.
      Reviewed-by: NAkash Goel <akash.goel@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      29b9bde6
    • C
      drm/i915: Retire requests before creating a new one · 227f782e
      Chris Wilson 提交于
      More fallout from
      
      commit c8725f3d
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Mon Mar 17 12:21:55 2014 +0000
      
          drm/i915: Do not call retire_requests from wait_for_rendering
      
      is that we can completely fill all of memory using small objects, such
      that we exhaust the filp space, and spend all of our time evicting
      objects from the aperture. As such, we never fill the ring, and never
      trigger the last resort flushing in
      
      commit 1cf0ba14
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Mon May 5 09:07:33 2014 +0100
      
          drm/i915: Flush request queue when waiting for ring space
      
      and so all the requests are left active and the objects keep that last
      active reference. Eventually the system comes to a halt as it runs out
      of memory.
      
      The impact is mainly limited to test cases as regular userspace will
      trigger retirement by manually checking whether an object is active.
      
      Testcase: igt/gem_lut_handle
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78724Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Tested-by: NGuo Jinxian <jinxianx.guo@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      227f782e
  2. 17 5月, 2014 3 次提交
    • C
      drm/i915: Only unpin the default ctx object if it exists · d3b448d9
      Chris Wilson 提交于
      Since commit 691e6415
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Wed Apr 9 09:07:36 2014 +0100
      
          drm/i915: Always use kref tracking for all contexts.
      
      we have contexts everywhere, and so we must be careful to distinguish
      fake contexts, which do not have an associated bo, and real ones, which
      do. In particular, we now need to be careful not to dereference NULL
      pointers.
      
      This is one such example, as the commit highlighted above failed to move
      the unpinning of the default ctx object into the real-context-only
      branch.
      Reported-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78792Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d3b448d9
    • V
      drm/i915: Convert uncleared FIFO underrun message to errors · 823c6909
      Ville Syrjälä 提交于
      Some platforms have a shared error interrupt, so if FIFO underrun
      reporting gets disabled for one pipe/transcoder it gets disabled
      for all pipes/transcoders.
      
      When we disable FIFO underrun reporting we check whether the
      interrupt was enabled or not. If it wasn't we might have missed
      an underrun and we perform one last check right there. Currently
      we print a debug message when an underrun is detect using this
      mechanism. Promote the message to DRM_ERROR() to match the other
      underrun error messages.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      823c6909
    • C
      drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl · 5cc9ed4b
      Chris Wilson 提交于
      By exporting the ability to map user address and inserting PTEs
      representing their backing pages into the GTT, we can exploit UMA in order
      to utilize normal application data as a texture source or even as a
      render target (depending upon the capabilities of the chipset). This has
      a number of uses, with zero-copy downloads to the GPU and efficient
      readback making the intermixed streaming of CPU and GPU operations
      fairly efficient. This ability has many widespread implications from
      faster rendering of client-side software rasterisers (chromium),
      mitigation of stalls due to read back (firefox) and to faster pipelining
      of texture data (such as pixel buffer objects in GL or data blobs in CL).
      
      v2: Compile with CONFIG_MMU_NOTIFIER
      v3: We can sleep while performing invalidate-range, which we can utilise
      to drop our page references prior to the kernel manipulating the vma
      (for either discard or cloning) and so protect normal users.
      v4: Only run the invalidate notifier if the range intercepts the bo.
      v5: Prevent userspace from attempting to GTT mmap non-page aligned buffers
      v6: Recheck after reacquire mutex for lost mmu.
      v7: Fix implicit padding of ioctl struct by rounding to next 64bit boundary.
      v8: Fix rebasing error after forwarding porting the back port.
      v9: Limit the userptr to page aligned entries. We now expect userspace
          to handle all the offset-in-page adjustments itself.
      v10: Prevent vma from being copied across fork to avoid issues with cow.
      v11: Drop vma behaviour changes -- locking is nigh on impossible.
           Use a worker to load user pages to avoid lock inversions.
      v12: Use get_task_mm()/mmput() for correct refcounting of mm.
      v13: Use a worker to release the mmu_notifier to avoid lock inversion
      v14: Decouple mmu_notifier from struct_mutex using a custom mmu_notifer
           with its own locking and tree of objects for each mm/mmu_notifier.
      v15: Prevent overlapping userptr objects, and invalidate all objects
           within the mmu_notifier range
      v16: Fix a typo for iterating over multiple objects in the range and
           rearrange error path to destroy the mmu_notifier locklessly.
           Also close a race between invalidate_range and the get_pages_worker.
      v17: Close a race between get_pages_worker/invalidate_range and fresh
           allocations of the same userptr range - and notice that
           struct_mutex was presumed to be held when during creation it wasn't.
      v18: Sigh. Fix the refactor of st_set_pages() to allocate enough memory
           for the struct sg_table and to clear it before reporting an error.
      v19: Always error out on read-only userptr requests as we don't have the
           hardware infrastructure to support them at the moment.
      v20: Refuse to implement read-only support until we have the required
           infrastructure - but reserve the bit in flags for future use.
      v21: use_mm() is not required for get_user_pages(). It is only meant to
           be used to fix up the kernel thread's current->mm for use with
           copy_user().
      v22: Use sg_alloc_table_from_pages for that chunky feeling
      v23: Export a function for sanity checking dma-buf rather than encode
           userptr details elsewhere, and clean up comments based on
           suggestions by Bradley.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: "Gong, Zhipeng" <zhipeng.gong@intel.com>
      Cc: Akash Goel <akash.goel@intel.com>
      Cc: "Volkin, Bradley D" <bradley.d.volkin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Reviewed-by: NBrad Volkin <bradley.d.volkin@intel.com>
      [danvet: Frob ioctl allocation to pick the next one - will cause a bit
      of fuss with create2 apparently, but such are the rules.]
      [danvet2: oops, forgot to git add after manual patch application]
      [danvet3: Appease sparse.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5cc9ed4b
  3. 16 5月, 2014 25 次提交
  4. 15 5月, 2014 4 次提交
  5. 14 5月, 2014 2 次提交