diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 09:54:10 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 09:54:10 -0800 |
commit | 9914712e2e0f80ddcc00c928d3f7a5848d925e1e (patch) | |
tree | 08862da0b2c7f20d920acddb5df157e17e0da234 /drivers/char/agp/frontend.c | |
parent | 488823f114a3cef58e7eb932cac977440a2a59cb (diff) | |
parent | bc894606e8843808c232319f69c26c18f6eaa662 (diff) | |
download | op-kernel-dev-9914712e2e0f80ddcc00c928d3f7a5848d925e1e.zip op-kernel-dev-9914712e2e0f80ddcc00c928d3f7a5848d925e1e.tar.gz |
Merge branch 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6
* 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
agp: remove flush_agp_mappings calls from new flush handling code
intel-agp: introduce IS_I915 and do some cleanups..
[intel_agp] fix name for G35 chipset
intel-agp: fixup resource handling in flush code.
intel-agp: add new chipset ID
agp: remove unnecessary pci_dev_put
agp: remove uid comparison as security check
fix AGP warning
agp/intel: Add chipset flushing support for i8xx chipsets.
intel-agp: add chipset flushing support
agp: add chipset flushing support to AGP interface
Diffstat (limited to 'drivers/char/agp/frontend.c')
-rw-r--r-- | drivers/char/agp/frontend.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c index 7791e98..55d7a82 100644 --- a/drivers/char/agp/frontend.c +++ b/drivers/char/agp/frontend.c @@ -689,7 +689,7 @@ static int agp_open(struct inode *inode, struct file *file) set_bit(AGP_FF_ALLOW_CLIENT, &priv->access_flags); priv->my_pid = current->pid; - if ((current->uid == 0) || (current->suid == 0)) { + if (capable(CAP_SYS_RAWIO)) { /* Root priv, can be controller */ set_bit(AGP_FF_ALLOW_CONTROLLER, &priv->access_flags); } @@ -960,6 +960,13 @@ static int agpioc_unbind_wrap(struct agp_file_private *priv, void __user *arg) return agp_unbind_memory(memory); } +int agpioc_chipset_flush_wrap(struct agp_file_private *priv) +{ + DBG(""); + agp_flush_chipset(agp_bridge); + return 0; +} + static int agp_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { @@ -1033,6 +1040,10 @@ static int agp_ioctl(struct inode *inode, struct file *file, case AGPIOC_UNBIND: ret_val = agpioc_unbind_wrap(curr_priv, (void __user *) arg); break; + + case AGPIOC_CHIPSET_FLUSH: + ret_val = agpioc_chipset_flush_wrap(curr_priv); + break; } ioctl_out: |