1. 28 Sep, 2020 3 commits
    • Karthik B S's avatar
      drm/i915: Add checks specific to async flips · 30ff93af
      Karthik B S authored
      If flip is requested on any other plane, reject it.
      
      Make sure there is no change in fbc, offset and framebuffer modifiers
      when async flip is requested.
      
      If any of these are modified, reject async flip.
      
      v2: -Replace DRM_ERROR (Paulo)
          -Add check for changes in OFFSET, FBC, RC(Paulo)
      
      v3: -Removed TODO as benchmarking tests have been run now.
      
      v4: -Added more state checks for async flip (Ville)
          -Moved intel_atomic_check_async to the end of intel_atomic_check
           as the plane checks needs to pass before this. (Ville)
          -Removed crtc_state->enable_fbc check. (Ville)
          -Set the I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP flag for async
           flip case as scanline counter is not reliable here.
      
      v5: -Fix typo and other check patch errors seen in CI
           in 'intel_atomic_check_async' function.
      
      v6: -Don't call intel_atomic_check_async multiple times. (Ville)
          -Remove the check for n_planes in intel_atomic_check_async
          -Added documentation for async flips. (Paulo)
      
      v7: -Replace 'intel_plane' with 'plane'. (Ville)
          -Replace all uapi.foo as hw.foo. (Ville)
          -Do not use intel_wm_need_update function. (Ville)
          -Add destination coordinate check. (Ville)
          -Do not allow async flip with linear buffer
           on older hw as it has issues with this. (Ville)
          -Remove break after intel_atomic_check_async. (Ville)
      
      v8: -Rebased.
      
      v9: -Replace DRM_DEBUG_KMS with drm_dbg_kms(). (Ville)
          -Fix comment formatting. (Ville)
          -Remove gen specific checks. (Ville)
          -Remove irrelevant FB size check. (Ville)
          -Add missing stride check. (Ville)
          -Use drm_rect_equals() instead of individual checks. (Ville)
          -Call intel_atomic_check_async before state dump. (Ville)
      
      v10: -Fix the checkpatch errors seen on CI.
      
      v11: -Use const for all plane/crtc states. (Ville)
           -Use 'switch' instead of 'if' for modifier check. (Ville)
           -Move documentation changes to a single patch. (Ville)
      Signed-off-by: default avatarKarthik B S <karthik.b.s@intel.com>
      Signed-off-by: default avatarVandita Kulkarni <vandita.kulkarni@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-4-karthik.b.s@intel.com
      30ff93af
    • Karthik B S's avatar
      drm/i915: Add support for async flips in I915 · c5e07e00
      Karthik B S authored
      Set the Async Address Update Enable bit in plane ctl
      when async flip is requested.
      
      v2: -Move the Async flip enablement to individual patch (Paulo)
      
      v3: -Rebased.
      
      v4: -Add separate plane hook for async flip case (Ville)
      
      v5: -Rebased.
      
      v6: -Move the plane hook to separate patch. (Paulo)
          -Remove the early return in skl_plane_ctl. (Paulo)
      
      v7: -Move async address update enable to skl_plane_ctl_crtc() (Ville)
      
      v8: -Rebased.
      
      v9: -Rebased.
      
      v10: -Rebased.
      Signed-off-by: default avatarKarthik B S <karthik.b.s@intel.com>
      Signed-off-by: default avatarVandita Kulkarni <vandita.kulkarni@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-3-karthik.b.s@intel.com
      c5e07e00
    • Karthik B S's avatar
      drm/i915: Add enable/disable flip done and flip done handler · 1288f9b0
      Karthik B S authored
      Add enable/disable flip done functions and the flip done handler
      function which handles the flip done interrupt.
      
      Enable the flip done interrupt in IER.
      
      Enable flip done function is called before writing the
      surface address register as the write to this register triggers
      the flip done interrupt
      
      Flip done handler is used to send the page flip event as soon as the
      surface address is written as per the requirement of async flips.
      The interrupt is disabled after the event is sent.
      
      v2: -Change function name from icl_* to skl_* (Paulo)
          -Move flip handler to this patch (Paulo)
          -Remove vblank_put() (Paulo)
          -Enable flip done interrupt for gen9+ only (Paulo)
          -Enable flip done interrupt in power_well_post_enable hook (Paulo)
          -Removed the event check in flip done handler to handle async
           flips without pageflip events.
      
      v3: -Move skl_disable_flip_done out of interrupt handler (Paulo)
          -Make the pending vblank event NULL in the beginning of
           flip_done_handler to remove sporadic WARN_ON that is seen.
      
      v4: -Calculate timestamps using flip done time stamp and current
           timestamp for async flips (Ville)
      
      v5: -Fix the sparse warning by making the function 'g4x_get_flip_counter'
           static.(Reported-by: kernel test robot <lkp@intel.com>)
          -Fix the typo in commit message.
      
      v6: -Revert back to old time stamping code.
          -Remove the break while calling skl_enable_flip_done. (Paulo)
      
      v7: -Rebased.
      
      v8: -Rebased.
      
      v9: -Use struct drm_i915_private *i915 in new code. (Ville)
          -Use intel_crtc instead of drm_crtc. (Ville)
          -Do not mix the flip done and vblank hooks. (Ville)
      
      v10: -Rebased.
      Signed-off-by: default avatarKarthik B S <karthik.b.s@intel.com>
      Signed-off-by: default avatarVandita Kulkarni <vandita.kulkarni@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-2-karthik.b.s@intel.com
      1288f9b0
  2. 24 Sep, 2020 5 commits
  3. 22 Sep, 2020 2 commits
  4. 17 Sep, 2020 22 commits
  5. 16 Sep, 2020 2 commits
  6. 15 Sep, 2020 6 commits