1. 14 Aug, 2014 2 commits
    • Sagar Kamble's avatar
      drm/i915: Sharing platform specific sequence between runtime and system suspend/ resume paths · 016970be
      Sagar Kamble authored
      On VLV, post S0i3 during i915_drm_thaw following issue is observed during ring
      initialization.
      
      [ 335.604039] [drm:stop_ring] ERROR render ring :timed out trying to stop ring
      [ 336.607340] [drm:stop_ring] ERROR render ring :timed out trying to stop ring
      [ 336.607345] [drm:init_ring_common] ERROR failed to set render ring head to zero ctl 00000000 head 00000000 tail 00000000 start 00000000
      [ 337.610645] [drm:stop_ring] ERROR bsd ring :timed out trying to stop ring
      [ 338.613952] [drm:stop_ring] ERROR bsd ring :timed out trying to stop ring
      [ 338.613956] [drm:init_ring_common] ERROR failed to set bsd ring head to zero ctl 00000000 head 00000000 tail 00000000 start 00000000
      [ 339.617256] [drm:stop_ring] ERROR render ring :timed out trying to stop ring
      [ 339.617258] -----------[ cut here ]-----------
      [ 339.617267] WARNING: CPU: 0 PID: 6 at drivers/gpu/drm/i915/intel_ringbuffer.c:1666 intel_cleanup_ring+0xe6/0xf0()
      [ 339.617396] --[ end trace 5ef5ed1a3c92e2a6 ]--
      [ 339.617428] [drm:__i915_drm_thaw] ERROR failed to re-initialize GPU, declaring wedged!
      
      This is happening since wake is not enabled and Gunit registers are not restored.
      For this system suspend/resume paths need to follow save/restore and additional
      platform specific setup in suspend_complete and resume_prepare.
      
      suspend_complete is shared unconditionaly for VLV, HSW, BDW. resume_prepare for
      HSW and BDW has pc8 disabling which is needed during thaw_early so sharing
      uncondtionally. For VLV and SNB runtime resume specific sequence exists.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Goel, Akash <akash.goel@intel.com>
      Signed-off-by: default avatarSagar Kamble <sagar.a.kamble@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      016970be
    • Sagar Kamble's avatar
      drm/i915: Created common handler for platform specific suspend/resume · ebc32824
      Sagar Kamble authored
      With this change, intel_runtime_suspend and intel_runtime_resume functions
      become completely platform agnostic. Platform specific suspend/resume
      changes are moved to intel_suspend_complete and intel_resume_prepare.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Goel, Akash <akash.goel@intel.com>
      Signed-off-by: default avatarSagar Kamble <sagar.a.kamble@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      ebc32824
  2. 13 Aug, 2014 18 commits
  3. 12 Aug, 2014 2 commits
    • Daniel Vetter's avatar
      drm/i915: Some cleanups for the ppgtt lifetime handling · ee960be7
      Daniel Vetter authored
      So when reviewing Michel's patch I've noticed a few things and cleaned
      them up:
      - The early checks in ppgtt_release are now redundant: The inactive
        list should always be empty now, so we can ditch these checks. Even
        for the aliasing ppgtt (though that's a different confusion) since
        we tear that down after all the objects are gone.
      - The ppgtt handling functions are splattered all over. Consolidate
        them in i915_gem_gtt.c, give them OCD prefixes and add wrappers for
        get/put.
      - There was a bit a confusion in ppgtt_release about whether it cares
        about the active or inactive list. It should care about them both,
        so augment the WARNINGs to check for both.
      
      There's still create_vm_for_ctx left to do, put that is blocked on the
      removal of ppgtt->ctx. Once that's done we can rename it to
      i915_ppgtt_create and move it to its siblings for handling ppgtts.
      
      v2: Move the ppgtt checks into the inline get/put functions as
      suggested by Chris.
      
      v3: Inline the now redundant ppgtt local variable.
      
      Cc: Michel Thierry <michel.thierry@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarMichel Thierry <michel.thierry@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      ee960be7
    • Michel Thierry's avatar
      drm/i915: vma/ppgtt lifetime rules · b9d06dd9
      Michel Thierry authored
      VMAs should take a reference of the address space they use.
      
      Now, when the fd is closed, it will release the ref that the context was
      holding, but it will still be referenced by any vmas that are still
      active.
      
      ppgtt_release() should then only be called when the last thing referencing
      it releases the ref, and it can just call the base cleanup and free the
      ppgtt.
      
      Note that with this we will extend the lifetime of ppgtts which
      contain shared objects. But all the non-shared objects will get
      removed as soon as they drop of the active list and for the shared
      ones the shrinker can eventually reap them. Since we currently can't
      evict ppgtt pagetables either I don't think that temporary leak is
      important.
      Signed-off-by: default avatarMichel Thierry <michel.thierry@intel.com>
      [danvet: Add note about potential ppgtt leak with this approach.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b9d06dd9
  4. 11 Aug, 2014 18 commits