Message ID | 20211029202432.140745-1-jose.souza@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] drm/i915/display: Check async flip state of every crtc and plane once | expand |
On Fri, Oct 29, 2021 at 01:24:32PM -0700, José Roberto de Souza wrote: > For every crtc in state, intel_atomic_check_async() was checking all > the crtc and plane states again. > > v2: comparing pipe ids instead of crtc pointers when iterating over > planes > > Cc: Karthik B S <karthik.b.s@intel.com> > Cc: Vandita Kulkarni <vandita.kulkarni@intel.com> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/i915/display/intel_display.c | 38 ++++++++++---------- > 1 file changed, 20 insertions(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index 79cd158503b37..e494028260621 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -7707,35 +7707,37 @@ static void kill_bigjoiner_slave(struct intel_atomic_state *state, > * correspond to the last vblank and have no relation to the actual time when > * the flip done event was sent. > */ > -static int intel_atomic_check_async(struct intel_atomic_state *state) > +static int intel_atomic_check_async(struct intel_atomic_state *state, struct intel_crtc *crtc) > { > struct drm_i915_private *i915 = to_i915(state->base.dev); > const struct intel_crtc_state *old_crtc_state, *new_crtc_state; > const struct intel_plane_state *new_plane_state, *old_plane_state; > - struct intel_crtc *crtc; > struct intel_plane *plane; > int i; > > - for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, > - new_crtc_state, i) { > - if (intel_crtc_needs_modeset(new_crtc_state)) { > - drm_dbg_kms(&i915->drm, "Modeset Required. Async flip not supported\n"); > - return -EINVAL; > - } > + old_crtc_state = intel_atomic_get_old_crtc_state(state, crtc); > + new_crtc_state = intel_atomic_get_new_crtc_state(state, crtc); > > - if (!new_crtc_state->hw.active) { > - drm_dbg_kms(&i915->drm, "CRTC inactive\n"); > - return -EINVAL; > - } > - if (old_crtc_state->active_planes != new_crtc_state->active_planes) { > - drm_dbg_kms(&i915->drm, > - "Active planes cannot be changed during async flip\n"); > - return -EINVAL; > - } > + if (intel_crtc_needs_modeset(new_crtc_state)) { > + drm_dbg_kms(&i915->drm, "Modeset Required. Async flip not supported\n"); > + return -EINVAL; > + } > + > + if (!new_crtc_state->hw.active) { > + drm_dbg_kms(&i915->drm, "CRTC inactive\n"); > + return -EINVAL; > + } > + if (old_crtc_state->active_planes != new_crtc_state->active_planes) { > + drm_dbg_kms(&i915->drm, > + "Active planes cannot be changed during async flip\n"); > + return -EINVAL; > } > > for_each_oldnew_intel_plane_in_state(state, plane, old_plane_state, > new_plane_state, i) { > + if (plane->pipe != crtc->pipe) > + continue; > + > /* > * TODO: Async flip is only supported through the page flip IOCTL > * as of now. So support currently added for primary plane only. > @@ -8054,7 +8056,7 @@ static int intel_atomic_check(struct drm_device *dev, > for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, > new_crtc_state, i) { > if (new_crtc_state->uapi.async_flip) { > - ret = intel_atomic_check_async(state); > + ret = intel_atomic_check_async(state, crtc); > if (ret) > goto fail; > } > -- > 2.33.1
On Sat, 2021-10-30 at 07:44 +0000, Patchwork wrote: > Patch Details > Series: drm/i915/display: Check async flip state of every crtc and plane once (rev2) > URL: https://patchwork.freedesktop.org/series/96402/ > State: success > Details: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21492/index.html > CI Bug Log - changes from CI_DRM_10817_full -> Patchwork_21492_full > > Summary > > SUCCESS > > No regressions found. Pushed to drm-intel-next, thanks for the review Ville. > > Participating hosts (9 -> 9) > > No changes in participating hosts > > Known issues > > Here are the changes found in Patchwork_21492_full that come from known issues: > > IGT changes > > Issues hit > > igt@feature_discovery@psr2: > > shard-iclb: PASS -> SKIP ([i915#658]) > igt@gem_exec_fair@basic-pace@vcs1: > > shard-tglb: PASS -> FAIL ([i915#2842]) > igt@gem_exec_fair@basic-pace@vecs0: > > shard-kbl: PASS -> FAIL ([i915#2842]) +1 similar issue > igt@gem_exec_suspend@basic-s3: > > shard-kbl: PASS -> DMESG-WARN ([i915#180]) +2 similar issues > igt@gem_userptr_blits@input-checking: > > shard-tglb: NOTRUN -> DMESG-WARN ([i915#3002]) > > shard-iclb: NOTRUN -> DMESG-WARN ([i915#3002]) > > shard-kbl: NOTRUN -> DMESG-WARN ([i915#3002]) > > igt@gen9_exec_parse@allowed-single: > > shard-skl: PASS -> DMESG-WARN ([i915#1436] / [i915#716]) > igt@gen9_exec_parse@basic-rejected-ctx-param: > > shard-tglb: NOTRUN -> SKIP ([i915#2856]) +1 similar issue > > shard-iclb: NOTRUN -> SKIP ([i915#2856]) > > igt@i915_pm_backlight@fade_with_suspend: > > shard-tglb: PASS -> INCOMPLETE ([i915#456]) > igt@i915_pm_dc@dc6-psr: > > shard-iclb: PASS -> FAIL ([i915#454]) > igt@i915_pm_rc6_residency@media-rc6-accuracy: > > shard-tglb: NOTRUN -> SKIP ([fdo#109289] / [fdo#111719]) > igt@kms_async_flips@alternate-sync-async-flip: > > shard-skl: PASS -> FAIL ([i915#2521]) > igt@kms_big_fb@linear-32bpp-rotate-90: > > shard-iclb: NOTRUN -> SKIP ([fdo#110725] / [fdo#111614]) > > shard-tglb: NOTRUN -> SKIP ([fdo#111614]) +2 similar issues > > igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip: > > shard-apl: NOTRUN -> SKIP ([fdo#109271] / [i915#3777]) > igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip: > > shard-kbl: NOTRUN -> SKIP ([fdo#109271] / [i915#3777]) +1 similar issue > igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip: > > shard-tglb: NOTRUN -> SKIP ([fdo#111615]) +1 similar issue > igt@kms_busy@extended-pageflip-hang-newfb: > > shard-snb: NOTRUN -> SKIP ([fdo#109271]) > igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_gen12_rc_ccs_cc: > > shard-skl: NOTRUN -> SKIP ([fdo#109271] / [i915#3886]) +2 similar issues > igt@kms_ccs@pipe-a-bad-rotation-90-y_tiled_gen12_mc_ccs: > > shard-apl: NOTRUN -> SKIP ([fdo#109271] / [i915#3886]) +2 similar issues > igt@kms_ccs@pipe-b-random-ccs-data-y_tiled_gen12_mc_ccs: > > shard-tglb: NOTRUN -> SKIP ([i915#3689] / [i915#3886]) > igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_rc_ccs_cc: > > shard-kbl: NOTRUN -> SKIP ([fdo#109271] / [i915#3886]) +2 similar issues > igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_ccs: > > shard-tglb: NOTRUN -> SKIP ([i915#3689]) +1 similar issue > igt@kms_ccs@pipe-d-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc: > > shard-kbl: NOTRUN -> SKIP ([fdo#109271]) +109 similar issues > igt@kms_chamelium@hdmi-audio-edid: > > shard-kbl: NOTRUN -> SKIP ([fdo#109271] / [fdo#111827]) +12 similar issues > igt@kms_chamelium@hdmi-hpd-after-suspend: > > shard-iclb: NOTRUN -> SKIP ([fdo#109284] / [fdo#111827]) +1 similar issue > igt@kms_chamelium@hdmi-hpd-fast: > > shard-tglb: NOTRUN -> SKIP ([fdo#109284] / [fdo#111827]) +1 similar issue > igt@kms_color@pipe-b-ctm-0-75: > > shard-skl: PASS -> DMESG-WARN ([i915#1982]) > igt@kms_color_chamelium@pipe-b-ctm-limited-range: > > shard-skl: NOTRUN -> SKIP ([fdo#109271] / [fdo#111827]) +2 similar issues > igt@kms_color_chamelium@pipe-c-ctm-0-25: > > shard-apl: NOTRUN -> SKIP ([fdo#109271] / [fdo#111827]) +1 similar issue > igt@kms_content_protection@uevent: > > shard-tglb: NOTRUN -> SKIP ([fdo#111828]) > igt@kms_cursor_crc@pipe-b-cursor-32x10-random: > > shard-tglb: NOTRUN -> SKIP ([i915#3359]) +1 similar issue > igt@kms_cursor_crc@pipe-b-cursor-512x512-offscreen: > > shard-skl: NOTRUN -> SKIP ([fdo#109271]) +49 similar issues > igt@kms_cursor_crc@pipe-c-cursor-max-size-random: > > shard-iclb: NOTRUN -> SKIP ([fdo#109278]) +1 similar issue > igt@kms_cursor_crc@pipe-d-cursor-512x170-onscreen: > > shard-tglb: NOTRUN -> SKIP ([fdo#109279] / [i915#3359]) > igt@kms_flip@flip-vs-expired-vblank-interruptible@a-edp1: > > shard-skl: PASS -> FAIL ([i915#79]) +1 similar issue > igt@kms_flip@wf_vblank-ts-check-interruptible@a-edp1: > > shard-skl: PASS -> FAIL ([i915#2122]) > igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs: > > shard-kbl: NOTRUN -> SKIP ([fdo#109271] / [i915#2672]) > igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-cpu: > > shard-apl: NOTRUN -> SKIP ([fdo#109271]) +33 similar issues > igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff: > > shard-iclb: NOTRUN -> SKIP ([fdo#109280]) > igt@kms_frontbuffer_tracking@fbcpsr-suspend: > > shard-tglb: PASS -> INCOMPLETE ([i915#2411] / [i915#456]) > igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-mmap-cpu: > > shard-tglb: NOTRUN -> SKIP ([fdo#111825]) +1 similar issue > igt@kms_hdr@bpc-switch-dpms: > > shard-skl: PASS -> FAIL ([i915#1188]) +1 similar issue > igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes: > > shard-kbl: NOTRUN -> DMESG-WARN ([i915#180]) +2 similar issues > igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb: > > shard-skl: NOTRUN -> FAIL ([i915#265]) > igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max: > > shard-kbl: NOTRUN -> FAIL ([fdo#108145] / [i915#265]) > igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4: > > shard-kbl: NOTRUN -> SKIP ([fdo#109271] / [i915#658]) +1 similar issue > igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3: > > shard-apl: NOTRUN -> SKIP ([fdo#109271] / [i915#658]) > igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5: > > shard-iclb: NOTRUN -> SKIP ([i915#658]) > > shard-tglb: NOTRUN -> SKIP ([i915#2920]) > > igt@kms_psr@psr2_sprite_plane_move: > > shard-iclb: PASS -> SKIP ([fdo#109441]) +2 similar issues > igt@kms_psr@psr2_sprite_render: > > shard-tglb: NOTRUN -> FAIL ([i915#132] / [i915#3467]) > > shard-iclb: NOTRUN -> SKIP ([fdo#109441]) > > igt@kms_vblank@pipe-a-ts-continuation-suspend: > > shard-apl: PASS -> DMESG-WARN ([i915#180] / [i915#295]) > igt@kms_vblank@pipe-c-ts-continuation-suspend: > > shard-apl: PASS -> DMESG-WARN ([i915#180]) +1 similar issue > igt@kms_writeback@writeback-pixel-formats: > > shard-skl: NOTRUN -> SKIP ([fdo#109271] / [i915#2437]) > igt@prime_nv_test@nv_write_i915_cpu_mmap_read: > > shard-tglb: NOTRUN -> SKIP ([fdo#109291]) > > shard-iclb: NOTRUN -> SKIP ([fdo#109291]) > > igt@sysfs_clients@busy: > > shard-tglb: NOTRUN -> SKIP ([i915#2994]) > > shard-iclb: NOTRUN -> SKIP ([i915#2994]) > > igt@sysfs_clients@fair-0: > > shard-skl: NOTRUN -> SKIP ([fdo#109271] / [i915#2994]) > igt@sysfs_clients@sema-10: > > shard-kbl: NOTRUN -> SKIP ([fdo#109271] / [i915#2994]) +3 similar issues > Possible fixes > > igt@gem_ctx_isolation@preservation-s3@bcs0: > > shard-apl: DMESG-WARN ([i915#180]) -> PASS +1 similar issue > igt@gem_ctx_persistence@smoketest: > > shard-iclb: FAIL ([i915#2896]) -> PASS > igt@gem_eio@unwedge-stress: > > shard-iclb: TIMEOUT ([i915#2369] / [i915#2481] / [i915#3070]) -> PASS > igt@gem_exec_fair@basic-none-share@rcs0: > > shard-apl: SKIP ([fdo#109271]) -> PASS > igt@gem_exec_fair@basic-pace-share@rcs0: > > shard-tglb: FAIL ([i915#2842]) -> PASS > > shard-glk: FAIL ([i915#2842]) -> PASS > > igt@gem_exec_fair@basic-pace@vcs1: > > shard-kbl: FAIL ([i915#2842]) -> PASS +1 similar issue > igt@kms_fbcon_fbt@fbc-suspend: > > shard-kbl: INCOMPLETE ([i915#180] / [i915#636]) -> PASS > igt@kms_fbcon_fbt@psr-suspend: > > shard-tglb: INCOMPLETE ([i915#2411] / [i915#456]) -> PASS > igt@kms_flip@flip-vs-expired-vblank@a-edp1: > > shard-skl: FAIL ([i915#79]) -> PASS > igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1: > > shard-skl: FAIL ([i915#2122]) -> PASS +4 similar issues > igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs: > > shard-iclb: SKIP ([i915#3701]) -> PASS > igt@kms_hdr@bpc-switch-suspend: > > shard-kbl: DMESG-WARN ([i915#180]) -> PASS +5 similar issues > igt@kms_plane_alpha_blend@pipe-b-coverage-7efc: > > shard-skl: FAIL ([fdo#108145] / [i915#265]) -> PASS +1 similar issue > igt@kms_psr@psr2_cursor_plane_move: > > shard-iclb: SKIP ([fdo#109441]) -> PASS +1 similar issue > igt@kms_setmode@basic: > > shard-apl: FAIL ([i915#31]) -> PASS > igt@perf@polling-parameterized: > > shard-glk: FAIL ([i915#1542]) -> PASS > igt@perf@short-reads: > > shard-skl: FAIL ([i915#51]) -> PASS > Warnings > > igt@i915_pm_rc6_residency@rc6-fence: > > shard-iclb: WARN ([i915#2684]) -> WARN ([i915#1804] / [i915#2684]) > igt@i915_pm_rc6_residency@rc6-idle: > > shard-iclb: WARN ([i915#1804] / [i915#2684]) -> WARN ([i915#2684]) > igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4: > > shard-iclb: SKIP ([i915#2920]) -> SKIP ([i915#658]) +2 similar issues > igt@kms_psr2_sf@plane-move-sf-dmg-area-3: > > shard-iclb: SKIP ([i915#658]) -> SKIP ([i915#2920]) +1 similar issue > igt@kms_psr2_su@page_flip: > > shard-iclb: SKIP ([fdo#109642] / [fdo#111068] / [i915#658]) -> FAIL ([i915#4148]) > igt@runner@aborted: > > shard-kbl: (FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312] / [i915#602] / [i915#92]) -> (FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL) ([i915#1436] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312] / [i915#602]) > > shard-apl: (FAIL, FAIL, FAIL, FAIL, FAIL) ([i915#1610] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312]) -> (FAIL, FAIL, FAIL, FAIL, FAIL, FAIL) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312])
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 79cd158503b37..e494028260621 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7707,35 +7707,37 @@ static void kill_bigjoiner_slave(struct intel_atomic_state *state, * correspond to the last vblank and have no relation to the actual time when * the flip done event was sent. */ -static int intel_atomic_check_async(struct intel_atomic_state *state) +static int intel_atomic_check_async(struct intel_atomic_state *state, struct intel_crtc *crtc) { struct drm_i915_private *i915 = to_i915(state->base.dev); const struct intel_crtc_state *old_crtc_state, *new_crtc_state; const struct intel_plane_state *new_plane_state, *old_plane_state; - struct intel_crtc *crtc; struct intel_plane *plane; int i; - for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, - new_crtc_state, i) { - if (intel_crtc_needs_modeset(new_crtc_state)) { - drm_dbg_kms(&i915->drm, "Modeset Required. Async flip not supported\n"); - return -EINVAL; - } + old_crtc_state = intel_atomic_get_old_crtc_state(state, crtc); + new_crtc_state = intel_atomic_get_new_crtc_state(state, crtc); - if (!new_crtc_state->hw.active) { - drm_dbg_kms(&i915->drm, "CRTC inactive\n"); - return -EINVAL; - } - if (old_crtc_state->active_planes != new_crtc_state->active_planes) { - drm_dbg_kms(&i915->drm, - "Active planes cannot be changed during async flip\n"); - return -EINVAL; - } + if (intel_crtc_needs_modeset(new_crtc_state)) { + drm_dbg_kms(&i915->drm, "Modeset Required. Async flip not supported\n"); + return -EINVAL; + } + + if (!new_crtc_state->hw.active) { + drm_dbg_kms(&i915->drm, "CRTC inactive\n"); + return -EINVAL; + } + if (old_crtc_state->active_planes != new_crtc_state->active_planes) { + drm_dbg_kms(&i915->drm, + "Active planes cannot be changed during async flip\n"); + return -EINVAL; } for_each_oldnew_intel_plane_in_state(state, plane, old_plane_state, new_plane_state, i) { + if (plane->pipe != crtc->pipe) + continue; + /* * TODO: Async flip is only supported through the page flip IOCTL * as of now. So support currently added for primary plane only. @@ -8054,7 +8056,7 @@ static int intel_atomic_check(struct drm_device *dev, for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { if (new_crtc_state->uapi.async_flip) { - ret = intel_atomic_check_async(state); + ret = intel_atomic_check_async(state, crtc); if (ret) goto fail; }
For every crtc in state, intel_atomic_check_async() was checking all the crtc and plane states again. v2: comparing pipe ids instead of crtc pointers when iterating over planes Cc: Karthik B S <karthik.b.s@intel.com> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> --- drivers/gpu/drm/i915/display/intel_display.c | 38 ++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-)