Commit b0e898ac authored by Daniel Vetter's avatar Daniel Vetter Committed by Dave Airlie
Browse files

drm: remove FASYNC support

So I've stumbled over drm_fasync and wondered what it does. Digging
that up is quite a story.

First I've had to read up on what this does and ended up being rather
bewildered why peopled loved signals so much back in the days that
they've created SIGIO just for that ...

Then I wondered how this ever works, and what that strange "No-op."
comment right above it should mean. After all calling the core fasync
helper is pretty obviously not a noop. After reading through the
kernels FASYNC implementation I've noticed that signals are only sent
out to the processes attached with FASYNC by calling kill_fasync.

No merged drm driver has ever done that.

After more digging I've found out that the only driver that ever used
this is the so called GAMMA driver. I've frankly never heard of such a
gpu brand ever before. Now FASYNC seems to not have been the only bad
thing with that driver, since Dave Airlie removed it from the drm
driver with prejudice:

commit 1430163b4bbf7b00367ea1066c1c5f...
parent 5bbd5332
...@@ -2504,7 +2504,6 @@ void (*postclose) (struct drm_device *, struct drm_file *);</synopsis> ...@@ -2504,7 +2504,6 @@ void (*postclose) (struct drm_device *, struct drm_file *);</synopsis>
<programlisting> <programlisting>
.poll = drm_poll, .poll = drm_poll,
.read = drm_read, .read = drm_read,
.fasync = drm_fasync,
.llseek = no_llseek, .llseek = no_llseek,
</programlisting> </programlisting>
</para> </para>
......
...@@ -190,7 +190,6 @@ static const struct file_operations ast_fops = { ...@@ -190,7 +190,6 @@ static const struct file_operations ast_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = ast_mmap, .mmap = ast_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = drm_compat_ioctl, .compat_ioctl = drm_compat_ioctl,
#endif #endif
......
...@@ -85,7 +85,6 @@ static const struct file_operations cirrus_driver_fops = { ...@@ -85,7 +85,6 @@ static const struct file_operations cirrus_driver_fops = {
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = drm_compat_ioctl, .compat_ioctl = drm_compat_ioctl,
#endif #endif
.fasync = drm_fasync,
}; };
static struct drm_driver driver = { static struct drm_driver driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_USE_MTRR, .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_USE_MTRR,
......
...@@ -73,8 +73,6 @@ static int drm_setup(struct drm_device * dev) ...@@ -73,8 +73,6 @@ static int drm_setup(struct drm_device * dev)
dev->last_context = 0; dev->last_context = 0;
dev->if_version = 0; dev->if_version = 0;
dev->buf_async = NULL;
DRM_DEBUG("\n"); DRM_DEBUG("\n");
/* /*
...@@ -372,18 +370,6 @@ static int drm_open_helper(struct inode *inode, struct file *filp, ...@@ -372,18 +370,6 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
return ret; return ret;
} }
/** No-op. */
int drm_fasync(int fd, struct file *filp, int on)
{
struct drm_file *priv = filp->private_data;
struct drm_device *dev = priv->minor->dev;
DRM_DEBUG("fd = %d, device = 0x%lx\n", fd,
(long)old_encode_dev(priv->minor->device));
return fasync_helper(fd, filp, on, &dev->buf_async);
}
EXPORT_SYMBOL(drm_fasync);
static void drm_master_release(struct drm_device *dev, struct file *filp) static void drm_master_release(struct drm_device *dev, struct file *filp)
{ {
struct drm_file *file_priv = filp->private_data; struct drm_file *file_priv = filp->private_data;
......
...@@ -622,7 +622,6 @@ static const struct file_operations psb_gem_fops = { ...@@ -622,7 +622,6 @@ static const struct file_operations psb_gem_fops = {
.unlocked_ioctl = psb_unlocked_ioctl, .unlocked_ioctl = psb_unlocked_ioctl,
.mmap = drm_gem_mmap, .mmap = drm_gem_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
.read = drm_read, .read = drm_read,
}; };
......
...@@ -113,7 +113,6 @@ static const struct file_operations i810_buffer_fops = { ...@@ -113,7 +113,6 @@ static const struct file_operations i810_buffer_fops = {
.release = drm_release, .release = drm_release,
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = i810_mmap_buffers, .mmap = i810_mmap_buffers,
.fasync = drm_fasync,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = drm_compat_ioctl, .compat_ioctl = drm_compat_ioctl,
#endif #endif
......
...@@ -49,7 +49,6 @@ static const struct file_operations i810_driver_fops = { ...@@ -49,7 +49,6 @@ static const struct file_operations i810_driver_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = drm_compat_ioctl, .compat_ioctl = drm_compat_ioctl,
#endif #endif
......
...@@ -994,7 +994,6 @@ static const struct file_operations i915_driver_fops = { ...@@ -994,7 +994,6 @@ static const struct file_operations i915_driver_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = drm_gem_mmap, .mmap = drm_gem_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
.read = drm_read, .read = drm_read,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = i915_compat_ioctl, .compat_ioctl = i915_compat_ioctl,
......
...@@ -50,7 +50,6 @@ static const struct file_operations mga_driver_fops = { ...@@ -50,7 +50,6 @@ static const struct file_operations mga_driver_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = mga_compat_ioctl, .compat_ioctl = mga_compat_ioctl,
#endif #endif
......
...@@ -81,7 +81,6 @@ static const struct file_operations mgag200_driver_fops = { ...@@ -81,7 +81,6 @@ static const struct file_operations mgag200_driver_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = mgag200_mmap, .mmap = mgag200_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = drm_compat_ioctl, .compat_ioctl = drm_compat_ioctl,
#endif #endif
......
...@@ -673,7 +673,6 @@ nouveau_driver_fops = { ...@@ -673,7 +673,6 @@ nouveau_driver_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = nouveau_ttm_mmap, .mmap = nouveau_ttm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
.read = drm_read, .read = drm_read,
#if defined(CONFIG_COMPAT) #if defined(CONFIG_COMPAT)
.compat_ioctl = nouveau_compat_ioctl, .compat_ioctl = nouveau_compat_ioctl,
......
...@@ -592,7 +592,6 @@ static const struct file_operations omapdriver_fops = { ...@@ -592,7 +592,6 @@ static const struct file_operations omapdriver_fops = {
.release = drm_release, .release = drm_release,
.mmap = omap_gem_mmap, .mmap = omap_gem_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
.read = drm_read, .read = drm_read,
.llseek = noop_llseek, .llseek = noop_llseek,
}; };
......
...@@ -84,7 +84,6 @@ static const struct file_operations qxl_fops = { ...@@ -84,7 +84,6 @@ static const struct file_operations qxl_fops = {
.release = drm_release, .release = drm_release,
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
.mmap = qxl_mmap, .mmap = qxl_mmap,
}; };
......
...@@ -48,7 +48,6 @@ static const struct file_operations r128_driver_fops = { ...@@ -48,7 +48,6 @@ static const struct file_operations r128_driver_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = r128_compat_ioctl, .compat_ioctl = r128_compat_ioctl,
#endif #endif
......
...@@ -266,7 +266,6 @@ static const struct file_operations radeon_driver_old_fops = { ...@@ -266,7 +266,6 @@ static const struct file_operations radeon_driver_old_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
.read = drm_read, .read = drm_read,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = radeon_compat_ioctl, .compat_ioctl = radeon_compat_ioctl,
...@@ -375,7 +374,6 @@ static const struct file_operations radeon_driver_kms_fops = { ...@@ -375,7 +374,6 @@ static const struct file_operations radeon_driver_kms_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = radeon_mmap, .mmap = radeon_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
.read = drm_read, .read = drm_read,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = radeon_kms_compat_ioctl, .compat_ioctl = radeon_kms_compat_ioctl,
......
...@@ -148,7 +148,6 @@ static const struct file_operations rcar_du_fops = { ...@@ -148,7 +148,6 @@ static const struct file_operations rcar_du_fops = {
#endif #endif
.poll = drm_poll, .poll = drm_poll,
.read = drm_read, .read = drm_read,
.fasync = drm_fasync,
.llseek = no_llseek, .llseek = no_llseek,
.mmap = drm_gem_cma_mmap, .mmap = drm_gem_cma_mmap,
}; };
......
...@@ -42,7 +42,6 @@ static const struct file_operations savage_driver_fops = { ...@@ -42,7 +42,6 @@ static const struct file_operations savage_driver_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = drm_compat_ioctl, .compat_ioctl = drm_compat_ioctl,
#endif #endif
......
...@@ -257,7 +257,6 @@ static const struct file_operations shmob_drm_fops = { ...@@ -257,7 +257,6 @@ static const struct file_operations shmob_drm_fops = {
#endif #endif
.poll = drm_poll, .poll = drm_poll,
.read = drm_read, .read = drm_read,
.fasync = drm_fasync,
.llseek = no_llseek, .llseek = no_llseek,
.mmap = drm_gem_cma_mmap, .mmap = drm_gem_cma_mmap,
}; };
......
...@@ -72,7 +72,6 @@ static const struct file_operations sis_driver_fops = { ...@@ -72,7 +72,6 @@ static const struct file_operations sis_driver_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = drm_compat_ioctl, .compat_ioctl = drm_compat_ioctl,
#endif #endif
......
...@@ -48,7 +48,6 @@ static const struct file_operations tdfx_driver_fops = { ...@@ -48,7 +48,6 @@ static const struct file_operations tdfx_driver_fops = {
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = drm_compat_ioctl, .compat_ioctl = drm_compat_ioctl,
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment