Skip to content
Snippets Groups Projects
  1. Mar 03, 2016
  2. Feb 17, 2016
  3. Feb 10, 2016
    • Simona Vetter's avatar
      drm/i915: Stop depending upon CONFIG_AGP_INTEL · 3e99a6b9
      Simona Vetter authored
      
      The AGP_INTEL driver provides an interface for very old userspace to
      control the GART (though the GART itself was only ever emulated on Intel
      systems). The pci bridge discovery code is also used by the i915.ko
      driver to set up the GTT on old systems, but it does not require the
      old userspace interface. When i915.ko selects the old interface, it
      binds another user to the core GTT routines, and in particular creates a
      second reference to the scratch pages allocated. This hinders resource
      leak debugging for when we unload i915.ko as we want to assert that all
      DMA pages have been released, but we appear to leak because of the
      secondary interface which persists after i915.ko unloads.
      
      All i915.ko users do not require the old /dev/agpgart interface so stop
      selecting it and simplify our debugging by dropping the historical
      baggage.
      
      Note that by selecting AGP=n it was already possible to unselect
      AGP_INTEL. But since we've dropped support for any of the AGP stuff
      long ago there's really no point for this any more.
      
      Also note that we still need INTEL_GTT, which is the underlying,
      shared, driver for the graphics GART on gen1-5.
      
      v2: Entirely new commit message (Chris, Ville).
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453901881-26425-2-git-send-email-daniel.vetter@ffwll.ch
      3e99a6b9
  4. Jan 29, 2016
  5. Jan 25, 2016
  6. Nov 17, 2015
    • Chris Wilson's avatar
      drm/i915: Serialise updates to GGTT with access through GGTT on Braswell · 5bab6f60
      Chris Wilson authored
      When accessing through the GTT from one CPU whilst concurrently updating
      the GGTT PTEs in another thread, the hardware likes to return random
      data. As we have strong serialisation prevent us from modifying the PTE
      of an active GTT mmapping, we have to conclude that it whilst modifying
      other PTE's that error occurs. (I have not looked for any pattern such
      as modifying PTE within the same page or cacheline as active PTE -
      though checking whether revoking neighbouring objects should be enough
      to test that theory.) The corruption also seems restricted to Braswell
      and disappears with maxcpus=0. This patch stops all access through the
      GTT by other CPUs when we update any PTE by stopping the machine around
      the GGTT update.
      
      Note that splitting up the 64 bit write into two 32 bit writes was
      tried and found to fail too.
      
      Testcase: igt/gem_concurrent_blit
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89079
      
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Add note about 2x 32bits failing too.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      5bab6f60
  7. Aug 11, 2015
  8. Jun 22, 2015
  9. May 26, 2015
  10. May 21, 2015
  11. Jan 29, 2015
  12. Jul 24, 2014
  13. May 16, 2014
    • Chris Wilson's avatar
      drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl · 5cc9ed4b
      Chris Wilson authored
      
      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: default avatarChris 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: default avatarTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Reviewed-by: default avatarBrad 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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      5cc9ed4b
  14. Apr 01, 2014
  15. Mar 20, 2014
  16. Nov 21, 2013
  17. Nov 14, 2013
    • Simona Vetter's avatar
      drm/i915: Deprecated UMS support · b30324ad
      Simona Vetter authored
      
      It's been 5 years since kms support was merged and roughly 4 years
      since UMS support was ripped out from userspace drivers.
      
      Thus far it's not been a big burden to keep the ums paths alive, and
      we've made some good progress in better separating it from the kms
      code by sprinkling DRIVER_MODESET checks all over the place.
      
      But now that the drm demidlayering is within reach this changes. I
      want to make the driver loading code more robust using devres.c and
      other cool tricks. But that doesn't work with ums due to the
      shadow-attach trick. Which means we either
      a) need to split out a complete ums codebase like radeon has
      b) kill it for good.
      
      The 2nd option is obviously much less work than the first, so I think
      it's time to test the waters and see how many people out there still
      use ums.
      
      I've decided that silently failing to initialize the driver (and not
      e.g. failing to load the module) is the right thing. That way we
      should only get reports from users that actually care about some ums
      features (like accelerated gl or support for secondary outputs).
      Everyone else will just fall back to the vesa X driver.
      
      For developers there's a small info level dmesg output.
      
      The plan is to drop this Kconfig option after 3.16 (so gives us 2 full
      releases) and then start killing code for real 2-3 releases
      afterwards. That should be more than enough time for users to pipe up.
      
      Of course if anyone does we need to revisit this plan and maybe go
      with option a) above.
      
      Also enable the KMS support by default in Kconfig and polish the help
      texts a bit.
      
      v2: Add the missing hunk of actual code changes. Oops. (Ville)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Dave Airlie <airlied@gmail.com>
      Acked-by: default avatarDave Airlie <airlied@gmail.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b30324ad
  18. Nov 08, 2013
    • Ville Syrjälä's avatar
      drm/i915: Make AGP support optional · 00fe639a
      Ville Syrjälä authored
      
      We only depend on the intel-gtt module for GTT frobbign on older gens.
      The intel_agp module is optional, except for UMS and some old XvMC
      userland on gen3. So make AGP support optional. As before, we will
      fail the i915 init for UMS and gen3 KMS the same as before if
      intel_agp isn't around.
      
      intel-gtt.c is left with a somewhat ugly ifdef mess, but I'm going
      to save that for a later cleaning.
      
      At least my gen2 still works with the patch and CONFIG_AGP=n.
      
      v2: Make i915 depend on X86 and PCI, and intel-gtt depend on PCI
      
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      00fe639a
  19. Oct 11, 2013
    • Simona Vetter's avatar
      drm/i915: Kconfig option to disable the legacy fbdev support · 4520f53a
      Simona Vetter authored
      
      Boots Just Fine (tm)!
      
      The only glitch seems to be that at least on Fedora the boot splash
      gets confused and doesn't display much at all.
      
      And since there's no ugly console flickering anymore in between, the
      flicker while switching between X servers (VT support is still enabled)
      is even more jarring.
      
      Also, I'm unsure whether we don't need to somehow kick out vgacon, now
      that nothing else gets in the way. But stuff seems to work, so I
      don't care. Also everything still works as well with VGA_CONSOLE=n
      
      Also the #ifdef mess needs a bit of a cleanup, follow-up patches will
      do just that.
      
      To keep the Kconfig tidy, extract all the i915 options into its own
      file.
      
      v2:
      - Rebase on top of the preliminary hw support option and the
        intel_drv.h cleanup.
      - Shut up warnings in i915_debugfs.c
      
      v3: Use the right CONFIG variable, spotted by Chon Ming.
      
      Cc: Lee, Chon Ming <chon.ming.lee@intel.com>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: default avatarChon Ming Lee <chon.ming.lee@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      4520f53a
Loading