1. 10 4月, 2015 2 次提交
  2. 07 4月, 2015 1 次提交
    • J
      drm/i915: add i915 specific connector debugfs file for DPCD · aa7471d2
      Jani Nikula 提交于
      Occasionally it would be interesting to read some of the DPCD registers
      for debug purposes, without having to resort to logging. Add an i915
      specific i915_dpcd debugfs file for DP and eDP connectors to dump parts
      of the DPCD. Currently the DPCD addresses to be dumped are statically
      configured, and more can be added trivially.
      
      The implementation also makes it relatively easy to add other i915 and
      connector specific debugfs files in the future, as necessary.
      
      This is currently i915 specific just because there's no generic way to
      do AUX transactions given just a drm_connector. However it's all pretty
      straightforward to port to other drivers.
      
      v2: Add more DPCD registers to dump.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NBob Paauwe <bob.j.paauwe@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      aa7471d2
  3. 01 4月, 2015 1 次提交
  4. 20 3月, 2015 2 次提交
  5. 18 3月, 2015 8 次提交
  6. 05 3月, 2015 1 次提交
  7. 26 2月, 2015 1 次提交
    • A
      drm/i915: Removed the read of RP_STATE_CAP from sysfs/debugfs functions · bc4d91f6
      Akash Goel 提交于
      The frequency values(Rp0, Rp1, Rpn) reported by RP_STATE_CAP register
      are stored, initially by the Driver, inside the dev_priv->rps structure.
      Since these values are expected to remain same throughout, there is no real
      need to read this register, on dynamic basis, from certain debugfs/sysfs
      functions and the values can be instead retrieved from the dev_priv->rps
      structure when needed.
      For the i915_frequency_info debugfs interface, the frequency values from the
      RP_STATE_CAP register only should be used, to indicate the actual Hw state,
      since it is principally used for the debugging purpose.
      
      v2: Reverted the changes in i915_frequency_info function, to continue report
          back the frequency values, as per the actual Hw state (Chris)
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bc4d91f6
  8. 25 2月, 2015 2 次提交
  9. 24 2月, 2015 2 次提交
    • J
      drm/i915/skl: Add SKL HW status to SSEU status · 7f992aba
      Jeff McGee 提交于
      Add a new section to the 'i915_sseu_status' debugfs entry to
      report the currently enabled counts of slice, subslice, and
      execution units on the device. The count of enabled subslice
      per slice represents the most enabled subslice on any one
      slice for devices where imbalances may exist. Similarly, the
      count of enabled EU per subslice represents the most enabled
      EU on any one subslice.
      
      Collect this device status for Skylake by reading the Gen9
      power gate control ack message registers. Power gate control
      operates on EU in pairs, therefore our reported counts of
      enabled EU can be overestimated by one for each pair in which
      one EU is fused-off.
      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>
      7f992aba
    • 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
  10. 23 2月, 2015 1 次提交
  11. 14 2月, 2015 2 次提交
  12. 09 2月, 2015 1 次提交
  13. 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
  14. 29 1月, 2015 2 次提交
  15. 27 1月, 2015 10 次提交
    • V
      drm/i915: Use intel_gpu_freq() and intel_freq_opcode() · 7c59a9c1
      Ville Syrjälä 提交于
      Replace all the vlv_gpu_freq(), vlv_freq_opcode(),
      *GT_FREQUENCY_MULTIPLIER, and /GT_FREQUENCY_MULTIPLIER instances
      with intel_gpu_freq() and intel_freq_opcode() calls.
      
      Most of the change was performed with the following semantic patch:
      @@
      expression E;
      @@
      (
      - E * GT_FREQUENCY_MULTIPLIER
      + intel_gpu_freq(dev_priv, E)
      |
      - E *= GT_FREQUENCY_MULTIPLIER
      + E = intel_gpu_freq(dev_priv, E)
      |
      - E /= GT_FREQUENCY_MULTIPLIER
      + E = intel_freq_opcode(dev_priv, E)
      |
      - do_div(E, GT_FREQUENCY_MULTIPLIER)
      + E = intel_freq_opcode(dev_priv, E)
      )
      
      @@
      expression E1, E2;
      @@
      (
      - vlv_gpu_freq(E1, E2)
      + intel_gpu_freq(E1, E2)
      |
      - vlv_freq_opcode(E1, E2)
      + intel_freq_opcode(E1, E2)
      )
      
      @@
      expression E1, E2, E3, E4;
      @@
      (
      - if (IS_VALLEYVIEW(E1)) {
      -  E2 = intel_gpu_freq(E3, E4);
      - } else {
      -  E2 = intel_gpu_freq(E3, E4);
      - }
      + E2 = intel_gpu_freq(E3, E4);
      |
      - if (IS_VALLEYVIEW(E1)) {
      -  E2 = intel_freq_opcode(E3, E4);
      - } else {
      -  E2 = intel_freq_opcode(E3, E4);
      - }
      + E2 = intel_freq_opcode(E3, E4);
      )
      
      One hunk was manually undone as intel_gpu_freq() ended up
      calling itself. Supposedly it would be possible to exclude
      certain functions via !=~, but I couldn't get that to work.
      
      Also the removal of vlv_gpu_freq() and vlv_opcode_freq() compat
      wrappers was done manually.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7c59a9c1
    • S
      drm/i915/skl: Adding power domains for AUX controllers · 1407121a
      Satheeshakrishna M 提交于
      Adding new power doamins for AUX controllers
      
      v2: Added new power domains in power_domain_str per Imre's comment
      
      v3: Added AUX power domains to older platforms
      
      v4: Rebase on top of POWER_DOMAIN_PLLS.
      
      v5: Modified to address review comments from Imre
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NSatheeshakrishna M <satheeshakrishna.m@intel.com>
      Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> (v3)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1407121a
    • M
      drm/i915: Rename i915_gen6_forcewake_count_info · f65367b5
      Mika Kuoppala 提交于
      There are multiple forcewake domains in newer architectures.
      Rename 'i915_gen6_forcewake_count_info' debugfs entry to
      'i915_forcewake_domains' to reflect this.
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f65367b5
    • M
      drm/i915: Rename the forcewake get/put functions · 59bad947
      Mika Kuoppala 提交于
      We have multiple forcewake domains now on recent gens. Change the
      function naming to reflect this.
      
      v2: More verbose names (Chris)
      v3: Rebase
      v4: Rebase
      v5: Add documentation for forcewake_get/put
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: Deepak S <deepak.s@linux.intel.com> (v2)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      59bad947
    • M
      drm/i915: Consolidate forcewake code · 05a2fb15
      Mika Kuoppala 提交于
      As we now have forcewake domains, take advantage of it
      by putting the differences in gen fw handling in data rather
      than in code.
      
      In past we have opencoded this quite extensively as the fw handling
      is in the fast path. There has also been a lot of cargo-culted
      copy'n'pasting from older gens to newer ones.
      
      Now when the releasing of the forcewake is done by deferred timer,
      it gives chance to consolidate more. Due to the frequency of actual hw
      access being significantly less.
      
      Take advantage of this and generalize the fw handling code
      as much as possible. But we still aim to keep the forcewake sequence
      particularities for each gen intact. So the access pattern
      to fw engines should remain the same.
      
      v2: - s/old_ack/clear_ack (Chris)
          - s/post_read/posting_read (Chris)
          - less polite commit msg (Chris)
      
      v3: - rebase
          - check and clear wake_count in init
      
      v4: - fix posting reads for gen8 (PRTS)
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: Deepak S <deepak.s@linux.intel.com> (v2)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      05a2fb15
    • C
      drm/i915: Reduce duplicated forcewake logic · b2cff0db
      Chris Wilson 提交于
      Introduce a structure to track the individual forcewake domains and use
      that to eliminate duplicate logic.
      
      v2: - Rebase on latest dinq (Mika)
          - for_each_fw_domain macro (Mika)
          - Handle reset atomically, keeping the timer running (Mika)
          - for_each_fw_domain parameter ordering (Chris)
          - defer timer on new register access (Mika)
      
      v3: - Fix forcewake_reset/get race by waiting pending timers
      
      v4: - cond_resched and verbose warning on timer deletion (Chris)
          - need to run pending timers manually on reset
      
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Acked-by: Deepak S <deepak.s@linux.intel.com> (v2)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b2cff0db
    • C
      drm/i915: Assert that runtime pm is active on user fw access · 6daccb0b
      Chris Wilson 提交于
      On user forcewake access, assert that runtime pm reference is held.
      Fix and cleanup the callsites accordingly.
      
      v2: Remove intel_runtime_pm_get() rebasehap (Deepak)
      
      v3: use drivers own runtime state tracking as pm_runtime_active()
          will return wrong results when we are in resume callchain (Mika)
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: Deepak S <deepak.s@linux.intel.com> (v2)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6daccb0b
    • N
      drm/i915: Subsume intel_ctx_submit_request in to drm_i915_gem_request · 6d3d8274
      Nick Hoath 提交于
      Move all remaining elements that were unique to execlists queue items
      in to the associated request.
      
      Issue: VIZ-4274
      
      v2: Rebase. Fixed issue of overzealous freeing of request.
      v3: Removed re-addition of cleanup work queue (found by Daniel Vetter)
      v4: Rebase.
      v5: Actual removal of intel_ctx_submit_request. Update both tail and postfix
      pointer in __i915_add_request (found by Thomas Daniel)
      v6: Removed unrelated changes
      Signed-off-by: NNick Hoath <nicholas.hoath@intel.com>
      Reviewed-by: NThomas Daniel <thomas.daniel@intel.com>
      [danvet: Reformat comment with strange linebreaks.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6d3d8274
    • N
      drm/i915: Removed duplicate members from submit_request · 72f95afa
      Nick Hoath 提交于
      Where there were duplicate variables for the tail, context and ring (engine)
      in the gem request and the execlist queue item, use the one from the request
      and remove the duplicate from the execlist queue item.
      
      Issue: VIZ-4274
      
      v1: Rebase
      v2: Fixed build issues. Keep separate postfix & tail pointers as these are
      used in different ways. Reinserted missing full tail pointer update.
      Signed-off-by: NNick Hoath <nicholas.hoath@intel.com>
      Reviewed-by: NThomas Daniel <thomas.daniel@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      72f95afa
    • A
      drm/i915: Make intel_crtc->config a pointer · 6e3c9717
      Ander Conselvan de Oliveira 提交于
      To match the semantics of drm_crtc->state, which this will eventually
      become. The allocation of the memory for config will be fixed in a
      followup patch. By adding the extra _config field to intel_crtc it was
      possible to generate this entire patch with the cocci script below.
      
      @@ @@
      struct intel_crtc {
      ...
      -struct intel_crtc_state config;
      +struct intel_crtc_state _config;
      +struct intel_crtc_state *config;
      ...
      }
      @@ struct intel_crtc *crtc; @@
      -memset(&crtc->config, 0, sizeof(crtc->config));
      +memset(crtc->config, 0, sizeof(*crtc->config));
      @@ @@
      __intel_set_mode(...) {
      <...
      -to_intel_crtc(crtc)->config = *pipe_config;
      +(*(to_intel_crtc(crtc)->config)) = *pipe_config;
      ...>
      }
      @@ @@
      intel_crtc_init(...) {
      ...
      WARN_ON(drm_crtc_index(&intel_crtc->base) != intel_crtc->pipe);
      +intel_crtc->config = &intel_crtc->_config;
      return;
      ...
      }
      @@ struct intel_crtc *crtc; @@
      -&crtc->config
      +crtc->config
      @@ struct intel_crtc *crtc; identifier member; @@
      -crtc->config.member
      +crtc->config->member
      @@ expression E; @@
      -&(to_intel_crtc(E)->config)
      +to_intel_crtc(E)->config
      @@ expression E; identifier member; @@
      -to_intel_crtc(E)->config.member
      +to_intel_crtc(E)->config->member
      
      v2: Clarify manual changes by splitting them into another patch. (Matt)
          Improve cocci script to generate even more of the changes. (Ander)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6e3c9717
  16. 15 1月, 2015 1 次提交
  17. 16 12月, 2014 1 次提交
    • B
      drm/i915: Implement a framework for batch buffer pools · 493018dc
      Brad Volkin 提交于
      This adds a small module for managing a pool of batch buffers.
      The only current use case is for the command parser, as described
      in the kerneldoc in the patch. The code is simple, but separating
      it out makes it easier to change the underlying algorithms and to
      extend to future use cases should they arise.
      
      The interface is simple: init to create an empty pool, fini to
      clean it up, get to obtain a new buffer. Note that all buffers are
      expected to be inactive before cleaning up the pool.
      
      Locking is currently based on the caller holding the struct_mutex.
      We already do that in the places where we will use the batch pool
      for the command parser.
      
      v2:
      - s/BUG_ON/WARN_ON/ for locking assertions
      - Remove the cap on pool size
      - Switch from alloc/free to init/fini
      
      v3:
      - Idiomatic looping structure in _fini
      - Correct handling of purged objects
      - Don't return a buffer that's too much larger than needed
      
      v4:
      - Rebased to latest -nightly
      
      v5:
      - Remove _put() function and clean up comments to match
      
      v6:
      - Move purged check inside the loop (danvet, from v4 1/7 feedback)
      
      v7:
      - Use single list instead of two. (Chris W)
      - s/active_list/cache_list
      - Squashed in debug patches (Chris W)
        drm/i915: Add a batch pool debugfs file
      
        It provides some useful information about the buffers in
        the global command parser batch pool.
      
        v2: rebase on global pool instead of per-ring pools
        v3: rebase
      
        drm/i915: Add batch pool details to i915_gem_objects debugfs
      
        To better account for the potentially large memory consumption
        of the batch pool.
      
      v8:
      - Keep cache in LRU order (danvet, from v6 1/5 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>
      493018dc
  18. 15 12月, 2014 1 次提交
    • T
      drm/i915: Infrastructure for supporting different GGTT views per object · fe14d5f4
      Tvrtko Ursulin 提交于
      Things like reliable GGTT mappings and mirrored 2d-on-3d display will need
      to map objects into the same address space multiple times.
      
      Added a GGTT view concept and linked it with the VMA to distinguish between
      multiple instances per address space.
      
      New objects and GEM functions which do not take this new view as a parameter
      assume the default of zero (I915_GGTT_VIEW_NORMAL) which preserves the
      previous behaviour.
      
      This now means that objects can have multiple VMA entries so the code which
      assumed there will only be one also had to be modified.
      
      Alternative GGTT views are supposed to borrow DMA addresses from obj->pages
      which is DMA mapped on first VMA instantiation and unmapped on the last one
      going away.
      
      v2:
          * Removed per view special casing in i915_gem_ggtt_prepare /
            finish_object in favour of creating and destroying DMA mappings
            on first VMA instantiation and last VMA destruction. (Daniel Vetter)
          * Simplified i915_vma_unbind which does not need to count the GGTT views.
            (Daniel Vetter)
          * Also moved obj->map_and_fenceable reset under the same check.
          * Checkpatch cleanups.
      
      v3:
          * Only retire objects once the last VMA is unbound.
      
      v4:
          * Keep scatter-gather table for alternative views persistent for the
            lifetime of the VMA.
          * Propagate binding errors to callers and handle appropriately.
      
      v5:
          * Explicitly look for normal GGTT view in i915_gem_obj_bound to align
            usage in i915_gem_object_ggtt_unpin. (Michel Thierry)
          * Change to single if statement in i915_gem_obj_to_ggtt. (Michel Thierry)
          * Removed stray semi-colon in i915_gem_object_set_cache_level.
      
      For: VIZ-4544
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NMichel Thierry <michel.thierry@intel.com>
      [danvet: Drop hunk from i915_gem_shrink since it's just prettification
      but upsets a __must_check warning.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fe14d5f4