mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
efeff7b38e
The way exec ufences are coded only 1 ufence per IOCTL will be signaled. It is possible to fix this but for current use cases 1 ufence per IOCTL is sufficient. Enforce a limit of 1 ufence per IOCTL (both exec and bind to be uniform). v2: - Add fixes tag (Thomas) Fixes:dd08ebf6c3
("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Mika Kahola <mika.kahola@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Brian Welty <brian.welty@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240124234413.1640825-1-matthew.brost@intel.com (cherry picked from commitd1df9bfbf6
) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2021 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_SYNC_H_
|
|
#define _XE_SYNC_H_
|
|
|
|
#include "xe_sync_types.h"
|
|
|
|
struct xe_device;
|
|
struct xe_exec_queue;
|
|
struct xe_file;
|
|
struct xe_sched_job;
|
|
struct xe_vm;
|
|
|
|
#define SYNC_PARSE_FLAG_EXEC BIT(0)
|
|
#define SYNC_PARSE_FLAG_LR_MODE BIT(1)
|
|
#define SYNC_PARSE_FLAG_DISALLOW_USER_FENCE BIT(2)
|
|
|
|
int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
|
|
struct xe_sync_entry *sync,
|
|
struct drm_xe_sync __user *sync_user,
|
|
unsigned int flags);
|
|
int xe_sync_entry_wait(struct xe_sync_entry *sync);
|
|
int xe_sync_entry_add_deps(struct xe_sync_entry *sync,
|
|
struct xe_sched_job *job);
|
|
void xe_sync_entry_signal(struct xe_sync_entry *sync,
|
|
struct xe_sched_job *job,
|
|
struct dma_fence *fence);
|
|
void xe_sync_entry_cleanup(struct xe_sync_entry *sync);
|
|
struct dma_fence *
|
|
xe_sync_in_fence_get(struct xe_sync_entry *sync, int num_sync,
|
|
struct xe_exec_queue *q, struct xe_vm *vm);
|
|
|
|
static inline bool xe_sync_is_ufence(struct xe_sync_entry *sync)
|
|
{
|
|
return !!sync->ufence;
|
|
}
|
|
|
|
#endif
|