[Xorg-commit] xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel drmP.h,1.1.4.2,1.1.4.3 drm_vm.h,1.1.4.1,1.1.4.2
Kaleb Keithley
xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007
- Previous message: [Xorg-commit] xc/programs/Xserver/hw/xfree86/drivers/sis 300vtbl.h,1.1.4.1,1.1.4.2 310vtbl.h,1.1.4.1,1.1.4.2 init.c,1.1.4.3,1.1.4.4 init.h,1.1.4.3,1.1.4.4 init301.c,1.1.4.3,1.1.4.4 init301.h,1.1.4.3,1.1.4.4 initdef.h,1.1.4.2,1.1.4.3 oem300.h,1.1.4.1,1.1.4.2 oem310.h,1.1.4.2,1.1.4.3 osdef.h,1.1.4.1,1.1.4.2 sis.h,1.1.4.4,1.1.4.5 sis300_accel.c,1.1.4.1,1.1.4.2 sis300_accel.h,1.1.4.1,1.1.4.2 sis310_accel.c,1.1.4.1,1.1.4.2 sis310_accel.h,1.1.4.1,1.1.4.2 sis6326_video.c,1.1.4.1,1.1.4.2 sis_accel.c,1.1.4.1,1.1.4.2 sis_accel.h,1.1.4.1,1.1.4.2 sis_common.h,1.1,1.1.4.1 sis_cursor.c,1.1.4.1,1.1.4.2 sis_cursor.h,1.1.4.1,1.1.4.2 sis_dac.c,1.1.4.2,1.1.4.3 sis_dac.h,1.1.4.1,1.1.4.2 sis_dga.c,1.1.4.1,1.1.4.2 sis_dri.c,1.1.4.1,1.1.4.2 sis_dri.h,1.1.4.1,1.1.4.2 sis_driver.c,1.1.4.4,1.1.4.5 sis_driver.h,1.1.4.3,1.1.4.4 sis_opt.c,1.1.4.3,1.1.4.4 sis_regs.h,1.1.4.1,1.1.4.2 sis_setup.c,1.1.4.1,1.1.4.2 sis_shadow.c,1.1.4.1,1.1.4.2 sis_shadow.h,1.1.4.1,1.1.4.2 sis_vb.c,1.1.4.3,1.1.4.4 sis_vb.h,1.1.4.2,1.1.4.3 sis_vga.c,1.1.4.2,1.1.4.3 sis_video.c,1.1.4.2,1.1.4.3 vgatypes.h,1.1.4.3,1.1.4.4 vstruct.h,1.1.4.3,1.1.4.4
- Next message: [Xorg-commit] xc/programs/Xserver/hw/xfree86/input/aiptek xf86Aiptek.c,1.1,1.1.4.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: kaleb
Update of /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel
Modified Files:
Tag: XORG-CURRENT
drmP.h drm_vm.h
Log Message:
merge most of XFree86 RC3 (4.3.99.903) from vendor branch.
bug #214
Index: drmP.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/drmP.h 6 Dec 2003 13:24:28 -0000 1.1.4.2
+++ b/drmP.h 23 Feb 2004 21:37:01 -0000 1.1.4.3
@@ -310,6 +310,19 @@
DRM(ioremapfree)( (map)->handle, (map)->size, (dev) ); \
} while (0)
+#ifndef VMAP_4_ARGS
+
+#define DRM_IOREMAPAGP(map, dev) \
+ (map)->handle = DRM(ioremap_agp)( (map)->offset, (map)->size, (dev) )
+
+#define DRM_IOREMAPAGPFREE(map) \
+ do { \
+ if ( (map)->handle && (map)->size ) \
+ DRM(ioremap_agp_free)( (map)->handle, (map)->size ); \
+ } while (0)
+
+#endif
+
/**
* Find mapping.
*
@@ -807,18 +820,6 @@
extern int DRM(fasync)(int fd, struct file *filp, int on);
/* Mapping support (drm_vm.h) */
-extern struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access);
-extern struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access);
-extern struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access);
-extern struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access);
extern void DRM(vm_open)(struct vm_area_struct *vma);
extern void DRM(vm_close)(struct vm_area_struct *vma);
extern void DRM(vm_shm_close)(struct vm_area_struct *vma);
@@ -846,6 +847,10 @@
extern void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev);
#if __REALLY_HAVE_AGP
+#ifndef VMAP_4_ARGS
+extern void *DRM(ioremap_agp)(unsigned long offset, unsigned long size, drm_device_t *dev);
+extern void DRM(ioremap_agp_free)(void *pt, unsigned long size);
+#endif
extern DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type);
extern int DRM(free_agp)(DRM_AGP_MEM *handle, int pages);
extern int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start);
Index: drm_vm.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/drm_vm.h 26 Nov 2003 22:49:02 -0000 1.1.4.1
+++ b/drm_vm.h 23 Feb 2004 21:37:01 -0000 1.1.4.2
@@ -36,48 +36,19 @@
#define __NO_VERSION__
#include "drmP.h"
-/** AGP virtual memory operations */
-struct vm_operations_struct DRM(vm_ops) = {
- .nopage = DRM(vm_nopage),
- .open = DRM(vm_open),
- .close = DRM(vm_close),
-};
-
-/** Shared virtual memory operations */
-struct vm_operations_struct DRM(vm_shm_ops) = {
- .nopage = DRM(vm_shm_nopage),
- .open = DRM(vm_open),
- .close = DRM(vm_shm_close),
-};
-
-/** DMA virtual memory operations */
-struct vm_operations_struct DRM(vm_dma_ops) = {
- .nopage = DRM(vm_dma_nopage),
- .open = DRM(vm_open),
- .close = DRM(vm_close),
-};
-
-/** Scatter-gather virtual memory operations */
-struct vm_operations_struct DRM(vm_sg_ops) = {
- .nopage = DRM(vm_sg_nopage),
- .open = DRM(vm_open),
- .close = DRM(vm_close),
-};
/**
* \c nopage method for AGP virtual memory.
*
* \param vma virtual memory area.
* \param address access address.
- * \param write_access sharing.
* \return pointer to the page structure.
*
* Find the right map and if it's AGP memory find the real physical page to
* map, get the page, increment the use count and return it.
*/
-struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access)
+static __inline__ struct page *DRM(do_vm_nopage)(struct vm_area_struct *vma,
+ unsigned long address)
{
#if __REALLY_HAVE_AGP
drm_file_t *priv = vma->vm_file->private_data;
@@ -147,15 +118,13 @@
*
* \param vma virtual memory area.
* \param address access address.
- * \param write_access sharing.
* \return pointer to the page structure.
*
* Get the the mapping, find the real physical page to map, get the page, and
* return it.
*/
-struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access)
+static __inline__ struct page *DRM(do_vm_shm_nopage)(struct vm_area_struct *vma,
+ unsigned long address)
{
drm_map_t *map = (drm_map_t *)vma->vm_private_data;
unsigned long offset;
@@ -262,14 +231,12 @@
*
* \param vma virtual memory area.
* \param address access address.
- * \param write_access sharing.
* \return pointer to the page structure.
*
* Determine the page number from the page offset and get it from drm_device_dma::pagelist.
*/
-struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access)
+static __inline__ struct page *DRM(do_vm_dma_nopage)(struct vm_area_struct *vma,
+ unsigned long address)
{
drm_file_t *priv = vma->vm_file->private_data;
drm_device_t *dev = priv->dev;
@@ -298,14 +265,12 @@
*
* \param vma virtual memory area.
* \param address access address.
- * \param write_access sharing.
* \return pointer to the page structure.
*
* Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
*/
-struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access)
+static __inline__ struct page *DRM(do_vm_sg_nopage)(struct vm_area_struct *vma,
+ unsigned long address)
{
drm_map_t *map = (drm_map_t *)vma->vm_private_data;
drm_file_t *priv = vma->vm_file->private_data;
@@ -330,6 +295,95 @@
return page;
}
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
+
+static struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int *type) {
+ if (type) *type = VM_FAULT_MINOR;
+ return DRM(do_vm_nopage)(vma, address);
+}
+
+static struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int *type) {
+ if (type) *type = VM_FAULT_MINOR;
+ return DRM(do_vm_shm_nopage)(vma, address);
+}
+
+static struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int *type) {
+ if (type) *type = VM_FAULT_MINOR;
+ return DRM(do_vm_dma_nopage)(vma, address);
+}
+
+static struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int *type) {
+ if (type) *type = VM_FAULT_MINOR;
+ return DRM(do_vm_sg_nopage)(vma, address);
+}
+
+#else /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,0) */
+
+static struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int unused) {
+ return DRM(do_vm_nopage)(vma, address);
+}
+
+static struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int unused) {
+ return DRM(do_vm_shm_nopage)(vma, address);
+}
+
+static struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int unused) {
+ return DRM(do_vm_dma_nopage)(vma, address);
+}
+
+static struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int unused) {
+ return DRM(do_vm_sg_nopage)(vma, address);
+}
+
+#endif
+
+
+/** AGP virtual memory operations */
+static struct vm_operations_struct DRM(vm_ops) = {
+ .nopage = DRM(vm_nopage),
+ .open = DRM(vm_open),
+ .close = DRM(vm_close),
+};
+
+/** Shared virtual memory operations */
+static struct vm_operations_struct DRM(vm_shm_ops) = {
+ .nopage = DRM(vm_shm_nopage),
+ .open = DRM(vm_open),
+ .close = DRM(vm_shm_close),
+};
+
+/** DMA virtual memory operations */
+static struct vm_operations_struct DRM(vm_dma_ops) = {
+ .nopage = DRM(vm_dma_nopage),
+ .open = DRM(vm_open),
+ .close = DRM(vm_close),
+};
+
+/** Scatter-gather virtual memory operations */
+static struct vm_operations_struct DRM(vm_sg_ops) = {
+ .nopage = DRM(vm_sg_nopage),
+ .open = DRM(vm_open),
+ .close = DRM(vm_close),
+};
+
+
/**
* \c open method for shared virtual memory.
*
- Previous message: [Xorg-commit] xc/programs/Xserver/hw/xfree86/drivers/sis 300vtbl.h,1.1.4.1,1.1.4.2 310vtbl.h,1.1.4.1,1.1.4.2 init.c,1.1.4.3,1.1.4.4 init.h,1.1.4.3,1.1.4.4 init301.c,1.1.4.3,1.1.4.4 init301.h,1.1.4.3,1.1.4.4 initdef.h,1.1.4.2,1.1.4.3 oem300.h,1.1.4.1,1.1.4.2 oem310.h,1.1.4.2,1.1.4.3 osdef.h,1.1.4.1,1.1.4.2 sis.h,1.1.4.4,1.1.4.5 sis300_accel.c,1.1.4.1,1.1.4.2 sis300_accel.h,1.1.4.1,1.1.4.2 sis310_accel.c,1.1.4.1,1.1.4.2 sis310_accel.h,1.1.4.1,1.1.4.2 sis6326_video.c,1.1.4.1,1.1.4.2 sis_accel.c,1.1.4.1,1.1.4.2 sis_accel.h,1.1.4.1,1.1.4.2 sis_common.h,1.1,1.1.4.1 sis_cursor.c,1.1.4.1,1.1.4.2 sis_cursor.h,1.1.4.1,1.1.4.2 sis_dac.c,1.1.4.2,1.1.4.3 sis_dac.h,1.1.4.1,1.1.4.2 sis_dga.c,1.1.4.1,1.1.4.2 sis_dri.c,1.1.4.1,1.1.4.2 sis_dri.h,1.1.4.1,1.1.4.2 sis_driver.c,1.1.4.4,1.1.4.5 sis_driver.h,1.1.4.3,1.1.4.4 sis_opt.c,1.1.4.3,1.1.4.4 sis_regs.h,1.1.4.1,1.1.4.2 sis_setup.c,1.1.4.1,1.1.4.2 sis_shadow.c,1.1.4.1,1.1.4.2 sis_shadow.h,1.1.4.1,1.1.4.2 sis_vb.c,1.1.4.3,1.1.4.4 sis_vb.h,1.1.4.2,1.1.4.3 sis_vga.c,1.1.4.2,1.1.4.3 sis_video.c,1.1.4.2,1.1.4.3 vgatypes.h,1.1.4.3,1.1.4.4 vstruct.h,1.1.4.3,1.1.4.4
- Next message: [Xorg-commit] xc/programs/Xserver/hw/xfree86/input/aiptek xf86Aiptek.c,1.1,1.1.4.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the xorg-commit
mailing list