summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/drm.h12
-rw-r--r--shared-core/i915_drv.h1
-rw-r--r--shared-core/i915_init.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/shared-core/drm.h b/shared-core/drm.h
index d42bf73a..890dcf88 100644
--- a/shared-core/drm.h
+++ b/shared-core/drm.h
@@ -978,6 +978,11 @@ struct drm_mode_fb_cmd {
unsigned int depth;
};
+struct drm_mode_mode_cmd {
+ unsigned int output_id;
+ unsigned int mode_id;
+};
+
/**
* \name Ioctls Definitions
*/
@@ -1055,7 +1060,12 @@ struct drm_mode_fb_cmd {
#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA3, struct drm_mode_crtc)
#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xA4, struct drm_mode_fb_cmd)
#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xA5, unsigned int)
-#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xA6, struct drm_mode_fb_cmd)
+#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xA6, struct drm_mode_fb_cmd)
+
+#define DRM_IOCTL_MODE_ADDMODE DRM_IOWR(0xA7, struct drm_mode_modeinfo)
+#define DRM_IOCTL_MODE_RMMODE DRM_IOWR(0xA8, unsigned int)
+#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd)
+#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xAA, struct drm_mode_mode_cmd)
/*@}*/
/**
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index a99beaa9..c41fbbc5 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -221,6 +221,7 @@ extern void i915_emit_breadcrumb(drm_device_t *dev);
extern void i915_dispatch_flip(drm_device_t * dev, int pipes, int sync);
extern int i915_emit_mi_flush(drm_device_t *dev, uint32_t flush);
extern int i915_driver_firstopen(struct drm_device *dev);
+extern int i915_dma_cleanup(drm_device_t * dev);
/* i915_irq.c */
extern int i915_irq_emit(DRM_IOCTL_ARGS);
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c
index 510e853b..61576aae 100644
--- a/shared-core/i915_init.c
+++ b/shared-core/i915_init.c
@@ -202,7 +202,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
/* FIXME: need wrapper with PCI mem checks */
ret = drm_mem_reg_ioremap(dev, &dev_priv->ring_buffer->mem,
- &dev_priv->ring.virtual_start);
+ (void **) &dev_priv->ring.virtual_start);
if (ret)
DRM_ERROR("error mapping ring buffer: %d\n", ret);
@@ -272,7 +272,7 @@ int i915_driver_unload(drm_device_t *dev)
drm_mem_reg_iounmap(dev, &dev_priv->ring_buffer->mem,
dev_priv->ring.virtual_start);
- DRM_DEBUG("usage is %d\n", dev_priv->ring_buffer->usage);
+ DRM_DEBUG("usage is %d\n", atomic_read(&dev_priv->ring_buffer->usage));
mutex_lock(&dev->struct_mutex);
drm_bo_usage_deref_locked(dev_priv->ring_buffer);
mutex_unlock(&dev->struct_mutex);