1. 24 11月, 2021 1 次提交
  2. 23 11月, 2021 4 次提交
  3. 18 11月, 2021 1 次提交
    • I
      drm/i915: Fix fastsets on TypeC ports following a non-blocking modeset · a59308a5
      Imre Deak 提交于
      After a non-blocking modeset on a TypeC port's CRTC - possibly blocked
      later in drm_atomic_helper_wait_for_dependencies() - a fastset on the
      same CRTC may copy the state of CRTC before this gets updated to reflect
      the up-to-date DP-alt vs. TBT-alt TypeC mode DPLL used for the CRTC. In
      this case after the first (non-blocking) commit completes enabling the
      DPLL required for the up-to-date TypeC mode the following fastset will
      update the CRTC state pointing to the wrong DPLL. A subsequent disabling
      modeset will try to disable the wrong PLL, triggering a state checker
      WARN (and leaving the DPLL which is actually used active for good).
      
      Fix the above race by copying the DPLL state for fastset CRTCs from the
      old CRTC state at the point where it's guaranteed to be up-to-date
      already. This could be handled in the encoder's update_prepare() hook as
      well, but that's a bigger change, which is better done as a follow-up.
      
      v2: Copy dpll_hw_state as well. (Ville)
      
      Testcase: igt/kms_busy/extended-modeset-hang-newfb-with-reset
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4308
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NMika Kahola <mika.kahola@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211115181121.156197-1-imre.deak@intel.com
      a59308a5
  4. 11 11月, 2021 2 次提交
  5. 10 11月, 2021 1 次提交
    • V
      drm/i915: Use vblank workers for gamma updates · 2bbc6fca
      Ville Syrjälä 提交于
      The pipe gamma registers are single buffered so they should only
      be updated during the vblank to avoid screen tearing. In fact they
      really should only be updated between start of vblank and frame
      start because that is the only time the pipe is guaranteed to be
      empty. Already at frame start the pipe begins to fill up with
      data for the next frame.
      
      Unfortunately frame start happens ~1 scanline after the start
      of vblank which in practice doesn't always leave us enough time to
      finish the gamma update in time (gamma LUTs can be several KiB of
      data we have to bash into the registers). However we must try our
      best and so we'll add a vblank work for each pipe from where we
      can do the gamma update. Additionally we could consider pushing
      frame start forward to the max of ~4 scanlines after start of
      vblank. But not sure that's exactly a validated configuration.
      As it stands the ~100 first pixels tend to make it through with
      the old gamma values.
      
      Even though the vblank worker is running on a high prority thread
      we still have to contend with C-states. If the CPU happens be in
      a deep C-state when the vblank interrupt arrives even the irq
      handler gets delayed massively (I've observed dozens of scanlines
      worth of latency). To avoid that problem we'll use the qos mechanism
      to keep the CPU awake while the vblank work is scheduled.
      
      With all this hooked up we can finally enjoy near atomic gamma
      updates. It even works across several pipes from the same atomic
      commit which previously was a total fail because we did the
      gamma updates for each pipe serially after waiting for all
      pipes to have latched the double buffered registers.
      
      In the future the DSB should take over this responsibility
      which will hopefully avoid some of these issues.
      
      Kudos to Lyude for finishing the actual vblank workers.
      Works like the proverbial train toilet.
      
      v2: Add missing intel_atomic_state fwd declaration
      v3: Clean up properly when not scheduling the worker
      v4: Clean up the rest and add tracepoints
      v5: s/intel_wait_for_vblank_works/intel_wait_for_vblank_workers/ (Jani,Uma)
      
      CC: Lyude Paul <lyude@redhat.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211020223339.669-4-ville.syrjala@linux.intel.comReviewed-by: NUma Shankar <uma.shankar@intel.com>
      2bbc6fca
  6. 09 11月, 2021 1 次提交
  7. 06 11月, 2021 1 次提交
  8. 05 11月, 2021 1 次提交
  9. 04 11月, 2021 2 次提交
    • V
      drm/i915: Split update_plane() into update_noarm() + update_arm() · 8ac80733
      Ville Syrjälä 提交于
      The amount of plane registers we have to write has been steadily
      increasing, putting more pressure on the vblank evasion mechanism
      and forcing us to increase its time budget. Let's try to take some
      of the pressure off by splitting plane updates into two parts:
      1) write all non-self arming plane registers, ie. the registers
         where the write actually does nothing until a separate arming
         register is also written which will cause the hardware to latch
         the new register values at the next start of vblank
      2) write all self arming plane registers, ie. registers which always
         just latch at the next start of vblank, and registers which also
         arm other registers to do so
      
      Here we just provide the mechanism, but don't actually implement
      the split on any platform yet. so everything stays now in the _arm()
      hooks. Subsequently we can move a whole bunch of stuff into the
      _noarm() part, especially in more modern platforms where the number
      of registers we have to write is also the greatest. On older
      platforms this is less beneficial probably, but no real reason
      to deviate from a common behaviour.
      
      And let's sprinkle some TODOs around the areas that will need
      adapting.
      
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211018115030.3547-5-ville.syrjala@linux.intel.comReviewed-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      8ac80733
    • V
      drm/i915: Reject planar formats when doing async flips · aaec72ee
      Ville Syrjälä 提交于
      Async flips are only capable of changing PLANE_SURF, hence we
      they can't easily be used with planar formats.
      
      Older platforms could require updating AUX_DIST as well, which
      is not possible. We'd have to make sure AUX_DIST doesn't change
      before allowing the async flip through. If we could get async
      flips with CCS then that might be interesting, but since the hw
      doesn't allow async flips with CCS I don't see much point in
      allowing this for planar formats either. No one renders their
      game content in YUV anyway.
      
      icl+ could in theory do this I suppose since each color plane
      has its own PLANE_SURF register, but I don't know if there is
      some magic to guarantee that both the Y and UV plane would
      async flip synchronously if you will. Ie. beyond just a clean
      tear we'd potentially get some kind of weird tear with some
      random mix of luma and chroma from the old and new frames.
      
      So let's just say no to async flips when scanning out planar
      formats.
      
      Cc: Karthik B S <karthik.b.s@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211018115030.3547-2-ville.syrjala@linux.intel.comReviewed-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      aaec72ee
  10. 03 11月, 2021 3 次提交
  11. 02 11月, 2021 1 次提交
  12. 27 10月, 2021 9 次提交
  13. 22 10月, 2021 3 次提交
  14. 19 10月, 2021 6 次提交
  15. 18 10月, 2021 1 次提交
    • V
      drm/i915: Move the pxp plane state computation · f9a7b19c
      Ville Syrjälä 提交于
      No real reason to have this pxp state computation in
      intel_atomic_check_planes(). Just stuff it into skl_plane_check().
      
      There was also some funny state copying being done from the
      old plane state to the new plane state when the plane is anyway
      disabled.
      
      The one thing we presumably must remember to do is copy
      over the decrypt state when assigning a Y plane for planar
      YCbCr scanout, so that the Y plane's PLANE_SURF will get the
      appropriate bit set. The force_black thing should not matter
      as I'm pretty sure all that stuff is ignored for the Y plane.
      I suppose this was the reason for the odd placement for the
      state computation, but I see no reason to deviate from the
      standard way of doing these things. This also guarantees
      that we don't calculate things differently between the
      linked UV and Y plane.
      
      v2: Only do stuff for icl+ since 'force_black' depends
          on the plane CSC which is an icl+ feature
      
      Cc: Anshuman Gupta <anshuman.gupta@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Juston Li <juston.li@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Uma Shankar <uma.shankar@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211006235704.28894-2-ville.syrjala@linux.intel.com
      Reviewed-by: Juston Li <juston.li@intel.com> #v1
      f9a7b19c
  16. 14 10月, 2021 3 次提交