mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-11 16:32:58 +00:00
igt/gem_concurrent_blit: dmabuf requires twice the number of files
In order to keep the dmabuf mmap around whilst we keep the object alive, we need a file descriptor for each. Check that the VFS supports that many fd. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
@@ -97,6 +97,7 @@ uint64_t intel_get_total_swap_mb(void);
|
||||
int __intel_check_memory(uint64_t count, uint64_t size, unsigned mode,
|
||||
uint64_t *out_required, uint64_t *out_total);
|
||||
void intel_require_memory(uint64_t count, uint64_t size, unsigned mode);
|
||||
void intel_require_files(uint64_t count);
|
||||
#define CHECK_RAM 0x1
|
||||
#define CHECK_SWAP 0x2
|
||||
|
||||
|
||||
@@ -192,6 +192,19 @@ static uint64_t vfs_file_max(void)
|
||||
return max;
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_require_files:
|
||||
* @count: number of files that will be created
|
||||
*
|
||||
* Does the system support enough file descriptors for the test?
|
||||
*/
|
||||
void intel_require_files(uint64_t count)
|
||||
{
|
||||
igt_require_f(count < vfs_file_max(),
|
||||
"Estimated that we need %'llu files, but the VFS maximum is only %'llu\n",
|
||||
(long long)count, (long long)vfs_file_max());
|
||||
}
|
||||
|
||||
int __intel_check_memory(uint64_t count, uint64_t size, unsigned mode,
|
||||
uint64_t *out_required, uint64_t *out_total)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user