Skip to content
  1. May 02, 2018
    • Chris Wilson's avatar
      drm/i915/execlists: Don't trigger preemption if complete · c5ce3b8d
      Chris Wilson authored
      
      
      Due to the latency of the tasklet running from ksoftirqd, by the time we
      process the execlist dequeue may be a long time behind the GPU. If the
      request was completed when we ran reschedule, we will not have tweaked
      its priority, but if it is still listed as being in-flight for dequeue
      we will use it as a reference for the rest of the queue, including
      requests from its own context which will now be at higher priority. This
      can cause us to issue a preempt-to-idle request, even though the request
      we want to preempt is already complete.
      
      Reported-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180501122131.19435-1-chris@chris-wilson.co.uk
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      c5ce3b8d
  2. May 01, 2018
    • Manasi Navare's avatar
      drm/i915/icl: Fix the DP Max Voltage for ICL · 36cf89f5
      Manasi Navare authored
      
      
      On clock recovery this function is called to find out
      the max voltage swing level that we could go.
      
      However gen 9 functions use the old buffer translation tables
      to figure that out. ICL uses different set of tables for eDP
      and DP for both Combo and MG PHY ports. This patch adds the hook
      for ICL for getting this information from appropriate buf trans tables.
      
      v5 (from Paulo):
      * New rebase after changes to earlier patches.
      v4:
      * Rebase.
      v3:
      * Follow the coding conventions here
      (https://cgit.freedesktop.org/drm-intel/tree/Documentation/process/codin
      g-style.rst#n191) (Paulo)
      v2:
      * Rebase after patch that adds voltage check inside buf trans
      function (Rodrigo)
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarManasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180328215803.13835-9-paulo.r.zanoni@intel.com
      36cf89f5
    • Manasi Navare's avatar
      drm/i915/icl: Implement voltage swing programming sequence for Combo PHY DDI · fb5c8e9d
      Manasi Navare authored
      
      
      This is an important part of the DDI initalization as well as
      for changing the voltage during DisplayPort link training.
      
      The Voltage swing seqeuence is similar to Cannonlake.
      However it has different register definitions and hence
      it makes sense to create a separate vswing sequence and
      program functions for ICL to leave room for more changes
      in case the Bspec changes later and deviates from CNL sequence.
      
      v2:
      Use ~TAP3_DISABLE for enbaling that bit (Jani Nikula)
      
      v3:
      * Use dw4_scaling column for PORT_TX_DW4 values (Rodrigo)
      
      v4:
      * Call it combo_vswing, use switch statement (Paulo)
      
      v5 (from Paulo):
      * Fix a typo.
      * s/rate < 600000/rate <= 600000/.
      * Don't remove blank lines that should be there.
      
      v6:
      * Rebased by Rodrigo on top of Cannonlake changes
        where non vswing sequences are not aligned with iboost
        anymore.
      
      v7: Another rebase after an upstream rework.
      
      v8 (from Paulo):
      * Adjust the code to the upstream output type changes.
      * Squash the patch that moved some functions up.
      * Merge both get_combo_buf_trans functions in order to simplify the
        code.
      * Change the changelog format.
      
      v9 (from Paulo):
      * Use RTERM_SELECT instead of SCALING_MODE_SEL.
      * Adjust the output type handling according to how the other platforms
        do it now.
      
      v10 (from Paulo):
      * Fix comment left out from v9 changes (Rodrigo).
      
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: James Ausmus <james.ausmus@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarManasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180328215803.13835-8-paulo.r.zanoni@intel.com
      fb5c8e9d
  3. Apr 30, 2018
    • Chris Wilson's avatar
      drm/i915: Only track live rings for retiring · 643b450a
      Chris Wilson authored
      
      
      We don't need to track every ring for its lifetime as they are managed
      by the contexts/engines. What we do want to track are the live rings so
      that we can sporadically clean up requests if userspace falls behind. We
      can simply restrict the gt->rings list to being only gt->live_rings.
      
      v2: s/live/active/ for consistency with gt.active_requests
      
      Suggested-by: default avatarTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180430131503.5375-4-chris@chris-wilson.co.uk
      643b450a
    • Chris Wilson's avatar
      drm/i915: Retire requests along rings · b887d615
      Chris Wilson authored
      
      
      In the next patch, rings are the central timeline as requests may jump
      between engines. Therefore in the future as we retire in order along the
      engine timeline, we may retire out-of-order within a ring (as the ring now
      occurs along multiple engines), leading to much hilarity in miscomputing
      the position of ring->head.
      
      As an added bonus, retiring along the ring reduces the penalty of having
      one execlists client do cleanup for another (old legacy submission
      shares a ring between all clients). The downside is that slow and
      irregular (off the critical path) process of cleaning up stale requests
      after userspace becomes a modicum less efficient.
      
      In the long run, it will become apparent that the ordered
      ring->request_list matches the ring->timeline, a fun challenge for the
      future will be unifying the two lists to avoid duplication!
      
      v2: We need both engine-order and ring-order processing to maintain our
      knowledge of where individual rings have completed upto as well as
      knowing what was last executing on any engine. And finally by decoupling
      retiring the contexts on the engine and the timelines along the rings,
      we do have to keep a reference to the context on each request
      (previously it was guaranteed by the context being pinned).
      
      v3: Not just a reference to the context, but we need to keep it pinned
      as we manipulate the rings; i.e. we need a pin for both the manipulation
      of the engine state during its retirements, and a separate pin for the
      manipulation of the ring state.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180430131503.5375-3-chris@chris-wilson.co.uk
      b887d615
    • Chris Wilson's avatar
      drm/i915: Wrap engine->context_pin() and engine->context_unpin() · ab82a063
      Chris Wilson authored
      
      
      Make life easier in upcoming patches by moving the context_pin and
      context_unpin vfuncs into inline helpers.
      
      v2: Fixup mock_engine to mark the context as pinned on use.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180430131503.5375-2-chris@chris-wilson.co.uk
      ab82a063
    • Chris Wilson's avatar
      drm/i915: Stop tracking timeline->inflight_seqnos · 52d7f16e
      Chris Wilson authored
      In commit 9b6586ae ("drm/i915: Keep a global seqno per-engine"), we
      moved from a global inflight counter to per-engine counters in the
      hope that will be easy to run concurrently in future. However, with the
      advent of the desire to move requests between engines, we do need a
      global counter to preserve the semantics that no engine wraps in the
      middle of a submit. (Although this semantic is now only required for gen7
      semaphore support, which only supports greater-then comparisons!)
      
      v2: Keep a global counter of all requests ever submitted and force the
      reset when it wraps.
      
      References: 9b6586ae
      
       ("drm/i915: Keep a global seqno per-engine")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180430131503.5375-1-chris@chris-wilson.co.uk
      52d7f16e
    • Chris Wilson's avatar
      drm/i915/lrc: Scrub the GPU state of the guilty hanging request · 5692251c
      Chris Wilson authored
      
      
      Previously, we just reset the ring register in the context image such
      that we could skip over the broken batch and emit the closing
      breadcrumb. However, on resume the context image and GPU state would be
      reloaded, which may have been left in an inconsistent state by the
      reset. The presumption was that at worst it would just cause another
      reset and skip again until it recovered, however it seems just as likely
      to cause an unrecoverable hang. Instead of risking loading an incomplete
      context image, restore it back to the default state.
      
      v2: Fix up off-by-one from including the ppHSWP in with the register
      state.
      v3: Use a ring local to compact a few lines.
      v4: Beware setting the ring local before checking for a NULL request.
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=105304
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: Michel Thierry <michel.thierry@intel.com> #v2
      Link: https://patchwork.freedesktop.org/patch/msgid/20180428111532.15819-1-chris@chris-wilson.co.uk
      5692251c
  4. Apr 28, 2018
    • Paulo Zanoni's avatar
      drm/i915/icl: add definitions for the ICL PLL registers · 78b60ce7
      Paulo Zanoni authored
      
      
      There's a lot of code for the PLL enabling, so let's first only
      introduce the register definitions in order to make patch reviewing a
      little easier.
      
      v2: Coding style (Jani).
      v3: Preparation for upstreaming.
      v4: Fix MG_CLKTOP2_CORECLKCTL1 address and random typos (James).
      
      Cc: James Ausmus <james.ausmus@intel.com>
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarJames Ausmus <james.ausmus@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180328215803.13835-3-paulo.r.zanoni@intel.com
      78b60ce7
    • Mahesh Kumar's avatar
      drm/i915/icl: update ddb entry start/end mask during hw ddb readout · 37cde11b
      Mahesh Kumar authored
      
      
      Gen11/ICL onward ddb entry start/end mask is increased from 10 bits to
      11 bits. This patch make changes to use proper mask for ICL+ during
      hardware ddb value readout.
      
      Changes since V1:
       - Use _MASK & _SHIFT macro (James)
      Changes since V2:
       - use kernel type u8 instead of uint8_t
      Changes since V3:
       - Rebase
      
      Signed-off-by: default avatarMahesh Kumar <mahesh1.kumar@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180426142517.16643-4-mahesh1.kumar@intel.com
      37cde11b
    • Mahesh Kumar's avatar
      drm/i915/icl: Enable 2nd DBuf slice only when needed · aa9664ff
      Mahesh Kumar authored
      
      
      ICL has two slices of DBuf, each slice of size 1024 blocks.
      We should not always enable slice-2. It should be enabled only if
      display total required BW is > 12GBps OR more than 1 pipes are enabled.
      
      Changes since V1:
       - typecast total_data_rate to u64 before multiplication to solve any
         possible overflow (Rodrigo)
       - fix where skl_wm_get_hw_state was memsetting ddb, resulting
         enabled_slices to become zero
       - Fix the logic of calculating ddb_size
      Changes since V2:
       - If no-crtc is part of commit required_slices will have value "0",
         don't try to disable DBuf slice.
      Changes since V3:
       - Create a generic helper to enable/disable slice
       - don't return early if total_data_rate is 0, it may be cursor only
         commit, or atomic modeset without any plane.
      Changes since V4:
       - Solve checkpatch warnings
       - use kernel types u8/u64 instead of uint8_t/uint64_t
      Changes since V5:
       - Rebase
      
      Signed-off-by: default avatarMahesh Kumar <mahesh1.kumar@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180426142517.16643-3-mahesh1.kumar@intel.com
      aa9664ff
    • Mahesh Kumar's avatar
      drm/i915/icl: track dbuf slice-2 status · 74bd8004
      Mahesh Kumar authored
      
      
      This patch adds support to start tracking status of DBUF slices.
      This is foundation to introduce support for enabling/disabling second
      DBUF slice dynamically for ICL.
      
      Changes Since V1:
       - use kernel type u8 over uint8_t
      
      Signed-off-by: default avatarMahesh Kumar <mahesh1.kumar@intel.com>
      Reviewed-by: default avatarJames Ausmus <james.ausmus@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180426142517.16643-2-mahesh1.kumar@intel.com
      74bd8004
    • James Ausmus's avatar
      drm/i915/icl: Don't set pipe CSC/Gamma in PLANE_COLOR_CTL · 077ef1f0
      James Ausmus authored
      
      
      These fields have been deprecated and moved in ICL+. Stop setting the
      bits.
      
      They have moved to GAMMA_MODE and CSC_MODE, respectively. This patch
      is just to stop incorrectly setting bits in PLANE_COLOR_CTL while
      we're waiting for the new replacement functionality to be done.
      
      v2: Drop useless comment, and change !(GEN >= 11) to (GEN < 11). (Ville)
      
      v3: No changes
      
      v4 (from Paulo): Rebase.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarJames Ausmus <james.ausmus@intel.com>
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180328215803.13835-2-paulo.r.zanoni@intel.com
      077ef1f0
  5. Apr 27, 2018
  6. Apr 26, 2018
  7. Apr 25, 2018
  8. Apr 24, 2018