1. 08 6月, 2018 2 次提交
  2. 17 5月, 2018 1 次提交
  3. 11 5月, 2018 1 次提交
    • O
      drm/i915/icl: Introduce initial Icelake Workarounds · cc38cae7
      Oscar Mateo 提交于
      Inherit workarounds from previous platforms that are still valid for
      Icelake.
      
      v2: GEN7_ROW_CHICKEN2 is masked
      v3:
        - Since it has been fixed already in upstream, removed the TODO
          comment about WA_SET_BIT for WaInPlaceDecompressionHang.
        - Squashed with this patch:
            drm/i915/icl: add icelake_init_clock_gating()
          from Paulo Zanoni <paulo.r.zanoni@intel.com>
        - Squashed with this patch:
            drm/i915/icl: WaForceEnableNonCoherent
          from Oscar Mateo <oscar.mateo@intel.com>
        - WaPushConstantDereferenceHoldDisable is now Wa_1604370585 and
          applies to B0 as well.
        - WaPipeControlBefore3DStateSamplePattern WABB was being applied
          to ICL incorrectly.
      v4:
        - Wrap the commit message
        - s/dev_priv/p to please checkpatch
      v5: Rebased on top of the WA refactoring
      v6: Rebased on top of further whitelist registers refactoring (Michel)
      v7: Added WaRsForcewakeAddDelayForAck
      v8: s/ICL_HDC_CHICKEN0/ICL_HDC_MODE (Mika)
      v9:
        - C, not lisp (Chris)
        - WaIncreaseDefaultTLBEntries is the same for GEN > 9_LP (Tvrtko)
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Tomasz Lis <tomasz.lis@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1525814984-20039-2-git-send-email-oscar.mateo@intel.com
      cc38cae7
  4. 06 4月, 2018 1 次提交
  5. 30 3月, 2018 2 次提交
  6. 23 3月, 2018 1 次提交
    • C
      drm/i915: Flush pending interrupt following a GPU reset · 0f36a85c
      Chris Wilson 提交于
      After resetting the GPU (or subset of engines), call synchronize_irq()
      to flush any pending irq before proceeding with the cleanup. For a
      device level reset, we disable the interupts around the reset, but when
      resetting just one engine, we have to avoid such global disabling. This
      leaves us open to an interrupt arriving for the engine as we try to
      reset it. We already do try to flush the IIR following the reset, but we
      have to ensure that the in-flight interrupt does not land after we start
      cleaning up after the reset; enter synchronize_irq().
      
      As it current stands, we very rarely, but fatally, see sequences such as:
      
          2.... 57964564us : execlists_reset_prepare: rcs0
          2.... 57964613us : execlists_reset: rcs0 seqno=424
          0d.h1 57964615us : gen8_cs_irq_handler: rcs0 CS active=1
          2d..1 57964617us : __i915_request_unsubmit: rcs0 fence 29:1056 <- global_seqno 1060
          2.... 57964703us : execlists_reset_finish: rcs0
          0..s. 57964705us : execlists_submission_tasklet: rcs0 awake?=1, active=0, irq-posted?=1
      
      v2: Move the sync into the execlists reset handler so that we coordinate
      the flush with disabling the interrupt handling and canceling the
      pending interrupt.
      v3: Just use synchronize_hardirq() to avoid the might_sleep(), we do not
      yet have threaded-irq to worry about.
      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>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Cc: Jeff McGee <jeff.mcgee@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180322073533.5313-4-chris@chris-wilson.co.ukReviewed-by: NJeff McGee <jeff.mcgee@intel.com>
      0f36a85c
  7. 20 3月, 2018 1 次提交
    • O
      drm/i915/icl: Check for fused-off VDBOX and VEBOX instances · 26376a7e
      Oscar Mateo 提交于
      In Gen11, the Video Decode engines (aka VDBOX, aka VCS, aka BSD) and the
      Video Enhancement engines (aka VEBOX, aka VECS) could be fused off. Also,
      each VDBOX and VEBOX has its own power well, which only exist if the
      related engine exists in the HW.
      
      Unfortunately, we have a Catch-22 situation going on: we need the blitter
      forcewake to read the register with the fuse info, but we cannot initialize
      the forcewake domains without knowin about the engines present in the HW.
      We workaround this problem by allowing the initialization of all forcewake
      domains and then pruning the fused off ones, as per the fuse information.
      
      Bspec: 20680
      
      v2: We were shifting incorrectly for vebox disable (Vinay)
      
      v3: Assert mmio is ready and warn if we have attempted to initialize
          forcewake for fused-off engines (Paulo)
      
      v4:
        - Use INTEL_GEN in new code (Tvrtko)
        - Shorter local variable (Tvrtko, Michal)
        - Keep "if (!...) continue" style (Tvrtko)
        - No unnecessary BUG_ON (Tvrtko)
        - WARN_ON and cleanup if wrong mask (Tvrtko, Michal)
        - Use I915_READ_FW (Michal)
        - Use I915_MAX_VCS/VECS macros (Michal)
      
      v5: Rebased by Rodrigo fixing conflicts on top of:
          "drm/i915: Simplify intel_engines_init"
      
      v6: Fix v5. Remove info->num_rings. (by Oscar)
      
      v7: Rebase (Rodrigo).
      
      v8:
        - s/intel_device_info_fused_off_engines/
          intel_device_info_init_mmio (Chris)
        - Make vdbox_disable & vebox_disable local variables (Chris)
      
      v9:
        - Move function declaration to intel_device_info.h (Michal)
        - Missing indent in bit fields definitions (Michal)
        - When RC6 is enabled by BIOS, the fuse register cannot be read until
          the blitter powerwell is awake. Shuffle where the fuse is read, prune
          the forcewake domains after the fact and change the commit message
          accordingly (Vinay, Sagar, Chris).
      
      v10:
        - Improved commit message (Sagar)
        - New line in header file (Sagar)
        - Specify the message in fw_domain_reset applies to ICL+ (Sagar)
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180316121456.11577-1-mika.kuoppala@linux.intel.com
      [Mika: soothe checkpatch on commit msg]
      Signed-off-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      26376a7e
  8. 07 3月, 2018 1 次提交
  9. 10 2月, 2018 1 次提交
  10. 08 2月, 2018 2 次提交
  11. 01 2月, 2018 1 次提交
  12. 09 1月, 2018 1 次提交
  13. 03 1月, 2018 1 次提交
  14. 01 12月, 2017 1 次提交
  15. 21 11月, 2017 2 次提交
  16. 15 11月, 2017 2 次提交
  17. 14 11月, 2017 1 次提交
  18. 10 11月, 2017 1 次提交
    • H
      drm/i915: Acquire PUNIT->PMIC bus for intel_uncore_forcewake_reset() · a5266db4
      Hans de Goede 提交于
      intel_uncore_forcewake_reset() does forcewake puts and gets as such
      we need to make sure that no-one tries to access the PUNIT->PMIC bus
      (on systems where this bus is shared) while it runs, otherwise bad
      things happen.
      
      Normally this is taken care of by the i915_pmic_bus_access_notifier()
      which does an intel_uncore_forcewake_get(FORCEWAKE_ALL) when some other
      driver tries to access the PMIC bus, so that later forcewake gets are
      no-ops (for the duration of the bus access).
      
      But intel_uncore_forcewake_reset gets called in 3 cases:
      1) Before registering the pmic_bus_access_notifier
      2) After unregistering the pmic_bus_access_notifier
      3) To reset forcewake state on a GPU reset
      
      In all 3 cases the i915_pmic_bus_access_notifier() protection is
      insufficient.
      
      This commit fixes this race by calling iosf_mbi_punit_acquire() before
      calling intel_uncore_forcewake_reset(). In the case where it is called
      directly after unregistering the pmic_bus_access_notifier, we need to
      hold the punit-lock over both calls to avoid a race where
      intel_uncore_fw_release_timer() may execute between the 2 calls.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171019111620.26761-3-hdegoede@redhat.com
      a5266db4
  19. 02 11月, 2017 3 次提交
  20. 27 10月, 2017 1 次提交
  21. 14 10月, 2017 1 次提交
  22. 10 10月, 2017 1 次提交
  23. 22 9月, 2017 1 次提交
  24. 20 9月, 2017 1 次提交
  25. 14 9月, 2017 1 次提交
  26. 08 9月, 2017 1 次提交
  27. 07 9月, 2017 1 次提交
  28. 18 8月, 2017 1 次提交
    • C
      drm/i915: Stop touching forcewake following a gen6+ engine reset · 4055dc75
      Chris Wilson 提交于
      Forcewake is not affected by the engine reset on gen6+. Indeed the
      reason why we added intel_uncore_forcewake_reset() to
      gen6_reset_engines() was to keep the bookkeeping intact because the
      reset did not touch the forcewake bit (yet we cancelled the forcewake
      consumers)!  This was done in commit 521198a2:
          Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
          Date:   Fri Aug 23 16:52:30 2013 +0300
      
      	drm/i915: sanitize forcewake registers on reset
      
      	In reset we try to restore the forcewake state to
      	pre reset state, using forcewake_count. The reset
      	doesn't seem to clear the forcewake bits so we
      	get warn on forcewake ack register not clearing.
      
      That futzing of the forcewake bookkeeping was dropped in commit
      0294ae7b ("drm/i915: Consolidate forcewake resetting to a single
      function"), but it did not make the realisation that the remaining
      intel_uncore_forcewake_reset() was redundant.
      
      The new danger with using intel_uncore_forcewake_reset() with per-engine
      resets is that the driver and hw are still in an active state as we
      perform the reset. We may be using the forcewake to read protected
      registers elsewhere and those results may be clobbered by the concurrent
      dropping of forcewake.
      Reported-by: NMichel Thierry <michel.thierry@intel.com>
      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>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170817173229.20324-1-chris@chris-wilson.co.ukReviewed-by: NMichel Thierry <michel.thierry@intel.com>
      Acked-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      4055dc75
  29. 07 7月, 2017 1 次提交
  30. 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
  31. 30 5月, 2017 1 次提交
  32. 26 5月, 2017 1 次提交
    • C
      drm/i915: Keep the forcewake timer alive for 1ms past the most recent use · c9e0c6da
      Chris Wilson 提交于
      Currently the timer is armed for 1ms after the first use and is killed
      immediately, dropping the forcewake as early as possible. However, for
      very frequent operations the forcewake dance has a large impact on
      latency and keeping the timer alive until we are idle is preferred. To
      achieve this, if we call intel_uncore_forcewake_get whilst the timer is
      alive (repeated use), then set a flag to restart the timer on expiry
      rather than drop the forcewake usage count. The timer is racy, the
      consequence of the race is to expire the timer earlier than is now
      desired but does not impact on correct behaviour. The offset the race
      slightly, we set the active flag again on intel_uncore_forcewake_put.
      
      The effect should be to reduce the jitter of reacquiring the fw every
      1ms on a busy system. However, the cost is to keep the timer alive for
      an extra 1ms on a nearly idle system. We chose to incur the jitter
      previously to keep the timer off for as much as possible.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170526132209.14640-1-chris@chris-wilson.co.uk
      c9e0c6da
  33. 22 5月, 2017 1 次提交