mbox series

[v2,00/13] drm/i915: Program SKL+ watermarks/ddb more carefully

Message ID 20181114210729.16185-1-ville.syrjala@linux.intel.com (mailing list archive)
Headers show
Series drm/i915: Program SKL+ watermarks/ddb more carefully | expand

Message

Ville Syrjala Nov. 14, 2018, 9:07 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Here's the remainder of the skl+ ddb/wm programming series. I tried to
split up the ugly monster patch into a few chunks, and I tossed in
a few extra nuggets on top. I also tried to improve the commit
messages a bit based on the previous review feedback.

Entire series available here:
git://github.com/vsyrjala/linux.git skl_plane_ddb_wm_update_3

Ville Syrjälä (13):
  drm/i915: Reorganize plane register writes to make them more atomic
  drm/i915: Move single buffered plane register writes to the end
  drm/i915: Introduce crtc_state->update_planes bitmask
  drm/i915: Pass the new crtc_state to ->disable_plane()
  drm/i915: Fix latency==0 handling for level 0 watermark on skl+
  drm/i915: Remove some useless zeroing on skl+ wm calculations
  drm/i915: Pass the entire skl_plane_wm to skl_compute_transition_wm()
  drm/i915: Clean up skl+ vs. icl+ watermark computation
  drm/i915: Don't pass dev_priv around so much
  drm/i915: Move ddb/wm programming into plane update/disable hooks on
    skl+
  drm/i915: Commit skl+ planes in an order that avoids ddb overlaps
  drm/i915: Rename the confusing 'plane_id' to 'color_plane'
  drm/i915: Pass the plane to icl_program_input_csc_coeff()

 drivers/gpu/drm/i915/i915_debugfs.c       |  21 +-
 drivers/gpu/drm/i915/i915_drv.h           |   3 -
 drivers/gpu/drm/i915/intel_atomic.c       |   1 +
 drivers/gpu/drm/i915/intel_atomic_plane.c | 102 ++++-
 drivers/gpu/drm/i915/intel_display.c      | 119 +++--
 drivers/gpu/drm/i915/intel_display.h      |  19 +-
 drivers/gpu/drm/i915/intel_drv.h          |  22 +-
 drivers/gpu/drm/i915/intel_pm.c           | 500 ++++++++++------------
 drivers/gpu/drm/i915/intel_sprite.c       | 148 ++++---
 9 files changed, 523 insertions(+), 412 deletions(-)

Comments

Ville Syrjala Nov. 15, 2018, 2:23 p.m. UTC | #1
On Thu, Nov 15, 2018 at 05:21:46AM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Program SKL+ watermarks/ddb more carefully (rev7)
> URL   : https://patchwork.freedesktop.org/series/51878/
> State : failure
> 
> == Summary ==
> 
> = CI Bug Log - changes from CI_DRM_5140_full -> Patchwork_10827_full =
> 
> == Summary - FAILURE ==
> 
>   Serious unknown changes coming with Patchwork_10827_full absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_10827_full, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   
> 
> == Possible new issues ==
> 
>   Here are the unknown changes that may have been introduced in Patchwork_10827_full:
> 
>   === IGT changes ===
> 
>     ==== Possible regressions ====
> 
>     igt@prime_vgem@basic-fence-flip:
>       shard-apl:          PASS -> DMESG-WARN
>       shard-kbl:          PASS -> DMESG-WARN


<3> [72.612353] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 0 (expected e=0 b=0 l=0, got e=1 b=3 l=1)
<3> [72.612661] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 1 (expected e=0 b=0 l=0, got e=1 b=4 l=1)
<3> [72.612784] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 2 (expected e=0 b=0 l=0, got e=1 b=4 l=1)
<3> [72.612905] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 3 (expected e=0 b=0 l=0, got e=1 b=6 l=2)
<3> [72.613026] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 4 (expected e=0 b=0 l=0, got e=1 b=6 l=2)
<3> [72.613147] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 5 (expected e=0 b=0 l=0, got e=1 b=6 l=2)
<3> [72.613267] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 6 (expected e=0 b=0 l=0, got e=1 b=6 l=2)
<3> [72.613388] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 7 (expected e=0 b=0 l=0, got e=1 b=6 l=2)

