summaryrefslogtreecommitdiff
path: root/linux-core
AgeCommit message (Expand)Author
2006-04-23fixup GFP_COMP for older kernels and get_page/put_page for newerDave Airlie
2006-04-05remove stupid init and exit flags..Dave Airlie
2006-04-03make add context non master...Dave Airlie
2006-03-19fix issue in mga from kernelDave Airlie
2006-02-21set dma pages reservedDave Airlie
2006-02-21use coherent memory for PCI allocations with COMP flagDave Airlie
2006-02-19experimental PCI DMA fixes use proper Linux interfacesDave Airlie
2006-02-18make some functions static from the kernelDave Airlie
2006-02-18always enable and set master on pci deviceDave Airlie
2006-02-18fix build wrong function callDave Airlie
2006-02-18major realigment of DRM CVS with kernel code, makes integration much easierDave Airlie
2006-02-18fix card unloadDave Airlie
2006-02-18Fixup test for memory at end of memory spaceDave Airlie
2006-01-26add missing name, desc, date, major, minor and patchlevel entriesAlan Hourihane
2006-01-12via: direction bug in get_user_pages call in via_dmablit.c fixed. BumpedThomas Hellstrom
2006-01-06via: Combine PCI DMA transfers with stride==width (Idea from LucThomas Hellstrom
2006-01-02nothing from VIA or S3 in thisDave Airlie
2006-01-02use drm_cards_limit instead of cards_limitDave Airlie
2006-01-02use common read/write routinesDave Airlie
2006-01-02sparse cleanupsDave Airlie
2006-01-02align spacing with kernelDave Airlie
2006-01-02Realign via driver with changes in Linux kernel (mainly whitespace)Dave Airlie
2005-12-28Add vblank support to i915 DRM..Dave Airlie
2005-12-04Fix from SuSE for issue with context creation failureDave Airlie
2005-11-29Fix from Hugh Dickins for consistent mappingDave Airlie
2005-11-15Loosen via dmablit alignment checks somewhat. Adapt stride check to maximumThomas Hellstrom
2005-11-11enable i915 32/64 bit ioctlsDave Airlie
2005-11-11i810 should be fine with i810.. no idea what this crack is ..Dave Airlie
2005-11-11whitespace align with kernelDave Airlie
2005-11-11realign whitespace with kernelDave Airlie
2005-11-11A bunch of create_proc_dir_entry() calls creating directories had crept inDave Airlie
2005-11-11convert to use __set_current_state, align some header includesDave Airlie
2005-11-11whitespace align closer with kernelDave Airlie
2005-11-11cleanup ioctl/max_ioctl to use header file for extern symbolsDave Airlie
2005-11-10Fix cpu_to_le32 same as kernel not sure it is correct for ppcDave Airlie
2005-11-10cleanup / whitespace align with kernelDave Airlie
2005-11-08Initial port of savage to FreeBSD for the AGP and !ShadowStatus case. AddsEric Anholt
2005-11-08Catch FreeBSD up to the pcie gart changes. Required minor modification toEric Anholt
2005-11-07Fix bug #4908 for now. Alternative is highlighted in this bug report as theAlan Hourihane
2005-11-03Converts the remaining drm_agp_foo functions to be a drm_agp_foo andIan Romanick
2005-10-23we don't use this stuff anymore .. remove 1k buffer from driver ..Dave Airlie
2005-10-21Don't set MTRR's for intel hardwareAlan Hourihane
2005-10-20via: PCI DMA bugfixes and DOS due to too many mapped pages checks.Thomas Hellstrom
2005-10-11The Linux 2.6.9 (and earlier) fops structure does not contain aIan Romanick
2005-10-06Skeleton nv drm driver, to enable DMA in EXA. (Lars Knoll, minor updates byAdam Jackson
2005-10-06remove version not used anymoreDave Airlie
2005-09-30fix header this is now a c fileDave Airlie
2005-09-30Add support to turn writeback off via radeon module optionDave Airlie
2005-09-30fixup bens fix so it works..Dave Airlie
2005-09-30Add Bens fix for radeon maps on ppcDave Airlie
n class="hl opt">(batchbuffer32.DR4, &batchbuffer->DR4) || __put_user(batchbuffer32.num_cliprects, &batchbuffer->num_cliprects) || __put_user((int __user *)(unsigned long)batchbuffer32.cliprects, &batchbuffer->cliprects)) return -EFAULT; return drm_ioctl(file->f_dentry->d_inode, file, DRM_IOCTL_I915_BATCHBUFFER, (unsigned long) batchbuffer); } typedef struct _drm_i915_cmdbuffer32 { u32 buf; /* pointer to userspace command buffer */ int sz; /* nr bytes in buf */ int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */ int DR4; /* window origin for GFX_OP_DRAWRECT_INFO */ int num_cliprects; /* mulitpass with multiple cliprects? */ u32 cliprects; /* pointer to userspace cliprects */ } drm_i915_cmdbuffer32_t; static int compat_i915_cmdbuffer(struct file *file, unsigned int cmd, unsigned long arg) { drm_i915_cmdbuffer32_t cmdbuffer32; drm_i915_cmdbuffer_t __user *cmdbuffer; if (copy_from_user(&cmdbuffer32, (void __user *)arg, sizeof(cmdbuffer32))) return -EFAULT; cmdbuffer = compat_alloc_user_space(sizeof(*cmdbuffer)); if (!access_ok(VERIFY_WRITE, cmdbuffer, sizeof(*cmdbuffer)) || __put_user((int __user *)(unsigned long)cmdbuffer32.buf, &cmdbuffer->buf) || __put_user(cmdbuffer32.sz, &cmdbuffer->sz) || __put_user(cmdbuffer32.DR1, &cmdbuffer->DR1) || __put_user(cmdbuffer32.DR4, &cmdbuffer->DR4) || __put_user(cmdbuffer32.num_cliprects, &cmdbuffer->num_cliprects) || __put_user((int __user *)(unsigned long)cmdbuffer32.cliprects, &cmdbuffer->cliprects)) return -EFAULT; return drm_ioctl(file->f_dentry->d_inode, file, DRM_IOCTL_I915_CMDBUFFER, (unsigned long) cmdbuffer); } typedef struct drm_i915_irq_emit32 { u32 irq_seq; } drm_i915_irq_emit32_t; static int compat_i915_irq_emit(struct file *file, unsigned int cmd, unsigned long arg) { drm_i915_irq_emit32_t req32; drm_i915_irq_emit_t __user *request; if (copy_from_user(&req32, (void __user *) arg, sizeof(req32))) return -EFAULT; request = compat_alloc_user_space(sizeof(*request)); if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) || __put_user((int __user *)(unsigned long)req32.irq_seq, &request->irq_seq)) return -EFAULT; return drm_ioctl(file->f_dentry->d_inode, file, DRM_IOCTL_I915_IRQ_EMIT, (unsigned long) request); } typedef struct drm_i915_getparam32 { int param; u32 value; } drm_i915_getparam32_t; static int compat_i915_getparam(struct file *file, unsigned int cmd, unsigned long arg) { drm_i915_getparam32_t req32; drm_i915_getparam_t __user *request; if (copy_from_user(&req32, (void __user *) arg, sizeof(req32))) return -EFAULT; request = compat_alloc_user_space(sizeof(*request)); if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) || __put_user(req32.param, &request->param) || __put_user((void __user *)(unsigned long)req32.value, &request->value)) return -EFAULT; return drm_ioctl(file->f_dentry->d_inode, file, DRM_IOCTL_I915_GETPARAM, (unsigned long) request); } typedef struct drm_i915_mem_alloc32 { int region; int alignment; int size; u32 region_offset; /* offset from start of fb or agp */ } drm_i915_mem_alloc32_t; static int compat_i915_alloc(struct file *file, unsigned int cmd, unsigned long arg) { drm_i915_mem_alloc32_t req32; drm_i915_mem_alloc_t __user *request; if (copy_from_user(&req32, (void __user *) arg, sizeof(req32))) return -EFAULT; request = compat_alloc_user_space(sizeof(*request)); if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) || __put_user(req32.region, &request->region) || __put_user(req32.alignment, &request->alignment) || __put_user(req32.size, &request->size) || __put_user((void __user *)(unsigned long)req32.region_offset, &request->region_offset)) return -EFAULT; return drm_ioctl(file->f_dentry->d_inode, file, DRM_IOCTL_I915_ALLOC, (unsigned long) request); } drm_ioctl_compat_t *i915_compat_ioctls[] = { [DRM_I915_BATCHBUFFER] = compat_i915_batchbuffer, [DRM_I915_CMDBUFFER] = compat_i915_cmdbuffer, [DRM_I915_GETPARAM] = compat_i915_getparam, [DRM_I915_IRQ_EMIT] = compat_i915_irq_emit, [DRM_I915_ALLOC] = compat_i915_alloc }; /** * 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 i915_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(i915_compat_ioctls)) fn = i915_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; }