1. 14 2月, 2015 16 次提交
  2. 27 1月, 2015 4 次提交
  3. 17 1月, 2015 2 次提交
  4. 13 1月, 2015 1 次提交
  5. 16 12月, 2014 3 次提交
  6. 11 12月, 2014 1 次提交
  7. 10 12月, 2014 3 次提交
    • D
      drm/i915: Remove '& 0xffff' from the mask given to WA_REG() · 26459343
      Damien Lespiau 提交于
      We may be hidding bugs by doing that, so let remove it and have the
      actual mask value shine through, for better or worse.
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      26459343
    • D
      drm/i915: Invert the mask and val arguments in wa_add() and WA_REG() · cf4b0de6
      Damien Lespiau 提交于
      While trying to unify the order of those arguments throughout the
      driver, Daniel noticed what we were inverting them in this part of the
      code.
      Suggested-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      cf4b0de6
    • D
      drm/i915/bdw: Fix the write setting up the WIZ hashing mode · 98533251
      Damien Lespiau 提交于
      I was playing with clang and oh surprise! a warning trigerred by
      -Wshift-overflow (gcc doesn't have this one):
      
          WA_SET_BIT_MASKED(GEN7_GT_MODE,
                            GEN6_WIZ_HASHING_MASK | GEN6_WIZ_HASHING_16x4);
      
          drivers/gpu/drm/i915/intel_ringbuffer.c:786:2: warning: signed shift result
            (0x28002000000) requires 43 bits to represent, but 'int' only has 32 bits
            [-Wshift-overflow]
              WA_SET_BIT_MASKED(GEN7_GT_MODE,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          drivers/gpu/drm/i915/intel_ringbuffer.c:737:15: note: expanded from macro
            'WA_SET_BIT_MASKED'
              WA_REG(addr, _MASKED_BIT_ENABLE(mask), (mask) & 0xffff)
      
      Turned out GEN6_WIZ_HASHING_MASK was already shifted by 16, and we were
      trying to shift it a bit more.
      
      The other thing is that it's not the usual case of setting WA bits here, we
      need to have separate mask and value.
      
      To fix this, I've introduced a new _MASKED_FIELD() macro that takes both the
      (unshifted) mask and the desired value and the rest of the patch ripples
      through from it.
      
      This bug was introduced when reworking the WA emission in:
      
        Commit 7225342a
        Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
        Date:   Tue Oct 7 17:21:26 2014 +0300
      
            drm/i915: Build workaround list in ring initialization
      
      v2: Invert the order of the mask and value arguments (Daniel Vetter)
          Rewrite _MASKED_BIT_ENABLE() and _MASKED_BIT_DISABLE() with
          _MASKED_FIELD() (Jani Nikula)
          Make sure we only evaluate 'a' once in _MASKED_BIT_ENABLE() (Dave Gordon)
          Add check to ensure the value is within the mask boundaries (Chris Wilson)
      
      v3: Ensure the the value and mask are 16 bits (Dave Gordon)
      
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      98533251
  8. 08 12月, 2014 1 次提交
  9. 06 12月, 2014 2 次提交
  10. 05 12月, 2014 1 次提交
  11. 03 12月, 2014 6 次提交
    • D
      drm/i915: Flatten engine init control flow · bfc882b4
      Daniel Vetter 提交于
      Now that sanity prevails and we have the clean split between software
      init and starting the engines we can drop all the "have we allocate
      this struct already?" nonsense.
      
      Execlist code could benefit quite a bit more still, but that's for
      another patch.
      Reviewed-by: NDave Gordon <david.s.gordon@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      bfc882b4
    • D
      drm/i915: Only init engines once · 35a57ffb
      Daniel Vetter 提交于
      We can do this.
      
      And now there's finally the clean split between software setup and
      hardware setup I kinda wanted since multi-ring support was merged
      aeons ago. It only took almost 5 years.
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NDave Gordon <david.s.gordon@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      35a57ffb
    • D
      drm/i915: Move intel_init_pipe_control out of engine->init_hw · 99be1dfe
      Daniel Vetter 提交于
      With this all the ->init_hw hooks really only set up hw state needed
      to start the ring, all the software state setup and memory/buffer
      allocations happen beforehand.
      
      v2: We need to call intel_init_pipe_control after the ring init since
      otherwise engine->dev is NULL and it falls over. Currently that's
      now after the hw ring is enabled but a) we'll be fine as long as no
      one submits a batch b) this will change soon.
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NDave Gordon <david.s.gordon@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      99be1dfe
    • D
      drm/i915: s/init()/init_hw()/ in intel_engine_cs · ecfe00d8
      Daniel Vetter 提交于
      This is (mostly, some exceptions that need fixing) the hw setup
      function which starts the ring. And not the function which allocates
      all the resources.
      
      Make this clear by giving it a better name.
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NDave Gordon <david.s.gordon@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ecfe00d8
    • D
      drm/i915: Consolidate ring freespace calculations · ebd0fd4b
      Dave Gordon 提交于
      There are numerous places in the code where the driver's idea of
      how much space is left in a ring is updated using the driver's
      latest notions of the positions of 'head' and 'tail' for the ring.
      Among them are some that update one or both of these values before
      (re)doing the calculation. In particular, there are four different
      places in the code where 'last_retired_head' is copied to 'head'
      and then set to -1; and two of these do not have a guard to check
      that it has actually been updated since last time it was consumed,
      leaving the possibility that the dummy -1 can be transferred from
      'last_retired_head' to 'head', causing the space calculation to
      produce 'impossible' results (previously seen on Android/VLV).
      
      This code therefore consolidates all the calculation and updating of
      these values, such that there is only one place where the ring space
      is updated, and it ALWAYS uses (and consumes) 'last_retired_head' if
      (and ONLY if) it has been updated since the last call.
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ebd0fd4b
    • D
      drm/i915: Make ring freespace calculation more robust · 4f54741e
      Dave Gordon 提交于
      The used space in a ring is given by the cyclic distance from the
      consumer (HEAD) to the producer (TAIL), i.e. ((tail-head) MOD size);
      conversely, the available space in a ring is the cyclic distance
      from the producer to the consumer, MINUS the amount reserved for a
      "gap" that is supposed to guarantee that the producer never catches
      up with or overruns the consumer. Note that some GEN h/w requires
      that TAIL never approach to within one cacheline of HEAD, so the gap
      is usually set to twice the cacheline size to ensure this.
      
      While the existing code gives the correct answer for correct inputs,
      if the producer HAS overrun into the reserved space, the result can
      be a value larger than the maximum valid value (size-reserved). We
      can improve this by reorganising the calculation, so that in the
      event of overrun the result will be negative rather than over-large.
      
      This means that the commonly-used test (available >= required)
      will then reject further writes into the ring after an overrun,
      giving some chance that we can recover from or at least diagnose
      the original problem; whereas allowing more writes would likely both
      confuse the h/w and destroy the evidence of what went wrong.
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4f54741e