1. 16 2月, 2018 2 次提交
  2. 15 2月, 2018 1 次提交
    • R
      drm/i915/cnl: Remove alpha_support protection · ccf74400
      Rodrigo Vivi 提交于
      We now have a stable cnl on our CI and it seems mostly
      green without big risks of blank screen or anything
      blowing up on linux installations in the future.
      
      As a reminder i915.alpha_support was created to protect
      future linux installation's iso images that might contain a
      kernel from the enabling time of the new platform. Without this
      protection most of linux installation was recommending
      nomodeset option during installation that was getting stick
      there after installation.
      
      Specifically, alpha support says nothing about the development
      state of the hardware, and everything about the state of the
      driver in a kernel release.
      
      This is semantically no different from the old
      preliminary_hw_support flag, but the old one was all too often
      interpreted as (preliminary hw) support instead of the intended
      (preliminary) hw support, and it was misleading for everyone.
      Hence the rename.
      
      v2: Fix the typos and include more history about the parameter
      rename on commit message. (Jani)
      
      Reference: https://intel-gfx-ci.01.org/tree/drm-tip/fi-cnl-y3.html
      Cc: James Ausmus <james.ausmus@intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Jani Saarinen <jani.saarinen@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180214204205.4446-1-rodrigo.vivi@intel.com
      ccf74400
  3. 31 1月, 2018 1 次提交
  4. 29 1月, 2018 1 次提交
  5. 20 1月, 2018 1 次提交
  6. 21 12月, 2017 1 次提交
  7. 01 12月, 2017 1 次提交
  8. 19 10月, 2017 1 次提交
  9. 18 10月, 2017 1 次提交
  10. 07 10月, 2017 3 次提交
  11. 05 10月, 2017 1 次提交
    • C
      drm/i915/execlists: Preemption! · beecec90
      Chris Wilson 提交于
      When we write to ELSP, it triggers a context preemption at the earliest
      arbitration point (3DPRIMITIVE, some PIPECONTROLs, a few other
      operations and the explicit MI_ARB_CHECK). If this is to the same
      context, it triggers a LITE_RESTORE where the RING_TAIL is merely
      updated (used currently to chain requests from the same context
      together, avoiding bubbles). However, if it is to a different context, a
      full context-switch is performed and it will start to execute the new
      context saving the image of the old for later execution.
      
      Previously we avoided preemption by only submitting a new context when
      the old was idle. But now we wish embrace it, and if the new request has
      a higher priority than the currently executing request, we write to the
      ELSP regardless, thus triggering preemption, but we tell the GPU to
      switch to our special preemption context (not the target). In the
      context-switch interrupt handler, we know that the previous contexts
      have finished execution and so can unwind all the incomplete requests
      and compute the new highest priority request to execute.
      
      It would be feasible to avoid the switch-to-idle intermediate by
      programming the ELSP with the target context. The difficulty is in
      tracking which request that should be whilst maintaining the dependency
      change, the error comes in with coalesced requests. As we only track the
      most recent request and its priority, we may run into the issue of being
      tricked in preempting a high priority request that was followed by a
      low priority request from the same context (e.g. for PI); worse still
      that earlier request may be our own dependency and the order then broken
      by preemption. By injecting the switch-to-idle and then recomputing the
      priority queue, we avoid the issue with tracking in-flight coalesced
      requests. Having tried the preempt-to-busy approach, and failed to find
      a way around the coalesced priority issue, Michal's original proposal to
      inject an idle context (based on handling GuC preemption) succeeds.
      
      The current heuristic for deciding when to preempt are only if the new
      request is of higher priority, and has the privileged priority of
      greater than 0. Note that the scheduler remains unfair!
      
      v2: Disable for gen8 (bdw/bsw) as we need additional w/a for GPGPU.
      Since, the feature is now conditional and not always available when we
      have a scheduler, make it known via the HAS_SCHEDULER GETPARAM (now a
      capability mask).
      v3: Stylistic tweaks.
      v4: Appease Joonas with a snippet of kerneldoc, only to fuel to fire of
      the preempt vs preempting debate.
      Suggested-by: NMichal Winiarski <michal.winiarski@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Michal Winiarski <michal.winiarski@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Cc: Zhi Wang <zhi.a.wang@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-8-chris@chris-wilson.co.uk
      beecec90
  12. 04 10月, 2017 3 次提交
  13. 03 10月, 2017 1 次提交
  14. 22 9月, 2017 1 次提交
  15. 20 9月, 2017 1 次提交
  16. 15 9月, 2017 1 次提交
  17. 07 9月, 2017 3 次提交
  18. 01 9月, 2017 2 次提交
  19. 22 8月, 2017 1 次提交
  20. 27 7月, 2017 1 次提交
    • C
      drm/i915: Disable per-engine reset for Broxton · 2b49e721
      Chris Wilson 提交于
      Triggering a GPU reset for one engine affects another, notably
      corrupting the context status buffer (CSB) effectively losing track of
      inflight requests.
      
      Adding a few printks:
      diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
      index ad41836fa5e5..a969456bc0fa 100644
      --- a/drivers/gpu/drm/i915/i915_drv.c
      +++ b/drivers/gpu/drm/i915/i915_drv.c
      @@ -1953,6 +1953,7 @@ int i915_reset_engine(struct intel_engine_cs *engine)
                      goto out;
              }
      
      +       pr_err("Resetting %s\n", engine->name);
              ret = intel_gpu_reset(engine->i915, intel_engine_flag(engine));
              if (ret) {
                      /* If we fail here, we expect to fallback to a global reset */
      diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
      index 716e5c9ea222..a72bc35d0870 100644
      --- a/drivers/gpu/drm/i915/intel_lrc.c
      +++ b/drivers/gpu/drm/i915/intel_lrc.c
      @@ -355,6 +355,7 @@ static void execlists_submit_ports(struct intel_engine_cs *engine)
                                      execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
                              port_set(&port[n], port_pack(rq, count));
                              desc = execlists_update_context(rq);
      +                       pr_err("%s: in (rq=%x) ctx=%d\n", engine->name, rq->global_seqno, upper_32_bits(desc));
                              GEM_DEBUG_EXEC(port[n].context_id = upper_32_bits(desc));
                      } else {
                              GEM_BUG_ON(!n);
      @@ -594,9 +595,23 @@ static void intel_lrc_irq_handler(unsigned long data)
                              if (!(status & GEN8_CTX_STATUS_COMPLETED_MASK))
                                      continue;
      
      +                       pr_err("%s: out CSB (%x head=%d, tail=%d), ctx=%d, rq=%d\n",
      +                                       engine->name,
      +                                       readl(csb_mmio),
      +                                       head, tail,
      +                                       readl(buf+2*head+1),
      +                                       port->context_id);
      +
                              /* Check the context/desc id for this event matches */
      -                       GEM_DEBUG_BUG_ON(readl(buf + 2 * head + 1) !=
      -                                        port->context_id);
      +                       if (readl(buf + 2 * head + 1) != port->context_id) {
      +                               pr_err("%s: BUG CSB (%x head=%d, tail=%d), ctx=%d, rq=%d\n",
      +                                               engine->name,
      +                                               readl(csb_mmio),
      +                                               head, tail,
      +                                               readl(buf+2*head+1),
      +                                               port->context_id);
      +                               BUG();
      +                       }
      
                              rq = port_unpack(port, &count);
                              GEM_BUG_ON(count == 0);
      
      Results in:
      
      [ 6423.006602] Resetting rcs0
      [ 6423.009080] rcs0: in (rq=fffffe70) ctx=1
      [ 6423.009216] rcs0: in (rq=fffffe6f) ctx=3
      [ 6423.009542] rcs0: out CSB (2 head=1, tail=2), ctx=3, rq=3
      [ 6423.009619] Resetting bcs0
      [ 6423.009980] rcs0: BUG CSB (0 head=1, tail=2), ctx=0, rq=3
      
      Note that this bug may be affect all machines and not just Broxton,
      Broxton is just the first machine on which I have confirmed this bug.
      
      Fixes: 142bc7d9 ("drm/i915: Modify error handler for per engine hang recovery")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Acked-by: NMichel Thierry <michel.thierry@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170721123238.16428-13-chris@chris-wilson.co.ukSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2b49e721
  21. 07 7月, 2017 1 次提交
  22. 21 6月, 2017 1 次提交
    • M
      drm/i915: Modify error handler for per engine hang recovery · 142bc7d9
      Michel Thierry 提交于
      This is a preparatory patch which modifies error handler to do per engine
      hang recovery. The actual patch which implements this sequence follows
      later in the series. The aim is to prepare existing recovery function to
      adapt to this new function where applicable (which fails at this point
      because core implementation is lacking) and continue recovery using legacy
      full gpu reset.
      
      A helper function is also added to query the availability of engine
      reset. A subsequent patch will add the capability to query which type
      of reset is present (engine -> full -> no-reset) via the get-param
      ioctl.
      
      It has been decided that the error events that are used to notify user of
      reset will only be sent in case if full chip reset. In case of just
      single (or multiple) engine resets, userspace won't be notified by these
      events.
      
      Note that this implementation of engine reset is for i915 directly
      submitting to the ELSP, where the driver manages the hang detection,
      recovery and resubmission. With GuC submission these tasks are shared
      between driver and firmware; i915 will still responsible for detecting a
      hang, and when it does it will have to request GuC to reset that Engine and
      remind the firmware about the outstanding submissions. This will be
      added in different patch.
      
      v2: rebase, advertise engine reset availability in platform definition,
      add note about GuC submission.
      v3: s/*engine_reset*/*reset_engine*/. (Chris)
      Handle reset as 2 level resets, by first going to engine only and fall
      backing to full/chip reset as needed, i.e. reset_engine will need the
      struct_mutex.
      v4: Pass the engine mask to i915_reset. (Chris)
      v5: Rebase, update selftests.
      v6: Rebase, prepare for mutex-less reset engine.
      v7: Pass reset_engine mask as a function parameter, and iterate over the
      engine mask for reset_engine. (Chris)
      v8: Use i915.reset >=2 in has_reset_engine; remove redundant reset
      logging; add a reset-engine-in-progress flag to prevent concurrent
      resets, and avoid dual purposing of reset-backoff. (Chris)
      v9: Support reset of different engines in parallel (Chris)
      v10: Handle reset-engine flag locking better (Chris)
      v11: Squash in reporting of per-engine-reset availability.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: NIan Lister <ian.lister@intel.com>
      Signed-off-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NArun Siluvery <arun.siluvery@linux.intel.com>
      Signed-off-by: NMichel Thierry <michel.thierry@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170615201828.23144-4-michel.thierry@intel.comReviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170620095751.13127-5-chris@chris-wilson.co.uk
      142bc7d9
  23. 13 6月, 2017 1 次提交
  24. 10 6月, 2017 5 次提交
  25. 09 6月, 2017 2 次提交
  26. 07 6月, 2017 2 次提交