Revert "drm/ttm: add a way to bo_wait for either the last read or last write"
This reverts commit dfadbbdb57
.
Further upstream discussion between Marek and Thomas decided this wasn't
fully baked and needed further work, so revert it before it hits mainline.
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -44,11 +44,6 @@ struct ttm_bo_device;
|
||||
|
||||
struct drm_mm_node;
|
||||
|
||||
enum ttm_buffer_usage {
|
||||
TTM_USAGE_READ = 1,
|
||||
TTM_USAGE_WRITE = 2,
|
||||
TTM_USAGE_READWRITE = TTM_USAGE_READ | TTM_USAGE_WRITE
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ttm_placement
|
||||
@@ -179,10 +174,7 @@ struct ttm_tt;
|
||||
* the bo_device::lru_lock.
|
||||
* @reserved: Deadlock-free lock used for synchronization state transitions.
|
||||
* @sync_obj_arg: Opaque argument to synchronization object function.
|
||||
* @sync_obj: Pointer to a synchronization object of a last read or write,
|
||||
* whichever is later.
|
||||
* @sync_obj_read: Pointer to a synchronization object of a last read.
|
||||
* @sync_obj_write: Pointer to a synchronization object of a last write.
|
||||
* @sync_obj: Pointer to a synchronization object.
|
||||
* @priv_flags: Flags describing buffer object internal state.
|
||||
* @vm_rb: Rb node for the vm rb tree.
|
||||
* @vm_node: Address space manager node.
|
||||
@@ -266,8 +258,6 @@ struct ttm_buffer_object {
|
||||
|
||||
void *sync_obj_arg;
|
||||
void *sync_obj;
|
||||
void *sync_obj_read;
|
||||
void *sync_obj_write;
|
||||
unsigned long priv_flags;
|
||||
|
||||
/**
|
||||
@@ -335,7 +325,6 @@ ttm_bo_reference(struct ttm_buffer_object *bo)
|
||||
* @bo: The buffer object.
|
||||
* @interruptible: Use interruptible wait.
|
||||
* @no_wait: Return immediately if buffer is busy.
|
||||
* @usage: Whether to wait for the last read and/or the last write.
|
||||
*
|
||||
* This function must be called with the bo::mutex held, and makes
|
||||
* sure any previous rendering to the buffer is completed.
|
||||
@@ -345,8 +334,7 @@ ttm_bo_reference(struct ttm_buffer_object *bo)
|
||||
* Returns -ERESTARTSYS if interrupted by a signal.
|
||||
*/
|
||||
extern int ttm_bo_wait(struct ttm_buffer_object *bo, bool lazy,
|
||||
bool interruptible, bool no_wait,
|
||||
enum ttm_buffer_usage usage);
|
||||
bool interruptible, bool no_wait);
|
||||
/**
|
||||
* ttm_bo_validate
|
||||
*
|
||||
|
@@ -41,26 +41,20 @@
|
||||
* @bo: refcounted buffer object pointer.
|
||||
* @new_sync_obj_arg: New sync_obj_arg for @bo, to be used once
|
||||
* adding a new sync object.
|
||||
* @usage Indicates how @bo is used by the device.
|
||||
* @reserved: Indicates whether @bo has been reserved for validation.
|
||||
* @removed: Indicates whether @bo has been removed from lru lists.
|
||||
* @put_count: Number of outstanding references on bo::list_kref.
|
||||
* @old_sync_obj: Pointer to a sync object about to be unreferenced
|
||||
* @old_sync_obj_read: Pointer to a read sync object about to be unreferenced.
|
||||
* @old_sync_obj_write: Pointer to a write sync object about to be unreferenced.
|
||||
*/
|
||||
|
||||
struct ttm_validate_buffer {
|
||||
struct list_head head;
|
||||
struct ttm_buffer_object *bo;
|
||||
void *new_sync_obj_arg;
|
||||
enum ttm_buffer_usage usage;
|
||||
bool reserved;
|
||||
bool removed;
|
||||
int put_count;
|
||||
void *old_sync_obj;
|
||||
void *old_sync_obj_read;
|
||||
void *old_sync_obj_write;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user