Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4567 → Rev 4568

/drivers/include/drm/vmwgfx_drm.h
File deleted
/drivers/include/drm/ttm/ttm_bo_api.h
172,6 → 172,7
* @offset: The current GPU offset, which can have different meanings
* depending on the memory type. For SYSTEM type memory, it should be 0.
* @cur_placement: Hint of current placement.
* @wu_mutex: Wait unreserved mutex.
*
* Base class for TTM buffer object, that deals with data placement and CPU
* mappings. GPU mappings are really up to the driver, but for simpler GPUs
253,6 → 254,7
 
struct reservation_object *resv;
struct reservation_object ttm_resv;
struct mutex wu_mutex;
};
 
/**
705,5 → 707,5
size_t count, loff_t *f_pos, bool write);
 
extern void ttm_bo_swapout_all(struct ttm_bo_device *bdev);
 
extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo);
#endif
/drivers/include/drm/ttm/ttm_bo_driver.h
38,7 → 38,7
#include <drm/drm_global.h>
#include <drm/drm_vma_manager.h>
//#include <linux/workqueue.h>
//#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/spinlock.h>
 
struct ww_acquire_ctx;
682,6 → 682,15
extern int ttm_tt_swapout(struct ttm_tt *ttm,
struct file *persistent_swap_storage);
 
/**
* ttm_tt_unpopulate - free pages from a ttm
*
* @ttm: Pointer to the ttm_tt structure
*
* Calls the driver method to free all pages from a ttm
*/
extern void ttm_tt_unpopulate(struct ttm_tt *ttm);
 
/*
* ttm_bo.c
*/
/drivers/include/drm/ttm/ttm_execbuf_util.h
70,7 → 70,8
/**
* function ttm_eu_reserve_buffers
*
* @ticket: [out] ww_acquire_ctx returned by call.
* @ticket: [out] ww_acquire_ctx filled in by call, or NULL if only
* non-blocking reserves should be tried.
* @list: thread private list of ttm_validate_buffer structs.
*
* Tries to reserve bos pointed to by the list entries for validation.
/drivers/include/drm/ttm/ttm_object.h
41,6 → 41,7
#include <drm/drm_hashtab.h>
#include <linux/kref.h>
//#include <linux/rcupdate.h>
#include <linux/dma-buf.h>
#include <ttm/ttm_memory.h>
 
/**
77,6 → 78,7
ttm_fence_type,
ttm_buffer_type,
ttm_lock_type,
ttm_prime_type,
ttm_driver_type0 = 256,
ttm_driver_type1,
ttm_driver_type2,
132,7 → 134,31
enum ttm_ref_type ref_type);
};
 
 
/**
* struct ttm_prime_object - Modified base object that is prime-aware
*
* @base: struct ttm_base_object that we derive from
* @mutex: Mutex protecting the @dma_buf member.
* @size: Size of the dma_buf associated with this object
* @real_type: Type of the underlying object. Needed since we're setting
* the value of @base::object_type to ttm_prime_type
* @dma_buf: Non ref-coutned pointer to a struct dma_buf created from this
* object.
* @refcount_release: The underlying object's release method. Needed since
* we set @base::refcount_release to our own release method.
*/
 
struct ttm_prime_object {
struct ttm_base_object base;
struct mutex mutex;
size_t size;
enum ttm_object_type real_type;
struct dma_buf *dma_buf;
void (*refcount_release) (struct ttm_base_object **);
};
 
/**
* ttm_base_object_init
*
* @tfile: Pointer to a struct ttm_object_file.
164,8 → 190,6
* @key: Hash key
*
* Looks up a struct ttm_base_object with the key @key.
* Also verifies that the object is visible to the application, by
* comparing the @tfile argument and checking the object shareable flag.
*/
 
extern struct ttm_base_object *ttm_base_object_lookup(struct ttm_object_file
172,6 → 196,20
*tfile, uint32_t key);
 
/**
* ttm_base_object_lookup_for_ref
*
* @tdev: Pointer to a struct ttm_object_device.
* @key: Hash key
*
* Looks up a struct ttm_base_object with the key @key.
* This function should only be used when the struct tfile associated with the
* caller doesn't yet have a reference to the base object.
*/
 
extern struct ttm_base_object *
ttm_base_object_lookup_for_ref(struct ttm_object_device *tdev, uint32_t key);
 
/**
* ttm_base_object_unref
*
* @p_base: Pointer to a pointer referencing a struct ttm_base_object.
192,6 → 230,8
* @existed: Upon completion, indicates that an identical reference object
* already existed, and the refcount was upped on that object instead.
*
* Checks that the base object is shareable and adds a ref object to it.
*
* Adding a ref object to a base object is basically like referencing the
* base object, but a user-space application holds the reference. When the
* file corresponding to @tfile is closed, all its reference objects are
248,14 → 288,18
/**
* ttm_object device init - initialize a struct ttm_object_device
*
* @mem_glob: struct ttm_mem_global for memory accounting.
* @hash_order: Order of hash table used to hash the base objects.
* @ops: DMA buf ops for prime objects of this device.
*
* This function is typically called on device initialization to prepare
* data structures needed for ttm base and ref objects.
*/
 
extern struct ttm_object_device *ttm_object_device_init
(struct ttm_mem_global *mem_glob, unsigned int hash_order);
extern struct ttm_object_device *
ttm_object_device_init(struct ttm_mem_global *mem_glob,
unsigned int hash_order,
const struct dma_buf_ops *ops);
 
/**
* ttm_object_device_release - release data held by a ttm_object_device
272,4 → 316,31
 
#define ttm_base_object_kfree(__object, __base)\
kfree_rcu(__object, __base.rhead)
 
extern int ttm_prime_object_init(struct ttm_object_file *tfile,
size_t size,
struct ttm_prime_object *prime,
bool shareable,
enum ttm_object_type type,
void (*refcount_release)
(struct ttm_base_object **),
void (*ref_obj_release)
(struct ttm_base_object *,
enum ttm_ref_type ref_type));
 
static inline enum ttm_object_type
ttm_base_object_type(struct ttm_base_object *base)
{
return (base->object_type == ttm_prime_type) ?
container_of(base, struct ttm_prime_object, base)->real_type :
base->object_type;
}
extern int ttm_prime_fd_to_handle(struct ttm_object_file *tfile,
int fd, u32 *handle);
extern int ttm_prime_handle_to_fd(struct ttm_object_file *tfile,
uint32_t handle, uint32_t flags,
int *prime_fd);
 
//#define ttm_prime_object_kfree(__obj, __prime) \
// kfree_rcu(__obj, __prime.base.rhead)
#endif
/drivers/include/drm/ttm/ttm_page_alloc.h
62,7 → 62,7
extern int ttm_page_alloc_debugfs(struct seq_file *m, void *data);
 
 
#ifdef CONFIG_SWIOTLB
#if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
/**
* Initialize pool allocator.
*/
94,6 → 94,15
{
return 0;
}
static inline int ttm_dma_populate(struct ttm_dma_tt *ttm_dma,
struct device *dev)
{
return -ENOMEM;
}
static inline void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma,
struct device *dev)
{
}
#endif
 
#endif