From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Lyude <cpaul@redhat.com>,
intel-gfx@lists.freedesktop.org,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Matt Roper" <matthew.d.roper@intel.com>
Cc: David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Hans de Goede <hdegoede@redhat.com>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH REBASED v10 6/6] drm/i915/skl: Update DDB values atomically with wms/plane attrs
Date: Thu, 11 Aug 2016 16:10:30 +0200 [thread overview]
Message-ID: <4a0e7ae6-8adc-24ba-dd19-8c04cfadb803@linux.intel.com> (raw)
In-Reply-To: <1470839281-19639-14-git-send-email-cpaul@redhat.com>
Hey,
Op 10-08-16 om 16:28 schreef 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()
>
> Fixes: 0e8fb7ba7ca5 ("drm/i915/skl: Flush the WM configuration")
> Fixes: 8211bd5bdf5e ("drm/i915/skl: Program the DDB allocation")
> [omitting CC for stable, since this patch will need to be changed for
> such backports first]
This series breaks on kms_atomic_transition.plane-all-transition (just uploaded the changed tests to igt, please rebuild)
[ 5455.543871] [drm:verify_wm_state.isra.72 [i915]] *ERROR* mismatch in DDB state pipe A plane 1 (expected (0,0), found (0,860))
There's also a WARN_ON(... && total_data_rate == 0) which you need to comment out for the tests to pass cleanly.
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-08-11 14:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 14:27 [PATCH REBASED v10 0/6] Finally fix watermarks Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 1/6] drm/i915/skl: Add support for the SAGV, fix underrun hangs Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 2/6] drm/i915/gen9: Only copy WM results for changed pipes to skl_hw Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 3/6] drm/i915/skl: Update plane watermarks atomically during plane updates Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 4/6] drm/i915/skl: Ensure pipes with changed wms get added to the state Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 5/6] drm/i915: Move CRTC updating in atomic_commit into it's own hook Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 6/6] drm/i915/skl: Update DDB values atomically with wms/plane attrs Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 0/6] Finally fix watermarks Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 1/6] drm/i915/skl: Add support for the SAGV, fix underrun hangs Lyude
2016-08-11 9:22 ` Maarten Lankhorst
2016-08-10 14:27 ` [PATCH REBASED v10 2/6] drm/i915/gen9: Only copy WM results for changed pipes to skl_hw Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 3/6] drm/i915/skl: Update plane watermarks atomically during plane updates Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 4/6] drm/i915/skl: Ensure pipes with changed wms get added to the state Lyude
2016-08-10 14:27 ` [PATCH REBASED v10 5/6] drm/i915: Move CRTC updating in atomic_commit into it's own hook Lyude
2016-08-10 14:28 ` [PATCH REBASED v10 6/6] drm/i915/skl: Update DDB values atomically with wms/plane attrs Lyude
2016-08-11 14:10 ` Maarten Lankhorst [this message]
2016-08-10 14:54 ` ✗ Ro.CI.BAT: failure for Finally fix watermarks (rev8) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4a0e7ae6-8adc-24ba-dd19-8c04cfadb803@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=airlied@linux.ie \
--cc=cpaul@redhat.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.d.roper@intel.com \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox