i915: finish removing TTM bits

Makes it build again.
main
Jesse Barnes 2008-08-16 12:09:24 -07:00
parent d313108167
commit a2adc69656
5 changed files with 1 additions and 129 deletions

View File

@ -48,31 +48,6 @@ module_param_named(fbpercrtc, i915_fbpercrtc, int, 0400);
unsigned int i915_rightof = 1;
module_param_named(i915_rightof, i915_rightof, int, 0400);
#if defined(I915_HAVE_FENCE) && defined(I915_TTM)
extern struct drm_fence_driver i915_fence_driver;
#endif
#if defined(I915_HAVE_BUFFER) && defined(I915_TTM)
static uint32_t i915_mem_prios[] = {DRM_BO_MEM_VRAM, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL};
static uint32_t i915_busy_prios[] = {DRM_BO_MEM_TT, DRM_BO_MEM_VRAM, DRM_BO_MEM_LOCAL};
static struct drm_bo_driver i915_bo_driver = {
.mem_type_prio = i915_mem_prios,
.mem_busy_prio = i915_busy_prios,
.num_mem_type_prio = sizeof(i915_mem_prios)/sizeof(uint32_t),
.num_mem_busy_prio = sizeof(i915_busy_prios)/sizeof(uint32_t),
.create_ttm_backend_entry = i915_create_ttm_backend_entry,
.fence_type = i915_fence_type,
.invalidate_caches = i915_invalidate_caches,
.init_mem_type = i915_init_mem_type,
.evict_flags = i915_evict_flags,
.move = i915_move,
.ttm_cache_flush = i915_flush_ttm,
.command_stream_barrier = NULL,
};
#endif /* ttm */
static int i915_suspend(struct drm_device *dev, pm_message_t state)
{
struct drm_i915_private *dev_priv = dev->dev_private;
@ -175,12 +150,6 @@ static struct drm_driver driver = {
.probe = probe,
.remove = remove,
},
#if defined(I915_HAVE_FENCE) && defined(I915_TTM)
.fence_driver = &i915_fence_driver,
#endif
#if defined(I915_HAVE_BUFFER) && defined(I915_TTM)
.bo_driver = &i915_bo_driver,
#endif
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.date = DRIVER_DATE,

View File

@ -183,73 +183,12 @@ static int compat_i915_alloc(struct file *file, unsigned int cmd,
DRM_IOCTL_I915_ALLOC, (unsigned long) request);
}
typedef struct drm_i915_execbuffer32 {
uint64_t ops_list;
uint32_t num_buffers;
struct _drm_i915_batchbuffer32 batch;
drm_context_t context;
struct drm_fence_arg fence_arg;
} drm_i915_execbuffer32_t;
static int compat_i915_execbuffer(struct file *file, unsigned int cmd,
unsigned long arg)
{
drm_i915_execbuffer32_t req32;
struct drm_i915_execbuffer __user *request;
int err;
if (copy_from_user(&req32, (void __user *) arg, sizeof(req32)))
return -EFAULT;
request = compat_alloc_user_space(sizeof(*request));
if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
|| __put_user(req32.ops_list, &request->ops_list)
|| __put_user(req32.num_buffers, &request->num_buffers)
|| __put_user(req32.context, &request->context)
|| __copy_to_user(&request->fence_arg, &req32.fence_arg,
sizeof(req32.fence_arg))
|| __put_user(req32.batch.start, &request->batch.start)
|| __put_user(req32.batch.used, &request->batch.used)
|| __put_user(req32.batch.DR1, &request->batch.DR1)
|| __put_user(req32.batch.DR4, &request->batch.DR4)
|| __put_user(req32.batch.num_cliprects,
&request->batch.num_cliprects)
|| __put_user((int __user *)(unsigned long)req32.batch.cliprects,
&request->batch.cliprects))
return -EFAULT;
err = drm_ioctl(file->f_dentry->d_inode, file,
DRM_IOCTL_I915_EXECBUFFER, (unsigned long)request);
if (err)
return err;
if (__get_user(req32.fence_arg.handle, &request->fence_arg.handle)
|| __get_user(req32.fence_arg.fence_class, &request->fence_arg.fence_class)
|| __get_user(req32.fence_arg.type, &request->fence_arg.type)
|| __get_user(req32.fence_arg.flags, &request->fence_arg.flags)
|| __get_user(req32.fence_arg.signaled, &request->fence_arg.signaled)
|| __get_user(req32.fence_arg.error, &request->fence_arg.error)
|| __get_user(req32.fence_arg.sequence, &request->fence_arg.sequence))
return -EFAULT;
if (copy_to_user((void __user *)arg, &req32, sizeof(req32)))
return -EFAULT;
return 0;
}
drm_ioctl_compat_t *i915_compat_ioctls[] = {
[DRM_I915_BATCHBUFFER] = compat_i915_batchbuffer,
[DRM_I915_CMDBUFFER] = compat_i915_cmdbuffer,
[DRM_I915_GETPARAM] = compat_i915_getparam,
[DRM_I915_IRQ_EMIT] = compat_i915_irq_emit,
[DRM_I915_ALLOC] = compat_i915_alloc,
#ifdef I915_HAVE_BUFFER
[DRM_I915_EXECBUFFER] = compat_i915_execbuffer,
#endif
};
/**

View File

@ -42,7 +42,6 @@
#define DRIVER_DATE "20080730"
#if defined(__linux__)
#define I915_HAVE_FENCE
#define I915_HAVE_BUFFER
#endif
@ -62,7 +61,7 @@
* 1.12: TTM relocation optimization
*/
#define DRIVER_MAJOR 1
#if defined(I915_HAVE_FENCE) && defined(I915_HAVE_BUFFER)
#if defined(I915_HAVE_BUFFER)
#define DRIVER_MINOR 13
#else
#define DRIVER_MINOR 6
@ -176,12 +175,6 @@ struct drm_i915_private {
struct drm_mm vram;
#ifdef I915_HAVE_FENCE
uint32_t flush_sequence;
uint32_t flush_flags;
uint32_t flush_pending;
uint32_t saved_flush_status;
#endif
#ifdef I915_HAVE_BUFFER
void *agp_iomap;
unsigned int max_validate_buffers;
@ -556,30 +549,7 @@ extern void i915_mem_release(struct drm_device * dev,
extern int i915_save_state(struct drm_device *dev);
extern int i915_restore_state(struct drm_device *dev);
#ifdef I915_HAVE_FENCE
/* i915_fence.c */
extern void i915_fence_handler(struct drm_device *dev);
extern void i915_invalidate_reported_sequence(struct drm_device *dev);
#endif
#if defined(I915_HAVE_BUFFER) && defined(I915_TTM)
/* i915_buffer.c */
extern struct drm_ttm_backend *i915_create_ttm_backend_entry(struct drm_device *dev);
extern int i915_fence_type(struct drm_buffer_object *bo, uint32_t *fclass,
uint32_t *type);
extern int i915_invalidate_caches(struct drm_device *dev, uint64_t buffer_flags);
extern int i915_init_mem_type(struct drm_device *dev, uint32_t type,
struct drm_mem_type_manager *man);
extern uint64_t i915_evict_flags(struct drm_buffer_object *bo);
extern int i915_move(struct drm_buffer_object *bo, int evict,
int no_wait, struct drm_bo_mem_reg *new_mem);
void i915_flush_ttm(struct drm_ttm *ttm);
#endif /* ttm */
#ifdef I915_HAVE_BUFFER
/* i915_execbuf.c */
int i915_execbuffer(struct drm_device *dev, void *data,
struct drm_file *file_priv);
/* i915_gem.c */
int i915_gem_init_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);

View File

@ -519,8 +519,5 @@ int i915_driver_firstopen(struct drm_device *dev)
{
if (drm_core_check_feature(dev, DRIVER_MODESET))
return 0;
#if defined(I915_HAVE_BUFFER) && defined(I915_TTM)
drm_bo_driver_init(dev);
#endif
return 0;
}

View File

@ -554,9 +554,6 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
if (iir & I915_USER_INTERRUPT) {
dev_priv->mm.irq_gem_seqno = i915_get_gem_seqno(dev);
DRM_WAKEUP(&dev_priv->irq_queue);
#ifdef I915_HAVE_FENCE
i915_fence_handler(dev);
#endif
}
if (pipea_stats & (PIPE_START_VBLANK_INTERRUPT_STATUS|