1. 14 10月, 2016 11 次提交
  2. 12 10月, 2016 1 次提交
  3. 10 10月, 2016 5 次提交
  4. 04 10月, 2016 2 次提交
  5. 28 9月, 2016 1 次提交
  6. 27 9月, 2016 2 次提交
  7. 23 9月, 2016 1 次提交
    • P
      drm/i915: don't forget to set intel_crtc->dspaddr_offset on SKL+ · 4c0b8a8b
      Paulo Zanoni 提交于
      We never remembered to set it (so it was zero), but this was not a
      problem in the past due to the way handled the hardware registers.
      Unfortunately we changed how we set the hardware and forgot to set
      intel_crtc->dspaddr_offset.
      
      This started to reflect on a few kms_frontbuffer_tracking subtests
      that relied on page flips with CRTCs that don't point to the x:0,y:0
      coordinates of the frontbuffer. After the page flip the CRTC was
      showing the x:0,y:0 coordinate of the frontbuffer instead of
      x:500,y:500. This problem is present even if we don't enable FBC or
      PSR.
      
      While trying to bisect it I realized that the first bad commit
      actually just gives me a black screen for the mentioned tests instead
      of showing the wrong x:0,y:0 offsets. A few commits later the black
      screen problem goes away and we get to the point where the code is
      today, but I'll consider the black screen as the first bad commit
      since it's the point where the IGT subtests start to fail.
      
      Fixes: 6687c906 ("drm/i915: Rewrite fb rotation GTT handling")
      Testcase: kms_frontbuffer_tracking/fbc-1p-primscrn-shrfb-pgflip-blt
      Testcase: kms_frontbuffer_tracking/fbc-1p-primscrn-shrfb-evflip-blt
      Testcase: kms_frontbuffer_tracking/fbc-1p-shrfb-fliptrack
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
      Cc: drm-intel-fixes@lists.freedesktop.org
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1471644203-23463-1-git-send-email-paulo.r.zanoni@intel.com
      4c0b8a8b
  8. 21 9月, 2016 1 次提交
  9. 20 9月, 2016 1 次提交
  10. 09 9月, 2016 3 次提交
  11. 08 9月, 2016 1 次提交
  12. 07 9月, 2016 1 次提交
    • L
      drm/i915/skl: Don't try to update plane watermarks if they haven't changed · ccebc23b
      Lyude 提交于
      i915 sometimes needs to disable planes in the middle of an atomic
      commit, and then reenable them later in the same commit. Because of
      this, we can't make the assumption that the state of the plane actually
      changed. Since the state of the plane hasn't actually changed, neither
      have it's watermarks. And if the watermarks hasn't changed then we
      haven't populated skl_results with anything, which means we'll end up
      zeroing out a plane's watermarks in the middle of the atomic commit
      without restoring them later.
      
      Simple reproduction recipe:
       - Get a SKL laptop, launch any kind of X session
       - Get two extra monitors
       - Keep hotplugging both displays (so that the display configuration
         jumps from 1 active pipe to 3 active pipes and back)
       - Eventually underrun
      
      Changes since v1:
       - Fix incorrect use of "it's"
      Changes since v2:
       - Add reproduction recipe
      Signed-off-by: NLyude <cpaul@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Fixes: 62e0fb88 ("drm/i915/skl: Update plane watermarks atomically during plane updates")
      Signed-off-by: NLyude <cpaul@redhat.com>
      Testcase: kms_plane
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1472488288-27280-1-git-send-email-cpaul@redhat.com
      Cc: drm-intel-fixes@lists.freedesktop.org
      ccebc23b
  13. 29 8月, 2016 1 次提交
  14. 25 8月, 2016 3 次提交
    • L
      drm/i915/skl: Update DDB values atomically with wms/plane attrs · 27082493
      Lyude 提交于
      Now that we can hook into update_crtcs and control the order in which we
      update CRTCs at each modeset, we can finish the final step of fixing
      Skylake's watermark handling by performing DDB updates at the same time
      as plane updates and watermark updates.
      
      The first major change in this patch is skl_update_crtcs(), which
      handles ensuring that we order each CRTC update in our atomic commits
      properly so that they honor the DDB flush order.
      
      The second major change in this patch is the order in which we flush the
      pipes. While the previous order may have worked, it can't be used in
      this approach since it no longer will do the right thing. For example,
      using the old ddb flush order:
      
      We have pipes A, B, and C enabled, and we're disabling C. Initial ddb
      allocation looks like this:
      
      |   A   |   B   |xxxxxxx|
      
      Since we're performing the ddb updates after performing any CRTC
      disablements in intel_atomic_commit_tail(), the space to the right of
      pipe B is unallocated.
      
      1. Flush pipes with new allocation contained into old space. None
         apply, so we skip this
      2. Flush pipes having their allocation reduced, but overlapping with a
         previous allocation. None apply, so we also skip this
      3. Flush pipes that got more space allocated. This applies to A and B,
         giving us the following update order: A, B
      
      This is wrong, since updating pipe A first will cause it to overlap with
      B and potentially burst into flames. Our new order (see the code
      comments for details) would update the pipes in the proper order: B, A.
      
      As well, we calculate the order for each DDB update during the check
      phase, and reference it later in the commit phase when we hit
      skl_update_crtcs().
      
      This long overdue patch fixes the rest of the underruns on Skylake.
      
      Changes since v1:
       - Add skl_ddb_entry_write() for cursor into skl_write_cursor_wm()
      Changes since v2:
       - Use the method for updating CRTCs that Ville suggested
       - In skl_update_wm(), only copy the watermarks for the crtc that was
         passed to us
      Changes since v3:
       - Small comment fix in skl_ddb_allocation_overlaps()
      Changes since v4:
       - Remove the second loop in intel_update_crtcs() and use Ville's
         suggestion for updating the ddb allocations in the right order
       - Get rid of the second loop and just use the ddb state as it updates
         to determine what order to update everything in (thanks for the
         suggestion Ville)
       - Simplify skl_ddb_allocation_overlaps()
       - Split actual overlap checking into it's own helper
      
      Fixes: 0e8fb7ba ("drm/i915/skl: Flush the WM configuration")
      Fixes: 8211bd5b ("drm/i915/skl: Program the DDB allocation")
      [omitting CC for stable, since this patch will need to be changed for
      such backports first]
      
      Testcase: kms_cursor_legacy
      Testcase: plane-all-modeset-transition
      Signed-off-by: NLyude <cpaul@redhat.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1471961565-28540-2-git-send-email-cpaul@redhat.com
      27082493
    • L
      drm/i915: Move CRTC updating in atomic_commit into it's own hook · 896e5bb0
      Lyude 提交于
      Since we have to write ddb allocations at the same time as we do other
      plane updates, we're going to need to be able to control the order in
      which we execute modesets on each pipe. The easiest way to do this is to
      just factor this section of intel_atomic_commit_tail()
      (intel_atomic_commit() for stable branches) into it's own function, and
      add an appropriate display function hook for it.
      
      Based off of Matt Rope's suggestions
      
      Changes since v1:
       - Drop pipe_config->base.active check in intel_update_crtcs() since we
         check that before calling the function
      Signed-off-by: NLyude <cpaul@redhat.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      [omitting CC for stable, since this patch will need to be changed for
      such backports first]
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Signed-off-by: NLyude <cpaul@redhat.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1471961565-28540-1-git-send-email-cpaul@redhat.com
      896e5bb0
    • C
      drm/i915: Suppress DRM_ERROR for D_COMP write on Haswell · 79cf219a
      Chris Wilson 提交于
      The D_COMP (render decompression) register write is followed by a status
      check and another error (either that the decompression shutdown or the
      lpll is enabled). Since we are followed by another, more pertinent,
      error we can reduce the pcode timeout to a debug and squelch a sporadic
      error message during suspend.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97465Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160824101607.13671-1-chris@chris-wilson.co.ukReviewed-by: NMatthew Auld <matthew.auld@intel.com>
      79cf219a
  15. 24 8月, 2016 3 次提交
  16. 23 8月, 2016 3 次提交
    • L
      drm/i915/skl: Update plane watermarks atomically during plane updates · 62e0fb88
      Lyude 提交于
      Thanks to Ville for suggesting this as a potential solution to pipe
      underruns on Skylake.
      
      On Skylake all of the registers for configuring planes, including the
      registers for configuring their watermarks, are double buffered. New
      values written to them won't take effect until said registers are
      "armed", which is done by writing to the PLANE_SURF (or in the case of
      cursor planes, the CURBASE register) register.
      
      With this in mind, up until now we've been updating watermarks on skl
      like this:
      
        non-modeset {
         - calculate (during atomic check phase)
         - finish_atomic_commit:
           - intel_pre_plane_update:
              - intel_update_watermarks()
           - {vblank happens; new watermarks + old plane values => underrun }
           - drm_atomic_helper_commit_planes_on_crtc:
              - start vblank evasion
              - write new plane registers
              - end vblank evasion
        }
      
        or
      
        modeset {
         - calculate (during atomic check phase)
         - finish_atomic_commit:
           - crtc_enable:
              - intel_update_watermarks()
           - {vblank happens; new watermarks + old plane values => underrun }
           - drm_atomic_helper_commit_planes_on_crtc:
              - start vblank evasion
              - write new plane registers
              - end vblank evasion
        }
      
      Now we update watermarks atomically like this:
      
        non-modeset {
         - calculate (during atomic check phase)
         - finish_atomic_commit:
           - intel_pre_plane_update:
              - intel_update_watermarks() (wm values aren't written yet)
           - drm_atomic_helper_commit_planes_on_crtc:
              - start vblank evasion
              - write new plane registers
              - write new wm values
              - end vblank evasion
        }
      
        modeset {
         - calculate (during atomic check phase)
         - finish_atomic_commit:
           - crtc_enable:
              - intel_update_watermarks() (actual wm values aren't written
                yet)
           - drm_atomic_helper_commit_planes_on_crtc:
              - start vblank evasion
              - write new plane registers
      	- write new wm values
              - end vblank evasion
        }
      
      So this patch moves all of the watermark writes into the right place;
      inside of the vblank evasion where we update all of the registers for
      each plane. While this patch doesn't fix everything, it does allow us to
      update the watermark values in the way the hardware expects us to.
      
      Changes since original patch series:
       - Remove mutex_lock/mutex_unlock since they don't do anything and we're
         not touching global state
       - Move skl_write_cursor_wm/skl_write_plane_wm functions into
         intel_pm.c, make externally visible
       - Add skl_write_plane_wm calls to skl_update_plane
       - Fix conditional for for loop in skl_write_plane_wm (level < max_level
         should be level <= max_level)
       - Make diagram in commit more accurate to what's actually happening
       - Add Fixes:
      
      Changes since v1:
       - Use IS_GEN9() instead of IS_SKYLAKE() since these fixes apply to more
         then just Skylake
       - Update description to make it clear this patch doesn't fix everything
       - Check if pipes were actually changed before writing watermarks
      
      Changes since v2:
       - Write PIPE_WM_LINETIME during vblank evasion
      
      Changes since v3:
       - Rebase against new SAGV patch changes
      
      Changes since v4:
       - Add a parameter to choose what skl_wm_values struct to use when
         writing new plane watermarks
      
      Changes since v5:
       - Remove cursor ddb entry write in skl_write_cursor_wm(), defer until
         patch 6
       - Write WM_LINETIME in intel_begin_crtc_commit()
      
      Changes since v6:
       - Remove redundant dirty_pipes check in skl_write_plane_wm (we check
         this in all places where we call this function, and it was supposed
         to have been removed earlier anyway)
       - In i9xx_update_cursor(), use dev_priv->info.gen >= 9 instead of
         IS_GEN9(dev_priv). We do this everywhere else and I'd imagine this
         needs to be done for gen10 as well
      
      Changes since v7:
       - Fix rebase fail (unused variable obj)
       - Make struct skl_wm_values *wm const
       - Fix indenting
       - Use INTEL_GEN() instead of dev_priv->info.gen
      
      Changes since v8:
       - Don't forget calls to skl_write_plane_wm() when disabling planes
       - Use INTEL_GEN(), not INTEL_INFO()->gen in intel_begin_crtc_commit()
      
      Fixes: 2d41c0b5 ("drm/i915/skl: SKL Watermark Computation")
      Signed-off-by: NLyude <cpaul@redhat.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Cc: stable@vger.kernel.org
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1471884608-10671-1-git-send-email-cpaul@redhat.com
      Link: http://patchwork.freedesktop.org/patch/msgid/1471884608-10671-1-git-send-email-cpaul@redhat.com
      62e0fb88
    • M
      0a478c27
    • M
      drm/i915: Pass crtc_state and connector_state to encoder functions · fd6bbda9
      Maarten Lankhorst 提交于
      This is mostly code churn, with exception of a few places:
      - intel_display.c has changes in intel_sanitize_encoder
      - intel_ddi.c has intel_ddi_fdi_disable calling intel_ddi_post_disable,
        and required a function change. Also affects intel_display.c
      - intel_dp_mst.c passes a NULL crtc_state and conn_state to
        intel_ddi_post_disable for shutting down the real encoder.
      
        If we would pass conn_state, then conn_state->connector !=
        intel_dig_port->connector and conn_state->best_encoder !=
        to_intel_encoder(intel_dig_port).
      
        We also shouldn't pass crtc_state, because in that case the
        disabling sequence may potentially be different depending on
        which crtc is disabled last. Nice way to introduce bugs.
      
      No other functional changes are done, diff stat is already huge.
      Each encoder type will need to be fixed to use the atomic states
      separately.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-6-git-send-email-maarten.lankhorst@linux.intel.comReviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fd6bbda9