[PATCH i-g-t 0/2] panfrost: Test accessing a purged buffer via mmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds a test for Panfrost to make sure that accessing a buffer
that has been madvised and then purged causes a bus fault. It is
intended to test the fix provided by this series:

https://patchwork.freedesktop.org/series/87324/

The series has now been merged into drm-misc-fixes (thanks!)

In order to trigger the purge, the test just tries to allocate a bunch
of buffers until one of them causes the original buffer to be purged.
During the review of the kernel patch series, Daniel Vetter suggested
it would be better to use debugfs or vm_drop_caches file from proc.
However, I noticed that there are other tests that use the same method
as in this series (eg, igt_vc4_trigger_purge). Seeing as there is
already a precedent for IGT tests to do this, I wonder if we could
leave that as a later change for someone who is more active in
Panfrost development.

Neil Roberts (2):
  lib/panfrost: Add a utility to madvise a buffer
  tests/panfrost: Add a test for accessing a purged buffer

 lib/igt_panfrost.c        |  12 ++++
 lib/igt_panfrost.h        |   1 +
 tests/meson.build         |   1 +
 tests/panfrost_purgemap.c | 146 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 160 insertions(+)
 create mode 100644 tests/panfrost_purgemap.c

-- 
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux