summaryrefslogtreecommitdiff
path: root/linux-core
AgeCommit message (Expand)Author
2003-10-19Fix probing on 2.5+ kernels, which require that drivers have .id_table set.Eric Anholt
2003-10-17- Move IRQ functions from drm_dma.h to new drm_irq.h and disentangle themEric Anholt
2003-10-17- Converted Linux drivers to initialize DRM instances based on PCI IDs, notEric Anholt
2003-09-28Fix typo in SiS help message (and testing cvs commit toLeif Delgass
2003-09-25Whitespace cleanup (spaces before tabs or instead of tabs).Eric Anholt
2003-09-25Fix Kconfig for SiS DRM now that it doesn't require sisfb.Eric Anholt
2003-09-12linux drm fixesAlan Hourihane
2003-08-29Add DRM(calloc), which is convenient, used by the new sis code, and takesEric Anholt
2003-08-28Remove superfluous TLB flushMichel Daenzer
2003-08-15Merge from 2.6 kernel (Linus Torvalds)Michel Daenzer
2003-08-15DA: loads of whitespace .. some from Linus, some from meDave Airlie
2003-08-13DA: patch from Matthew upgraded to latest DRI head to solve issue with i810Dave Airlie
2003-08-11DA: code cleanups for i810_dma.c from 2.4 kernelDave Airlie
2003-08-07build fix for kernels >= 2.6Michel Daenzer
2003-08-06Fix maplist entries being used after they were freed; thanks to BenjaminMichel Daenzer
2003-07-29IRQ code cleanup suggested by Linus TorvaldsMichel Daenzer
2003-07-25Compile fixes for recent 2.5/2.6 Linux kernels. I hope this doesn't breakMichel Daenzer
2003-07-25Fail in DRM(agp_acquire) if the AGP aperture can't be used, such that the XMichel Daenzer
2003-07-11Restore __HAVE_KERNEL_CTX_SWITCH, required for the sparc drm module in theKeith Whitwell
2003-07-09DA: fix for bug 484 in Bugzilla, originally from me, reworked by DavidDave Airlie
2003-07-08Removed unused __HAVE_KERNEL_CTX_SWITCH, whatever that was.Keith Whitwell
2003-07-04Don't need to include linux/wrapper.h - we only use Set/ClearPageReservedLeif Delgass
2003-06-19Revert the janitorial - that works is now on the new branchJose Fonseca
2003-06-14Move the linux AGP includes into drm_agp.h and only define the AGP dataJose Fonseca
2003-06-07fix pitch compile errorDave Airlie
2003-06-05add page flipping support to the DRM, up version number to 1.3.0...Dave Airlie
2003-06-03Added the Doxygen configuration file. Minor documentation fixes.Jose Fonseca
2003-06-03Split declarations/definitions in drm_scatter.h into drm_sg.h/drm_sg_tmp.hJose Fonseca
2003-05-28Restore DRM_*MEMORYBARRIER change reverted with documentation mergeLeif Delgass
2003-05-27Merged DRM documentation.Jose Fonseca
2003-05-17do allow reading from read only mappings...Michel Daenzer
2003-05-16Support AGP bridges where the AGP aperture can't be accessed directly byMichel Daenzer
2003-04-29remove unused variablesLeif Delgass
2003-04-28Restore Eric Anholt's DRM_*MEMORYBARRIER changes from rev 1.11Leif Delgass
2003-04-28Only free original pagelist in addbufs_pci if one already exists (fixesLeif Delgass
2003-04-28DRM_READ/WRITEMEMORYBARRIER was given an argument in the bsd tree, fix forAlan Hourihane
2003-04-27Put back __HAVE_KERNEL_CTX_SWITCH for David Miller's sparc drm driverKeith Whitwell
2003-04-26Remove the map argument from DRM_*MEMORYBARRIER. Not all of the uses ofEric Anholt
2003-04-26Ensure driver has been initialized (dev_private != NULL) before installingLeif Delgass
2003-04-262.5.x sync patch from Linus TorvaldsKeith Whitwell
2003-04-26move prototypes for gamma functions to gamma_drv.hKeith Whitwell
2003-04-26Remove #if 0'd codeKeith Whitwell
2003-04-25Fix potential oops and memory leaks when allocations fail inLeif Delgass
2003-04-24Pass dma handle from pci_alloc_consistent to the card for status page,Leif Delgass
2003-04-24Remove unused dev->map_count. We always iterate the maplist withLeif Delgass
2003-04-24Remove unused variablesLeif Delgass
2003-04-24Move the debug versions of the DRM memory functions to a new file andKeith Whitwell
2003-04-24Remove #if 0'd code and some unused string functionsKeith Whitwell
2003-04-23Install dummy/noop read & poll fops unless the driver has replacements.Keith Whitwell
2003-04-22Remove AGP dependency in kernel config for radeon, sis. RemoveLeif Delgass
>.sarea_priv_offset, &init->sarea_priv_offset) || __put_user(init32.is_pci, &init->is_pci) || __put_user(init32.cce_mode, &init->cce_mode) || __put_user(init32.cce_secure, &init->cce_secure) || __put_user(init32.ring_size, &init->ring_size) || __put_user(init32.usec_timeout, &init->usec_timeout) || __put_user(init32.fb_bpp, &init->fb_bpp) || __put_user(init32.front_offset, &init->front_offset) || __put_user(init32.front_pitch, &init->front_pitch) || __put_user(init32.back_offset, &init->back_offset) || __put_user(init32.back_pitch, &init->back_pitch) || __put_user(init32.depth_bpp, &init->depth_bpp) || __put_user(init32.depth_offset, &init->depth_offset) || __put_user(init32.depth_pitch, &init->depth_pitch) || __put_user(init32.span_offset, &init->span_offset) || __put_user(init32.fb_offset, &init->fb_offset) || __put_user(init32.mmio_offset, &init->mmio_offset) || __put_user(init32.ring_offset, &init->ring_offset) || __put_user(init32.ring_rptr_offset, &init->ring_rptr_offset) || __put_user(init32.buffers_offset, &init->buffers_offset) || __put_user(init32.agp_textures_offset, &init->agp_textures_offset)) return -EFAULT; return drm_ioctl(file->f_dentry->d_inode, file, DRM_IOCTL_R128_INIT, (unsigned long)init); } typedef struct drm_r128_depth32 { int func; int n; u32 x; u32 y; u32 buffer; u32 mask; } drm_r128_depth32_t; static int compat_r128_depth(struct file *file, unsigned int cmd, unsigned long arg) { drm_r128_depth32_t depth32; drm_r128_depth_t __user *depth; if (copy_from_user(&depth32, (void __user *)arg, sizeof(depth32))) return -EFAULT; depth = compat_alloc_user_space(sizeof(*depth)); if (!access_ok(VERIFY_WRITE, depth, sizeof(*depth)) || __put_user(depth32.func, &depth->func) || __put_user(depth32.n, &depth->n) || __put_user((int __user *)(unsigned long)depth32.x, &depth->x) || __put_user((int __user *)(unsigned long)depth32.y, &depth->y) || __put_user((unsigned int __user *)(unsigned long)depth32.buffer, &depth->buffer) || __put_user((unsigned char __user *)(unsigned long)depth32.mask, &depth->mask)) return -EFAULT; return drm_ioctl(file->f_dentry->d_inode, file, DRM_IOCTL_R128_DEPTH, (unsigned long)depth); } typedef struct drm_r128_stipple32 { u32 mask; } drm_r128_stipple32_t; static int compat_r128_stipple(struct file *file, unsigned int cmd, unsigned long arg) { drm_r128_stipple32_t stipple32; drm_r128_stipple_t __user *stipple; if (copy_from_user(&stipple32, (void __user *)arg, sizeof(stipple32))) return -EFAULT; stipple = compat_alloc_user_space(sizeof(*stipple)); if (!access_ok(VERIFY_WRITE, stipple, sizeof(*stipple)) || __put_user((unsigned int __user *)(unsigned long)stipple32.mask, &stipple->mask)) return -EFAULT; return drm_ioctl(file->f_dentry->d_inode, file, DRM_IOCTL_R128_STIPPLE, (unsigned long)stipple); } typedef struct drm_r128_getparam32 { int param; u32 value; } drm_r128_getparam32_t; static int compat_r128_getparam(struct file *file, unsigned int cmd, unsigned long arg) { drm_r128_getparam32_t getparam32; drm_r128_getparam_t __user *getparam; if (copy_from_user(&getparam32, (void __user *)arg, sizeof(getparam32))) return -EFAULT; getparam = compat_alloc_user_space(sizeof(*getparam)); if (!access_ok(VERIFY_WRITE, getparam, sizeof(*getparam)) || __put_user(getparam32.param, &getparam->param) || __put_user((void __user *)(unsigned long)getparam32.value, &getparam->value)) return -EFAULT; return drm_ioctl(file->f_dentry->d_inode, file, DRM_IOCTL_R128_GETPARAM, (unsigned long)getparam); } drm_ioctl_compat_t *r128_compat_ioctls[] = { [DRM_R128_INIT] = compat_r128_init, [DRM_R128_DEPTH] = compat_r128_depth, [DRM_R128_STIPPLE] = compat_r128_stipple, [DRM_R128_GETPARAM] = compat_r128_getparam, }; /** * Called whenever a 32-bit process running under a 64-bit kernel * performs an ioctl on /dev/dri/card<n>. * * \param filp file pointer. * \param cmd command. * \param arg user argument. * \return zero on success or negative number on failure. */ long r128_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { unsigned int nr = DRM_IOCTL_NR(cmd); drm_ioctl_compat_t *fn = NULL; int ret; if (nr < DRM_COMMAND_BASE) return drm_compat_ioctl(filp, cmd, arg); if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(r128_compat_ioctls)) fn = r128_compat_ioctls[nr - DRM_COMMAND_BASE]; lock_kernel(); /* XXX for now */ if (fn != NULL) ret = (*fn)(filp, cmd, arg); else ret = drm_ioctl(filp->f_dentry->d_inode, filp, cmd, arg); unlock_kernel(); return ret; }