summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@tungstengraphics.com>2008-11-12 18:40:04 +0100
committerJakob Bornecrantz <jakob@tungstengraphics.com>2008-11-12 18:40:04 +0100
commit1ead45c8f02e7c51cfe977383726d20479385688 (patch)
tree70adf739fa7dc10653b266dc542fb65e0ee82086
parent13948c635d83285909e25ffd5285165789a598b2 (diff)
mode: Remove hotplug support from ioctl interface
-rw-r--r--libdrm/xf86drmMode.c9
-rw-r--r--libdrm/xf86drmMode.h5
-rw-r--r--linux-core/drm_crtc.c10
-rw-r--r--linux-core/drm_drv.c2
-rw-r--r--linux-core/drm_irq.c52
-rw-r--r--shared-core/drm.h33
-rw-r--r--shared-core/drm_mode.h7
7 files changed, 0 insertions, 118 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index a25b11bb..38fdbc11 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -183,15 +183,6 @@ err_allocs:
return r;
}
-uint32_t drmModeGetHotplug(int fd)
-{
- struct drm_mode_hotplug arg;
- arg.counter = 0;
-
- ioctl(fd, DRM_IOCTL_MODE_HOTPLUG, &arg);
- return arg.counter;
-}
-
int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
uint32_t *buf_id)
diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h
index 59612a94..ee45717b 100644
--- a/libdrm/xf86drmMode.h
+++ b/libdrm/xf86drmMode.h
@@ -158,11 +158,6 @@ extern void drmModeFreeEncoder( drmModeEncoderPtr ptr );
*/
extern drmModeResPtr drmModeGetResources(int fd);
-/**
- * Retrives the hotplug counter
- */
-extern uint32_t drmModeGetHotplug(int fd);
-
/*
* FrameBuffer manipulation.
*/
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index bc385dce..255cc8c2 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -844,16 +844,6 @@ void drm_mode_config_cleanup(struct drm_device *dev)
}
EXPORT_SYMBOL(drm_mode_config_cleanup);
-int drm_mode_hotplug_ioctl(struct drm_device *dev,
- void *data, struct drm_file *file_priv)
-{
- struct drm_mode_hotplug *arg = data;
-
- arg->counter = dev->mode_config.hotplug_counter;
-
- return 0;
-}
-
/**
* drm_crtc_convert_to_umode - convert a drm_display_mode into a modeinfo
* @out: drm_mode_modeinfo struct to return to the user
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 11044bff..a8b17f1d 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -138,8 +138,6 @@ static struct drm_ioctl_desc drm_ioctls[] = {
DRM_IOCTL_DEF(DRM_IOCTL_MODE_ATTACHMODE, drm_mode_attachmode_ioctl, DRM_MASTER|DRM_CONTROL_ALLOW),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_DETACHMODE, drm_mode_detachmode_ioctl, DRM_MASTER|DRM_CONTROL_ALLOW),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPROPERTY, drm_mode_getproperty_ioctl, DRM_MASTER | DRM_CONTROL_ALLOW),
- DRM_IOCTL_DEF(DRM_IOCTL_MODE_HOTPLUG, drm_mode_hotplug_ioctl, DRM_CONTROL_ALLOW),
- DRM_IOCTL_DEF(DRM_IOCTL_WAIT_HOTPLUG, drm_wait_hotplug, 0),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_REPLACEFB, drm_mode_replacefb, DRM_MASTER|DRM_ROOT_ONLY|DRM_CONTROL_ALLOW),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETENCODER, drm_mode_getencoder, DRM_MASTER|DRM_CONTROL_ALLOW),
diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c
index b317d863..103f3e2b 100644
--- a/linux-core/drm_irq.c
+++ b/linux-core/drm_irq.c
@@ -192,58 +192,6 @@ err:
}
EXPORT_SYMBOL(drm_vblank_init);
-int drm_wait_hotplug(struct drm_device *dev, void *data,
- struct drm_file *file_priv)
-{
- union drm_wait_hotplug *hotplugwait = data;
- struct timeval now;
- int ret = 0;
- unsigned int flags;
-
- if ((!dev->irq) || (!dev->irq_enabled))
- return -EINVAL;
-
- flags = hotplugwait->request.type;
-
- if (flags & _DRM_HOTPLUG_SIGNAL) {
- unsigned long irqflags;
- struct list_head *hotplug_sigs = dev->hotplug_sigs;
- struct drm_hotplug_sig *hotplug_sig;
-
- hotplug_sig = drm_calloc(1, sizeof(struct drm_hotplug_sig),
- DRM_MEM_DRIVER);
- if (!hotplug_sig)
- return -ENOMEM;
-
- atomic_inc(&dev->hotplug_signal_pending);
-
- hotplug_sig->info.si_signo = hotplugwait->request.signal;
- hotplug_sig->task = current;
- hotplug_sig->counter =
- hotplugwait->reply.counter =
- dev->mode_config.hotplug_counter;
-
- spin_lock_irqsave(&dev->hotplug_lock, irqflags);
-
- list_add_tail(&hotplug_sig->head, hotplug_sigs);
-
- spin_unlock_irqrestore(&dev->hotplug_lock, irqflags);
- } else {
- int cur_hotplug = dev->mode_config.hotplug_counter;
-
- DRM_WAIT_ON(ret, dev->hotplug_queue, 3 * DRM_HZ,
- dev->mode_config.hotplug_counter > cur_hotplug);
-
- do_gettimeofday(&now);
-
- hotplugwait->reply.tval_sec = now.tv_sec;
- hotplugwait->reply.tval_usec = now.tv_usec;
- hotplugwait->reply.counter = dev->mode_config.hotplug_counter;
- }
-
- return ret;
-}
-
static void drm_hotplug_cleanup(struct drm_device *dev)
{
if (dev->hotplug_sigs)
diff --git a/shared-core/drm.h b/shared-core/drm.h
index 42dad492..cc6aead4 100644
--- a/shared-core/drm.h
+++ b/shared-core/drm.h
@@ -555,37 +555,6 @@ union drm_wait_vblank {
struct drm_wait_vblank_reply reply;
};
-/* Handle monitor hotplug.
- *
- * May want to extend this later to pass reply information which
- * details the connectors which generated the hotplug event.
- * Some chipsets can't determine that though, and we'd need to leave
- * it to the higher levels to determine exactly what changed.
- */
-enum drm_hotplug_seq_type {
- _DRM_HOTPLUG_SIGNAL = 0x00000001, /**< Send signal instead of blocking */
-};
-struct drm_wait_hotplug_request {
- enum drm_hotplug_seq_type type;
- unsigned long signal;
-};
-
-struct drm_wait_hotplug_reply {
- enum drm_hotplug_seq_type type;
- unsigned int counter;
- long tval_sec;
- long tval_usec;
-};
-
-/**
- * DRM_IOCTL_WAIT_HOTPLUG ioctl argument type.
- *
- * \sa drmWaitHotplug().
- */
-union drm_wait_hotplug {
- struct drm_wait_hotplug_request request;
- struct drm_wait_hotplug_reply reply;
-};
enum drm_modeset_ctl_cmd {
_DRM_PRE_MODESET = 1,
@@ -792,8 +761,6 @@ struct drm_gem_open {
#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAB, struct drm_mode_get_property)
#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xAC, struct drm_mode_cursor)
-#define DRM_IOCTL_MODE_HOTPLUG DRM_IOWR(0xAD, struct drm_mode_hotplug)
-#define DRM_IOCTL_WAIT_HOTPLUG DRM_IOWR(0xAE, union drm_wait_hotplug)
#define DRM_IOCTL_MODE_REPLACEFB DRM_IOWR(0xAF, struct drm_mode_fb_cmd)
#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xB0, struct drm_mode_get_encoder)
diff --git a/shared-core/drm_mode.h b/shared-core/drm_mode.h
index f44c9a0d..6b1abd5b 100644
--- a/shared-core/drm_mode.h
+++ b/shared-core/drm_mode.h
@@ -258,13 +258,6 @@ struct drm_mode_cursor {
uint32_t handle;
};
-/*
- * oh so ugly hotplug
- */
-struct drm_mode_hotplug {
- uint32_t counter;
-};
-
struct drm_mode_crtc_lut {
uint32_t crtc_id;
uint32_t gamma_size;