* [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 @ 2022-01-21 8:06 Stanislav Lisovskiy 2022-01-21 8:06 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy ` (8 more replies) 0 siblings, 9 replies; 21+ messages in thread From: Stanislav Lisovskiy @ 2022-01-21 8:06 UTC (permalink / raw) To: intel-gfx Limitting the WM levels to 0 for DG2 during async flips, allows to slightly increase the performance, as recommended by HW team. Stanislav Lisovskiy (4): drm/i915: Pass plane to watermark calculation functions drm/i915: Introduce do_async_flip flag to intel_plane_state drm/i915: Use wm0 only during async flips for DG2 drm/i915: Don't allocate extra ddb during async flip for DG2 .../gpu/drm/i915/display/intel_atomic_plane.c | 5 +- .../gpu/drm/i915/display/intel_atomic_plane.h | 3 ++ drivers/gpu/drm/i915/display/intel_display.c | 31 +++++++++++- .../drm/i915/display/intel_display_types.h | 3 ++ drivers/gpu/drm/i915/intel_pm.c | 49 ++++++++++++++++--- 5 files changed, 80 insertions(+), 11 deletions(-) -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy @ 2022-01-21 8:06 ` Stanislav Lisovskiy 2022-01-21 11:47 ` Ville Syrjälä 2022-01-21 8:06 ` [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state Stanislav Lisovskiy ` (7 subsequent siblings) 8 siblings, 1 reply; 21+ messages in thread From: Stanislav Lisovskiy @ 2022-01-21 8:06 UTC (permalink / raw) To: intel-gfx Sometimes we might need to change the way we calculate watermarks, based on which particular plane it is calculated for. Thus it would be convenient to pass plane struct to those functions. v2: Pass plane instead of plane_id v3: Do not pass plane to skl_cursor_allocation(Ville Syrjälä) Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> --- .../gpu/drm/i915/display/intel_atomic_plane.c | 2 +- .../gpu/drm/i915/display/intel_atomic_plane.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 20 +++++++++++++------ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c index c2c512cd8ec0..d1344e9c06de 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c @@ -373,7 +373,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ old_plane_state, new_plane_state); } -static struct intel_plane * +struct intel_plane * intel_crtc_get_plane(struct intel_crtc *crtc, enum plane_id plane_id) { struct drm_i915_private *i915 = to_i915(crtc->base.dev); diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/gpu/drm/i915/display/intel_atomic_plane.h index 7907f601598e..c1499bb7370e 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h @@ -16,10 +16,13 @@ struct intel_crtc; struct intel_crtc_state; struct intel_plane; struct intel_plane_state; +enum plane_id; unsigned int intel_adjusted_rate(const struct drm_rect *src, const struct drm_rect *dst, unsigned int rate); +struct intel_plane *intel_crtc_get_plane(struct intel_crtc *crtc, + enum plane_id plane_id); unsigned int intel_plane_pixel_rate(const struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state); diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 3981aa856cc2..35d0bd8c6e57 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4252,7 +4252,9 @@ static int skl_compute_wm_params(const struct intel_crtc_state *crtc_state, u64 modifier, unsigned int rotation, u32 plane_pixel_rate, struct skl_wm_params *wp, int color_plane); + static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, int level, unsigned int latency, const struct skl_wm_params *wp, @@ -4268,6 +4270,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, struct skl_wm_level wm = {}; int ret, min_ddb_alloc = 0; struct skl_wm_params wp; + const struct intel_plane *cursor_plane = to_intel_plane(crtc_state->uapi.crtc->cursor); ret = skl_compute_wm_params(crtc_state, 256, drm_format_info(DRM_FORMAT_ARGB8888), @@ -4279,7 +4282,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, for (level = 0; level <= max_level; level++) { unsigned int latency = dev_priv->wm.skl_latency[level]; - skl_compute_plane_wm(crtc_state, level, latency, &wp, &wm, &wm); + skl_compute_plane_wm(crtc_state, cursor_plane, level, latency, &wp, &wm, &wm); if (wm.min_ddb_alloc == U16_MAX) break; @@ -5508,6 +5511,7 @@ static int skl_wm_max_lines(struct drm_i915_private *dev_priv) } static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, int level, unsigned int latency, const struct skl_wm_params *wp, @@ -5635,6 +5639,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, static void skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, const struct skl_wm_params *wm_params, struct skl_wm_level *levels) { @@ -5646,7 +5651,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, struct skl_wm_level *result = &levels[level]; unsigned int latency = dev_priv->wm.skl_latency[level]; - skl_compute_plane_wm(crtc_state, level, latency, + skl_compute_plane_wm(crtc_state, plane, level, latency, wm_params, result_prev, result); result_prev = result; @@ -5654,6 +5659,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, } static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, const struct skl_wm_params *wm_params, struct skl_plane_wm *plane_wm) { @@ -5662,7 +5668,7 @@ static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, struct skl_wm_level *levels = plane_wm->wm; unsigned int latency = dev_priv->wm.skl_latency[0] + dev_priv->sagv_block_time_us; - skl_compute_plane_wm(crtc_state, 0, latency, + skl_compute_plane_wm(crtc_state, plane, 0, latency, wm_params, &levels[0], sagv_wm); } @@ -5737,6 +5743,7 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); struct skl_wm_params wm_params; int ret; @@ -5745,13 +5752,13 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, if (ret) return ret; - skl_compute_wm_levels(crtc_state, &wm_params, wm->wm); + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->wm); skl_compute_transition_wm(dev_priv, &wm->trans_wm, &wm->wm[0], &wm_params); if (DISPLAY_VER(dev_priv) >= 12) { - tgl_compute_sagv_wm(crtc_state, &wm_params, wm); + tgl_compute_sagv_wm(crtc_state, plane, &wm_params, wm); skl_compute_transition_wm(dev_priv, &wm->sagv.trans_wm, &wm->sagv.wm0, &wm_params); @@ -5765,6 +5772,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, enum plane_id plane_id) { struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); struct skl_wm_params wm_params; int ret; @@ -5776,7 +5784,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, if (ret) return ret; - skl_compute_wm_levels(crtc_state, &wm_params, wm->uv_wm); + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->uv_wm); return 0; } -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions 2022-01-21 8:06 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy @ 2022-01-21 11:47 ` Ville Syrjälä 0 siblings, 0 replies; 21+ messages in thread From: Ville Syrjälä @ 2022-01-21 11:47 UTC (permalink / raw) To: Stanislav Lisovskiy; +Cc: intel-gfx On Fri, Jan 21, 2022 at 10:06:12AM +0200, Stanislav Lisovskiy wrote: > Sometimes we might need to change the way we calculate > watermarks, based on which particular plane it is calculated > for. Thus it would be convenient to pass plane struct to those > functions. > > v2: Pass plane instead of plane_id > v3: Do not pass plane to skl_cursor_allocation(Ville Syrjälä) > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > --- > .../gpu/drm/i915/display/intel_atomic_plane.c | 2 +- > .../gpu/drm/i915/display/intel_atomic_plane.h | 3 +++ > drivers/gpu/drm/i915/intel_pm.c | 20 +++++++++++++------ > 3 files changed, 18 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c > index c2c512cd8ec0..d1344e9c06de 100644 > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c > @@ -373,7 +373,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ > old_plane_state, new_plane_state); > } > > -static struct intel_plane * > +struct intel_plane * > intel_crtc_get_plane(struct intel_crtc *crtc, enum plane_id plane_id) > { > struct drm_i915_private *i915 = to_i915(crtc->base.dev); > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/gpu/drm/i915/display/intel_atomic_plane.h > index 7907f601598e..c1499bb7370e 100644 > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h > @@ -16,10 +16,13 @@ struct intel_crtc; > struct intel_crtc_state; > struct intel_plane; > struct intel_plane_state; > +enum plane_id; > > unsigned int intel_adjusted_rate(const struct drm_rect *src, > const struct drm_rect *dst, > unsigned int rate); > +struct intel_plane *intel_crtc_get_plane(struct intel_crtc *crtc, > + enum plane_id plane_id); You're no longer using that, so can stay static. > unsigned int intel_plane_pixel_rate(const struct intel_crtc_state *crtc_state, > const struct intel_plane_state *plane_state); > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 3981aa856cc2..35d0bd8c6e57 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -4252,7 +4252,9 @@ static int skl_compute_wm_params(const struct intel_crtc_state *crtc_state, > u64 modifier, unsigned int rotation, > u32 plane_pixel_rate, struct skl_wm_params *wp, > int color_plane); > + > static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane, > int level, > unsigned int latency, > const struct skl_wm_params *wp, > @@ -4268,6 +4270,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, > struct skl_wm_level wm = {}; > int ret, min_ddb_alloc = 0; > struct skl_wm_params wp; > + const struct intel_plane *cursor_plane = to_intel_plane(crtc_state->uapi.crtc->cursor); I think just 'plane' would suffice since we know from the context what it is. Also sticking to the reverse christmas tree order would look a bit neater imo. > > ret = skl_compute_wm_params(crtc_state, 256, > drm_format_info(DRM_FORMAT_ARGB8888), > @@ -4279,7 +4282,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, > for (level = 0; level <= max_level; level++) { > unsigned int latency = dev_priv->wm.skl_latency[level]; > > - skl_compute_plane_wm(crtc_state, level, latency, &wp, &wm, &wm); > + skl_compute_plane_wm(crtc_state, cursor_plane, level, latency, &wp, &wm, &wm); > if (wm.min_ddb_alloc == U16_MAX) > break; > > @@ -5508,6 +5511,7 @@ static int skl_wm_max_lines(struct drm_i915_private *dev_priv) > } > > static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane, > int level, > unsigned int latency, > const struct skl_wm_params *wp, > @@ -5635,6 +5639,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > > static void > skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane, > const struct skl_wm_params *wm_params, > struct skl_wm_level *levels) > { > @@ -5646,7 +5651,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, > struct skl_wm_level *result = &levels[level]; > unsigned int latency = dev_priv->wm.skl_latency[level]; > > - skl_compute_plane_wm(crtc_state, level, latency, > + skl_compute_plane_wm(crtc_state, plane, level, latency, > wm_params, result_prev, result); > > result_prev = result; > @@ -5654,6 +5659,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, > } > > static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane, > const struct skl_wm_params *wm_params, > struct skl_plane_wm *plane_wm) > { > @@ -5662,7 +5668,7 @@ static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, > struct skl_wm_level *levels = plane_wm->wm; > unsigned int latency = dev_priv->wm.skl_latency[0] + dev_priv->sagv_block_time_us; > > - skl_compute_plane_wm(crtc_state, 0, latency, > + skl_compute_plane_wm(crtc_state, plane, 0, latency, > wm_params, &levels[0], > sagv_wm); > } > @@ -5737,6 +5743,7 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, > struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); > struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); > struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; > + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); Hmm. I was first going to suggest not plumbing plane_id through to here at all anymore, but thanks to the Y plane shenanigans we can't actually do that. I think to make this totally consistent we should actually plumb the whole plane into skl_build_plane_wm_{single,uv}() instead of just the plane_id. > struct skl_wm_params wm_params; > int ret; > > @@ -5745,13 +5752,13 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, > if (ret) > return ret; > > - skl_compute_wm_levels(crtc_state, &wm_params, wm->wm); > + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->wm); > > skl_compute_transition_wm(dev_priv, &wm->trans_wm, > &wm->wm[0], &wm_params); > > if (DISPLAY_VER(dev_priv) >= 12) { > - tgl_compute_sagv_wm(crtc_state, &wm_params, wm); > + tgl_compute_sagv_wm(crtc_state, plane, &wm_params, wm); > > skl_compute_transition_wm(dev_priv, &wm->sagv.trans_wm, > &wm->sagv.wm0, &wm_params); > @@ -5765,6 +5772,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, > enum plane_id plane_id) > { > struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; > + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); > struct skl_wm_params wm_params; > int ret; > > @@ -5776,7 +5784,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, > if (ret) > return ret; > > - skl_compute_wm_levels(crtc_state, &wm_params, wm->uv_wm); > + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->uv_wm); > > return 0; > } > -- > 2.24.1.485.gad05a3d8e5 -- Ville Syrjälä Intel ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy 2022-01-21 8:06 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy @ 2022-01-21 8:06 ` Stanislav Lisovskiy 2022-01-21 11:48 ` Ville Syrjälä 2022-01-21 8:06 ` [Intel-gfx] [PATCH 3/4] drm/i915: Use wm0 only during async flips for DG2 Stanislav Lisovskiy ` (6 subsequent siblings) 8 siblings, 1 reply; 21+ messages in thread From: Stanislav Lisovskiy @ 2022-01-21 8:06 UTC (permalink / raw) To: intel-gfx There might be various logical contructs when we might want to enable async flip, so lets calculate those and set this flag, so that there is no need in long conditions in other places. v2: - Set do_async_flip flag to False, if no async flip needed. Lets not rely that it will be 0-initialized, but set explicitly, so that the logic is clear as well. v3: - Clear do_async_flip in intel_plane_duplicate_state(Ville Syrjälä) - Check with do_async_flip also when calling intel_crtc_{enable,disable}_flip_done(Ville Syrjälä) Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> --- drivers/gpu/drm/i915/display/intel_atomic_plane.c | 3 ++- drivers/gpu/drm/i915/display/intel_display.c | 9 +++++++-- drivers/gpu/drm/i915/display/intel_display_types.h | 3 +++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c index d1344e9c06de..9d79ab987b2e 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c @@ -109,6 +109,7 @@ intel_plane_duplicate_state(struct drm_plane *plane) intel_state->ggtt_vma = NULL; intel_state->dpt_vma = NULL; intel_state->flags = 0; + intel_state->do_async_flip = false; /* add reference to fb */ if (intel_state->hw.fb) @@ -491,7 +492,7 @@ void intel_plane_update_arm(struct intel_plane *plane, trace_intel_plane_update_arm(&plane->base, crtc); - if (crtc_state->uapi.async_flip && plane->async_flip) + if (plane_state->do_async_flip) plane->async_flip(plane, crtc_state, plane_state, true); else plane->update_arm(plane, crtc_state, plane_state); diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 55cd453c4ce5..9996daa036a0 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1369,7 +1369,8 @@ static void intel_crtc_enable_flip_done(struct intel_atomic_state *state, for_each_new_intel_plane_in_state(state, plane, plane_state, i) { if (plane->enable_flip_done && plane->pipe == crtc->pipe && - update_planes & BIT(plane->id)) + update_planes & BIT(plane->id) && + plane_state->do_async_flip) plane->enable_flip_done(plane); } } @@ -1387,7 +1388,8 @@ static void intel_crtc_disable_flip_done(struct intel_atomic_state *state, for_each_new_intel_plane_in_state(state, plane, plane_state, i) { if (plane->disable_flip_done && plane->pipe == crtc->pipe && - update_planes & BIT(plane->id)) + update_planes & BIT(plane->id) && + plane_state->do_async_flip) plane->disable_flip_done(plane); } } @@ -5027,6 +5029,9 @@ int intel_plane_atomic_calc_changes(const struct intel_crtc_state *old_crtc_stat needs_scaling(new_plane_state)))) new_crtc_state->disable_lp_wm = true; + if (new_crtc_state->uapi.async_flip && plane->async_flip) + new_plane_state->do_async_flip = true; + return 0; } diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 41e3dd25a78f..6b107872ad39 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -634,6 +634,9 @@ struct intel_plane_state { struct intel_fb_view view; + /* Indicates if async flip is required */ + bool do_async_flip; + /* Plane pxp decryption state */ bool decrypt; -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state 2022-01-21 8:06 ` [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state Stanislav Lisovskiy @ 2022-01-21 11:48 ` Ville Syrjälä 0 siblings, 0 replies; 21+ messages in thread From: Ville Syrjälä @ 2022-01-21 11:48 UTC (permalink / raw) To: Stanislav Lisovskiy; +Cc: intel-gfx On Fri, Jan 21, 2022 at 10:06:13AM +0200, Stanislav Lisovskiy wrote: > There might be various logical contructs when we might want > to enable async flip, so lets calculate those and set this > flag, so that there is no need in long conditions in other > places. > > v2: - Set do_async_flip flag to False, if no async flip needed. > Lets not rely that it will be 0-initialized, but set > explicitly, so that the logic is clear as well. > > v3: - Clear do_async_flip in intel_plane_duplicate_state(Ville Syrjälä) > - Check with do_async_flip also when calling > intel_crtc_{enable,disable}_flip_done(Ville Syrjälä) > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/i915/display/intel_atomic_plane.c | 3 ++- > drivers/gpu/drm/i915/display/intel_display.c | 9 +++++++-- > drivers/gpu/drm/i915/display/intel_display_types.h | 3 +++ > 3 files changed, 12 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c > index d1344e9c06de..9d79ab987b2e 100644 > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c > @@ -109,6 +109,7 @@ intel_plane_duplicate_state(struct drm_plane *plane) > intel_state->ggtt_vma = NULL; > intel_state->dpt_vma = NULL; > intel_state->flags = 0; > + intel_state->do_async_flip = false; > > /* add reference to fb */ > if (intel_state->hw.fb) > @@ -491,7 +492,7 @@ void intel_plane_update_arm(struct intel_plane *plane, > > trace_intel_plane_update_arm(&plane->base, crtc); > > - if (crtc_state->uapi.async_flip && plane->async_flip) > + if (plane_state->do_async_flip) > plane->async_flip(plane, crtc_state, plane_state, true); > else > plane->update_arm(plane, crtc_state, plane_state); > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index 55cd453c4ce5..9996daa036a0 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -1369,7 +1369,8 @@ static void intel_crtc_enable_flip_done(struct intel_atomic_state *state, > for_each_new_intel_plane_in_state(state, plane, plane_state, i) { > if (plane->enable_flip_done && > plane->pipe == crtc->pipe && > - update_planes & BIT(plane->id)) > + update_planes & BIT(plane->id) && > + plane_state->do_async_flip) > plane->enable_flip_done(plane); > } > } > @@ -1387,7 +1388,8 @@ static void intel_crtc_disable_flip_done(struct intel_atomic_state *state, > for_each_new_intel_plane_in_state(state, plane, plane_state, i) { > if (plane->disable_flip_done && > plane->pipe == crtc->pipe && > - update_planes & BIT(plane->id)) > + update_planes & BIT(plane->id) && > + plane_state->do_async_flip) > plane->disable_flip_done(plane); > } > } > @@ -5027,6 +5029,9 @@ int intel_plane_atomic_calc_changes(const struct intel_crtc_state *old_crtc_stat > needs_scaling(new_plane_state)))) > new_crtc_state->disable_lp_wm = true; > > + if (new_crtc_state->uapi.async_flip && plane->async_flip) > + new_plane_state->do_async_flip = true; > + > return 0; > } > > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h > index 41e3dd25a78f..6b107872ad39 100644 > --- a/drivers/gpu/drm/i915/display/intel_display_types.h > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h > @@ -634,6 +634,9 @@ struct intel_plane_state { > > struct intel_fb_view view; > > + /* Indicates if async flip is required */ > + bool do_async_flip; > + > /* Plane pxp decryption state */ > bool decrypt; > > -- > 2.24.1.485.gad05a3d8e5 -- Ville Syrjälä Intel ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 3/4] drm/i915: Use wm0 only during async flips for DG2 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy 2022-01-21 8:06 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy 2022-01-21 8:06 ` [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state Stanislav Lisovskiy @ 2022-01-21 8:06 ` Stanislav Lisovskiy 2022-01-21 11:59 ` Ville Syrjälä 2022-01-21 8:06 ` [Intel-gfx] [PATCH 4/4] drm/i915: Don't allocate extra ddb during async flip " Stanislav Lisovskiy ` (5 subsequent siblings) 8 siblings, 1 reply; 21+ messages in thread From: Stanislav Lisovskiy @ 2022-01-21 8:06 UTC (permalink / raw) To: intel-gfx This optimization allows to achieve higher perfomance during async flips. For the first async flip we have to still temporarily switch to sync flip, in order to reprogram plane watermarks, so this requires taking into account old plane state's do_async_flip flag. v2: - Removed redundant new_plane_state->do_async_flip check from needs_async_flip_wm_override condition (Ville Syrjälä) - Extract dg2_async_flip_optimization to separate function(Ville Syrjälä) - Check for plane->async_flip instead of plane_id (Ville Syrjälä) v3: - Rename "needs_async_flip_wm_override" to "intel_plane_do_async_flip" and move all the required checks there (Ville Syrjälä) - Rename "dg2_async_flip_optimization" to "use_minimal_wm0_only" (Ville Syrjälä) Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> --- drivers/gpu/drm/i915/display/intel_display.c | 24 +++++++++++++++++++- drivers/gpu/drm/i915/intel_pm.c | 12 +++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 9996daa036a0..3b86ede01b57 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -4910,6 +4910,28 @@ static bool needs_scaling(const struct intel_plane_state *state) return (src_w != dst_w || src_h != dst_h); } +static bool intel_plane_do_async_flip(struct intel_plane *plane, + const struct intel_crtc_state *new_crtc_state, + const struct intel_crtc_state *old_crtc_state) +{ + struct drm_i915_private *i915 = to_i915(new_crtc_state->uapi.crtc->dev); + + if (!plane->async_flip) + return false; + + if (!new_crtc_state->uapi.async_flip) + return false; + + /* + * In platforms after DISPLAY13, we might need to override + * first async flip in order to change watermark levels + * as part of optimization. + * So for those, we are checking if this is a first async flip. + * For platforms earlier than DISPLAY13 we always do async flip. + */ + return DISPLAY_VER(i915) < 13 || old_crtc_state->uapi.async_flip; +} + int intel_plane_atomic_calc_changes(const struct intel_crtc_state *old_crtc_state, struct intel_crtc_state *new_crtc_state, const struct intel_plane_state *old_plane_state, @@ -5029,7 +5051,7 @@ int intel_plane_atomic_calc_changes(const struct intel_crtc_state *old_crtc_stat needs_scaling(new_plane_state)))) new_crtc_state->disable_lp_wm = true; - if (new_crtc_state->uapi.async_flip && plane->async_flip) + if (intel_plane_do_async_flip(plane, new_crtc_state, old_crtc_state)) new_plane_state->do_async_flip = true; return 0; diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 35d0bd8c6e57..5fb022a2a4d7 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5510,6 +5510,15 @@ static int skl_wm_max_lines(struct drm_i915_private *dev_priv) return 31; } +static bool use_minimal_wm0_only(struct drm_i915_private *i915, + const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane) +{ + return DISPLAY_VER(i915) >= 13 && + crtc_state->uapi.async_flip && + plane->async_flip; +} + static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, const struct intel_plane *plane, int level, @@ -5523,7 +5532,8 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, uint_fixed_16_16_t selected_result; u32 blocks, lines, min_ddb_alloc = 0; - if (latency == 0) { + if (latency == 0 || + (use_minimal_wm0_only(dev_priv, crtc_state, plane) && level > 0)) { /* reject it */ result->min_ddb_alloc = U16_MAX; return; -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH 3/4] drm/i915: Use wm0 only during async flips for DG2 2022-01-21 8:06 ` [Intel-gfx] [PATCH 3/4] drm/i915: Use wm0 only during async flips for DG2 Stanislav Lisovskiy @ 2022-01-21 11:59 ` Ville Syrjälä 0 siblings, 0 replies; 21+ messages in thread From: Ville Syrjälä @ 2022-01-21 11:59 UTC (permalink / raw) To: Stanislav Lisovskiy; +Cc: intel-gfx On Fri, Jan 21, 2022 at 10:06:14AM +0200, Stanislav Lisovskiy wrote: > This optimization allows to achieve higher perfomance > during async flips. > For the first async flip we have to still temporarily > switch to sync flip, in order to reprogram plane > watermarks, so this requires taking into account > old plane state's do_async_flip flag. > > v2: - Removed redundant new_plane_state->do_async_flip > check from needs_async_flip_wm_override condition > (Ville Syrjälä) > - Extract dg2_async_flip_optimization to separate > function(Ville Syrjälä) > - Check for plane->async_flip instead of plane_id > (Ville Syrjälä) > > v3: - Rename "needs_async_flip_wm_override" to > "intel_plane_do_async_flip" and move all the required > checks there (Ville Syrjälä) > - Rename "dg2_async_flip_optimization" to > "use_minimal_wm0_only" (Ville Syrjälä) > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > --- > drivers/gpu/drm/i915/display/intel_display.c | 24 +++++++++++++++++++- > drivers/gpu/drm/i915/intel_pm.c | 12 +++++++++- > 2 files changed, 34 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index 9996daa036a0..3b86ede01b57 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -4910,6 +4910,28 @@ static bool needs_scaling(const struct intel_plane_state *state) > return (src_w != dst_w || src_h != dst_h); > } > > +static bool intel_plane_do_async_flip(struct intel_plane *plane, > + const struct intel_crtc_state *new_crtc_state, > + const struct intel_crtc_state *old_crtc_state) I think typically we put the old state before the new state. Sadly the compiler can't help us with these so we should try to be consistent to avoid accidental mishaps. > +{ > + struct drm_i915_private *i915 = to_i915(new_crtc_state->uapi.crtc->dev); Would be a bit shorter to grab this from plane->base.dev > + > + if (!plane->async_flip) > + return false; > + > + if (!new_crtc_state->uapi.async_flip) > + return false; > + > + /* > + * In platforms after DISPLAY13, we might need to override > + * first async flip in order to change watermark levels > + * as part of optimization. > + * So for those, we are checking if this is a first async flip. > + * For platforms earlier than DISPLAY13 we always do async flip. > + */ > + return DISPLAY_VER(i915) < 13 || old_crtc_state->uapi.async_flip; > +} > + > int intel_plane_atomic_calc_changes(const struct intel_crtc_state *old_crtc_state, > struct intel_crtc_state *new_crtc_state, > const struct intel_plane_state *old_plane_state, > @@ -5029,7 +5051,7 @@ int intel_plane_atomic_calc_changes(const struct intel_crtc_state *old_crtc_stat > needs_scaling(new_plane_state)))) > new_crtc_state->disable_lp_wm = true; > > - if (new_crtc_state->uapi.async_flip && plane->async_flip) > + if (intel_plane_do_async_flip(plane, new_crtc_state, old_crtc_state)) > new_plane_state->do_async_flip = true; > > return 0; > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 35d0bd8c6e57..5fb022a2a4d7 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -5510,6 +5510,15 @@ static int skl_wm_max_lines(struct drm_i915_private *dev_priv) > return 31; > } > > +static bool use_minimal_wm0_only(struct drm_i915_private *i915, We can dig out 'i915' from eg. the plane, so no need for the caller to pass it in. > + const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane) > +{ Atypical 'const' still on the plane pointer here. Apart from those lgtm Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > + return DISPLAY_VER(i915) >= 13 && > + crtc_state->uapi.async_flip && > + plane->async_flip; > +} > + > static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > const struct intel_plane *plane, > int level, > @@ -5523,7 +5532,8 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > uint_fixed_16_16_t selected_result; > u32 blocks, lines, min_ddb_alloc = 0; > > - if (latency == 0) { > + if (latency == 0 || > + (use_minimal_wm0_only(dev_priv, crtc_state, plane) && level > 0)) { > /* reject it */ > result->min_ddb_alloc = U16_MAX; > return; > -- > 2.24.1.485.gad05a3d8e5 -- Ville Syrjälä Intel ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 4/4] drm/i915: Don't allocate extra ddb during async flip for DG2 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy ` (2 preceding siblings ...) 2022-01-21 8:06 ` [Intel-gfx] [PATCH 3/4] drm/i915: Use wm0 only during async flips for DG2 Stanislav Lisovskiy @ 2022-01-21 8:06 ` Stanislav Lisovskiy 2022-01-21 12:06 ` Ville Syrjälä 2022-01-21 8:26 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Async flip optimization for DG2 (rev3) Patchwork ` (4 subsequent siblings) 8 siblings, 1 reply; 21+ messages in thread From: Stanislav Lisovskiy @ 2022-01-21 8:06 UTC (permalink / raw) To: intel-gfx In terms of async flip optimization we don't to allocate extra ddb space, so lets skip it. v2: - Extracted min ddb async flip check to separate function (Ville Syrjälä) - Used this function to prevent false positive WARN to be triggered(Ville Syrjälä) v3: - Renamed dg2_need_min_ddb to need_min_ddb thus making it more universal. - Also used DISPLAY_VER instead of IS_DG2(Ville Syrjälä) - Use rate = 0 instead of just setting extra = 0, thus letting other planes to use extra ddb and avoiding WARN (Ville Syrjälä) Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> --- drivers/gpu/drm/i915/intel_pm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 5fb022a2a4d7..18fb35c480ef 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5118,6 +5118,12 @@ static bool icl_need_wm1_wa(struct drm_i915_private *i915, (IS_DISPLAY_VER(i915, 12, 13) && plane_id == PLANE_CURSOR); } +static bool needs_min_ddb(struct drm_i915_private *i915, + struct intel_crtc_state *crtc_state) +{ + return DISPLAY_VER(i915) >= 13 && crtc_state->uapi.async_flip; +} + static int skl_allocate_plane_ddb(struct intel_atomic_state *state, struct intel_crtc *crtc) @@ -5225,9 +5231,14 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, break; rate = crtc_state->plane_data_rate[plane_id]; + + if (needs_min_ddb(dev_priv, crtc_state)) + rate = 0; + extra = min_t(u16, alloc_size, DIV64_U64_ROUND_UP(alloc_size * rate, total_data_rate)); + total[plane_id] = wm->wm[level].min_ddb_alloc + extra; alloc_size -= extra; total_data_rate -= rate; @@ -5236,13 +5247,19 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, break; rate = crtc_state->uv_plane_data_rate[plane_id]; + + if (needs_min_ddb(dev_priv, crtc_state)) + rate = 0; + extra = min_t(u16, alloc_size, DIV64_U64_ROUND_UP(alloc_size * rate, total_data_rate)); + uv_total[plane_id] = wm->uv_wm[level].min_ddb_alloc + extra; alloc_size -= extra; total_data_rate -= rate; } + drm_WARN_ON(&dev_priv->drm, alloc_size != 0 || total_data_rate != 0); /* Set the actual DDB start/end points for each plane */ -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH 4/4] drm/i915: Don't allocate extra ddb during async flip for DG2 2022-01-21 8:06 ` [Intel-gfx] [PATCH 4/4] drm/i915: Don't allocate extra ddb during async flip " Stanislav Lisovskiy @ 2022-01-21 12:06 ` Ville Syrjälä 2022-01-23 20:34 ` Lisovskiy, Stanislav 0 siblings, 1 reply; 21+ messages in thread From: Ville Syrjälä @ 2022-01-21 12:06 UTC (permalink / raw) To: Stanislav Lisovskiy; +Cc: intel-gfx On Fri, Jan 21, 2022 at 10:06:15AM +0200, Stanislav Lisovskiy wrote: > In terms of async flip optimization we don't to allocate > extra ddb space, so lets skip it. > > v2: - Extracted min ddb async flip check to separate function > (Ville Syrjälä) > - Used this function to prevent false positive WARN > to be triggered(Ville Syrjälä) > > v3: - Renamed dg2_need_min_ddb to need_min_ddb thus making > it more universal. > - Also used DISPLAY_VER instead of IS_DG2(Ville Syrjälä) > - Use rate = 0 instead of just setting extra = 0, thus > letting other planes to use extra ddb and avoiding WARN > (Ville Syrjälä) > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > --- > drivers/gpu/drm/i915/intel_pm.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 5fb022a2a4d7..18fb35c480ef 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -5118,6 +5118,12 @@ static bool icl_need_wm1_wa(struct drm_i915_private *i915, > (IS_DISPLAY_VER(i915, 12, 13) && plane_id == PLANE_CURSOR); > } > > +static bool needs_min_ddb(struct drm_i915_private *i915, > + struct intel_crtc_state *crtc_state) s/needs/use/ to match the wm0 counterpart? Could use a comment as well perhaps, or maybe just put this right next to the wm0 counterpart so the reader can see both together and make the connection. Hmm. Actually I think this would also need the plane->async_flip check here too or else we'll drop all the planes to min ddb instead of just the plane doing async flips. Oh, and I think we need this same thing when calculating the total_data_rate or else the numbers won't match. > +{ > + return DISPLAY_VER(i915) >= 13 && crtc_state->uapi.async_flip; > +} > + > static int > skl_allocate_plane_ddb(struct intel_atomic_state *state, > struct intel_crtc *crtc) > @@ -5225,9 +5231,14 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, > break; > > rate = crtc_state->plane_data_rate[plane_id]; > + > + if (needs_min_ddb(dev_priv, crtc_state)) > + rate = 0; > + > extra = min_t(u16, alloc_size, > DIV64_U64_ROUND_UP(alloc_size * rate, > total_data_rate)); > + > total[plane_id] = wm->wm[level].min_ddb_alloc + extra; > alloc_size -= extra; > total_data_rate -= rate; > @@ -5236,13 +5247,19 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, > break; > > rate = crtc_state->uv_plane_data_rate[plane_id]; > + > + if (needs_min_ddb(dev_priv, crtc_state)) > + rate = 0; > + > extra = min_t(u16, alloc_size, > DIV64_U64_ROUND_UP(alloc_size * rate, > total_data_rate)); > + > uv_total[plane_id] = wm->uv_wm[level].min_ddb_alloc + extra; > alloc_size -= extra; > total_data_rate -= rate; > } > + > drm_WARN_ON(&dev_priv->drm, alloc_size != 0 || total_data_rate != 0); > > /* Set the actual DDB start/end points for each plane */ > -- > 2.24.1.485.gad05a3d8e5 -- Ville Syrjälä Intel ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH 4/4] drm/i915: Don't allocate extra ddb during async flip for DG2 2022-01-21 12:06 ` Ville Syrjälä @ 2022-01-23 20:34 ` Lisovskiy, Stanislav 2022-01-24 7:42 ` Ville Syrjälä 0 siblings, 1 reply; 21+ messages in thread From: Lisovskiy, Stanislav @ 2022-01-23 20:34 UTC (permalink / raw) To: Ville Syrjälä; +Cc: intel-gfx On Fri, Jan 21, 2022 at 02:06:12PM +0200, Ville Syrjälä wrote: > On Fri, Jan 21, 2022 at 10:06:15AM +0200, Stanislav Lisovskiy wrote: > > In terms of async flip optimization we don't to allocate > > extra ddb space, so lets skip it. > > > > v2: - Extracted min ddb async flip check to separate function > > (Ville Syrjälä) > > - Used this function to prevent false positive WARN > > to be triggered(Ville Syrjälä) > > > > v3: - Renamed dg2_need_min_ddb to need_min_ddb thus making > > it more universal. > > - Also used DISPLAY_VER instead of IS_DG2(Ville Syrjälä) > > - Use rate = 0 instead of just setting extra = 0, thus > > letting other planes to use extra ddb and avoiding WARN > > (Ville Syrjälä) > > > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > > --- > > drivers/gpu/drm/i915/intel_pm.c | 17 +++++++++++++++++ > > 1 file changed, 17 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > > index 5fb022a2a4d7..18fb35c480ef 100644 > > --- a/drivers/gpu/drm/i915/intel_pm.c > > +++ b/drivers/gpu/drm/i915/intel_pm.c > > @@ -5118,6 +5118,12 @@ static bool icl_need_wm1_wa(struct drm_i915_private *i915, > > (IS_DISPLAY_VER(i915, 12, 13) && plane_id == PLANE_CURSOR); > > } > > > > +static bool needs_min_ddb(struct drm_i915_private *i915, > > + struct intel_crtc_state *crtc_state) > > s/needs/use/ to match the wm0 counterpart? > > Could use a comment as well perhaps, or maybe just put this right > next to the wm0 counterpart so the reader can see both together and > make the connection. > > Hmm. Actually I think this would also need the plane->async_flip > check here too or else we'll drop all the planes to min ddb > instead of just the plane doing async flips. > > Oh, and I think we need this same thing when calculating the > total_data_rate or else the numbers won't match. Yes, there seems to be a problem with that approach, we use ratio from data plane_data_rate/total_data_rate to determine how we split extra ddb blocks, however if plane data rate can be just set as 0 here localle, total_data_rate is obtained from crtc_state->plane_data_rate, which is being calculated first. So if we trick icl_get_total_relative_data_rate function to calculate total_data_rate corresponding to rate = 0, we will then have crtc_state->plane_data_rate[plane_id] set to 0, which is probably not what we want. Or should I just edit icl_get_total_relative_data_rate so that it still calculates crtc_state->plane_data_rate properly however, the doesn't add those to total_data_rate, if use_min_ddb(plane) is set? Stan > > > +{ > > + return DISPLAY_VER(i915) >= 13 && crtc_state->uapi.async_flip; > > +} > > + > > static int > > skl_allocate_plane_ddb(struct intel_atomic_state *state, > > struct intel_crtc *crtc) > > @@ -5225,9 +5231,14 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, > > break; > > > > rate = crtc_state->plane_data_rate[plane_id]; > > + > > + if (needs_min_ddb(dev_priv, crtc_state)) > > + rate = 0; > > + > > extra = min_t(u16, alloc_size, > > DIV64_U64_ROUND_UP(alloc_size * rate, > > total_data_rate)); > > + > > total[plane_id] = wm->wm[level].min_ddb_alloc + extra; > > alloc_size -= extra; > > total_data_rate -= rate; > > @@ -5236,13 +5247,19 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, > > break; > > > > rate = crtc_state->uv_plane_data_rate[plane_id]; > > + > > + if (needs_min_ddb(dev_priv, crtc_state)) > > + rate = 0; > > + > > extra = min_t(u16, alloc_size, > > DIV64_U64_ROUND_UP(alloc_size * rate, > > total_data_rate)); > > + > > uv_total[plane_id] = wm->uv_wm[level].min_ddb_alloc + extra; > > alloc_size -= extra; > > total_data_rate -= rate; > > } > > + > > drm_WARN_ON(&dev_priv->drm, alloc_size != 0 || total_data_rate != 0); > > > > /* Set the actual DDB start/end points for each plane */ > > -- > > 2.24.1.485.gad05a3d8e5 > > -- > Ville Syrjälä > Intel ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH 4/4] drm/i915: Don't allocate extra ddb during async flip for DG2 2022-01-23 20:34 ` Lisovskiy, Stanislav @ 2022-01-24 7:42 ` Ville Syrjälä 0 siblings, 0 replies; 21+ messages in thread From: Ville Syrjälä @ 2022-01-24 7:42 UTC (permalink / raw) To: Lisovskiy, Stanislav; +Cc: intel-gfx On Sun, Jan 23, 2022 at 10:34:17PM +0200, Lisovskiy, Stanislav wrote: > On Fri, Jan 21, 2022 at 02:06:12PM +0200, Ville Syrjälä wrote: > > On Fri, Jan 21, 2022 at 10:06:15AM +0200, Stanislav Lisovskiy wrote: > > > In terms of async flip optimization we don't to allocate > > > extra ddb space, so lets skip it. > > > > > > v2: - Extracted min ddb async flip check to separate function > > > (Ville Syrjälä) > > > - Used this function to prevent false positive WARN > > > to be triggered(Ville Syrjälä) > > > > > > v3: - Renamed dg2_need_min_ddb to need_min_ddb thus making > > > it more universal. > > > - Also used DISPLAY_VER instead of IS_DG2(Ville Syrjälä) > > > - Use rate = 0 instead of just setting extra = 0, thus > > > letting other planes to use extra ddb and avoiding WARN > > > (Ville Syrjälä) > > > > > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > > > --- > > > drivers/gpu/drm/i915/intel_pm.c | 17 +++++++++++++++++ > > > 1 file changed, 17 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > > > index 5fb022a2a4d7..18fb35c480ef 100644 > > > --- a/drivers/gpu/drm/i915/intel_pm.c > > > +++ b/drivers/gpu/drm/i915/intel_pm.c > > > @@ -5118,6 +5118,12 @@ static bool icl_need_wm1_wa(struct drm_i915_private *i915, > > > (IS_DISPLAY_VER(i915, 12, 13) && plane_id == PLANE_CURSOR); > > > } > > > > > > +static bool needs_min_ddb(struct drm_i915_private *i915, > > > + struct intel_crtc_state *crtc_state) > > > > s/needs/use/ to match the wm0 counterpart? > > > > Could use a comment as well perhaps, or maybe just put this right > > next to the wm0 counterpart so the reader can see both together and > > make the connection. > > > > Hmm. Actually I think this would also need the plane->async_flip > > check here too or else we'll drop all the planes to min ddb > > instead of just the plane doing async flips. > > > > Oh, and I think we need this same thing when calculating the > > total_data_rate or else the numbers won't match. > > Yes, there seems to be a problem with that approach, we use ratio > from data plane_data_rate/total_data_rate to determine how we split > extra ddb blocks, however if plane data rate can be just set as 0 > here localle, total_data_rate is obtained from crtc_state->plane_data_rate, > which is being calculated first. > So if we trick icl_get_total_relative_data_rate function to calculate > total_data_rate corresponding to rate = 0, we will then have > crtc_state->plane_data_rate[plane_id] set to 0, which is probably > not what we want. These are just the relative data rates so they're not actually used for anything else. So I guess we could even set them to 0. Though I don't even recall if the current code really works or not. I think there might have been some problem with calculating these that I perhaps fixed with my latest ddb series (or maybe I already fixed it with some earlier series, can't remember anymore). > > Or should I just edit icl_get_total_relative_data_rate so that it > still calculates crtc_state->plane_data_rate properly however, the > doesn't add those to total_data_rate, if use_min_ddb(plane) is set? This should work too. Can't immediately think why one approach would be strictly better than the other. -- Ville Syrjälä Intel ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Async flip optimization for DG2 (rev3) 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy ` (3 preceding siblings ...) 2022-01-21 8:06 ` [Intel-gfx] [PATCH 4/4] drm/i915: Don't allocate extra ddb during async flip " Stanislav Lisovskiy @ 2022-01-21 8:26 ` Patchwork 2022-01-21 8:52 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork ` (3 subsequent siblings) 8 siblings, 0 replies; 21+ messages in thread From: Patchwork @ 2022-01-21 8:26 UTC (permalink / raw) To: Stanislav Lisovskiy; +Cc: intel-gfx == Series Details == Series: Async flip optimization for DG2 (rev3) URL : https://patchwork.freedesktop.org/series/98981/ State : warning == Summary == $ dim checkpatch origin/drm-tip c096e57d2e26 drm/i915: Pass plane to watermark calculation functions 5b3c6244957a drm/i915: Introduce do_async_flip flag to intel_plane_state 673ea1a0d880 drm/i915: Use wm0 only during async flips for DG2 -:9: WARNING:TYPO_SPELLING: 'perfomance' may be misspelled - perhaps 'performance'? #9: This optimization allows to achieve higher perfomance ^^^^^^^^^^ total: 0 errors, 1 warnings, 0 checks, 60 lines checked 3bdabf9d5e5b drm/i915: Don't allocate extra ddb during async flip for DG2 ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BAT: failure for Async flip optimization for DG2 (rev3) 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy ` (4 preceding siblings ...) 2022-01-21 8:26 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Async flip optimization for DG2 (rev3) Patchwork @ 2022-01-21 8:52 ` Patchwork 2022-01-21 11:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Async flip optimization for DG2 (rev4) Patchwork ` (2 subsequent siblings) 8 siblings, 0 replies; 21+ messages in thread From: Patchwork @ 2022-01-21 8:52 UTC (permalink / raw) To: Stanislav Lisovskiy; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 8339 bytes --] == Series Details == Series: Async flip optimization for DG2 (rev3) URL : https://patchwork.freedesktop.org/series/98981/ State : failure == Summary == CI Bug Log - changes from CI_DRM_11115 -> Patchwork_22052 ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with Patchwork_22052 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_22052, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/index.html Participating hosts (45 -> 42) ------------------------------ Additional (3): bat-jsl-2 fi-icl-u2 bat-adlp-4 Missing (6): fi-kbl-soraka shard-tglu fi-bsw-cyan shard-rkl shard-dg1 fi-bdw-samus Possible new issues ------------------- Here are the unknown changes that may have been introduced in Patchwork_22052: ### IGT changes ### #### Possible regressions #### * igt@kms_addfb_basic@addfb25-framebuffer-vs-set-tiling: - bat-adlp-4: NOTRUN -> [DMESG-WARN][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/bat-adlp-4/igt@kms_addfb_basic@addfb25-framebuffer-vs-set-tiling.html Known issues ------------ Here are the changes found in Patchwork_22052 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@amdgpu/amd_cs_nop@fork-gfx0: - fi-icl-u2: NOTRUN -> [SKIP][2] ([fdo#109315]) +17 similar issues [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-icl-u2/igt@amdgpu/amd_cs_nop@fork-gfx0.html * igt@amdgpu/amd_cs_nop@sync-fork-compute0: - fi-snb-2600: NOTRUN -> [SKIP][3] ([fdo#109271]) +17 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-snb-2600/igt@amdgpu/amd_cs_nop@sync-fork-compute0.html * igt@gem_huc_copy@huc-copy: - fi-icl-u2: NOTRUN -> [SKIP][4] ([i915#2190]) [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-icl-u2/igt@gem_huc_copy@huc-copy.html * igt@gem_lmem_swapping@basic: - bat-adlp-4: NOTRUN -> [SKIP][5] ([i915#4613]) +3 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/bat-adlp-4/igt@gem_lmem_swapping@basic.html * igt@gem_lmem_swapping@parallel-random-engines: - fi-icl-u2: NOTRUN -> [SKIP][6] ([i915#4613]) +3 similar issues [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-icl-u2/igt@gem_lmem_swapping@parallel-random-engines.html * igt@gem_tiled_pread_basic: - bat-adlp-4: NOTRUN -> [SKIP][7] ([i915#3282]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/bat-adlp-4/igt@gem_tiled_pread_basic.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-icl-u2: NOTRUN -> [SKIP][8] ([fdo#111827]) +8 similar issues [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic: - fi-icl-u2: NOTRUN -> [SKIP][9] ([fdo#109278]) +2 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html * igt@kms_force_connector_basic@force-load-detect: - fi-icl-u2: NOTRUN -> [SKIP][10] ([fdo#109285]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-icl-u2/igt@kms_force_connector_basic@force-load-detect.html * igt@kms_psr@primary_page_flip: - fi-skl-6600u: [PASS][11] -> [FAIL][12] ([i915#4547]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11115/fi-skl-6600u/igt@kms_psr@primary_page_flip.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-skl-6600u/igt@kms_psr@primary_page_flip.html * igt@prime_vgem@basic-userptr: - fi-icl-u2: NOTRUN -> [SKIP][13] ([i915#3301]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-icl-u2/igt@prime_vgem@basic-userptr.html * igt@runner@aborted: - bat-adlp-4: NOTRUN -> [FAIL][14] ([i915#4312]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/bat-adlp-4/igt@runner@aborted.html - fi-skl-6600u: NOTRUN -> [FAIL][15] ([i915#4312]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-skl-6600u/igt@runner@aborted.html - fi-bdw-5557u: NOTRUN -> [FAIL][16] ([i915#2426] / [i915#4312]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-bdw-5557u/igt@runner@aborted.html #### Possible fixes #### * igt@gem_exec_suspend@basic-s0@smem: - fi-tgl-1115g4: [FAIL][17] ([i915#1888]) -> [PASS][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11115/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s0@smem.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s0@smem.html * igt@i915_selftest@live@hangcheck: - bat-dg1-6: [DMESG-FAIL][19] ([i915#4494]) -> [PASS][20] [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11115/bat-dg1-6/igt@i915_selftest@live@hangcheck.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/bat-dg1-6/igt@i915_selftest@live@hangcheck.html - fi-snb-2600: [INCOMPLETE][21] ([i915#3921]) -> [PASS][22] [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11115/fi-snb-2600/igt@i915_selftest@live@hangcheck.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-snb-2600/igt@i915_selftest@live@hangcheck.html * igt@kms_frontbuffer_tracking@basic: - fi-cml-u2: [DMESG-WARN][23] ([i915#4269]) -> [PASS][24] [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11115/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827 [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888 [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982 [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190 [i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426 [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282 [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301 [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921 [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103 [i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269 [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312 [i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494 [i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547 [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613 [i915#4897]: https://gitlab.freedesktop.org/drm/intel/issues/4897 [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533 Build changes ------------- * Linux: CI_DRM_11115 -> Patchwork_22052 CI-20190529: 20190529 CI_DRM_11115: 4e12213687264ffccb45d72fe638f94d3ca666bd @ git://anongit.freedesktop.org/gfx-ci/linux IGT_6329: 38f656fdd61119105ecfa2c4dac157cd7dcad204 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Patchwork_22052: 3bdabf9d5e5bec9430ef526f5e11b170d7401238 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 3bdabf9d5e5b drm/i915: Don't allocate extra ddb during async flip for DG2 673ea1a0d880 drm/i915: Use wm0 only during async flips for DG2 5b3c6244957a drm/i915: Introduce do_async_flip flag to intel_plane_state c096e57d2e26 drm/i915: Pass plane to watermark calculation functions == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22052/index.html [-- Attachment #2: Type: text/html, Size: 9370 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Async flip optimization for DG2 (rev4) 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy ` (5 preceding siblings ...) 2022-01-21 8:52 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork @ 2022-01-21 11:10 ` Patchwork 2022-01-21 11:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2022-01-21 13:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork 8 siblings, 0 replies; 21+ messages in thread From: Patchwork @ 2022-01-21 11:10 UTC (permalink / raw) To: Lisovskiy, Stanislav; +Cc: intel-gfx == Series Details == Series: Async flip optimization for DG2 (rev4) URL : https://patchwork.freedesktop.org/series/98981/ State : warning == Summary == $ dim checkpatch origin/drm-tip a21feb89e84d drm/i915: Pass plane to watermark calculation functions 3328aa934fa7 drm/i915: Introduce do_async_flip flag to intel_plane_state 8a01e4903796 drm/i915: Use wm0 only during async flips for DG2 -:9: WARNING:TYPO_SPELLING: 'perfomance' may be misspelled - perhaps 'performance'? #9: This optimization allows to achieve higher perfomance ^^^^^^^^^^ total: 0 errors, 1 warnings, 0 checks, 60 lines checked 57d60bca103b drm/i915: Don't allocate extra ddb during async flip for DG2 ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for Async flip optimization for DG2 (rev4) 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy ` (6 preceding siblings ...) 2022-01-21 11:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Async flip optimization for DG2 (rev4) Patchwork @ 2022-01-21 11:41 ` Patchwork 2022-01-21 13:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork 8 siblings, 0 replies; 21+ messages in thread From: Patchwork @ 2022-01-21 11:41 UTC (permalink / raw) To: Lisovskiy, Stanislav; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 2820 bytes --] == Series Details == Series: Async flip optimization for DG2 (rev4) URL : https://patchwork.freedesktop.org/series/98981/ State : success == Summary == CI Bug Log - changes from CI_DRM_11117 -> Patchwork_22054 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/index.html Participating hosts (46 -> 35) ------------------------------ Missing (11): fi-ilk-m540 bat-dg1-6 fi-hsw-4200u fi-icl-u2 fi-bsw-cyan bat-adlp-6 bat-adlp-4 fi-ctg-p8600 fi-bdw-samus bat-jsl-2 bat-jsl-1 Known issues ------------ Here are the changes found in Patchwork_22054 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_exec_suspend@basic-s3@smem: - fi-bdw-5557u: [PASS][1] -> [INCOMPLETE][2] ([i915#146]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/fi-bdw-5557u/igt@gem_exec_suspend@basic-s3@smem.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/fi-bdw-5557u/igt@gem_exec_suspend@basic-s3@smem.html * igt@i915_selftest@live@hangcheck: - fi-hsw-4770: [PASS][3] -> [INCOMPLETE][4] ([i915#3303]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html * igt@runner@aborted: - fi-hsw-4770: NOTRUN -> [FAIL][5] ([fdo#109271] / [i915#1436] / [i915#4312]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/fi-hsw-4770/igt@runner@aborted.html [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436 [i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146 [i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303 [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312 Build changes ------------- * Linux: CI_DRM_11117 -> Patchwork_22054 CI-20190529: 20190529 CI_DRM_11117: 78a44103a76675b9916b8f0c1e9d1da370f2830f @ git://anongit.freedesktop.org/gfx-ci/linux IGT_6329: 38f656fdd61119105ecfa2c4dac157cd7dcad204 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Patchwork_22054: 57d60bca103b41d7c7469748a7c7d5feeb94e9b3 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 57d60bca103b drm/i915: Don't allocate extra ddb during async flip for DG2 8a01e4903796 drm/i915: Use wm0 only during async flips for DG2 3328aa934fa7 drm/i915: Introduce do_async_flip flag to intel_plane_state a21feb89e84d drm/i915: Pass plane to watermark calculation functions == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/index.html [-- Attachment #2: Type: text/html, Size: 3491 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] ✗ Fi.CI.IGT: failure for Async flip optimization for DG2 (rev4) 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy ` (7 preceding siblings ...) 2022-01-21 11:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork @ 2022-01-21 13:18 ` Patchwork 8 siblings, 0 replies; 21+ messages in thread From: Patchwork @ 2022-01-21 13:18 UTC (permalink / raw) To: Lisovskiy, Stanislav; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 30261 bytes --] == Series Details == Series: Async flip optimization for DG2 (rev4) URL : https://patchwork.freedesktop.org/series/98981/ State : failure == Summary == CI Bug Log - changes from CI_DRM_11117_full -> Patchwork_22054_full ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with Patchwork_22054_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_22054_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. Participating hosts (10 -> 10) ------------------------------ No changes in participating hosts Possible new issues ------------------- Here are the unknown changes that may have been introduced in Patchwork_22054_full: ### IGT changes ### #### Possible regressions #### * igt@sysfs_heartbeat_interval@mixed@vecs0: - shard-tglb: [PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-tglb1/igt@sysfs_heartbeat_interval@mixed@vecs0.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb3/igt@sysfs_heartbeat_interval@mixed@vecs0.html Known issues ------------ Here are the changes found in Patchwork_22054_full that come from known issues: ### CI changes ### #### Possible fixes #### * boot: - shard-glk: ([PASS][3], [PASS][4], [PASS][5], [FAIL][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], [PASS][20], [PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27]) ([i915#4392]) -> ([PASS][28], [PASS][29], [PASS][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], [PASS][49], [PASS][50], [PASS][51], [PASS][52]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk4/boot.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk4/boot.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk3/boot.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk3/boot.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk3/boot.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk3/boot.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk2/boot.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk2/boot.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk2/boot.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk1/boot.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk1/boot.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk1/boot.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk9/boot.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk9/boot.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk8/boot.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk8/boot.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk8/boot.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk7/boot.html [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk7/boot.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk6/boot.html [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk6/boot.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk5/boot.html [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk5/boot.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk5/boot.html [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk4/boot.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk9/boot.html [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk8/boot.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk8/boot.html [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk9/boot.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk9/boot.html [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk1/boot.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk1/boot.html [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk1/boot.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk2/boot.html [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk2/boot.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk2/boot.html [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk3/boot.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk3/boot.html [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk4/boot.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk4/boot.html [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk4/boot.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk5/boot.html [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk5/boot.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk6/boot.html [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk6/boot.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk6/boot.html [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk7/boot.html [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk7/boot.html [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk7/boot.html [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk8/boot.html ### IGT changes ### #### Issues hit #### * igt@gem_exec_balancer@parallel-contexts: - shard-iclb: [PASS][53] -> [SKIP][54] ([i915#4525]) [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-iclb4/igt@gem_exec_balancer@parallel-contexts.html [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-iclb8/igt@gem_exec_balancer@parallel-contexts.html * igt@gem_exec_endless@dispatch@vcs1: - shard-tglb: [PASS][55] -> [INCOMPLETE][56] ([i915#3778]) [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-tglb5/igt@gem_exec_endless@dispatch@vcs1.html [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb5/igt@gem_exec_endless@dispatch@vcs1.html * igt@gem_exec_fair@basic-deadline: - shard-glk: [PASS][57] -> [FAIL][58] ([i915#2846]) [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk3/igt@gem_exec_fair@basic-deadline.html [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk6/igt@gem_exec_fair@basic-deadline.html * igt@gem_exec_fair@basic-none-rrul@rcs0: - shard-glk: NOTRUN -> [FAIL][59] ([i915#2842]) [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk7/igt@gem_exec_fair@basic-none-rrul@rcs0.html * igt@gem_exec_fair@basic-none-share@rcs0: - shard-iclb: [PASS][60] -> [FAIL][61] ([i915#2842]) [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-iclb2/igt@gem_exec_fair@basic-none-share@rcs0.html [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-iclb3/igt@gem_exec_fair@basic-none-share@rcs0.html * igt@gem_exec_fair@basic-none-vip@rcs0: - shard-tglb: NOTRUN -> [FAIL][62] ([i915#2842]) [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@gem_exec_fair@basic-none-vip@rcs0.html * igt@gem_exec_fair@basic-none@vcs0: - shard-kbl: [PASS][63] -> [FAIL][64] ([i915#2842]) [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-kbl1/igt@gem_exec_fair@basic-none@vcs0.html [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl6/igt@gem_exec_fair@basic-none@vcs0.html * igt@gem_exec_fair@basic-none@vcs1: - shard-iclb: NOTRUN -> [FAIL][65] ([i915#2842]) [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-iclb2/igt@gem_exec_fair@basic-none@vcs1.html * igt@gem_exec_fair@basic-pace@rcs0: - shard-glk: [PASS][66] -> [FAIL][67] ([i915#2842]) [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk1/igt@gem_exec_fair@basic-pace@rcs0.html [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk7/igt@gem_exec_fair@basic-pace@rcs0.html * igt@gem_exec_params@no-blt: - shard-tglb: NOTRUN -> [SKIP][68] ([fdo#109283]) [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@gem_exec_params@no-blt.html * igt@gem_exec_suspend@basic-s3@smem: - shard-apl: NOTRUN -> [DMESG-WARN][69] ([i915#180]) [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl6/igt@gem_exec_suspend@basic-s3@smem.html * igt@gem_exec_whisper@basic-contexts: - shard-glk: [PASS][70] -> [DMESG-WARN][71] ([i915#118]) +2 similar issues [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk7/igt@gem_exec_whisper@basic-contexts.html [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk3/igt@gem_exec_whisper@basic-contexts.html * igt@gem_huc_copy@huc-copy: - shard-tglb: NOTRUN -> [SKIP][72] ([i915#2190]) [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@gem_huc_copy@huc-copy.html * igt@gem_lmem_swapping@heavy-random: - shard-kbl: NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#4613]) [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl7/igt@gem_lmem_swapping@heavy-random.html * igt@gem_lmem_swapping@parallel-random-engines: - shard-apl: NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#4613]) [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl1/igt@gem_lmem_swapping@parallel-random-engines.html * igt@gem_lmem_swapping@verify-random: - shard-skl: NOTRUN -> [SKIP][75] ([fdo#109271] / [i915#4613]) +1 similar issue [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@gem_lmem_swapping@verify-random.html * igt@gen9_exec_parse@bb-oversize: - shard-tglb: NOTRUN -> [SKIP][76] ([i915#2527] / [i915#2856]) [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@gen9_exec_parse@bb-oversize.html * igt@i915_pm_rpm@modeset-lpsp-stress: - shard-apl: NOTRUN -> [SKIP][77] ([fdo#109271]) +74 similar issues [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl6/igt@i915_pm_rpm@modeset-lpsp-stress.html * igt@i915_selftest@live@gt_lrc: - shard-tglb: NOTRUN -> [DMESG-FAIL][78] ([i915#2373]) [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@i915_selftest@live@gt_lrc.html * igt@i915_selftest@live@gt_pm: - shard-tglb: NOTRUN -> [DMESG-FAIL][79] ([i915#1759]) [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@i915_selftest@live@gt_pm.html * igt@i915_selftest@live@hangcheck: - shard-snb: [PASS][80] -> [INCOMPLETE][81] ([i915#3921]) [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-snb4/igt@i915_selftest@live@hangcheck.html [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-snb2/igt@i915_selftest@live@hangcheck.html * igt@i915_suspend@fence-restore-tiled2untiled: - shard-apl: [PASS][82] -> [DMESG-WARN][83] ([i915#180]) +1 similar issue [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-apl8/igt@i915_suspend@fence-restore-tiled2untiled.html [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl1/igt@i915_suspend@fence-restore-tiled2untiled.html * igt@i915_suspend@sysfs-reader: - shard-kbl: [PASS][84] -> [DMESG-WARN][85] ([i915#180]) +2 similar issues [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-kbl6/igt@i915_suspend@sysfs-reader.html [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl1/igt@i915_suspend@sysfs-reader.html * igt@kms_async_flips@alternate-sync-async-flip: - shard-tglb: [PASS][86] -> [FAIL][87] ([i915#2521]) [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-tglb6/igt@kms_async_flips@alternate-sync-async-flip.html [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb6/igt@kms_async_flips@alternate-sync-async-flip.html * igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip: - shard-skl: NOTRUN -> [FAIL][88] ([i915#3743]) +1 similar issue [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl10/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html * igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip: - shard-apl: NOTRUN -> [SKIP][89] ([fdo#109271] / [i915#3777]) [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl6/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip.html * igt@kms_big_fb@yf-tiled-addfb: - shard-tglb: NOTRUN -> [SKIP][90] ([fdo#111615]) +1 similar issue [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_big_fb@yf-tiled-addfb.html * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip: - shard-skl: NOTRUN -> [SKIP][91] ([fdo#109271] / [i915#3777]) [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip.html * igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc: - shard-skl: NOTRUN -> [SKIP][92] ([fdo#109271] / [i915#3886]) +1 similar issue [92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl10/igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html * igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_ccs: - shard-tglb: NOTRUN -> [SKIP][93] ([i915#3689]) +1 similar issue [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_ccs.html * igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_mc_ccs: - shard-glk: NOTRUN -> [SKIP][94] ([fdo#109271] / [i915#3886]) +1 similar issue [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk7/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_mc_ccs.html * igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc: - shard-apl: NOTRUN -> [SKIP][95] ([fdo#109271] / [i915#3886]) +3 similar issues [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl6/igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html * igt@kms_ccs@pipe-c-ccs-on-another-bo-yf_tiled_ccs: - shard-tglb: NOTRUN -> [SKIP][96] ([fdo#111615] / [i915#3689]) [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_ccs@pipe-c-ccs-on-another-bo-yf_tiled_ccs.html * igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs: - shard-tglb: NOTRUN -> [SKIP][97] ([i915#3689] / [i915#3886]) +1 similar issue [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb5/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html * igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc: - shard-iclb: NOTRUN -> [SKIP][98] ([fdo#109278] / [i915#3886]) [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-iclb3/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html * igt@kms_ccs@pipe-d-ccs-on-another-bo-yf_tiled_ccs: - shard-kbl: NOTRUN -> [SKIP][99] ([fdo#109271]) +13 similar issues [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl3/igt@kms_ccs@pipe-d-ccs-on-another-bo-yf_tiled_ccs.html * igt@kms_chamelium@dp-hpd-storm-disable: - shard-tglb: NOTRUN -> [SKIP][100] ([fdo#109284] / [fdo#111827]) +2 similar issues [100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_chamelium@dp-hpd-storm-disable.html * igt@kms_chamelium@dp-mode-timings: - shard-apl: NOTRUN -> [SKIP][101] ([fdo#109271] / [fdo#111827]) +7 similar issues [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl1/igt@kms_chamelium@dp-mode-timings.html * igt@kms_chamelium@hdmi-aspect-ratio: - shard-glk: NOTRUN -> [SKIP][102] ([fdo#109271] / [fdo#111827]) +2 similar issues [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk7/igt@kms_chamelium@hdmi-aspect-ratio.html * igt@kms_chamelium@hdmi-crc-fast: - shard-kbl: NOTRUN -> [SKIP][103] ([fdo#109271] / [fdo#111827]) [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl7/igt@kms_chamelium@hdmi-crc-fast.html * igt@kms_color_chamelium@pipe-b-ctm-max: - shard-skl: NOTRUN -> [SKIP][104] ([fdo#109271] / [fdo#111827]) +5 similar issues [104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@kms_color_chamelium@pipe-b-ctm-max.html * igt@kms_content_protection@uevent: - shard-apl: NOTRUN -> [FAIL][105] ([i915#2105]) [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl2/igt@kms_content_protection@uevent.html * igt@kms_cursor_crc@pipe-b-cursor-max-size-onscreen: - shard-glk: NOTRUN -> [SKIP][106] ([fdo#109271]) +38 similar issues [106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk7/igt@kms_cursor_crc@pipe-b-cursor-max-size-onscreen.html * igt@kms_cursor_crc@pipe-c-cursor-32x32-offscreen: - shard-tglb: NOTRUN -> [SKIP][107] ([i915#3319]) [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_cursor_crc@pipe-c-cursor-32x32-offscreen.html * igt@kms_cursor_crc@pipe-d-cursor-32x10-sliding: - shard-tglb: NOTRUN -> [SKIP][108] ([i915#3359]) [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_cursor_crc@pipe-d-cursor-32x10-sliding.html * igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions-varying-size: - shard-tglb: NOTRUN -> [SKIP][109] ([fdo#109274] / [fdo#111825]) +3 similar issues [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions-varying-size.html * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions: - shard-iclb: [PASS][110] -> [FAIL][111] ([i915#2346]) [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-iclb1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html - shard-skl: [PASS][112] -> [FAIL][113] ([i915#2346]) [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-skl4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html * igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size: - shard-tglb: NOTRUN -> [SKIP][114] ([i915#4103]) [114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size.html * igt@kms_draw_crc@draw-method-rgb565-blt-xtiled: - shard-snb: [PASS][115] -> [SKIP][116] ([fdo#109271]) +1 similar issue [115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-snb2/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html [116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-snb6/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html * igt@kms_fbcon_fbt@fbc-suspend: - shard-kbl: [PASS][117] -> [INCOMPLETE][118] ([i915#180] / [i915#636]) [117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-kbl6/igt@kms_fbcon_fbt@fbc-suspend.html [118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl1/igt@kms_fbcon_fbt@fbc-suspend.html * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling: - shard-skl: NOTRUN -> [INCOMPLETE][119] ([i915#3701]) [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling.html * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-downscaling: - shard-iclb: [PASS][120] -> [SKIP][121] ([i915#3701]) [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-iclb8/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-downscaling.html [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-downscaling.html * igt@kms_frontbuffer_tracking@fbc-1p-shrfb-fliptrack-mmap-gtt: - shard-skl: NOTRUN -> [SKIP][122] ([fdo#109271]) +71 similar issues [122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@kms_frontbuffer_tracking@fbc-1p-shrfb-fliptrack-mmap-gtt.html * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-onoff: - shard-tglb: NOTRUN -> [SKIP][123] ([fdo#109280] / [fdo#111825]) +9 similar issues [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-onoff.html * igt@kms_hdr@bpc-switch-suspend: - shard-skl: [PASS][124] -> [FAIL][125] ([i915#1188]) [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-skl2/igt@kms_hdr@bpc-switch-suspend.html [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@kms_hdr@bpc-switch-suspend.html * igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb: - shard-apl: NOTRUN -> [FAIL][126] ([i915#265]) [126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl6/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html * igt@kms_plane_alpha_blend@pipe-c-alpha-7efc: - shard-apl: NOTRUN -> [FAIL][127] ([fdo#108145] / [i915#265]) [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl1/igt@kms_plane_alpha_blend@pipe-c-alpha-7efc.html * igt@kms_plane_alpha_blend@pipe-c-alpha-transparent-fb: - shard-kbl: NOTRUN -> [FAIL][128] ([i915#265]) [128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl3/igt@kms_plane_alpha_blend@pipe-c-alpha-transparent-fb.html * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min: - shard-skl: NOTRUN -> [FAIL][129] ([fdo#108145] / [i915#265]) +1 similar issue [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html * igt@kms_psr2_sf@cursor-plane-update-sf: - shard-skl: NOTRUN -> [SKIP][130] ([fdo#109271] / [i915#658]) [130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@kms_psr2_sf@cursor-plane-update-sf.html * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area: - shard-kbl: NOTRUN -> [SKIP][131] ([fdo#109271] / [i915#658]) [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl7/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area.html * igt@kms_psr2_su@frontbuffer-xrgb8888: - shard-apl: NOTRUN -> [SKIP][132] ([fdo#109271] / [i915#658]) [132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl1/igt@kms_psr2_su@frontbuffer-xrgb8888.html * igt@kms_psr@psr2_no_drrs: - shard-iclb: [PASS][133] -> [SKIP][134] ([fdo#109441]) +2 similar issues [133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-iclb2/igt@kms_psr@psr2_no_drrs.html [134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-iclb3/igt@kms_psr@psr2_no_drrs.html * igt@kms_psr@psr2_primary_page_flip: - shard-tglb: NOTRUN -> [FAIL][135] ([i915#132] / [i915#3467]) [135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@kms_psr@psr2_primary_page_flip.html * igt@kms_vblank@pipe-d-wait-idle: - shard-glk: NOTRUN -> [SKIP][136] ([fdo#109271] / [i915#533]) [136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk7/igt@kms_vblank@pipe-d-wait-idle.html * igt@kms_writeback@writeback-check-output: - shard-skl: NOTRUN -> [SKIP][137] ([fdo#109271] / [i915#2437]) [137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@kms_writeback@writeback-check-output.html * igt@nouveau_crc@pipe-b-ctx-flip-skip-current-frame: - shard-tglb: NOTRUN -> [SKIP][138] ([i915#2530]) [138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@nouveau_crc@pipe-b-ctx-flip-skip-current-frame.html * igt@perf@polling-parameterized: - shard-apl: [PASS][139] -> [FAIL][140] ([i915#1542]) [139]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-apl7/igt@perf@polling-parameterized.html [140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl4/igt@perf@polling-parameterized.html * igt@prime_nv_pcopy@test3_1: - shard-tglb: NOTRUN -> [SKIP][141] ([fdo#109291]) [141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb7/igt@prime_nv_pcopy@test3_1.html * igt@sysfs_clients@busy: - shard-apl: NOTRUN -> [SKIP][142] ([fdo#109271] / [i915#2994]) [142]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl1/igt@sysfs_clients@busy.html * igt@sysfs_clients@pidname: - shard-skl: NOTRUN -> [SKIP][143] ([fdo#109271] / [i915#2994]) [143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-skl9/igt@sysfs_clients@pidname.html #### Possible fixes #### * igt@api_intel_allocator@standalone: - shard-apl: [TIMEOUT][144] -> [PASS][145] [144]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-apl3/igt@api_intel_allocator@standalone.html [145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl7/igt@api_intel_allocator@standalone.html * igt@gem_ctx_persistence@many-contexts: - shard-tglb: [FAIL][146] ([i915#2410]) -> [PASS][147] [146]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-tglb2/igt@gem_ctx_persistence@many-contexts.html [147]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-tglb6/igt@gem_ctx_persistence@many-contexts.html * igt@gem_exec_balancer@parallel-keep-in-fence: - shard-iclb: [SKIP][148] ([i915#4525]) -> [PASS][149] [148]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-iclb7/igt@gem_exec_balancer@parallel-keep-in-fence.html [149]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-iclb1/igt@gem_exec_balancer@parallel-keep-in-fence.html * igt@gem_exec_fair@basic-none-vip@rcs0: - shard-kbl: [FAIL][150] ([i915#2842]) -> [PASS][151] +3 similar issues [150]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-kbl7/igt@gem_exec_fair@basic-none-vip@rcs0.html [151]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl1/igt@gem_exec_fair@basic-none-vip@rcs0.html * igt@kms_big_fb@yf-tiled-16bpp-rotate-0: - shard-glk: [DMESG-WARN][152] ([i915#118]) -> [PASS][153] [152]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk3/igt@kms_big_fb@yf-tiled-16bpp-rotate-0.html [153]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk1/igt@kms_big_fb@yf-tiled-16bpp-rotate-0.html * igt@kms_cursor_crc@pipe-a-cursor-suspend: - shard-kbl: [DMESG-WARN][154] ([i915#180]) -> [PASS][155] +1 similar issue [154]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-kbl1/igt@kms_cursor_crc@pipe-a-cursor-suspend.html [155]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions: - shard-iclb: [FAIL][156] -> [PASS][157] +1 similar issue [156]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-iclb7/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html [157]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-iclb4/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html * igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a2: - shard-glk: [FAIL][158] ([i915#79]) -> [PASS][159] [158]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-glk5/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a2.html [159]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-glk2/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a2.html * igt@kms_flip@flip-vs-suspend-interruptible@c-dp1: - shard-apl: [DMESG-WARN][160] ([i915#180]) -> [PASS][161] +3 similar issues [160]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11117/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html [161]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/shard-apl2/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html * igt@kms_flip@plain-flip-ts-check == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22054/index.html [-- Attachment #2: Type: text/html, Size: 33579 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 @ 2022-01-24 9:06 Stanislav Lisovskiy 2022-01-24 9:06 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy 0 siblings, 1 reply; 21+ messages in thread From: Stanislav Lisovskiy @ 2022-01-24 9:06 UTC (permalink / raw) To: intel-gfx Limitting the WM levels to 0 for DG2 during async flips, allows to slightly increase the performance, as recommended by HW team. Stanislav Lisovskiy (4): drm/i915: Pass plane to watermark calculation functions drm/i915: Introduce do_async_flip flag to intel_plane_state drm/i915: Use wm0 only during async flips for DG2 drm/i915: Don't allocate extra ddb during async flip for DG2 .../gpu/drm/i915/display/intel_atomic_plane.c | 5 +- .../gpu/drm/i915/display/intel_atomic_plane.h | 4 +- drivers/gpu/drm/i915/display/intel_display.c | 31 ++++++- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/intel_pm.c | 83 ++++++++++++++----- 5 files changed, 102 insertions(+), 24 deletions(-) -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions 2022-01-24 9:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy @ 2022-01-24 9:06 ` Stanislav Lisovskiy 2022-01-25 15:45 ` Ville Syrjälä 0 siblings, 1 reply; 21+ messages in thread From: Stanislav Lisovskiy @ 2022-01-24 9:06 UTC (permalink / raw) To: intel-gfx Sometimes we might need to change the way we calculate watermarks, based on which particular plane it is calculated for. Thus it would be convenient to pass plane struct to those functions. v2: Pass plane instead of plane_id v3: Do not pass plane to skl_cursor_allocation(Ville Syrjälä) v4: - Make intel_crtc_get_plane static again(Ville Syrjälä) - s/cursor_plane/plane(Ville Syrjälä) - Pass plane to skl_compute_wm_* instead of plane_id(Ville Syrjälä) Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> --- .../gpu/drm/i915/display/intel_atomic_plane.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 37 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/gpu/drm/i915/display/intel_atomic_plane.h index 7907f601598e..ead789709477 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h @@ -16,6 +16,7 @@ struct intel_crtc; struct intel_crtc_state; struct intel_plane; struct intel_plane_state; +enum plane_id; unsigned int intel_adjusted_rate(const struct drm_rect *src, const struct drm_rect *dst, diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 2ec8e48806b6..06707d2b5fc5 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4240,7 +4240,9 @@ static int skl_compute_wm_params(const struct intel_crtc_state *crtc_state, u64 modifier, unsigned int rotation, u32 plane_pixel_rate, struct skl_wm_params *wp, int color_plane); + static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, + struct intel_plane *plane, int level, unsigned int latency, const struct skl_wm_params *wp, @@ -4251,6 +4253,7 @@ static unsigned int skl_cursor_allocation(const struct intel_crtc_state *crtc_state, int num_active) { + struct intel_plane *plane = to_intel_plane(crtc_state->uapi.crtc->cursor); struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); int level, max_level = ilk_wm_max_level(dev_priv); struct skl_wm_level wm = {}; @@ -4267,7 +4270,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, for (level = 0; level <= max_level; level++) { unsigned int latency = dev_priv->wm.skl_latency[level]; - skl_compute_plane_wm(crtc_state, level, latency, &wp, &wm, &wm); + skl_compute_plane_wm(crtc_state, plane, level, latency, &wp, &wm, &wm); if (wm.min_ddb_alloc == U16_MAX) break; @@ -5495,6 +5498,7 @@ static int skl_wm_max_lines(struct drm_i915_private *dev_priv) } static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, + struct intel_plane *plane, int level, unsigned int latency, const struct skl_wm_params *wp, @@ -5622,6 +5626,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, static void skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, + struct intel_plane *plane, const struct skl_wm_params *wm_params, struct skl_wm_level *levels) { @@ -5633,7 +5638,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, struct skl_wm_level *result = &levels[level]; unsigned int latency = dev_priv->wm.skl_latency[level]; - skl_compute_plane_wm(crtc_state, level, latency, + skl_compute_plane_wm(crtc_state, plane, level, latency, wm_params, result_prev, result); result_prev = result; @@ -5641,6 +5646,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, } static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, + struct intel_plane *plane, const struct skl_wm_params *wm_params, struct skl_plane_wm *plane_wm) { @@ -5649,7 +5655,7 @@ static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, struct skl_wm_level *levels = plane_wm->wm; unsigned int latency = dev_priv->wm.skl_latency[0] + dev_priv->sagv_block_time_us; - skl_compute_plane_wm(crtc_state, 0, latency, + skl_compute_plane_wm(crtc_state, plane, 0, latency, wm_params, &levels[0], sagv_wm); } @@ -5719,11 +5725,11 @@ static void skl_compute_transition_wm(struct drm_i915_private *dev_priv, static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state, - enum plane_id plane_id, int color_plane) + struct intel_plane *plane, int color_plane) { struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); - struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; + struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane->id]; struct skl_wm_params wm_params; int ret; @@ -5732,13 +5738,13 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, if (ret) return ret; - skl_compute_wm_levels(crtc_state, &wm_params, wm->wm); + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->wm); skl_compute_transition_wm(dev_priv, &wm->trans_wm, &wm->wm[0], &wm_params); if (DISPLAY_VER(dev_priv) >= 12) { - tgl_compute_sagv_wm(crtc_state, &wm_params, wm); + tgl_compute_sagv_wm(crtc_state, plane, &wm_params, wm); skl_compute_transition_wm(dev_priv, &wm->sagv.trans_wm, &wm->sagv.wm0, &wm_params); @@ -5749,9 +5755,9 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state, - enum plane_id plane_id) + struct intel_plane *plane) { - struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; + struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane->id]; struct skl_wm_params wm_params; int ret; @@ -5763,7 +5769,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, if (ret) return ret; - skl_compute_wm_levels(crtc_state, &wm_params, wm->uv_wm); + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->uv_wm); return 0; } @@ -5783,13 +5789,13 @@ static int skl_build_plane_wm(struct intel_crtc_state *crtc_state, return 0; ret = skl_build_plane_wm_single(crtc_state, plane_state, - plane_id, 0); + plane, 0); if (ret) return ret; if (fb->format->is_yuv && fb->format->num_planes > 1) { ret = skl_build_plane_wm_uv(crtc_state, plane_state, - plane_id); + plane); if (ret) return ret; } @@ -5814,7 +5820,6 @@ static int icl_build_plane_wm(struct intel_crtc_state *crtc_state, if (plane_state->planar_linked_plane) { const struct drm_framebuffer *fb = plane_state->hw.fb; - enum plane_id y_plane_id = plane_state->planar_linked_plane->id; drm_WARN_ON(&dev_priv->drm, !intel_wm_plane_visible(crtc_state, plane_state)); @@ -5822,17 +5827,17 @@ static int icl_build_plane_wm(struct intel_crtc_state *crtc_state, fb->format->num_planes == 1); ret = skl_build_plane_wm_single(crtc_state, plane_state, - y_plane_id, 0); + plane_state->planar_linked_plane, 0); if (ret) return ret; ret = skl_build_plane_wm_single(crtc_state, plane_state, - plane_id, 1); + plane, 1); if (ret) return ret; } else if (intel_wm_plane_visible(crtc_state, plane_state)) { ret = skl_build_plane_wm_single(crtc_state, plane_state, - plane_id, 0); + plane, 0); if (ret) return ret; } -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions 2022-01-24 9:06 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy @ 2022-01-25 15:45 ` Ville Syrjälä 0 siblings, 0 replies; 21+ messages in thread From: Ville Syrjälä @ 2022-01-25 15:45 UTC (permalink / raw) To: Stanislav Lisovskiy; +Cc: intel-gfx On Mon, Jan 24, 2022 at 11:06:50AM +0200, Stanislav Lisovskiy wrote: > Sometimes we might need to change the way we calculate > watermarks, based on which particular plane it is calculated > for. Thus it would be convenient to pass plane struct to those > functions. > > v2: Pass plane instead of plane_id > v3: Do not pass plane to skl_cursor_allocation(Ville Syrjälä) > v4: - Make intel_crtc_get_plane static again(Ville Syrjälä) > - s/cursor_plane/plane(Ville Syrjälä) > - Pass plane to skl_compute_wm_* instead of plane_id(Ville Syrjälä) > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > .../gpu/drm/i915/display/intel_atomic_plane.h | 1 + > drivers/gpu/drm/i915/intel_pm.c | 37 +++++++++++-------- > 2 files changed, 22 insertions(+), 16 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/gpu/drm/i915/display/intel_atomic_plane.h > index 7907f601598e..ead789709477 100644 > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h > @@ -16,6 +16,7 @@ struct intel_crtc; > struct intel_crtc_state; > struct intel_plane; > struct intel_plane_state; > +enum plane_id; > > unsigned int intel_adjusted_rate(const struct drm_rect *src, > const struct drm_rect *dst, > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 2ec8e48806b6..06707d2b5fc5 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -4240,7 +4240,9 @@ static int skl_compute_wm_params(const struct intel_crtc_state *crtc_state, > u64 modifier, unsigned int rotation, > u32 plane_pixel_rate, struct skl_wm_params *wp, > int color_plane); > + > static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > + struct intel_plane *plane, > int level, > unsigned int latency, > const struct skl_wm_params *wp, > @@ -4251,6 +4253,7 @@ static unsigned int > skl_cursor_allocation(const struct intel_crtc_state *crtc_state, > int num_active) > { > + struct intel_plane *plane = to_intel_plane(crtc_state->uapi.crtc->cursor); > struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); > int level, max_level = ilk_wm_max_level(dev_priv); > struct skl_wm_level wm = {}; > @@ -4267,7 +4270,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, > for (level = 0; level <= max_level; level++) { > unsigned int latency = dev_priv->wm.skl_latency[level]; > > - skl_compute_plane_wm(crtc_state, level, latency, &wp, &wm, &wm); > + skl_compute_plane_wm(crtc_state, plane, level, latency, &wp, &wm, &wm); > if (wm.min_ddb_alloc == U16_MAX) > break; > > @@ -5495,6 +5498,7 @@ static int skl_wm_max_lines(struct drm_i915_private *dev_priv) > } > > static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > + struct intel_plane *plane, > int level, > unsigned int latency, > const struct skl_wm_params *wp, > @@ -5622,6 +5626,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > > static void > skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, > + struct intel_plane *plane, > const struct skl_wm_params *wm_params, > struct skl_wm_level *levels) > { > @@ -5633,7 +5638,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, > struct skl_wm_level *result = &levels[level]; > unsigned int latency = dev_priv->wm.skl_latency[level]; > > - skl_compute_plane_wm(crtc_state, level, latency, > + skl_compute_plane_wm(crtc_state, plane, level, latency, > wm_params, result_prev, result); > > result_prev = result; > @@ -5641,6 +5646,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, > } > > static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, > + struct intel_plane *plane, > const struct skl_wm_params *wm_params, > struct skl_plane_wm *plane_wm) > { > @@ -5649,7 +5655,7 @@ static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, > struct skl_wm_level *levels = plane_wm->wm; > unsigned int latency = dev_priv->wm.skl_latency[0] + dev_priv->sagv_block_time_us; > > - skl_compute_plane_wm(crtc_state, 0, latency, > + skl_compute_plane_wm(crtc_state, plane, 0, latency, > wm_params, &levels[0], > sagv_wm); > } > @@ -5719,11 +5725,11 @@ static void skl_compute_transition_wm(struct drm_i915_private *dev_priv, > > static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, > const struct intel_plane_state *plane_state, > - enum plane_id plane_id, int color_plane) > + struct intel_plane *plane, int color_plane) > { > struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); > struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); > - struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; > + struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane->id]; > struct skl_wm_params wm_params; > int ret; > > @@ -5732,13 +5738,13 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, > if (ret) > return ret; > > - skl_compute_wm_levels(crtc_state, &wm_params, wm->wm); > + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->wm); > > skl_compute_transition_wm(dev_priv, &wm->trans_wm, > &wm->wm[0], &wm_params); > > if (DISPLAY_VER(dev_priv) >= 12) { > - tgl_compute_sagv_wm(crtc_state, &wm_params, wm); > + tgl_compute_sagv_wm(crtc_state, plane, &wm_params, wm); > > skl_compute_transition_wm(dev_priv, &wm->sagv.trans_wm, > &wm->sagv.wm0, &wm_params); > @@ -5749,9 +5755,9 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, > > static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, > const struct intel_plane_state *plane_state, > - enum plane_id plane_id) > + struct intel_plane *plane) > { > - struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; > + struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane->id]; > struct skl_wm_params wm_params; > int ret; > > @@ -5763,7 +5769,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, > if (ret) > return ret; > > - skl_compute_wm_levels(crtc_state, &wm_params, wm->uv_wm); > + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->uv_wm); > > return 0; > } > @@ -5783,13 +5789,13 @@ static int skl_build_plane_wm(struct intel_crtc_state *crtc_state, > return 0; > > ret = skl_build_plane_wm_single(crtc_state, plane_state, > - plane_id, 0); > + plane, 0); > if (ret) > return ret; > > if (fb->format->is_yuv && fb->format->num_planes > 1) { > ret = skl_build_plane_wm_uv(crtc_state, plane_state, > - plane_id); > + plane); > if (ret) > return ret; > } > @@ -5814,7 +5820,6 @@ static int icl_build_plane_wm(struct intel_crtc_state *crtc_state, > > if (plane_state->planar_linked_plane) { > const struct drm_framebuffer *fb = plane_state->hw.fb; > - enum plane_id y_plane_id = plane_state->planar_linked_plane->id; > > drm_WARN_ON(&dev_priv->drm, > !intel_wm_plane_visible(crtc_state, plane_state)); > @@ -5822,17 +5827,17 @@ static int icl_build_plane_wm(struct intel_crtc_state *crtc_state, > fb->format->num_planes == 1); > > ret = skl_build_plane_wm_single(crtc_state, plane_state, > - y_plane_id, 0); > + plane_state->planar_linked_plane, 0); > if (ret) > return ret; > > ret = skl_build_plane_wm_single(crtc_state, plane_state, > - plane_id, 1); > + plane, 1); > if (ret) > return ret; > } else if (intel_wm_plane_visible(crtc_state, plane_state)) { > ret = skl_build_plane_wm_single(crtc_state, plane_state, > - plane_id, 0); > + plane, 0); > if (ret) > return ret; > } > -- > 2.24.1.485.gad05a3d8e5 -- Ville Syrjälä Intel ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 @ 2022-01-18 10:48 Stanislav Lisovskiy 2022-01-18 10:48 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy 0 siblings, 1 reply; 21+ messages in thread From: Stanislav Lisovskiy @ 2022-01-18 10:48 UTC (permalink / raw) To: intel-gfx Limitting the WM levels to 0 for DG2 during async flips, allows to slightly increase the perfomance, as recommended by HW team. Stanislav Lisovskiy (4): drm/i915: Pass plane to watermark calculation functions drm/i915: Introduce do_async_flip flag to intel_plane_state drm/i915: Use wm0 only during async flips for DG2 drm/i915: Don't allocate extra ddb during async flip for DG2 .../gpu/drm/i915/display/intel_atomic_plane.c | 4 +- .../gpu/drm/i915/display/intel_atomic_plane.h | 3 + drivers/gpu/drm/i915/display/intel_display.c | 15 ++++ .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/intel_pm.c | 69 +++++++++++++++---- 5 files changed, 77 insertions(+), 17 deletions(-) -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions 2022-01-18 10:48 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy @ 2022-01-18 10:48 ` Stanislav Lisovskiy 2022-01-19 11:26 ` Ville Syrjälä 0 siblings, 1 reply; 21+ messages in thread From: Stanislav Lisovskiy @ 2022-01-18 10:48 UTC (permalink / raw) To: intel-gfx Sometimes we might need to change the way we calculate watermarks, based on which particular plane it is calculated for. Thus it would be convenient to pass plane struct to those functions. v2: Pass plane instead of plane_id Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> --- .../gpu/drm/i915/display/intel_atomic_plane.c | 2 +- .../gpu/drm/i915/display/intel_atomic_plane.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 23 +++++++++++++------ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c index c2c512cd8ec0..d1344e9c06de 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c @@ -373,7 +373,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ old_plane_state, new_plane_state); } -static struct intel_plane * +struct intel_plane * intel_crtc_get_plane(struct intel_crtc *crtc, enum plane_id plane_id) { struct drm_i915_private *i915 = to_i915(crtc->base.dev); diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/gpu/drm/i915/display/intel_atomic_plane.h index 7907f601598e..c1499bb7370e 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h @@ -16,10 +16,13 @@ struct intel_crtc; struct intel_crtc_state; struct intel_plane; struct intel_plane_state; +enum plane_id; unsigned int intel_adjusted_rate(const struct drm_rect *src, const struct drm_rect *dst, unsigned int rate); +struct intel_plane *intel_crtc_get_plane(struct intel_crtc *crtc, + enum plane_id plane_id); unsigned int intel_plane_pixel_rate(const struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state); diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 62fde21fac39..dc1203d21c46 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4252,7 +4252,9 @@ static int skl_compute_wm_params(const struct intel_crtc_state *crtc_state, u64 modifier, unsigned int rotation, u32 plane_pixel_rate, struct skl_wm_params *wp, int color_plane); + static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, int level, unsigned int latency, const struct skl_wm_params *wp, @@ -4261,6 +4263,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, static unsigned int skl_cursor_allocation(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, int num_active) { struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); @@ -4279,7 +4282,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, for (level = 0; level <= max_level; level++) { unsigned int latency = dev_priv->wm.skl_latency[level]; - skl_compute_plane_wm(crtc_state, level, latency, &wp, &wm, &wm); + skl_compute_plane_wm(crtc_state, plane, level, latency, &wp, &wm, &wm); if (wm.min_ddb_alloc == U16_MAX) break; @@ -5124,6 +5127,7 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, intel_atomic_get_new_crtc_state(state, crtc); const struct intel_dbuf_state *dbuf_state = intel_atomic_get_new_dbuf_state(state); + const struct intel_plane *cursor_plane = intel_crtc_get_plane(crtc, PLANE_CURSOR); const struct skl_ddb_entry *alloc = &dbuf_state->ddb[crtc->pipe]; int num_active = hweight8(dbuf_state->active_pipes); u16 alloc_size, start = 0; @@ -5153,7 +5157,7 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, return 0; /* Allocate fixed number of blocks for cursor. */ - total[PLANE_CURSOR] = skl_cursor_allocation(crtc_state, num_active); + total[PLANE_CURSOR] = skl_cursor_allocation(crtc_state, cursor_plane, num_active); alloc_size -= total[PLANE_CURSOR]; crtc_state->wm.skl.plane_ddb_y[PLANE_CURSOR].start = alloc->end - total[PLANE_CURSOR]; @@ -5507,6 +5511,7 @@ static int skl_wm_max_lines(struct drm_i915_private *dev_priv) } static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, int level, unsigned int latency, const struct skl_wm_params *wp, @@ -5634,6 +5639,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, static void skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, const struct skl_wm_params *wm_params, struct skl_wm_level *levels) { @@ -5645,7 +5651,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, struct skl_wm_level *result = &levels[level]; unsigned int latency = dev_priv->wm.skl_latency[level]; - skl_compute_plane_wm(crtc_state, level, latency, + skl_compute_plane_wm(crtc_state, plane, level, latency, wm_params, result_prev, result); result_prev = result; @@ -5653,6 +5659,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, } static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, const struct skl_wm_params *wm_params, struct skl_plane_wm *plane_wm) { @@ -5661,7 +5668,7 @@ static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, struct skl_wm_level *levels = plane_wm->wm; unsigned int latency = dev_priv->wm.skl_latency[0] + dev_priv->sagv_block_time_us; - skl_compute_plane_wm(crtc_state, 0, latency, + skl_compute_plane_wm(crtc_state, plane, 0, latency, wm_params, &levels[0], sagv_wm); } @@ -5736,6 +5743,7 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); struct skl_wm_params wm_params; int ret; @@ -5744,13 +5752,13 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, if (ret) return ret; - skl_compute_wm_levels(crtc_state, &wm_params, wm->wm); + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->wm); skl_compute_transition_wm(dev_priv, &wm->trans_wm, &wm->wm[0], &wm_params); if (DISPLAY_VER(dev_priv) >= 12) { - tgl_compute_sagv_wm(crtc_state, &wm_params, wm); + tgl_compute_sagv_wm(crtc_state, plane, &wm_params, wm); skl_compute_transition_wm(dev_priv, &wm->sagv.trans_wm, &wm->sagv.wm0, &wm_params); @@ -5764,6 +5772,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, enum plane_id plane_id) { struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); struct skl_wm_params wm_params; int ret; @@ -5775,7 +5784,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, if (ret) return ret; - skl_compute_wm_levels(crtc_state, &wm_params, wm->uv_wm); + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->uv_wm); return 0; } -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions 2022-01-18 10:48 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy @ 2022-01-19 11:26 ` Ville Syrjälä 0 siblings, 0 replies; 21+ messages in thread From: Ville Syrjälä @ 2022-01-19 11:26 UTC (permalink / raw) To: Stanislav Lisovskiy; +Cc: intel-gfx On Tue, Jan 18, 2022 at 12:48:36PM +0200, Stanislav Lisovskiy wrote: > Sometimes we might need to change the way we calculate > watermarks, based on which particular plane it is calculated > for. Thus it would be convenient to pass plane struct to those > functions. > > v2: Pass plane instead of plane_id > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > --- > .../gpu/drm/i915/display/intel_atomic_plane.c | 2 +- > .../gpu/drm/i915/display/intel_atomic_plane.h | 3 +++ > drivers/gpu/drm/i915/intel_pm.c | 23 +++++++++++++------ > 3 files changed, 20 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c > index c2c512cd8ec0..d1344e9c06de 100644 > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c > @@ -373,7 +373,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ > old_plane_state, new_plane_state); > } > > -static struct intel_plane * > +struct intel_plane * > intel_crtc_get_plane(struct intel_crtc *crtc, enum plane_id plane_id) > { > struct drm_i915_private *i915 = to_i915(crtc->base.dev); > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/gpu/drm/i915/display/intel_atomic_plane.h > index 7907f601598e..c1499bb7370e 100644 > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h > @@ -16,10 +16,13 @@ struct intel_crtc; > struct intel_crtc_state; > struct intel_plane; > struct intel_plane_state; > +enum plane_id; > > unsigned int intel_adjusted_rate(const struct drm_rect *src, > const struct drm_rect *dst, > unsigned int rate); > +struct intel_plane *intel_crtc_get_plane(struct intel_crtc *crtc, > + enum plane_id plane_id); > unsigned int intel_plane_pixel_rate(const struct intel_crtc_state *crtc_state, > const struct intel_plane_state *plane_state); > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 62fde21fac39..dc1203d21c46 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -4252,7 +4252,9 @@ static int skl_compute_wm_params(const struct intel_crtc_state *crtc_state, > u64 modifier, unsigned int rotation, > u32 plane_pixel_rate, struct skl_wm_params *wp, > int color_plane); > + > static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane, > int level, > unsigned int latency, > const struct skl_wm_params *wp, > @@ -4261,6 +4263,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > > static unsigned int > skl_cursor_allocation(const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane, I don't see a reason for having the caller pass this in. We can just keep it local to this function. Also we don't usually const these things. > int num_active) > { > struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); > @@ -4279,7 +4282,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, > for (level = 0; level <= max_level; level++) { > unsigned int latency = dev_priv->wm.skl_latency[level]; > > - skl_compute_plane_wm(crtc_state, level, latency, &wp, &wm, &wm); > + skl_compute_plane_wm(crtc_state, plane, level, latency, &wp, &wm, &wm); > if (wm.min_ddb_alloc == U16_MAX) > break; > > @@ -5124,6 +5127,7 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, > intel_atomic_get_new_crtc_state(state, crtc); > const struct intel_dbuf_state *dbuf_state = > intel_atomic_get_new_dbuf_state(state); > + const struct intel_plane *cursor_plane = intel_crtc_get_plane(crtc, PLANE_CURSOR); Could be just to_intel_plane(crtc->base.cursor) Apart from that looks OK. > const struct skl_ddb_entry *alloc = &dbuf_state->ddb[crtc->pipe]; > int num_active = hweight8(dbuf_state->active_pipes); > u16 alloc_size, start = 0; > @@ -5153,7 +5157,7 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, > return 0; > > /* Allocate fixed number of blocks for cursor. */ > - total[PLANE_CURSOR] = skl_cursor_allocation(crtc_state, num_active); > + total[PLANE_CURSOR] = skl_cursor_allocation(crtc_state, cursor_plane, num_active); > alloc_size -= total[PLANE_CURSOR]; > crtc_state->wm.skl.plane_ddb_y[PLANE_CURSOR].start = > alloc->end - total[PLANE_CURSOR]; > @@ -5507,6 +5511,7 @@ static int skl_wm_max_lines(struct drm_i915_private *dev_priv) > } > > static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane, > int level, > unsigned int latency, > const struct skl_wm_params *wp, > @@ -5634,6 +5639,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, > > static void > skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane, > const struct skl_wm_params *wm_params, > struct skl_wm_level *levels) > { > @@ -5645,7 +5651,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, > struct skl_wm_level *result = &levels[level]; > unsigned int latency = dev_priv->wm.skl_latency[level]; > > - skl_compute_plane_wm(crtc_state, level, latency, > + skl_compute_plane_wm(crtc_state, plane, level, latency, > wm_params, result_prev, result); > > result_prev = result; > @@ -5653,6 +5659,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, > } > > static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, > + const struct intel_plane *plane, > const struct skl_wm_params *wm_params, > struct skl_plane_wm *plane_wm) > { > @@ -5661,7 +5668,7 @@ static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, > struct skl_wm_level *levels = plane_wm->wm; > unsigned int latency = dev_priv->wm.skl_latency[0] + dev_priv->sagv_block_time_us; > > - skl_compute_plane_wm(crtc_state, 0, latency, > + skl_compute_plane_wm(crtc_state, plane, 0, latency, > wm_params, &levels[0], > sagv_wm); > } > @@ -5736,6 +5743,7 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, > struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); > struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); > struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; > + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); > struct skl_wm_params wm_params; > int ret; > > @@ -5744,13 +5752,13 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, > if (ret) > return ret; > > - skl_compute_wm_levels(crtc_state, &wm_params, wm->wm); > + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->wm); > > skl_compute_transition_wm(dev_priv, &wm->trans_wm, > &wm->wm[0], &wm_params); > > if (DISPLAY_VER(dev_priv) >= 12) { > - tgl_compute_sagv_wm(crtc_state, &wm_params, wm); > + tgl_compute_sagv_wm(crtc_state, plane, &wm_params, wm); > > skl_compute_transition_wm(dev_priv, &wm->sagv.trans_wm, > &wm->sagv.wm0, &wm_params); > @@ -5764,6 +5772,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, > enum plane_id plane_id) > { > struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; > + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); > struct skl_wm_params wm_params; > int ret; > > @@ -5775,7 +5784,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, > if (ret) > return ret; > > - skl_compute_wm_levels(crtc_state, &wm_params, wm->uv_wm); > + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->uv_wm); > > return 0; > } > -- > 2.24.1.485.gad05a3d8e5 -- Ville Syrjälä Intel ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions @ 2021-12-07 11:07 Stanislav Lisovskiy 0 siblings, 0 replies; 21+ messages in thread From: Stanislav Lisovskiy @ 2021-12-07 11:07 UTC (permalink / raw) To: intel-gfx Sometimes we might need to change the way we calculate watermarks, based on which particular plane it is calculated for. Thus it would be convenient to pass plane struct to those functions. v2: Pass plane instead of plane_id Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> --- .../gpu/drm/i915/display/intel_atomic_plane.c | 2 +- .../gpu/drm/i915/display/intel_atomic_plane.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 23 +++++++++++++------ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c index 27b8f99dd099..023747fb5052 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c @@ -372,7 +372,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ old_plane_state, new_plane_state); } -static struct intel_plane * +struct intel_plane * intel_crtc_get_plane(struct intel_crtc *crtc, enum plane_id plane_id) { struct drm_i915_private *i915 = to_i915(crtc->base.dev); diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/gpu/drm/i915/display/intel_atomic_plane.h index 7907f601598e..c1499bb7370e 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h @@ -16,10 +16,13 @@ struct intel_crtc; struct intel_crtc_state; struct intel_plane; struct intel_plane_state; +enum plane_id; unsigned int intel_adjusted_rate(const struct drm_rect *src, const struct drm_rect *dst, unsigned int rate); +struct intel_plane *intel_crtc_get_plane(struct intel_crtc *crtc, + enum plane_id plane_id); unsigned int intel_plane_pixel_rate(const struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state); diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index fe3787425780..79dac38d9eb2 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4238,7 +4238,9 @@ static int skl_compute_wm_params(const struct intel_crtc_state *crtc_state, u64 modifier, unsigned int rotation, u32 plane_pixel_rate, struct skl_wm_params *wp, int color_plane); + static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, int level, unsigned int latency, const struct skl_wm_params *wp, @@ -4247,6 +4249,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, static unsigned int skl_cursor_allocation(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, int num_active) { struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); @@ -4265,7 +4268,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, for (level = 0; level <= max_level; level++) { unsigned int latency = dev_priv->wm.skl_latency[level]; - skl_compute_plane_wm(crtc_state, level, latency, &wp, &wm, &wm); + skl_compute_plane_wm(crtc_state, plane, level, latency, &wp, &wm, &wm); if (wm.min_ddb_alloc == U16_MAX) break; @@ -5111,6 +5114,7 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, intel_atomic_get_new_crtc_state(state, crtc); const struct intel_dbuf_state *dbuf_state = intel_atomic_get_new_dbuf_state(state); + const struct intel_plane *cursor_plane = intel_crtc_get_plane(crtc, PLANE_CURSOR); const struct skl_ddb_entry *alloc = &dbuf_state->ddb[crtc->pipe]; int num_active = hweight8(dbuf_state->active_pipes); u16 alloc_size, start = 0; @@ -5140,7 +5144,7 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state, return 0; /* Allocate fixed number of blocks for cursor. */ - total[PLANE_CURSOR] = skl_cursor_allocation(crtc_state, num_active); + total[PLANE_CURSOR] = skl_cursor_allocation(crtc_state, cursor_plane, num_active); alloc_size -= total[PLANE_CURSOR]; crtc_state->wm.skl.plane_ddb_y[PLANE_CURSOR].start = alloc->end - total[PLANE_CURSOR]; @@ -5494,6 +5498,7 @@ static int skl_wm_max_lines(struct drm_i915_private *dev_priv) } static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, int level, unsigned int latency, const struct skl_wm_params *wp, @@ -5621,6 +5626,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state, static void skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, const struct skl_wm_params *wm_params, struct skl_wm_level *levels) { @@ -5632,7 +5638,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, struct skl_wm_level *result = &levels[level]; unsigned int latency = dev_priv->wm.skl_latency[level]; - skl_compute_plane_wm(crtc_state, level, latency, + skl_compute_plane_wm(crtc_state, plane, level, latency, wm_params, result_prev, result); result_prev = result; @@ -5640,6 +5646,7 @@ skl_compute_wm_levels(const struct intel_crtc_state *crtc_state, } static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, + const struct intel_plane *plane, const struct skl_wm_params *wm_params, struct skl_plane_wm *plane_wm) { @@ -5648,7 +5655,7 @@ static void tgl_compute_sagv_wm(const struct intel_crtc_state *crtc_state, struct skl_wm_level *levels = plane_wm->wm; unsigned int latency = dev_priv->wm.skl_latency[0] + dev_priv->sagv_block_time_us; - skl_compute_plane_wm(crtc_state, 0, latency, + skl_compute_plane_wm(crtc_state, plane, 0, latency, wm_params, &levels[0], sagv_wm); } @@ -5723,6 +5730,7 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); struct skl_wm_params wm_params; int ret; @@ -5731,13 +5739,13 @@ static int skl_build_plane_wm_single(struct intel_crtc_state *crtc_state, if (ret) return ret; - skl_compute_wm_levels(crtc_state, &wm_params, wm->wm); + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->wm); skl_compute_transition_wm(dev_priv, &wm->trans_wm, &wm->wm[0], &wm_params); if (DISPLAY_VER(dev_priv) >= 12) { - tgl_compute_sagv_wm(crtc_state, &wm_params, wm); + tgl_compute_sagv_wm(crtc_state, plane, &wm_params, wm); skl_compute_transition_wm(dev_priv, &wm->sagv.trans_wm, &wm->sagv.wm0, &wm_params); @@ -5751,6 +5759,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, enum plane_id plane_id) { struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id]; + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); struct skl_wm_params wm_params; int ret; @@ -5762,7 +5771,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state, if (ret) return ret; - skl_compute_wm_levels(crtc_state, &wm_params, wm->uv_wm); + skl_compute_wm_levels(crtc_state, plane, &wm_params, wm->uv_wm); return 0; } -- 2.24.1.485.gad05a3d8e5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
end of thread, other threads:[~2022-01-25 15:45 UTC | newest] Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-01-21 8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy 2022-01-21 8:06 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy 2022-01-21 11:47 ` Ville Syrjälä 2022-01-21 8:06 ` [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state Stanislav Lisovskiy 2022-01-21 11:48 ` Ville Syrjälä 2022-01-21 8:06 ` [Intel-gfx] [PATCH 3/4] drm/i915: Use wm0 only during async flips for DG2 Stanislav Lisovskiy 2022-01-21 11:59 ` Ville Syrjälä 2022-01-21 8:06 ` [Intel-gfx] [PATCH 4/4] drm/i915: Don't allocate extra ddb during async flip " Stanislav Lisovskiy 2022-01-21 12:06 ` Ville Syrjälä 2022-01-23 20:34 ` Lisovskiy, Stanislav 2022-01-24 7:42 ` Ville Syrjälä 2022-01-21 8:26 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Async flip optimization for DG2 (rev3) Patchwork 2022-01-21 8:52 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork 2022-01-21 11:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Async flip optimization for DG2 (rev4) Patchwork 2022-01-21 11:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2022-01-21 13:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2022-01-24 9:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy 2022-01-24 9:06 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy 2022-01-25 15:45 ` Ville Syrjälä 2022-01-18 10:48 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy 2022-01-18 10:48 ` [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy 2022-01-19 11:26 ` Ville Syrjälä 2021-12-07 11:07 Stanislav Lisovskiy
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.