diff mbox series

drm/i915/psr: Use hw.adjusted mode when calculating io/fast wake times

Message ID 20230620111745.2870706-1-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/psr: Use hw.adjusted mode when calculating io/fast wake times | expand

Commit Message

Hogander, Jouni June 20, 2023, 11:17 a.m. UTC
Encoder compute config is changing hw.adjusted mode. Uapi.adjusted mode
doesn't get updated before psr compute config gets called. This causes io
and fast wake line calculation using adjusted mode containing values before
encoder adjustments. Fix this by using hw.adjusted mode instead of
uapi.adjusted mode.

Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8475
Fixes: cb42e8ede5b4 ("drm/i915/psr: Use calculated io and fast wake lines")
---
 drivers/gpu/drm/i915/display/intel_psr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kahola, Mika June 21, 2023, 6:59 a.m. UTC | #1
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Jouni Högander
> Sent: Tuesday, June 20, 2023 2:18 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH] drm/i915/psr: Use hw.adjusted mode when calculating io/fast wake times
> 
> Encoder compute config is changing hw.adjusted mode. Uapi.adjusted mode doesn't get updated before psr compute config
> gets called. This causes io and fast wake line calculation using adjusted mode containing values before encoder adjustments. Fix
> this by using hw.adjusted mode instead of uapi.adjusted mode.
> 
> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> 

Reviewed-by: Mika Kahola <mika.kahola@intel.com>

> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8475
> Fixes: cb42e8ede5b4 ("drm/i915/psr: Use calculated io and fast wake lines")
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index df517c395da7..04ab034a8d57 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1044,9 +1044,9 @@ static bool _compute_psr2_wake_times(struct intel_dp *intel_dp,
>  	}
> 
>  	io_wake_lines = intel_usecs_to_scanlines(
> -		&crtc_state->uapi.adjusted_mode, io_wake_time);
> +		&crtc_state->hw.adjusted_mode, io_wake_time);
>  	fast_wake_lines = intel_usecs_to_scanlines(
> -		&crtc_state->uapi.adjusted_mode, fast_wake_time);
> +		&crtc_state->hw.adjusted_mode, fast_wake_time);
> 
>  	if (io_wake_lines > max_wake_lines ||
>  	    fast_wake_lines > max_wake_lines)
> --
> 2.34.1
Hogander, Jouni June 21, 2023, 7:44 a.m. UTC | #2
Possible regressions here are not related to my patch.

BR,

Jouni Högander

On Tue, 2023-06-20 at 22:48 +0000, Patchwork wrote:
Patch Details
Series: drm/i915/psr: Use hw.adjusted mode when calculating io/fast wake times
URL:    https://patchwork.freedesktop.org/series/119580/
State:  failure
Details:        https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/index.html
CI Bug Log - changes from CI_DRM_13293_full -> Patchwork_119580v1_full
Summary

FAILURE

Serious unknown changes coming with Patchwork_119580v1_full absolutely need to be
verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_119580v1_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.

Participating hosts (7 -> 7)

No changes in participating hosts

Possible new issues

Here are the unknown changes that may have been introduced in Patchwork_119580v1_full:

IGT changes
Possible regressions

  *   igt@kms_plane_lowres@tiling-x@pipe-a-hdmi-a-2:

     *   shard-rkl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-rkl-6/igt@kms_plane_lowres@tiling-x@pipe-a-hdmi-a-2.html> -> ABORT<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-2/igt@kms_plane_lowres@tiling-x@pipe-a-hdmi-a-2.html>
  *   igt@kms_plane_lowres@tiling-x@pipe-b-hdmi-a-2:

     *   shard-rkl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-rkl-6/igt@kms_plane_lowres@tiling-x@pipe-b-hdmi-a-2.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-2/igt@kms_plane_lowres@tiling-x@pipe-b-hdmi-a-2.html>

Known issues

Here are the changes found in Patchwork_119580v1_full that come from known issues:

IGT changes
Issues hit

  *   igt@drm_fdinfo@virtual-idle:

     *   shard-rkl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-rkl-2/igt@drm_fdinfo@virtual-idle.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-1/igt@drm_fdinfo@virtual-idle.html> (i915#7742<https://gitlab.freedesktop.org/drm/intel/issues/7742>)
  *   igt@gem_exec_fair@basic-deadline:

     *   shard-glk: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-glk9/igt@gem_exec_fair@basic-deadline.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-glk2/igt@gem_exec_fair@basic-deadline.html> (i915#2846<https://gitlab.freedesktop.org/drm/intel/issues/2846>)
  *   igt@gem_exec_fair@basic-flow@rcs0:

     *   shard-rkl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-rkl-2/igt@gem_exec_fair@basic-flow@rcs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-1/igt@gem_exec_fair@basic-flow@rcs0.html> (i915#2842<https://gitlab.freedesktop.org/drm/intel/issues/2842>) +3 similar issues
  *   igt@gem_exec_fair@basic-none-solo@rcs0:

     *   shard-apl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-apl7/igt@gem_exec_fair@basic-none-solo@rcs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-apl1/igt@gem_exec_fair@basic-none-solo@rcs0.html> (i915#2842<https://gitlab.freedesktop.org/drm/intel/issues/2842>)
  *   igt@i915_pm_dc@dc9-dpms:

     *   shard-tglu: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-tglu-10/igt@i915_pm_dc@dc9-dpms.html> -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-tglu-8/igt@i915_pm_dc@dc9-dpms.html> (i915#4281<https://gitlab.freedesktop.org/drm/intel/issues/4281>)
  *   igt@kms_async_flips@alternate-sync-async-flip@pipe-b-hdmi-a-2:

     *   shard-rkl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-rkl-4/igt@kms_async_flips@alternate-sync-async-flip@pipe-b-hdmi-a-2.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-6/igt@kms_async_flips@alternate-sync-async-flip@pipe-b-hdmi-a-2.html> (i915#2521<https://gitlab.freedesktop.org/drm/intel/issues/2521>)
  *   igt@kms_color@deep-color:

     *   shard-rkl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-7/igt@kms_color@deep-color.html> (i915#3555<https://gitlab.freedesktop.org/drm/intel/issues/3555> / i915#4579<https://gitlab.freedesktop.org/drm/intel/issues/4579>)
  *   igt@kms_cursor_legacy@forked-move@pipe-b:

     *   shard-rkl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-rkl-1/igt@kms_cursor_legacy@forked-move@pipe-b.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-7/igt@kms_cursor_legacy@forked-move@pipe-b.html> (i915#8011<https://gitlab.freedesktop.org/drm/intel/issues/8011>)
  *   igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1:

     *   shard-glk: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-glk3/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-glk8/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1.html> (i915#79<https://gitlab.freedesktop.org/drm/intel/issues/79>)
  *   igt@kms_plane_scaling@plane-downscale-with-rotation-factor-0-25@pipe-a-hdmi-a-2:

     *   shard-rkl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-2/igt@kms_plane_scaling@plane-downscale-with-rotation-factor-0-25@pipe-a-hdmi-a-2.html> (i915#5176<https://gitlab.freedesktop.org/drm/intel/issues/5176>) +2 similar issues
  *   igt@kms_plane_scaling@plane-downscale-with-rotation-factor-0-25@pipe-b-hdmi-a-2:

     *   shard-rkl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-2/igt@kms_plane_scaling@plane-downscale-with-rotation-factor-0-25@pipe-b-hdmi-a-2.html> (i915#4579<https://gitlab.freedesktop.org/drm/intel/issues/4579> / i915#5176<https://gitlab.freedesktop.org/drm/intel/issues/5176>) +2 similar issues
  *   igt@kms_plane_scaling@plane-upscale-with-modifiers-20x20@pipe-b-hdmi-a-1:

     *   shard-snb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-snb1/igt@kms_plane_scaling@plane-upscale-with-modifiers-20x20@pipe-b-hdmi-a-1.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#4579<https://gitlab.freedesktop.org/drm/intel/issues/4579>) +8 similar issues
  *   igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-5@pipe-a-vga-1:

     *   shard-snb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-snb6/igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-5@pipe-a-vga-1.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +13 similar issues
  *   igt@kms_rotation_crc@primary-rotation-270:

     *   shard-rkl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-rkl-6/igt@kms_rotation_crc@primary-rotation-270.html> -> ABORT<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-1/igt@kms_rotation_crc@primary-rotation-270.html> (i915#7461<https://gitlab.freedesktop.org/drm/intel/issues/7461>)

Possible fixes

  *   igt@gem_eio@reset-stress:

     *   {shard-dg1}: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-dg1-19/igt@gem_eio@reset-stress.html> (i915#5784<https://gitlab.freedesktop.org/drm/intel/issues/5784>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-dg1-15/igt@gem_eio@reset-stress.html>
  *   igt@gem_exec_balancer@nop:

     *   {shard-dg1}: DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-dg1-12/igt@gem_exec_balancer@nop.html> (i915#4423<https://gitlab.freedesktop.org/drm/intel/issues/4423>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-dg1-19/igt@gem_exec_balancer@nop.html>
  *   igt@gem_exec_fair@basic-pace-solo@rcs0:

     *   shard-rkl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-rkl-2/igt@gem_exec_fair@basic-pace-solo@rcs0.html> (i915#2842<https://gitlab.freedesktop.org/drm/intel/issues/2842>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-rkl-2/igt@gem_exec_fair@basic-pace-solo@rcs0.html>
  *   igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:

     *   shard-apl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-apl1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html> (i915#2346<https://gitlab.freedesktop.org/drm/intel/issues/2346>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-apl3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html>
  *   igt@kms_flip@flip-vs-expired-vblank-interruptible@c-dp1:

     *   shard-apl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-apl2/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-dp1.html> (i915#79<https://gitlab.freedesktop.org/drm/intel/issues/79>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-apl2/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-dp1.html>
  *   igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1:

     *   shard-glk: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-glk1/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1.html> (i915#79<https://gitlab.freedesktop.org/drm/intel/issues/79>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-glk4/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1.html>

Warnings

  *   igt@i915_pm_rc6_residency@rc6-idle@rcs0:
     *   shard-tglu: WARN<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13293/shard-tglu-9/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html> (i915#2681<https://gitlab.freedesktop.org/drm/intel/issues/2681>) -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119580v1/shard-tglu-2/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html> (i915#2681<https://gitlab.freedesktop.org/drm/intel/issues/2681> / i915#3591<https://gitlab.freedesktop.org/drm/intel/issues/3591>)

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

Build changes

  *   Linux: CI_DRM_13293 -> Patchwork_119580v1

CI-20190529: 20190529
CI_DRM_13293: 0b6c4d4f639c4077e28e1d6fcb97412ae8f69d7c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7340: e975155e9167f0fed8f3da9c5b61de71d082b5c7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_119580v1: 0b6c4d4f639c4077e28e1d6fcb97412ae8f69d7c @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
Hogander, Jouni June 21, 2023, 10:57 a.m. UTC | #3
On Wed, 2023-06-21 at 06:59 +0000, Kahola, Mika wrote:
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf
> > Of Jouni Högander
> > Sent: Tuesday, June 20, 2023 2:18 PM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH] drm/i915/psr: Use hw.adjusted mode
> > when calculating io/fast wake times
> > 
> > Encoder compute config is changing hw.adjusted mode. Uapi.adjusted
> > mode doesn't get updated before psr compute config
> > gets called. This causes io and fast wake line calculation using
> > adjusted mode containing values before encoder adjustments. Fix
> > this by using hw.adjusted mode instead of uapi.adjusted mode.
> > 
> > Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> > 
> 
> Reviewed-by: Mika Kahola <mika.kahola@intel.com>

Thank you Mika for the review. This noow pushed.

BR,

Jouni Högander
> 
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8475
> > Fixes: cb42e8ede5b4 ("drm/i915/psr: Use calculated io and fast wake
> > lines")
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index df517c395da7..04ab034a8d57 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -1044,9 +1044,9 @@ static bool _compute_psr2_wake_times(struct
> > intel_dp *intel_dp,
> >         }
> > 
> >         io_wake_lines = intel_usecs_to_scanlines(
> > -               &crtc_state->uapi.adjusted_mode, io_wake_time);
> > +               &crtc_state->hw.adjusted_mode, io_wake_time);
> >         fast_wake_lines = intel_usecs_to_scanlines(
> > -               &crtc_state->uapi.adjusted_mode, fast_wake_time);
> > +               &crtc_state->hw.adjusted_mode, fast_wake_time);
> > 
> >         if (io_wake_lines > max_wake_lines ||
> >             fast_wake_lines > max_wake_lines)
> > --
> > 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index df517c395da7..04ab034a8d57 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1044,9 +1044,9 @@  static bool _compute_psr2_wake_times(struct intel_dp *intel_dp,
 	}
 
 	io_wake_lines = intel_usecs_to_scanlines(
-		&crtc_state->uapi.adjusted_mode, io_wake_time);
+		&crtc_state->hw.adjusted_mode, io_wake_time);
 	fast_wake_lines = intel_usecs_to_scanlines(
-		&crtc_state->uapi.adjusted_mode, fast_wake_time);
+		&crtc_state->hw.adjusted_mode, fast_wake_time);
 
 	if (io_wake_lines > max_wake_lines ||
 	    fast_wake_lines > max_wake_lines)