1. 03 9月, 2014 5 次提交
  2. 23 8月, 2014 1 次提交
  3. 20 8月, 2014 1 次提交
  4. 18 8月, 2014 2 次提交
    • I
      drm/i915: cancel hotplug and dig_port work during suspend and unload · 1d0d343a
      Imre Deak 提交于
      Make sure these work handlers don't run after we system suspend or
      unload the driver. Note that we don't cancel the handlers during runtime
      suspend. That could lead to a lockup, since we take a runtime PM ref
      from the handlers themselves. Fortunaltely canceling there is not needed
      since the RPM ref itself provides for the needed serialization.
      
      v2:
      - fix the order of canceling dig_port_work wrt. hotplug_work (Ville)
      - zero out {long,short}_hpd_port_mask and hpd_event_bits for speed
        (Ville)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: stable@vger.kernel.org (3.16+)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      1d0d343a
    • I
      drm/i915: fix HPD IRQ reenable work cancelation · 6323751d
      Imre Deak 提交于
      Atm, the HPD IRQ reenable timer can get rearmed right after it's
      canceled. Also to access the HPD IRQ mask registers we need to wake up
      the HW.
      
      Solve both issues by converting the reenable timer to a delayed work and
      grabbing a runtime PM reference in the work. By this we can also forgo
      canceling the timer during runtime suspend, since the only important
      thing there is that the HW is awake when we write the registers and
      that's ensured by the RPM ref. So do the cancelation only during driver
      unload time; this is also a requirement for an upcoming patch where we
      want to cancel all HPD related works only during system suspend and
      driver unload time, but not during runtime suspend.
      
      Note that there is still a race between the HPD IRQ reenable work and
      drm_irq_uninstall() during driver unload, where the work can reenable
      the HPD IRQs disabled by drm_irq_uninstall(). This isn't a problem since
      the HPD IRQs will still be effectively masked by the first level
      interrupt mask.
      
      v2-3:
      - unchanged
      v4:
      - use proper API for changing the expiration time for an already pending
        delayed work (Jani)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v2)
      Cc: stable@vger.kernel.org (3.16+)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      6323751d
  5. 14 8月, 2014 1 次提交
  6. 13 8月, 2014 5 次提交
  7. 12 8月, 2014 3 次提交
    • D
      drm/i915: Some cleanups for the ppgtt lifetime handling · ee960be7
      Daniel Vetter 提交于
      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: NMichel Thierry <michel.thierry@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ee960be7
    • M
      drm/i915: vma/ppgtt lifetime rules · b9d06dd9
      Michel Thierry 提交于
      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: NMichel Thierry <michel.thierry@intel.com>
      [danvet: Add note about potential ppgtt leak with this approach.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b9d06dd9
    • O
      drm/i915/bdw: Workload submission mechanism for Execlists · ba8b7ccb
      Oscar Mateo 提交于
      This is what i915_gem_do_execbuffer calls when it wants to execute some
      worload in an Execlists world.
      
      v2: Check arguments before doing stuff in intel_execlists_submission. Also,
      get rel_constants parsing right.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Drop the chipset flush, that's pre-gen6. And appease
      checkpatch a bit .... again!]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ba8b7ccb
  8. 11 8月, 2014 9 次提交
    • O
      drm/i915: Abstract the legacy workload submission mechanism away · a83014d3
      Oscar Mateo 提交于
      As suggested by Daniel Vetter. The idea, in subsequent patches, is to
      provide an alternative to these vfuncs for the Execlists submission
      mechanism.
      
      v2: Splitted into two and reordered to illustrate our intentions, instead
      of showing it off. Also, remove the add_request vfunc and added the
      stop_ring one.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet:
      - Make checkpatch happy.
      - Be grumpy about the excessive vtable.
      - Ditch gt->is_ring_initialized.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a83014d3
    • O
      drm/i915/bdw: Allocate ringbuffers for Logical Ring Contexts · 84c2377f
      Oscar Mateo 提交于
      As we have said a couple of times by now, logical ring contexts have
      their own ringbuffers: not only the backing pages, but the whole
      management struct.
      
      In a previous version of the series, this was achieved with two separate
      patches:
      drm/i915/bdw: Allocate ringbuffer backing objects for default global LRC
      drm/i915/bdw: Allocate ringbuffer for user-created LRCs
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      84c2377f
    • O
      drm/i915/bdw: A bit more advanced LR context alloc/free · 8c857917
      Oscar Mateo 提交于
      Now that we have the ability to allocate our own context backing objects
      and we have multiplexed one of them per engine inside the context structs,
      we can finally allocate and free them correctly.
      
      Regarding the context size, reading the register to calculate the sizes
      can work, I think, however the docs are very clear about the actual
      context sizes on GEN8, so just hardcode that and use it.
      
      v2: Rebased on top of the Full PPGTT series. It is important to notice
      that at this point we have one global default context per engine, all
      of them using the aliasing PPGTT (as opposed to the single global
      default context we have with legacy HW contexts).
      
      v3:
      - Go back to one single global default context, this time with multiple
        backing objects inside.
      - Use different context sizes for non-render engines, as suggested by
        Damien (still hardcoded, since the information about the context size
        registers in the BSpec is, well, *lacking*).
      - Render ctx size is 20 (or 19) pages, but not 21 (caught by Damien).
      - Move default context backing object creation to intel_init_ring (so
        that we don't waste memory in rings that might not get initialized).
      
      v4:
      - Reuse the HW legacy context init/fini.
      - Create a separate free function.
      - Rename the functions with an intel_ preffix.
      
      v5: Several rebases to account for the changes in the previous patches.
      
      Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1)
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8c857917
    • O
      drm/i915/bdw: Introduce one context backing object per engine · c9e003af
      Oscar Mateo 提交于
      A context backing object only makes sense for a given engine (because
      it holds state data specific to that engine).
      
      In legacy ringbuffer sumission mode, the only MI_SET_CONTEXT we really
      perform is for the render engine, so one backing object is all we nee.
      
      With Execlists, however, we need backing objects for every engine, as
      contexts become the only way to submit workloads to the GPU. To tackle
      this problem, we multiplex the context struct to contain <no-of-engines>
      objects.
      
      Originally, I colored this code by instantiating one new context for
      every engine I wanted to use, but this change suggested by Brad Volkin
      makes it more elegant.
      
      v2: Leave the old backing object pointer behind. Daniel Vetter suggested
      using a union, but it makes more sense to keep rcs_state as a NULL
      pointer behind, to make sure no one uses it incorrectly when Execlists
      are enabled, similar to what he suggested for ring->buffer (Rusty's API
      level 5).
      
      v3: Use the name "state" instead of the too-generic "obj", so that it
      mirrors the name choice for the legacy rcs_state.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c9e003af
    • O
      drm/i915/bdw: Macro for LRCs and module option for Execlists · 127f1003
      Oscar Mateo 提交于
      GEN8 brings an expansion of the HW contexts: "Logical Ring Contexts".
      These expanded contexts enable a number of new abilities, especially
      "Execlists".
      
      The macro is defined to off until we have things in place to hope to
      work.
      
      v2: Rename "advanced contexts" to the more correct "logical ring
      contexts".
      
      v3: Add a module parameter to enable execlists. Execlist are relatively
      new, and so it'd be wise to be able to switch back to ring submission
      to debug subtle problems that will inevitably arise.
      
      v4: Add an intel_enable_execlists function.
      
      v5: Sanitize early, as suggested by Daniel. Remove lrc_enabled.
      
      Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1)
      Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> (v3)
      Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> (v2, v4 & v5)
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      127f1003
    • O
      drm/i915/bdw: New source and header file for LRs, LRCs and Execlists · b20385f1
      Oscar Mateo 提交于
      Some legacy HW context code assumptions don't make sense for this new
      submission method, so we will place this stuff in a separate file.
      
      Note for reviewers: I've carefully considered the best name for this file
      and this was my best option (other possibilities were intel_lr_context.c
      or intel_execlist.c). I am open to a certain bikeshedding on this matter,
      anyway.
      
      And some point in time, it would be a good idea to split intel_lrc.c/.h
      even further, but for the moment just shove everything together.
      
      v2: Change to intel_lrc.c
      
      v3: Squash together with the header file addition
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b20385f1
    • C
      drm/i915: Agnostic INTEL_INFO · dbbe9127
      Chris Wilson 提交于
      Adapt the macro so that we can pass either the struct drm_device or the
      struct drm_i915_private pointers and get the answer we want. Over time,
      my plan is to convert all users over to using drm_i915_private and so
      trimming down the pointer dance. Having spent a few hours chasing that
      goal and achieved over 8k of object code saving, it appears to be a
      worthwhile target. This interim macro allows us to slowly convert over.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Drop the (struct drm_device *) cast per the m-l discussion.
      Also explain the seemingly unecessary first cast.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dbbe9127
    • C
      drm/i915: Copy PCI device id into the device info block · 87f1f465
      Chris Wilson 提交于
      This is so that we can make the drm_i915_private->info always the
      preferred source for chipset type and feature queries.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      87f1f465
    • C
      drm/i915: Remove fenced_gpu_access and pending_fenced_gpu_access · 82b6b6d7
      Chris Wilson 提交于
      This migrates the fence tracking onto the existing seqno
      infrastructure so that the later conversion to tracking via requests is
      simplified.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      82b6b6d7
  9. 09 8月, 2014 1 次提交
  10. 08 8月, 2014 5 次提交
  11. 07 8月, 2014 2 次提交
    • R
      drm/i915: Fix DEIER and GTIER collecting for BDW. · 885ea5a8
      Rodrigo Vivi 提交于
      BDW has many other Display Engine interrupts and GT interrupts registers.
      Collecting it properly on gpu_error_state.
      
      On debugfs all was properly listed already but besides we were also listing old
      DEIER and GTIER that doesn't exist on BDW anymore. This was causing
      unclaimed register messages
      
      v2: Fix small issues of first version and don't read DEIER regs when pipe's
          power well is disabled
      v3: bikeshed accepted: use enum pipe pipe instead of int i for pipe interection
      v4: Ben notice previous version was checking for display_power_enabled without
          using propper locks. Using _unlocked version isn't reliable and we cannot
          get this registers when power well is off. So let's avoid getting all DE_IER
          per pipe for now. If someone think this is an useful information it can be
          added later.
      v5: Ben: put back debugfs stuff that might be coverred by pm_get and use
          	 gen >= 8 trying to predict future.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81701
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: N(v3) Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      885ea5a8
    • R
      drm/i915: Collect gtier properly on HSW. · 843db716
      Rodrigo Vivi 提交于
      GTIER and DEIER doesn't have same interface on HSW so this "or" operation
      makes the information provided useless.
      
      v2: since we have gtier variable already let's split for everybody
      and avoid the strange | op.
          Also avoid overriding the value that was set for vlv. In this case I
          believe that we should reorganize the whole function, but I'll respect
          the comment that ask to not touch the order and let this organization
          work to be done later.
      v3: moving VLV check to the right place.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      843db716
  12. 05 8月, 2014 1 次提交
  13. 24 7月, 2014 1 次提交
  14. 23 7月, 2014 3 次提交