1. 15 5月, 2014 1 次提交
    • D
      drm/i915: Don't drop pinned fences · aff10b30
      Daniel Vetter 提交于
      Userspace can currently provoke this when e.g. trying to use a pinned
      scanout as a cursor or overlay target. Later on that might lead to
      some fun fence pin count mayhem.
      
      Spurred by Ville's report that something goes wrong here and
      originally I've thought that this might slip through the pwrite gtt
      fastpath. But that one checks of obj tiling, so should be ok.
      
      But one thing that _does_ blow up is the vma unbinding with more than
      one address space. The next patch will fix this.
      
      v2: Use a WARN_ON - Chris pointed out that we already catch all cases
      so userspace can't provoke this like I've originally feared.
      
      While reviewing relevant code I've noticed a pile of DRM_ERROR in the
      overlay&cursor code which are all triggerable by userspace. Tune them
      down while at it.
      
      v3: Split out the DRM_ERROR->DRM_DEBUG_KMS change into a separate patch,
      as requested by Chris.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Tested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      aff10b30
  2. 14 5月, 2014 8 次提交
  3. 13 5月, 2014 24 次提交
  4. 08 5月, 2014 2 次提交
  5. 07 5月, 2014 5 次提交
    • B
      drm/i915: Make aliasing a 2nd class VM · 6e7186af
      Ben Widawsky 提交于
      There is a good debate to be had about how best to fit the aliasing
      PPGTT into the code. However, as it stands right now, getting aliasing
      PPGTT bindings is a hack, and done through implicit arguments. To make
      this absolutely clear, WARN and return an error if a driver writer tries
      to do something they shouldn't.
      
      I have no issue with an eventual revert of this patch. It makes sense
      for what we have today.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6e7186af
    • B
      drm/i915: Use topdown allocation for PPGTT PDEs on gen6/7 · 3e8b5ae9
      Ben Widawsky 提交于
      It was always the intention to do the topdown allocation for context
      objects (Chris' idea originally). Unfortunately, I never managed to land
      the patch, but someone else did, so now we can use it.
      
      As a reminder, hardware contexts never need to be in the precious GTT
      aperture space - which is what is what happens with the normal bottom up
      allocation we do today. Doing a top down allocation increases the odds
      that the HW contexts can get out of the way, especially with per FD
      contexts as is done in full PPGTT
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3e8b5ae9
    • I
      drm/i915: vlv: enable runtime PM · fd7f8cce
      Imre Deak 提交于
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fd7f8cce
    • I
      drm/i915: vlv: add runtime PM support · ddeea5b0
      Imre Deak 提交于
      Add runtime PM support for VLV, but leave it disabled. The next patch
      enables it.
      
      The suspend/resume sequence used is based on [1] and [2]. In practice we
      depend on the GT RC6 mechanism to save the HW context depending on the
      render and media power wells. By the time we run the runtime suspend
      callback the display side is also off and the HW context for that is
      managed by the display power domain framework.
      
      Besides the above there are Gunit registers that depend on a system-wide
      power well. This power well goes off once the device enters any of the
      S0i[R123] states. To handle this scenario, save/restore these Gunit
      registers. Note that this is not the complete register set dictated by
      [2], to remove some overhead, registers that are known not to be used are
      ignored. Also some registers are fully setup by initialization functions
      called during resume, these are not saved either. The list of registers
      can be further reduced, see the TODO note in the code.
      
      [1] VLV_gfx_clocking_PM_reset_y12w21d3 / "Driver D3 entry/exit"
      [2] VLV2_S0IXRegs
      
      v2:
      - unchanged
      v3:
      - fix s/GEN6_PMIIR/GEN6_PMIMR/ typo when saving/restoring registers
        (Ville)
      v4:
      - rebased on the previous patch fixing GEN register prefixes
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      [ rebased (according to v4) ]
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ddeea5b0
    • I
      drm/i915: propagate the error code from runtime PM callbacks · 0ab9cfeb
      Imre Deak 提交于
      Atm, none of the RPM callbacks can fail, but the next patch adding
      RPM support for VLV changes this, so prepare for it.
      
      In case one of these callbacks return error RPM will get permanently
      disabled until the error is explicitly cleared. In the future we could
      add support for re-enabling it, for example after resetting the HW, but
      for now - hopefully - we can live with the simpler solution.
      
      v2:
      - propagate the error from the resume callbacks too (Paulo)
      v3:
      - fix rebase fail typo around IS_GEN6() check in intel_runtime_suspend()
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0ab9cfeb