1. 18 3月, 2015 2 次提交
  2. 27 2月, 2015 1 次提交
  3. 24 2月, 2015 2 次提交
    • D
      drm/i915/skl: Tune IZ hashing when subslices are unbalanced · b7668791
      Damien Lespiau 提交于
      When one EU is disabled in a particular subslice, we can tune how the
      work is spread between subslices to improve EU utilization.
      
      v2: - Use a bitfield to record which subslice(s) has(have) 7 EUs. That
            will also make the machinery work if several sublices have 7 EUs.
            (Jeff Mcgee)
          - Only apply the different hashing algorithm if the slice is
            effectively unbalanced by checking there's a single subslice with
            7 EUs. (Jeff Mcgee)
      
      v3: Fix typo in comment (Jeff Mcgee)
      
      Issue: VIZ-3845
      Cc: Jeff Mcgee <jeff.mcgee@intel.com>
      Reviewed-by: NJeff Mcgee <jeff.mcgee@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b7668791
    • J
      drm/i915/skl: Determine SKL slice/subslice/EU info · 3873218f
      Jeff McGee 提交于
      Read fuse registers to determine the available slice total,
      subslice total, subslice per slice, EU total, and EU per subslice
      counts of the SKL device. The EU per subslice attribute is more
      precisely defined as the maximum EU available on any one subslice,
      since available EU counts may vary across subslices due to fusing.
      Set flags indicating the SKL device's slice/subslice/EU (SSEU)
      power gating capability. Make all values available via debugfs
      entry 'i915_sseu_status'.
      
      v2: Several small clean-ups suggested by Damien. Most notably,
          used smaller types for the new device info fields to reduce
          memory usage and improved the clarity/readability of the
          method used to extract attribute values from the fuse
          registers.
      Signed-off-by: NJeff McGee <jeff.mcgee@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3873218f
  4. 14 2月, 2015 1 次提交
  5. 30 1月, 2015 1 次提交
    • M
      drm/i915: Remove nested work in gpu error handling · b8d24a06
      Mika Kuoppala 提交于
      Now when we declare gpu errors only through our own dedicated
      hangcheck workqueue there is no need to have a separate workqueue
      for handling the resetting and waking up the clients as the deadlock
      concerns are no more.
      
      The only exception is i915_debugfs::i915_set_wedged, which triggers
      error handling through process context. However as this is only used through
      test harness it is responsibility for test harness not to introduce hangs
      through both debug interface and through hangcheck mechanism at the same time.
      
      Remove gpu_error.work and let the hangcheck work do the tasks it used to.
      
      v2: Add a big warning sign into i915_debugfs::i915_set_wedged (Chris)
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b8d24a06
  6. 29 1月, 2015 1 次提交
    • C
      drm/i915: Convert hangcheck from a timer into a delayed work item · 737b1506
      Chris Wilson 提交于
      When run as a timer, i915_hangcheck_elapsed() must adhere to all the
      rules of running in a softirq context. This is advantageous to us as we
      want to minimise the risk that a driver bug will prevent us from
      detecting a hung GPU. However, that is irrelevant if the driver bug
      prevents us from resetting and recovering. Still it is prudent not to
      rely on mutexes inside the checker, but given the coarseness of
      dev->struct_mutex doing so is extremely hard.
      
      Give in and run from a work queue, i.e. outside of softirq.
      
      v2: Use own workqueue to avoid deadlocks (Daniel)
          Cleanup commit msg and add comment to i915_queue_hangcheck() (Chris)
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Daniel Vetter <dnaiel.vetter@ffwll.chm>
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      [danvet: Remove accidental kerneldoc comment starter, to appease the 0
      day builder.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      737b1506
  7. 27 1月, 2015 2 次提交
  8. 12 1月, 2015 1 次提交
    • I
      drm/i915: add component support · 58fddc28
      Imre Deak 提交于
      Register a component to be used to interface with the snd_hda_intel
      driver. This is meant to replace the same interface that is currently
      based on module symbol lookup.
      
      v2:
      - change roles between the hda and i915 components (Daniel)
      - add the implementation to a new file (Jani)
      - use better namespacing (Jani)
      v3:
      - move the implementation to intel_audio.c (Daniel)
      - rename display_component to audio_component (Daniel)
      - add kerneldoc (Daniel)
      v4:
      - run forgotten git rm i915_component.c (Jani)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      58fddc28
  9. 08 1月, 2015 1 次提交
  10. 06 1月, 2015 1 次提交
    • A
      drm/i915: Support creation of unbound wc user mappings for objects · 1816f923
      Akash Goel 提交于
      This patch provides support to create write-combining virtual mappings of
      GEM object. It intends to provide the same funtionality of 'mmap_gtt'
      interface without the constraints and contention of a limited aperture
      space, but requires clients handles the linear to tile conversion on their
      own. This is for improving the CPU write operation performance, as with such
      mapping, writes and reads are almost 50% faster than with mmap_gtt. Similar
      to the GTT mmapping, unlike the regular CPU mmapping, it avoids the cache
      flush after update from CPU side, when object is passed onto GPU.  This
      type of mapping is specially useful in case of sub-region update,
      i.e. when only a portion of the object is to be updated. Using a CPU mmap
      in such cases would normally incur a clflush of the whole object, and
      using a GTT mmapping would likely require eviction of an active object or
      fence and thus stall. The write-combining CPU mmap avoids both.
      
      To ensure the cache coherency, before using this mapping, the GTT domain
      has been reused here. This provides the required cache flush if the object
      is in CPU domain or synchronization against the concurrent rendering.
      Although the access through an uncached mmap should automatically
      invalidate the cache lines, this may not be true for non-temporal write
      instructions and also not all pages of the object may be updated at any
      given point of time through this mapping.  Having a call to get_pages in
      set_to_gtt_domain function, as added in the earlier patch 'drm/i915:
      Broaden application of set-domain(GTT)', would guarantee the clflush and
      so there will be no cachelines holding the data for the object before it
      is accessed through this map.
      
      The drm_i915_gem_mmap structure (for the DRM_I915_GEM_MMAP_IOCTL) has been
      extended with a new flags field (defaulting to 0 for existent users). In
      order for userspace to detect the extended ioctl, a new parameter
      I915_PARAM_MMAP_VERSION has been added for versioning the ioctl interface.
      
      v2: Fix error handling, invalid flag detection, renaming (ickle)
      
      v3: Rebase to latest drm-intel-nightly codebase
      
      The new mmapping is exercised by igt/gem_mmap_wc,
      igt/gem_concurrent_blit and igt/gem_gtt_speed.
      
      Change-Id: Ie883942f9e689525f72fe9a8d3780c3a9faa769a
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1816f923
  11. 16 12月, 2014 1 次提交
    • B
      drm/i915: Use batch pools with the command parser · 78a42377
      Brad Volkin 提交于
      This patch sets up all of the tracking and copying necessary to
      use batch pools with the command parser and dispatches the copied
      (shadow) batch to the hardware.
      
      After this patch, the parser is in 'enabling' mode.
      
      Note that performance takes a hit from the copy in some cases
      and will likely need some work. At a rough pass, the memcpy
      appears to be the bottleneck. Without having done a deeper
      analysis, two ideas that come to mind are:
      1) Copy sections of the batch at a time, as they are reached
         by parsing. Might improve cache locality.
      2) Copy only up to the userspace-supplied batch length and
         memset the rest of the buffer. Reduces the number of reads.
      
      v2:
      - Remove setting the capacity of the pool
      - One global pool instead of per-ring pools
      - Replace batch_obj with shadow_batch_obj and hook into eb->vmas
      - Memset any space in the shadow batch beyond what gets copied
      - Rebased on execlist prep refactoring
      
      v3:
      - Rebase on chained batch handling
      - Squash in setting the secure dispatch flag
      - Add a note about the interaction w/secure dispatch pinning
      - Check for request->batch_obj == NULL in i915_gem_free_request
      
      v4:
      - Fix read domains for shadow_batch_obj
      - Remove the set_to_gtt_domain call from i915_parse_cmds
      - ggtt_pin/unpin in the parser block to simplify error handling
      - Check USES_FULL_PPGTT before setting DISPATCH_SECURE flag
      - Remove i915_gem_batch_pool_put calls
      
      v5:
      - Move 'pending_read_domains |= I915_GEM_DOMAIN_COMMAND' after
        the parser (danvet, from v4 0/7 feedback)
      
      Issue: VIZ-4719
      Signed-off-by: NBrad Volkin <bradley.d.volkin@intel.com>
      Reviewed-By: NJon Bloomfield <jon.bloomfield@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      78a42377
  12. 03 12月, 2014 1 次提交
  13. 20 11月, 2014 7 次提交
  14. 17 11月, 2014 1 次提交
  15. 14 11月, 2014 1 次提交
    • C
      drm/i915: Make the physical object coherent with GTT · 6a2c4232
      Chris Wilson 提交于
      Currently objects for which the hardware needs a contiguous physical
      address are allocated a shadow backing storage to satisfy the contraint.
      This shadow buffer is not wired into the normal obj->pages and so the
      physical object is incoherent with accesses via the GPU, GTT and CPU. By
      setting up the appropriate scatter-gather table, we can allow userspace
      to access the physical object via either a GTT mmaping of or by rendering
      into the GEM bo. However, keeping the CPU mmap of the shmemfs backing
      storage coherent with the contiguous shadow is not yet possible.
      Fortuituously, CPU mmaps of objects requiring physical addresses are not
      expected to be coherent anyway.
      
      This allows the physical constraint of the GEM object to be transparent
      to userspace and allow it to efficiently render into or update them via
      the GTT and GPU.
      
      v2: Fix leak of pci handle spotted by Ville
      v3: Remove the now duplicate call to detach_phys_object during free.
      v4: Wait for rendering before pwrite. As this patch makes it possible to
      render into the phys object, we should make it correct as well!
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6a2c4232
  16. 24 10月, 2014 2 次提交
    • I
      drm/i915: unify switcheroo and legacy suspend/resume handlers · fc49b3da
      Imre Deak 提交于
      By now we handle switcheroo and legacy suspend/resume the same way, so
      no need to keep separate functions for them.
      
      No functional change.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fc49b3da
    • P
      drm/i915: call drm_vblank_cleanup() earlier at unload · 2ebfaf5f
      Paulo Zanoni 提交于
      In its current place, it just segfaults while trying to access the
      CRTC structures:
      
      [ 9132.421681] Call Trace:
      [ 9132.421707]  [<ffffffffa01130d8>] i915_get_crtc_scanoutpos+0x1e8/0x220 [i915]
      [ 9132.421727]  [<ffffffffa001da34>] drm_calc_vbltimestamp_from_scanoutpos+0x94/0x330 [drm]
      [ 9132.421744]  [<ffffffffa001d240>] ?vblank_disable_and_save+0x40/0x1e0 [drm]
      [ 9132.421769]  [<ffffffffa0114328>] i915_get_vblank_timestamp+0x68/0xb0 [i915]
      [ 9132.421786]  [<ffffffffa001d094>] drm_get_last_vbltimestamp+0x44/0x80 [drm]
      [ 9132.421801]  [<ffffffffa001d3a6>] vblank_disable_and_save+0x1a6/0x1e0 [drm]
      [ 9132.421817]  [<ffffffffa001eac1>] drm_vblank_cleanup+0x61/0xa0 [drm]
      [ 9132.421849]  [<ffffffffa0177a5e>] i915_driver_unload+0xde/0x290 [i915]
      [ 9132.421867]  [<ffffffffa0020264>] drm_dev_unregister+0x24/0xb0 [drm]
      [ 9132.421884]  [<ffffffffa002090e>] drm_put_dev+0x1e/0x70 [drm]
      [ 9132.421901]  [<ffffffffa00e01e0>] i915_pci_remove+0x10/0x20 [i915]
      [ 9132.421910]  [<ffffffff81347556>] pci_device_remove+0x36/0xb0
      [ 9132.421920]  [<ffffffff8140084a>] __device_release_driver+0x7a/0xf0
      [ 9132.421928]  [<ffffffff81400fc8>] driver_detach+0xb8/0xc0
      [ 9132.421936]  [<ffffffff8140054a>] bus_remove_driver+0x4a/0xb0
      [ 9132.421944]  [<ffffffff81401717>] driver_unregister+0x27/0x50
      [ 9132.421953]  [<ffffffff81346f65>] pci_unregister_driver+0x25/0x70
      [ 9132.421971]  [<ffffffffa00229c8>] drm_pci_exit+0x78/0xa0 [drm]
      [ 9132.422000]  [<ffffffffa017a6d2>] i915_exit+0x20/0x94e [i915]
      [ 9132.422009]  [<ffffffff810fb9dc>] SyS_delete_module+0x13c/0x1f0
      [ 9132.422019]  [<ffffffff8131c5fb>] ?
      trace_hardirqs_on_thunk+0x3a/0x3f
      [ 9132.422028]  [<ffffffff816f7792>] system_call_fastpath+0x16/0x1b
      
      This means it has to be before intel_modeset_cleanup, which cleans the
      CRTC structures. But if we move it to before intel_fbdev_fini(), we
      get WARNs because intel_fbdev_fini() still tries to use the vblanks,
      so the only acceptable point for drm_vblank_cleanup() seems to be this
      place.
      
      Related commit:
      
          commit cbb47d17
          Author: Chris Wilson <chris@chris-wilson.co.uk>
          Date:   Mon Sep 23 17:33:20 2013 -0300
              drm/i915: Add some missing steps to i915_driver_load error path
      
      Testsuite: igt/drv_module_reload
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77511
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83484Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2ebfaf5f
  17. 03 10月, 2014 2 次提交
  18. 01 10月, 2014 2 次提交
  19. 24 9月, 2014 1 次提交
  20. 19 9月, 2014 1 次提交
  21. 12 9月, 2014 1 次提交
  22. 10 9月, 2014 1 次提交
  23. 08 9月, 2014 1 次提交
    • D
      drm/i915: Fix irq enable tracking in driver load · 4868b45d
      Daniel Vetter 提交于
      A bunch of warnings fire on some ->irq_postinstall hooks since those
      can enable interrupts (e.g. rps interrupts). And then our ordering
      self-checks fire and complain.
      
      To fix that set the tracking boolen before enabling the irqs with
      drm_irq_install. Quoting the discussion with Jesse why that's safe:
      
      On Tue, Aug 26, 2014 at 11:18 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
      > Yes, it might work, but if you look through the history, we set this
      > field carefully; first to true in the irq_init code, then to false only
      > after the irq_install completes.  So I think your fragility arguments
      > apply to this change too.
      
      Well we've done it in 4 commits or so, but currently we have:
      
      - Set irqs_disabled to true early in driver load to make sure checks
      that. That's done in irq_init, which is totally not the function that
      enables interrupts, only the function that initializes all the vtables
      and similar things. We actually have a fairly sane naming scheme
      nowadays (not fully consistent ofc): _init is sw setup,
      _enable/_hw_init is the actual hw setup. That is done in
      95f25bed
      
      - Set irqs_disabled to false right after the irqs are actually
      enabled. This is done in ed2e6df1
      
      So my change should only move the flag change over the ->preinstall
      and ->postinstall hooks. I've done a little audit and didn't spot
      anything amiss. Furthermore the runtime pm setup already clears
      irqs_disabled _before_ calling these two hooks.
      
      This regression has been introduced in
      
      commit ed2e6df1
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Fri Jun 20 09:39:36 2014 -0700
      
          drm/i915: clear pm._irqs_disabled field after installing IRQs
      
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Oliver Hartkopp <socketcan@hartkopp.net>
      Tested-by: NOliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Tested-by: Chris Wilson <chris@chris-wilson.co.uk> # gm45, ilk
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      4868b45d
  24. 03 9月, 2014 2 次提交
  25. 13 8月, 2014 3 次提交