1. 08 11月, 2014 2 次提交
  2. 24 10月, 2014 2 次提交
  3. 24 9月, 2014 1 次提交
  4. 19 9月, 2014 1 次提交
  5. 03 9月, 2014 1 次提交
  6. 23 7月, 2014 2 次提交
    • P
      drm/i915: BDW can also detect unclaimed registers · 66bc2cab
      Paulo Zanoni 提交于
      By the time I wrote this patch, it allowed me to catch some problems.
      But due to patch reordering - in order to prevent fake "regression"
      reports - this patch may be merged after the fixes of the problems
      identified by this patch.
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      66bc2cab
    • P
      drm/i915: reorganize the unclaimed register detection code · 5978118c
      Paulo Zanoni 提交于
      The current code only runs when we do an I915_WRITE operation. It
      checks if the unclaimed register flag is set before we do the
      operation, and then it checks it again after we do the operation. This
      double check allows us to find out if the I915_WRITE operation in
      question is the bad one, or if some previous code is the bad one. When
      it finds a problem, our code uses DRM_ERROR to signal it.
      
      The good thing about the current code is that it detects the problem,
      so at least we can know we did something wrong. The problem is that
      even though we find the problem, we don't really have much information
      to actually debug it. So whenever I see one of these DRM_ERROR
      messages on my systems, the first thing I do is apply a patch to
      change the DRM_ERROR to a WARN and also check for unclaimed registers
      on I915_READ operations. This local patch makes things even slower,
      but it usually helps a lot in finding the bad code.
      
      The first point here is that since the current code is only useful to
      detect whether we have a problem or not, but it is not really good to
      find the cause of the problem, I don't think we should be checking
      both before and after every I915_WRITE operation: just doing the check
      once should be enough for us to quickly detect problems. With this
      change, the code that runs by default for every single user will only
      do 1 read operation for every single I915_WRITE, instead of 2. This
      patch does this change.
      
      The second point is that the local patch I have should be upstream,
      but since it makes things slower it should be disabled by default. So
      I added the i915.mmio_debug option to enable it.
      
      So after this patch, this is what will happen:
       - By default, we will try to detect unclaimed registers once after
         every I915_WRITE operation. Previously we tried twice for every
         I915_WRITE.
       - When we find an unclaimed register we will still print a DRM_ERROR
         message, but we will now tell the user to try again with
         i915.mmio_debug=1.
       - When we use i915.mmio_debug=1 we will try to find unclaimed
         registers both before and after every I915_READ and I915_WRITE
         operation, and we will print stack traces in case we find them.
         This should really help locating the exact point of the bad code
         (or at least finding out that i915.ko is not the problem).
      
      This commit also opens space for really-slow register debugging
      operations on other platforms. In theory we can now add lots and lots
      of debug code behind i915.mmio_debug, enable this option on our tests,
      and catch more problems.
      
      v2: - Remove not-so-useful comments (Daniel)
          - Fix the param definition macros (Rodrigo)
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5978118c
  7. 08 7月, 2014 1 次提交
    • O
      drm/i915: Emphasize that ctx->id is merely a user handle · 821d66dd
      Oscar Mateo 提交于
      This is an Execlists preparatory patch, since they make context ID become an
      overloaded term:
      
      - In the software, it was used to distinguish which context userspace was
        trying to use.
      - In the BSpec, the term is used to describe the 20-bits long field the
        hardware uses to it to discriminate the contexts that are submitted to
        the ELSP and inform the driver about their current status (via Context
        Switch Interrupts and Context Status Buffers).
      
      Initially, I tried to make the different meanings converge, but it proved
      impossible:
      
      - The software ctx->id is per-filp, while the hardware one needs to be
        globally unique.
      - Also, we multiplex several backing states objects per intel_context,
        and all of them need unique HW IDs.
      - I tried adding a per-filp ID and then composing the HW context ID as:
        ctx->id + file_priv->id + ring->id, but the fact that the hardware only
        uses 20-bits means we have to artificially limit the number of filps or
        contexts the userspace can create.
      
      The ctx->user_handle renaming bits are done with this Cocci patch (plus
      manual frobbing of the struct declaration):
      
          @@
          struct intel_context c;
          @@
          - (c).id
          + c.user_handle
      
          @@
          struct intel_context *c;
          @@
          - (c)->id
          + c->user_handle
      
      Also, while we are at it, s/DEFAULT_CONTEXT_ID/DEFAULT_CONTEXT_HANDLE and
      change the type to unsigned 32 bits.
      
      v2: s/handle/user_handle and change the type to uint32_t as suggested by
      Chris Wilson.
      
      Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v1)
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      821d66dd
  8. 13 6月, 2014 2 次提交
  9. 12 6月, 2014 1 次提交
  10. 11 6月, 2014 5 次提交
  11. 05 6月, 2014 2 次提交
  12. 23 5月, 2014 1 次提交
    • O
      drm/i915: s/i915_hw_context/intel_context · 273497e5
      Oscar Mateo 提交于
      Up until now, contexts had one (and only one) backing object that was
      used by the hardware to save/restore render ring contexts (via the
      MI_SET_CONTEXT command). Other rings did not have or need this, so
      our i915_hw_context struct had a 1:1 relationship with a a real HW
      context.
      
      With Logical Ring Contexts and Execlists, this is not possible anymore:
      all rings need a backing object, and it cannot be reused. To prepare
      for that, rename our contexts to the more generic term intel_context.
      
      No functional changes.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      273497e5
  13. 22 5月, 2014 1 次提交
  14. 21 5月, 2014 2 次提交
  15. 20 5月, 2014 3 次提交
  16. 10 5月, 2014 1 次提交
  17. 05 5月, 2014 1 次提交
  18. 02 4月, 2014 5 次提交
  19. 18 3月, 2014 2 次提交
  20. 14 3月, 2014 1 次提交
  21. 13 3月, 2014 1 次提交
  22. 08 3月, 2014 1 次提交
  23. 06 3月, 2014 1 次提交