1. 08 7月, 2015 1 次提交
  2. 07 7月, 2015 2 次提交
  3. 06 7月, 2015 5 次提交
  4. 03 7月, 2015 1 次提交
  5. 30 6月, 2015 2 次提交
  6. 29 6月, 2015 2 次提交
    • V
      drm/i915: CHV DDR DVFS support and another watermark rewrite · 262cd2e1
      Ville Syrjälä 提交于
      Turns out the VLV/CHV system agent doesn't understand memory
      latencies, so trying to rely on the PND deadline mechanism is not
      going to fly especially when DDR DVFS is enabled. Currently we try to
      avoid the problems by lying to the system agent about the deadlines
      and setting the FIFO watermarks to 8 cachelines. This however leads to
      bad memory self refresh residency.
      
      So in order to satosfy everyone we'll just give up on the deadline
      scheme and program the watermarks old school based on the worst case
      memory latency.
      
      I've modelled this a bit on the ILK+ approach where we compute multiple
      sets of watermarks for each pipe (PM2,PM5,DDR DVFS) and when merge thet
      appropriate one later with the watermarks from other pipes. There isn't
      too much to merge actually since each pipe has a totally independent
      FIFO (well apart from the mess with the partially shared DSPARB
      registers), but still decopuling the pipes from each other seems like a
      good idea.
      
      Eventually we'll want to perform the watermark update in two phases
      around the plane update to avoid underruns due to the single buffered
      watermark registers. But that's still in limbo for ILK+ too, so I've not
      gone that far yet for VLV/CHV either.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NClint Taylor <Clinton.A.Taylor@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      262cd2e1
    • V
      drm/i915: Read wm values from hardware at init on CHV · 6eb1a681
      Ville Syrjälä 提交于
      Read out the current watermark settings from the hardware at driver init
      time. This will allow us to compare the newly calculated values against
      the currrent ones and potentially avoid needless WM updates.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NClint Taylor <Clinton.A.Taylor@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6eb1a681
  7. 24 6月, 2015 1 次提交
  8. 23 6月, 2015 19 次提交
    • J
      drm/i915: Remove the now obsolete 'i915_gem_check_olr()' · a5ac0f90
      John Harrison 提交于
      As there is no OLR to check, the check_olr() function is now a no-op and can be
      removed.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a5ac0f90
    • J
      drm/i915: Move the request/file and request/pid association to creation time · fcfa423c
      John Harrison 提交于
      In _i915_add_request(), the request is associated with a userland client.
      Specifically it is linked to the 'file' structure and the current user process
      is recorded. One problem here is that the current user process is not
      necessarily the same as when the request was submitted to the driver. This is
      especially true when the GPU scheduler arrives and decouples driver submission
      from hardware submission. Note also that it is only in the case where the add
      request comes from an execbuff call that there is a client to associate. Any
      other add request call is kernel only so does not need to do it.
      
      This patch moves the client association into a separate function. This is then
      called from the execbuffer code path itself at a sensible time. It also removes
      the now redundant 'file' pointer from the add request parameter list.
      
      An extra cleanup of the client association is also added to the request clean up
      code for the eventuality where the request is killed after association but
      before being submitted (e.g. due to out of memory error somewhere). Once the
      submission has happened, the request is on the request list and the regular
      request list removal will clear the association. Note that this still needs to
      happen at this point in time because the request might be kept floating around
      much longer (due to someone holding a reference count) and the client should not
      be worrying about this request after it has been retired.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fcfa423c
    • J
      drm/i915: Update l3_remap to take a request structure · 6909a666
      John Harrison 提交于
      Converted i915_gem_l3_remap() to take a request structure instead of a ring.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6909a666
    • J
      drm/i915: Update [vma|object]_move_to_active() to take request structures · b2af0376
      John Harrison 提交于
      Now that everything above has been converted to use request structures, it is
      possible to update the lower level move_to_active() functions to be request
      based as well.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b2af0376
    • J
      drm/i915: Update add_request() to take a request structure · 75289874
      John Harrison 提交于
      Now that all callers of i915_add_request() have a request pointer to hand, it is
      possible to update the add request function to take a request pointer rather
      than pulling it out of the OLR.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      75289874
    • J
      drm/i915: Update queue_flip() to take a request structure · 6258fbe2
      John Harrison 提交于
      Updated the display page flip code to do explicit request creation and
      submission rather than relying on the OLR and just hoping that the request
      actually gets submitted at some random point.
      
      The sequence is now to create a request, queue the work to the ring, assign the
      known request to the flip queue work item then actually submit the work and post
      the request.
      
      Note that every single flip function used to finish with
      '__intel_ring_advance(ring);'. However, immediately after they return there is
      now an add request call which will do the advance anyway. Thus the many
      duplicate advance calls have been removed.
      
      v2: Updated commit message with comment about advance removal.
      
      v3: The request can now be allocated by the _sync() code earlier on. Thus the
      page flip path does not necessarily need to allocate a new request, it may be
      able to re-use one.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6258fbe2
    • J
      drm/i915: Update i915_gem_object_sync() to take a request structure · 91af127f
      John Harrison 提交于
      The plan is to pass requests around as the basic submission tracking structure
      rather than rings and contexts. This patch updates the i915_gem_object_sync()
      code path.
      
      v2: Much more complex patch to share a single request between the sync and the
      page flip. The _sync() function now supports lazy allocation of the request
      structure. That is, if one is passed in then that will be used. If one is not,
      then a request will be allocated and passed back out. Note that the _sync() code
      does not necessarily require a request. Thus one will only be created until
      certain situations. The reason the lazy allocation must be done within the
      _sync() code itself is because the decision to need one or not is not really
      something that code above can second guess (except in the case where one is
      definitely not required because no ring is passed in).
      
      The call chains above _sync() now support passing a request through which most
      callers passing in NULL and assuming that no request will be required (because
      they also pass in NULL for the ring and therefore can't be generating any ring
      code).
      
      The exeception is intel_crtc_page_flip() which now supports having a request
      returned from _sync(). If one is, then that request is shared by the page flip
      (if the page flip is of a type to need a request). If _sync() does not generate
      a request but the page flip does need one, then the page flip path will create
      its own request.
      
      v3: Updated comment description to be clearer about 'to_req' parameter (Tomas
      Elf review request). Rebased onto newer tree that significantly changed the
      synchronisation code.
      
      v4: Updated comments from review feedback (Tomas Elf)
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      91af127f
    • J
      drm/i915: Update i915_switch_context() to take a request structure · ba01cc93
      John Harrison 提交于
      Now that the request is guaranteed to specify the context, it is possible to
      update the context switch code to use requests rather than ring and context
      pairs. This patch updates i915_switch_context() accordingly.
      
      Also removed the warning that the request's context must match the last context
      switch's context. As the context switch now gets the context object from the
      request structure, there is no longer any scope for the two to become out of
      step.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ba01cc93
    • J
      drm/i915: Update ppgtt_init_ring() & context_enable() to take requests · b3dd6b96
      John Harrison 提交于
      The final step in removing the OLR from i915_gem_init_hw() is to pass the newly
      allocated request structure in to each step rather than passing a ring
      structure. This patch updates both i915_ppgtt_init_ring() and
      i915_gem_context_enable() to take request pointers.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b3dd6b96
    • J
      drm/i915: Add explicit request management to i915_gem_init_hw() · dc4be607
      John Harrison 提交于
      Now that a single per ring loop is being done for all the different
      intialisation steps in i915_gem_init_hw(), it is possible to add proper request
      management as well. The last remaining issue is that the context enable call
      eventually ends up within *_render_state_init() and this does its own private
      _i915_add_request() call.
      
      This patch adds explicit request creation and submission to the top level loop
      and removes the add_request() from deep within the sub-functions.
      
      v2: Updated for removal of batch_obj from add_request call in previous patch.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dc4be607
    • J
      drm/i915: Moved the for_each_ring loop outside of i915_gem_context_enable() · 90638cc1
      John Harrison 提交于
      The start of day context initialisation code in i915_gem_context_enable() loops
      over each ring and calls the legacy switch context or the execlist init context
      code as appropriate.
      
      This patch moves the ring looping out of that function in to the top level
      caller i915_gem_init_hw(). This means the a single pass can be made over all
      rings doing the PPGTT, L3 remap and context initialisation of each ring
      altogether.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      90638cc1
    • J
      drm/i915: Add flag to i915_add_request() to skip the cache flush · 5b4a60c2
      John Harrison 提交于
      In order to explcitly track all GPU work (and completely remove the outstanding
      lazy request), it is necessary to add extra i915_add_request() calls to various
      places. Some of these do not need the implicit cache flush done as part of the
      standard batch buffer submission process.
      
      This patch adds a flag to _add_request() to specify whether the flush is
      required or not.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5b4a60c2
    • J
      drm/i915: Update execbuffer_move_to_active() to take a request structure · 8a8edb59
      John Harrison 提交于
      The plan is to pass requests around as the basic submission tracking structure
      rather than rings and contexts. This patch updates the
      execbuffer_move_to_active() code path.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8a8edb59
    • J
      drm/i915: Add request to execbuf params and add explicit cleanup · 6a6ae79a
      John Harrison 提交于
      Rather than just having a local request variable in the execbuff code, the
      request pointer is now stored in the execbuff params structure. Also added
      explicit cleanup of the request (plus wiping the OLR to match) in the error
      case. This means that the execbuff code is no longer dependent upon the OLR
      keeping track of the request so as to not leak it when things do go wrong. Note
      that in the success case, the i915_add_request() at the end of the submission
      function will tidy up the request and clear the OLR.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6a6ae79a
    • J
      drm/i915: Update alloc_request to return the allocated request · 217e46b5
      John Harrison 提交于
      The alloc_request() function does not actually return the newly allocated
      request. Instead, it must be pulled from ring->outstanding_lazy_request. This
      patch fixes this so that code can create a request and start using it knowing
      exactly which request it actually owns.
      
      v2: Updated for new i915_gem_request_alloc() scheme.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      217e46b5
    • J
      drm/i915: Simplify i915_gem_execbuffer_retire_commands() parameters · adeca76d
      John Harrison 提交于
      Shrunk the parameter list of i915_gem_execbuffer_retire_commands() to a single
      structure as everything it requires is available in the execbuff_params object.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      adeca76d
    • J
      drm/i915: Merged the many do_execbuf() parameters into a structure · 5f19e2bf
      John Harrison 提交于
      The do_execbuf() function takes quite a few parameters. The actual set of
      parameters is going to change with the conversion to passing requests around.
      Further, it is due to grow massively with the arrival of the GPU scheduler.
      
      This patch simplifies the prototype by passing a parameter structure instead.
      Changing the parameter set in the future is then simply a matter of
      adding/removing items to the structure.
      
      Note that the structure does not contain absolutely everything that is passed
      in. This is because the intention is to use this structure more extensively
      later in this patch series and more especially in the GPU scheduler that is
      coming soon. The latter requires hanging on to the structure as the final
      hardware submission can be delayed until long after the execbuf IOCTL has
      returned to user land. Thus it is unsafe to put anything in the structure that
      is local to the IOCTL call itself - such as the 'args' parameter. All entries
      must be copies of data or pointers to structures that are reference counted in
      some way and guaranteed to exist for the duration of the batch buffer's life.
      
      v2: Rebased to newer tree and updated for changes to the command parser.
      Specifically, a code shuffle has required saving the batch start address in the
      params structure.
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5f19e2bf
    • J
      drm/i915: i915_add_request must not fail · bf7dc5b7
      John Harrison 提交于
      The i915_add_request() function is called to keep track of work that has been
      written to the ring buffer. It adds epilogue commands to track progress (seqno
      updates and such), moves the request structure onto the right list and other
      such house keeping tasks. However, the work itself has already been written to
      the ring and will get executed whether or not the add request call succeeds. So
      no matter what goes wrong, there isn't a whole lot of point in failing the call.
      
      At the moment, this is fine(ish). If the add request does bail early on and not
      do the housekeeping, the request will still float around in the
      ring->outstanding_lazy_request field and be picked up next time. It means
      multiple pieces of work will be tagged as the same request and driver can't
      actually wait for the first piece of work until something else has been
      submitted. But it all sort of hangs together.
      
      This patch series is all about removing the OLR and guaranteeing that each piece
      of work gets its own personal request. That means that there is no more
      'hoovering up of forgotten requests'. If the request does not get tracked then
      it will be leaked. Thus the add request call _must_ not fail. The previous patch
      should have already ensured that it _will_ not fail by removing the potential
      for running out of ring space. This patch enforces the rule by actually removing
      the early exit paths and the return code.
      
      Note that if something does manage to fail and the epilogue commands don't get
      written to the ring, the driver will still hang together. The request will be
      added to the tracking lists. And as in the old case, any subsequent work will
      generate a new seqno which will suffice for marking the old one as complete.
      
      v2: Improved WARNings (Tomas Elf review request).
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bf7dc5b7
    • J
      drm/i915: Reserve ring buffer space for i915_add_request() commands · 29b1b415
      John Harrison 提交于
      It is a bad idea for i915_add_request() to fail. The work will already have been
      send to the ring and will be processed, but there will not be any tracking or
      management of that work.
      
      The only way the add request call can fail is if it can't write its epilogue
      commands to the ring (cache flushing, seqno updates, interrupt signalling). The
      reasons for that are mostly down to running out of ring buffer space and the
      problems associated with trying to get some more. This patch prevents that
      situation from happening in the first place.
      
      When a request is created, it marks sufficient space as reserved for the
      epilogue commands. Thus guaranteeing that by the time the epilogue is written,
      there will be plenty of space for it. Note that a ring_begin() call is required
      to actually reserve the space (and do any potential waiting). However, that is
      not currently done at request creation time. This is because the ring_begin()
      code can allocate a request. Hence calling begin() from the request allocation
      code would lead to infinite recursion! Later patches in this series remove the
      need for begin() to do the allocate. At that point, it becomes safe for the
      allocate to call begin() and really reserve the space.
      
      Until then, there is a potential for insufficient space to be available at the
      point of calling i915_add_request(). However, that would only be in the case
      where the request was created and immediately submitted without ever calling
      ring_begin() and adding any work to that request. Which should never happen. And
      even if it does, and if that request happens to fall down the tiny window of
      opportunity for failing due to being out of ring space then does it really
      matter because the request wasn't doing anything in the first place?
      
      v2: Updated the 'reserved space too small' warning to include the offending
      sizes. Added a 'cancel' operation to clean up when a request is abandoned. Added
      re-initialisation of tracking state after a buffer wrap to keep the sanity
      checks accurate.
      
      v3: Incremented the reserved size to accommodate Ironlake (after finally
      managing to run on an ILK system). Also fixed missing wrap code in LRC mode.
      
      v4: Added extra comment and removed duplicate WARN (feedback from Tomas).
      
      For: VIZ-5115
      CC: Tomas Elf <tomas.elf@intel.com>
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      29b1b415
  9. 22 6月, 2015 2 次提交
  10. 20 6月, 2015 1 次提交
  11. 16 6月, 2015 1 次提交
  12. 15 6月, 2015 3 次提交