I suspect this would be caused by the cursor becoming fully clipped 
but still logically enabled (fb != NULL) during the  previous test
(kms_chv_cursor_fail). And then when it comes time to turn off the
pipe we won't reprogram the cursor because its visibility didn't
change and thus we won't clear its watermarks either. I think I'm
going to write a targeted test for that just to make sure my
analysis is correct.
Ville Syrjala Nov. 15, 2018, 3:23 p.m. UTC | #2
On Thu, Nov 15, 2018 at 04:23:46PM +0200, Ville Syrjälä wrote:
> On Thu, Nov 15, 2018 at 05:21:46AM -0000, Patchwork wrote:
> > == Series Details ==
> > 
> > Series: drm/i915: Program SKL+ watermarks/ddb more carefully (rev7)
> > URL   : https://patchwork.freedesktop.org/series/51878/
> > State : failure
> > 
> > == Summary ==
> > 
> > = CI Bug Log - changes from CI_DRM_5140_full -> Patchwork_10827_full =
> > 
> > == Summary - FAILURE ==
> > 
> >   Serious unknown changes coming with Patchwork_10827_full absolutely need to be
> >   verified manually.
> >   
> >   If you think the reported changes have nothing to do with the changes
> >   introduced in Patchwork_10827_full, please notify your bug team to allow them
> >   to document this new failure mode, which will reduce false positives in CI.
> > 
> >   
> > 
> > == Possible new issues ==
> > 
> >   Here are the unknown changes that may have been introduced in Patchwork_10827_full:
> > 
> >   === IGT changes ===
> > 
> >     ==== Possible regressions ====
> > 
> >     igt@prime_vgem@basic-fence-flip:
> >       shard-apl:          PASS -> DMESG-WARN
> >       shard-kbl:          PASS -> DMESG-WARN
> 
> 
> <3> [72.612353] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 0 (expected e=0 b=0 l=0, got e=1 b=3 l=1)
> <3> [72.612661] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 1 (expected e=0 b=0 l=0, got e=1 b=4 l=1)
> <3> [72.612784] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 2 (expected e=0 b=0 l=0, got e=1 b=4 l=1)
> <3> [72.612905] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 3 (expected e=0 b=0 l=0, got e=1 b=6 l=2)
> <3> [72.613026] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 4 (expected e=0 b=0 l=0, got e=1 b=6 l=2)
> <3> [72.613147] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 5 (expected e=0 b=0 l=0, got e=1 b=6 l=2)
> <3> [72.613267] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 6 (expected e=0 b=0 l=0, got e=1 b=6 l=2)
> <3> [72.613388] [drm:verify_wm_state [i915]] *ERROR* mismatch in WM pipe A cursor level 7 (expected e=0 b=0 l=0, got e=1 b=6 l=2)
> 
> I suspect this would be caused by the cursor becoming fully clipped 
> but still logically enabled (fb != NULL) during the  previous test
> (kms_chv_cursor_fail). And then when it comes time to turn off the
> pipe we won't reprogram the cursor because its visibility didn't
> change and thus we won't clear its watermarks either. I think I'm
> going to write a targeted test for that just to make sure my
> analysis is correct.

Actually that can't be it I think. There was no complaint about a
non-zero DDB allocation left behind, so somehow we've got non-zero
watermarks with no DDB allocated. That doesn't quite make sense.
Ville Syrjala Nov. 21, 2018, 7:19 p.m. UTC | #3
On Wed, Nov 21, 2018 at 06:05:21AM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Program SKL+ watermarks/ddb more carefully (rev8)
> URL   : https://patchwork.freedesktop.org/series/51878/
> State : failure
> 
> == Summary ==
> 
> = CI Bug Log - changes from CI_DRM_5174_full -> Patchwork_10868_full =
> 
> == Summary - FAILURE ==
> 
>   Serious unknown changes coming with Patchwork_10868_full absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_10868_full, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   
> 
> == Possible new issues ==
> 
>   Here are the unknown changes that may have been introduced in Patchwork_10868_full:
> 
>   === IGT changes ===
> 
>     ==== Possible regressions ====
> 
>     igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic:
>       shard-skl:          PASS -> FAIL
> 
>     igt@kms_cursor_legacy@nonblocking-modeset-vs-cursor-atomic:
>       shard-apl:          PASS -> FAIL

Mysterious and mysteriouser.

The test does this:
1. enable_crtc
2. setcursor
3. wait_for_event
4. disable_crtc

Apparently we're not getting -EBUSY from step 4. Which would imply
that we still have an unifinished commit in the queue. The cursor ioctl
should block until everything is done, so I can't see how that is
possible. And so far I'm unable to reproduce this locally.

> 
>     
>     ==== Warnings ====
> 
>     igt@pm_rc6_residency@rc6-accuracy:
>       shard-snb:          SKIP -> PASS
> 
>     
> == Known issues ==
> 
>   Here are the changes found in Patchwork_10868_full that come from known issues:
> 
>   === IGT changes ===
> 
>     ==== Issues hit ====
> 
>     igt@gem_exec_schedule@preempt-hang-render:
>       shard-apl:          PASS -> INCOMPLETE (fdo#103927)
> 
>     igt@gem_render_copy_redux@normal:
>       shard-kbl:          PASS -> INCOMPLETE (fdo#103665, fdo#106650)
> 
>     igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
>       shard-glk:          PASS -> FAIL (fdo#108145)
> 
>     igt@kms_chv_cursor_fail@pipe-a-128x128-top-edge:
>       shard-skl:          NOTRUN -> FAIL (fdo#104671) +1
> 
>     igt@kms_cursor_crc@cursor-256x256-suspend:
>       shard-skl:          PASS -> FAIL (fdo#103191, fdo#103232)
> 
>     igt@kms_cursor_crc@cursor-256x85-onscreen:
>       shard-apl:          PASS -> FAIL (fdo#103232)
> 
>     igt@kms_flip@2x-flip-vs-expired-vblank:
>       shard-glk:          PASS -> FAIL (fdo#105363)
> 
>     igt@kms_flip@flip-vs-expired-vblank-interruptible:
>       shard-skl:          PASS -> FAIL (fdo#105363)
> 
>     igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-wc:
>       shard-skl:          NOTRUN -> FAIL (fdo#105682)
> 
>     igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
>       shard-skl:          NOTRUN -> FAIL (fdo#103167) +3
> 
>     igt@kms_frontbuffer_tracking@fbc-modesetfrombusy:
>       shard-glk:          PASS -> FAIL (fdo#103167) +2
> 
>     igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
>       shard-skl:          PASS -> INCOMPLETE (fdo#107773, fdo#104108) +1
> 
>     igt@kms_plane@plane-position-covered-pipe-a-planes:
>       shard-skl:          NOTRUN -> FAIL (fdo#103166)
> 
>     igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
>       shard-skl:          NOTRUN -> FAIL (fdo#107815, fdo#108145)
> 
>     igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
>       shard-skl:          PASS -> FAIL (fdo#107815)
> 
>     igt@kms_plane_multiple@atomic-pipe-c-tiling-y:
>       shard-apl:          PASS -> FAIL (fdo#103166)
> 
>     igt@kms_universal_plane@universal-plane-pipe-c-functional:
>       shard-glk:          PASS -> FAIL (fdo#103166) +1
> 
>     igt@perf@oa-exponents:
>       shard-glk:          PASS -> FAIL (fdo#105483)
> 
>     
>     ==== Possible fixes ====
> 
>     igt@gem_ppgtt@blt-vs-render-ctxn:
>       shard-skl:          TIMEOUT (fdo#108039) -> PASS
> 
>     igt@gem_pwrite@big-gtt-backwards:
>       shard-apl:          INCOMPLETE (fdo#103927) -> PASS
> 
>     igt@kms_cursor_crc@cursor-256x85-sliding:
>       shard-apl:          FAIL (fdo#103232) -> PASS
> 
>     igt@kms_cursor_legacy@cursora-vs-flipa-toggle:
>       shard-glk:          DMESG-WARN (fdo#106538, fdo#105763) -> PASS
> 
>     igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
>       shard-apl:          FAIL (fdo#103167) -> PASS +2
>       shard-glk:          FAIL (fdo#103167) -> PASS +1
> 
>     igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
>       shard-skl:          FAIL (fdo#107815) -> PASS
> 
>     igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
>       shard-glk:          FAIL (fdo#103166) -> PASS +2
> 
>     igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
>       shard-apl:          FAIL (fdo#103166) -> PASS +1
> 
>     igt@kms_setmode@basic:
>       shard-hsw:          FAIL (fdo#99912) -> PASS
> 
>     
>   fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
>   fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
>   fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
>   fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
>   fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
>   fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
>   fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
>   fdo#104671 https://bugs.freedesktop.org/show_bug.cgi?id=104671
>   fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
>   fdo#105483 https://bugs.freedesktop.org/show_bug.cgi?id=105483
>   fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
>   fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
>   fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
>   fdo#106650 https://bugs.freedesktop.org/show_bug.cgi?id=106650
>   fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
>   fdo#107815 https://bugs.freedesktop.org/show_bug.cgi?id=107815
>   fdo#108039 https://bugs.freedesktop.org/show_bug.cgi?id=108039
>   fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
>   fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
> 
> 
> == Participating hosts (7 -> 6) ==
> 
>   Missing    (1): shard-iclb 
> 
> 
> == Build changes ==
> 
>     * Linux: CI_DRM_5174 -> Patchwork_10868
> 
>   CI_DRM_5174: 0bfa7192170c039a271ebc27222b4b91516e73f6 @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_4722: fdcdfa1e220c5070072d5dac9523cd105e7406c2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>   Patchwork_10868: 145a11acda90d218c1127096da2f508cc178651f @ git://anongit.freedesktop.org/gfx-ci/linux
>   piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10868/shards.html
Ville Syrjala Nov. 28, 2018, 8:18 p.m. UTC | #4
On Wed, Nov 14, 2018 at 11:07:16PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Here's the remainder of the skl+ ddb/wm programming series. I tried to
> split up the ugly monster patch into a few chunks, and I tossed in
> a few extra nuggets on top. I also tried to improve the commit
> messages a bit based on the previous review feedback.
> 
> Entire series available here:
> git://github.com/vsyrjala/linux.git skl_plane_ddb_wm_update_3
> 
> Ville Syrjälä (13):
>   drm/i915: Reorganize plane register writes to make them more atomic
>   drm/i915: Move single buffered plane register writes to the end
>   drm/i915: Introduce crtc_state->update_planes bitmask
>   drm/i915: Pass the new crtc_state to ->disable_plane()
>   drm/i915: Fix latency==0 handling for level 0 watermark on skl+
>   drm/i915: Remove some useless zeroing on skl+ wm calculations
>   drm/i915: Pass the entire skl_plane_wm to skl_compute_transition_wm()
>   drm/i915: Clean up skl+ vs. icl+ watermark computation
>   drm/i915: Don't pass dev_priv around so much
>   drm/i915: Move ddb/wm programming into plane update/disable hooks on
>     skl+
>   drm/i915: Commit skl+ planes in an order that avoids ddb overlaps
>   drm/i915: Rename the confusing 'plane_id' to 'color_plane'
>   drm/i915: Pass the plane to icl_program_input_csc_coeff()

Entire series pushed to dinq. Thanks for the reviews everyone.