[PATCH i-g-t v12 0/3] i915: Convert old cursor legacy to async path helpers

Helen Koike helen.koike at collabora.com
Thu Oct 10 18:01:36 UTC 2019


Hello,

This series replaces the old intel_legacy_cursor_update implementation by
the current async framework in the i915 driver.

This is important to allow userspace to migrate from the legacy cursor
uAPI to the atomic uAPI, once we have the AMEND/Mailbox uAPI feature.

>From the last version, the Intel CI reported the following regressions:

https://www.spinics.net/lists/intel-gfx/msg214191.html

1. igt at kms_cursor_crc@pipe-b-cursor-256x256-onscreen
	- *ERROR* CPU pipe B FIFO underrun
	This was fixed by replacing the legacy_cursor_update by
	async_update flag. The error was related to watermark. The
	watermark code was erroneously being executed when
	legacy_cursor_update=1 and async_update=0 (as both flags were
	not in sync). Using a single flag fixed the issue.

2. igt at kms_flip@2x-dpms-vs-vblank-race
	- (kms_flip:2342) CRITICAL: Failed assertion: end - start > 0.9 ...
	I used two displays to run the tests, but I couldn't reproduce
	it in my test environment, I just noticed that after fixing the
	FIFO underrun and ODEBUG issues in the fences objects, that I
	didn't get the message "vblank interval differs from modeline!"
	anymore.

3. igt at kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff
	- I couldn't reproduce this error, the test passes for me.
	But without the fixes I made, I got the message:
	"vblank interval differs from modeline!"
	and the message is gone now.

4. igt at kms_universal_plane@cursor-fb-leak-pipe-a
	- ODEBUG: assert_init not available (active state 0) object type: i915_sw_fence hint: 0x6b6b6b6b6b6b6b68
	I fixed by handling fences diferently in case of async_update

5. igt at kms_universal_plane@cursor-fb-leak-pipe-b
	- Incomplete test, it was blocking.
	Solution applied to (1) fixed this too.

I'm using a Samus ChromeBook for testing.

I had to introduce a new patchset in the series to fix (1) and (5), but it
touches the code drm_atomic_helpers, so I also tested in Rockchip.

Samus ChromeBook igt test results:
https://people.collabora.com/~koike/i915-results-5.3.0-rc3+-v12/html

Rockchip rk3399 igt test results:
https://people.collabora.com/~koike/rk-results-5.3.0-rc3+-v12/html

Note: I'll be attending ELCE 2019 in case someone want to discuss this in
details.

Thanks
Helen

Changes in v12:
- "drm: replace legacy_cursor_update flag by async_update" is a new patch in the series
 - v11: https://patchwork.kernel.org/project/dri-devel/list/?series=178995
 - skip handling commit_ready fence in async update. In async update we
 update the in-place state, so it doesn't make sense to handle the
 commid_ready fence inside the state object that will be thrown away.
 Otherwise, the code throw ODEBUG errors.
 - remove usage of state->legacy_cursor_update flag

Changes in v11:
 - v10 https://patchwork.kernel.org/project/dri-devel/list/?series=147095
 - rebase on drm-intel
 - replace i915_gem_track_fb() by intel_frontbuffer_track()

Changes in v10:
 - v9: https://patchwork.kernel.org/patch/11000561/
 - rebase on drm-tip
 - call i915_sw_fence_init() in the begining of intel_atomic_commit(),
 otherwise drm_atomic_helper_prepare_planes() without initializing the
 fence object, casing errors like:
ODEBUG: assert_init not available (active state 0) object type: i915_sw_fence hint: 0x0

Changes in v9:
 - v8: https://patchwork.kernel.org/patch/10843395/
 - Added tested-by tag
 - submitted to  intel-gfx at lists.freedesktop.org to invoke CI
 - rebased and fixed conflicts on top of drm-tip
 - v8: https://patchwork.kernel.org/patch/10843397/
 - rebased and fixed conflicts on top of drm-tip

Changes in v8:
 - v7: https://lkml.org/lkml/2018/6/8/168
 - v7 was splited in two, one that adds the async callbacks and another
 that updates the cursor.
 - rebase with drm-intel
 - allow async update in all types of planes, not only cursor
 - add watermark checks in async update
 - remove bypass of intel_prepare_plane_fb() in case of async update
 - add missing drm_atomic_helper_cleanup_planes(dev, state) call in
 intel_atomic_commit().
 - use swap() function in async update to set the old_fb in the
 new_state object.
 - use helpers intel_update_plane()/intel_disable_plane()
 - v7: https://lkml.org/lkml/2018/6/8/168
 - v7 was splited in two, one that adds the async callbacks and another
 that updates the cursor.
 - Update comment in intel_pm.c that was referencing
 intel_plane_atomic_async_update()

Changes in v7:
- Rebase on top of drm-intel repository. Hopefully now will play
  nicely with autobuilders.

Changes in v6:
- Rework the intel_plane_atomic_async_update due driver changed from
  last time.
- Removed the mutex_lock/unlock as causes a deadlock.

Changes in v5:
- Call drm_atomic_helper_async_check() from the check hook

Changes in v4:
- Set correct vma to new state for cleanup
- Move size checks back to drivers (Ville Syrjälä)

Changes in v3:
- Move fb setting to core and use new state (Eric Anholt)

Gustavo Padovan (2):
  drm/i915: Introduce async plane update to i915
  drm/i915: update cursors asynchronously through atomic

Helen Koike (1):
  drm: replace legacy_cursor_update flag by async_update

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   4 +-
 drivers/gpu/drm/drm_atomic_helper.c           |  10 +-
 .../gpu/drm/i915/display/intel_atomic_plane.c |  71 +++++++
 drivers/gpu/drm/i915/display/intel_display.c  | 199 +++---------------
 .../drm/i915/display/intel_display_types.h    |   6 +
 drivers/gpu/drm/i915/intel_pm.c               |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c       |   3 +-
 drivers/gpu/drm/msm/msm_atomic.c              |   2 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |   2 +-
 drivers/gpu/drm/vc4/vc4_kms.c                 |   4 +-
 include/drm/drm_atomic.h                      |   2 -
 11 files changed, 122 insertions(+), 183 deletions(-)

-- 
2.22.0



More information about the Intel-gfx-trybot mailing list