1. 23 5月, 2014 9 次提交
    • O
      drm/i915: Kill private_default_ctx off · f83d6518
      Oscar Mateo 提交于
      It's barely alive now anyway, so give it the "coup de grâce".
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f83d6518
    • 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
    • O
      drm/i915: Split the ringbuffers from the rings (3/3) · 93b0a4e0
      Oscar Mateo 提交于
      Manual cleanup after the previous Coccinelle script.
      
      Yes, I could write another Coccinelle script to do this but I
      don't want labor-replacing robots making an honest programmer's
      work obsolete (also, I'm lazy).
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      93b0a4e0
    • O
      drm/i915: Split the ringbuffers from the rings (2/3) · ee1b1e5e
      Oscar Mateo 提交于
      This refactoring has been performed using the following Coccinelle
      semantic script:
      
          @@
          struct intel_engine_cs r;
          @@
          (
          - (r).obj
          + r.buffer->obj
          |
          - (r).virtual_start
          + r.buffer->virtual_start
          |
          - (r).head
          + r.buffer->head
          |
          - (r).tail
          + r.buffer->tail
          |
          - (r).space
          + r.buffer->space
          |
          - (r).size
          + r.buffer->size
          |
          - (r).effective_size
          + r.buffer->effective_size
          |
          - (r).last_retired_head
          + r.buffer->last_retired_head
          )
      
          @@
          struct intel_engine_cs *r;
          @@
          (
          - (r)->obj
          + r->buffer->obj
          |
          - (r)->virtual_start
          + r->buffer->virtual_start
          |
          - (r)->head
          + r->buffer->head
          |
          - (r)->tail
          + r->buffer->tail
          |
          - (r)->space
          + r->buffer->space
          |
          - (r)->size
          + r->buffer->size
          |
          - (r)->effective_size
          + r->buffer->effective_size
          |
          - (r)->last_retired_head
          + r->buffer->last_retired_head
          )
      
          @@
          expression E;
          @@
          (
          - LP_RING(E)->obj
          + LP_RING(E)->buffer->obj
          |
          - LP_RING(E)->virtual_start
          + LP_RING(E)->buffer->virtual_start
          |
          - LP_RING(E)->head
          + LP_RING(E)->buffer->head
          |
          - LP_RING(E)->tail
          + LP_RING(E)->buffer->tail
          |
          - LP_RING(E)->space
          + LP_RING(E)->buffer->space
          |
          - LP_RING(E)->size
          + LP_RING(E)->buffer->size
          |
          - LP_RING(E)->effective_size
          + LP_RING(E)->buffer->effective_size
          |
          - LP_RING(E)->last_retired_head
          + LP_RING(E)->buffer->last_retired_head
          )
      
      Note: On top of this this patch also removes the now unused ringbuffer
      fields in intel_engine_cs.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      [danvet: Add note about fixup patch included here.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ee1b1e5e
    • O
      drm/i915: Split the ringbuffers from the rings (1/3) · 8ee14975
      Oscar Mateo 提交于
      As advanced by the previous patch, the ringbuffers and the engine
      command streamers belong in different structs. This is so because,
      while they used to be tightly coupled together, the new Logical
      Ring Contexts (LRC for short) have a ringbuffer each.
      
      In legacy code, we will use the buffer* pointer inside each ring
      to get to the pertaining ringbuffer (the actual switch will be
      done in the next patch). In the new Execlists code, this pointer
      will be NULL and we will use instead the one inside the context
      instead.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8ee14975
    • O
      drm/i915: s/intel_ring_buffer/intel_engine_cs · a4872ba6
      Oscar Mateo 提交于
      In the upcoming patches we plan to break the correlation between
      engine command streamers (a.k.a. rings) and ringbuffers, so it
      makes sense to refactor the code and make the change obvious.
      
      No functional changes.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a4872ba6
    • I
      drm/i915: disable GT power saving early during system suspend · fe5b1886
      Imre Deak 提交于
      Atm, we disable GT power saving during the end of the suspend sequence
      in i915_save_state(). Doing the disabling at that point seems arbitrary.
      One reason to disable it early though is to have a quiescent HW state
      before we do anything else (for example save registers). So move the
      disabling earlier, which also takes care canceling of the deferred RPS
      enabling work done by intel_disable_gt_powersave().
      
      Note that after the move we'll call intel_disable_gt_powersave() only
      in case modeset is enabled, but that's anyway the only case where we
      have it enabled in the first place.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NRobert Beckett <robert.beckett@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fe5b1886
    • I
      drm/i915: fix possible RPM ref leaking during RPS disabling · e494837a
      Imre Deak 提交于
      In
      
      commit c6df39b5
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Mon Apr 14 20:24:29 2014 +0300
      
          drm/i915: get a runtime PM ref for the deferred GT powersave enabling
      
      I added an RPM get-ref when enabling RPS from a deferred work, but forgot
      to add the corresponding put-ref when canceling the work. This may leave
      RPM disabled.
      
      Note that the race is real since we run the rps enabling with a
      delayed work item after resume, so leaves enough time (in contrived
      examples) to fit a quick autoresum in.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NRobert Beckett <robert.beckett@intel.com>
      Testecase: igt/pm_rpm/system-suspend
      [danvet: Mention testcase and add note.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e494837a
    • I
      drm/i915: remove user GTT mappings early during runtime suspend · d6102977
      Imre Deak 提交于
      Currently user space can access GEM buffers mapped to GTT through
      existing mappings concurrently while the platform specific suspend
      handlers are running. Since these handlers may change the HW state in a
      way that would break such accesses, remove the mappings before calling
      the handlers. Spotted by Ville.
      
      Also Chris pointed out that the lists that i915_gem_release_all_mmaps()
      walks through need dev->struct_mutex, so take this lock. There is a
      potential deadlock against a concurrent RPM resume, resolve this by
      aborting and rescheduling the suspend (Daniel).
      
      v2:
      - take struct_mutex around i915_gem_release_all_mmaps() (Chris, Daniel)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NRobert Beckett <robert.beckett@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d6102977
  2. 22 5月, 2014 19 次提交
  3. 21 5月, 2014 12 次提交