1. 08 8月, 2013 4 次提交
    • C
      drm/i915: List objects allocated from stolen memory in debugfs · 6d2b8885
      Chris Wilson 提交于
      I was curious as to what objects were currently allocated from stolen
      memory, and so exported it from debugfs.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6d2b8885
    • B
      drm/i915: mm_list is per VMA · ca191b13
      Ben Widawsky 提交于
      formerly: "drm/i915: Create VMAs (part 5) - move mm_list"
      
      The mm_list is used for the active/inactive LRUs. Since those LRUs are
      per address space, the link should be per VMx .
      
      Because we'll only ever have 1 VMA before this point, it's not incorrect
      to defer this change until this point in the patch series, and doing it
      here makes the change much easier to understand.
      
      Shamelessly manipulated out of Daniel:
      "active/inactive stuff is used by eviction when we run out of address
      space, so needs to be per-vma and per-address space. Bound/unbound otoh
      is used by the shrinker which only cares about the amount of memory used
      and not one bit about in which address space this memory is all used in.
      Of course to actual kick out an object we need to unbind it from every
      address space, but for that we have the per-object list of vmas."
      
      v2: only bump GGTT LRU in i915_gem_object_set_to_gtt_domain (Chris)
      
      v3: Moved earlier in the series
      
      v4: Add dropped message from v3
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Frob patch to apply and use vma->node.size directly as
      discused with Ben. Also drop a needles BUG_ON before move_to_inactive,
      the function itself has the same check.]
      [danvet 2nd: Rebase on top of the lost "drm/i915: Cleanup more of VMA
      in destroy", specifically unlink the vma from the mm_list in
      vma_unbind (to keep it symmetric with bind_to_vm) instead of
      vma_destroy.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ca191b13
    • V
      drm/i915: Silence a sparse warning · 2b4bd0e0
      Ville Syrjälä 提交于
      drivers/gpu/drm/i915/i915_debugfs.c:2136:3: warning: symbol
      'i915_debugfs_files' was not declared. Should it be static?
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2b4bd0e0
    • B
      drm/i915: plumb VM into bind/unbind code · 07fe0b12
      Ben Widawsky 提交于
      As alluded to in several patches, and it will be reiterated later... A
      VMA is an abstraction for a GEM BO bound into an address space.
      Therefore it stands to reason, that the existing bind, and unbind are
      the ones which will be the most impacted. This patch implements this,
      and updates all callers which weren't already updated in the series
      (because it was too messy).
      
      This patch represents the bulk of an earlier, larger patch. I've pulled
      out a bunch of things by the request of Daniel. The history is preserved
      for posterity with the email convention of ">" One big change from the
      original patch aside from a bunch of cropping is I've created an
      i915_vma_unbind() function. That is because we always have the VMA
      anyway, and doing an extra lookup is useful. There is a caveat, we
      retain an i915_gem_object_ggtt_unbind, for the global cases which might
      not talk in VMAs.
      
      > drm/i915: plumb VM into object operations
      >
      > This patch was formerly known as:
      > "drm/i915: Create VMAs (part 3) - plumbing"
      >
      > This patch adds a VM argument, bind/unbind, and the object
      > offset/size/color getters/setters. It preserves the old ggtt helper
      > functions because things still need, and will continue to need them.
      >
      > Some code will still need to be ported over after this.
      >
      > v2: Fix purge to pick an object and unbind all vmas
      > This was doable because of the global bound list change.
      >
      > v3: With the commit to actually pin/unpin pages in place, there is no
      > longer a need to check if unbind succeeded before calling put_pages().
      > Make put_pages only BUG() after checking pin count.
      >
      > v4: Rebased on top of the new hangcheck work by Mika
      > plumbed eb_destroy also
      > Many checkpatch related fixes
      >
      > v5: Very large rebase
      >
      > v6:
      > Change BUG_ON to WARN_ON (Daniel)
      > Rename vm to ggtt in preallocate stolen, since it is always ggtt when
      > dealing with stolen memory. (Daniel)
      > list_for_each will short-circuit already (Daniel)
      > remove superflous space (Daniel)
      > Use per object list of vmas (Daniel)
      > Make obj_bound_any() use obj_bound for each vm (Ben)
      > s/bind_to_gtt/bind_to_vm/ (Ben)
      >
      > Fixed up the inactive shrinker. As Daniel noticed the code could
      > potentially count the same object multiple times. While it's not
      > possible in the current case, since 1 object can only ever be bound into
      > 1 address space thus far - we may as well try to get something more
      > future proof in place now. With a prep patch before this to switch over
      > to using the bound list + inactive check, we're now able to carry that
      > forward for every address space an object is bound into.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Rebase on top of the loss of "drm/i915: Cleanup more of VMA
      in destroy".]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      07fe0b12
  2. 06 8月, 2013 2 次提交
  3. 05 8月, 2013 1 次提交
  4. 25 7月, 2013 2 次提交
    • C
      drm/i915: Convert the register access tracepoint to be conditional · ed71f1b4
      Chris Wilson 提交于
      The TRACE_EVENT_CONDITION is supposed to generate more efficient code
      than if (cond) trace(), which is what we are currently using inside the
      register access functions.
      
      v2: Rebase onto uncore
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ed71f1b4
    • C
      drm/i915: Colocate all GT access routines in the same file · 907b28c5
      Chris Wilson 提交于
      Currently, the register access code is split between i915_drv.c and
      intel_pm.c. It only bares a superficial resemblance to the reset of the
      powermanagement code, so move it all into its own file. This is to ease
      further patches to enforce serialised register access.
      
      v2: Scan for random abuse of I915_WRITE_NOTRACE
      v3: Take the opportunity to rename the GT functions as uncore. Uncore is
      the term used by the hardware design (and bspec) for all functions
      outside of the GPU (and CPU) cores in what is also known as the System
      Agent.
      v4: Rebase onto SNB rc6 fixes
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Wrestle patch into applying and inline
      intel_uncore_early_sanitize (plus move the old comment to the new
      function). Also keep the _santize postfix for intel_uncore_sanitize.]
      [danvet: Squash in fixup spotted by Chris on irc: We need to call
      intel_pm_init before intel_uncore_sanitize since the later will call
      cancel_work on the delayed rps setup work the former initializes.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      907b28c5
  5. 18 7月, 2013 5 次提交
  6. 16 7月, 2013 1 次提交
  7. 13 7月, 2013 1 次提交
  8. 09 7月, 2013 2 次提交
    • D
      drm/i915: convert debugfs creation/destruction to table · 34b9674c
      Daniel Vetter 提交于
      At least for the common cases where we only need special file
      operations. The forcewake file is still rather more special.
      
      v2: Fix up the debugfs unregister code.
      
      v3: Actually squash in the right fixup.
      Acked-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      34b9674c
    • B
      drm/i915: Getter/setter for object attributes · f343c5f6
      Ben Widawsky 提交于
      Soon we want to gut a lot of our existing assumptions how many address
      spaces an object can live in, and in doing so, embed the drm_mm_node in
      the object (and later the VMA).
      
      It's possible in the future we'll want to add more getter/setter
      methods, but for now this is enough to enable the VMAs.
      
      v2: Reworked commit message (Ben)
      Added comments to the main functions (Ben)
      sed -i "s/i915_gem_obj_set_color/i915_gem_obj_ggtt_set_color/" drivers/gpu/drm/i915/*.[ch]
      sed -i "s/i915_gem_obj_bound/i915_gem_obj_ggtt_bound/" drivers/gpu/drm/i915/*.[ch]
      sed -i "s/i915_gem_obj_size/i915_gem_obj_ggtt_size/" drivers/gpu/drm/i915/*.[ch]
      sed -i "s/i915_gem_obj_offset/i915_gem_obj_ggtt_offset/" drivers/gpu/drm/i915/*.[ch]
      (Daniel)
      
      v3: Rebased on new reserve_node patch
      Changed DRM_DEBUG_KMS to actually work (will need fixing later)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f343c5f6
  9. 02 7月, 2013 3 次提交
  10. 01 7月, 2013 7 次提交
  11. 06 6月, 2013 1 次提交
    • C
      drm/i915: Track clients and print their object usage in debugfs · 2db8e9d6
      Chris Wilson 提交于
      By stashing a pointer of who opened the device and keeping a list of
      open fd, we can then walk each client and inspect how many objects they
      have open. For example,
      
      i915_gem_objects:
      1102 objects, 613646336 bytes
      663 [662] objects, 468783104 [468750336] bytes in gtt
        37 [37] active objects, 46874624 [46874624] bytes
        626 [625] inactive objects, 421908480 [421875712] bytes
      282 unbound objects, 6512640 bytes
      85 purgeable objects, 6787072 bytes
      28 pinned mappable objects, 3686400 bytes
      40 fault mappable objects, 27783168 bytes
      2145386496 [536870912] gtt total
      
      Xorg: 43 objects, 32243712 bytes (10223616 active, 16683008 inactive, 4096 unbound)
      gnome-shell: 30 objects, 28381184 bytes (0 active, 28336128 inactive, 0 unbound)
      xonotic-linux64: 1032 objects, 569933824 bytes (46874624 active, 383545344 inactive, 6508544 unbound)
      
      v2: Use existing drm->filelist as pointed out by Ben.
      v3: Not even stashing the task_struct is required as Ben pointed out
          drm_file->pid.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2db8e9d6
  12. 03 6月, 2013 1 次提交
  13. 01 6月, 2013 2 次提交
  14. 24 5月, 2013 2 次提交
  15. 23 5月, 2013 1 次提交
  16. 23 4月, 2013 2 次提交
  17. 18 4月, 2013 3 次提交
    • J
      drm/i915: turbo & RC6 support for VLV v7 · 0a073b84
      Jesse Barnes 提交于
      Uses slightly different interfaces than other platforms.
      
      v2: track actual set freq, not requested (Rohit)
          fix debug prints in init code (Jesse)
      v3: don't write sleep reg (Jesse)
          re-add RC6 wake limit write (Ben)
          fixup thresholds to match other platforms (Ben)
          clean up mem freq calculation (Ben)
          clean up debug prints (Ben)
      v4: move defines from punit patch (Ville)
      v5: remove writes to nonexistent regs (Jesse)
          put RP and RC regs together (Jesse)
          fix RC6 enable (Jesse)
      v6: use correct fuse reads from NC (Jesse)
          split out min/max funcs for use in sysfs (Jesse)
          add debugfs & sysfs freq controls (Jesse)
      v7: update with Ben's hw_max changes (Jesse)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: Ben Widawsky <ben@bwidawsk.net> (v6)
      [danvet: Follow checkpatch sugggestion to use min_t to avoid casting
      fun.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0a073b84
    • C
      drm/i915: Scale ring, rather than ia, frequency on Haswell · 3ebecd07
      Chris Wilson 提交于
      Haswell introduces a separate frequency domain for the ring (uncore). So
      where we used to increase the CPU (IA) clock with GPU busyness, we now
      need to scale the ring frequency directly instead. As the ring limits
      our memory bandwidth, it is vital for performance that when the GPU is
      busy, we increase the frequency of the ring to increase the available
      memory bandwidth.
      
      v2: Fix the algorithm to actually use the scaled gpu frequency for the ring.
      v3: s/max_ring_freq/min_ring_freq/ as that is what it is
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Add space checkpatch complained about.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3ebecd07
    • M
      drm/i915: shorten debugfs output simple attributes · 3a3b4f98
      Mika Kuoppala 提交于
      commit 647416f9
      Author: Kees Cook <keescook@chromium.org>
      Date:   Sun Mar 10 14:10:06 2013 -0700
      
          drm/i915: use simple attribute in debugfs routines
      
      made i915_next_seqno debugfs entry to crop it's output
      if returned value was large enough. Using simple_attr
      will limit the output to 24 bytes.
      
      Fix is to strip out preamples on all simple attributes
      that have one.
      
      v2: Fix all simple attributes (Daniel Vetter)
      
      Cc: Kees Cook <keescook@chromium.org>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3a3b4f98