diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-30 14:29:54 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-30 14:29:54 -0400 |
| commit | e823aff2d6eb43083abcc75a32ddfb167c324089 (patch) | |
| tree | 60b67f3f2f088d6741a5af8488b4a565fb4c4cfe | |
| parent | 77ed74da26f50fa28471571ee7a2251b77526d84 (diff) | |
| parent | 3e14a2867d8ccf555fe6e318eac0f8200399fe1c (diff) | |
Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (36 commits)
drm: Use register writes instead of BITBLT_MULTI packets for buffer swap blits
drm: use radeon specific names for radeon flags
drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers
drm: allow multiple addMaps with the same 32-bit map offsset.
drm: fd.o Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset().
drm: Fix hashtab implementation leaking illegal error codes to user space.
drm: domain changes broke ppc r200
drm: fixup setversion return codes..
drm: fixup i915 error codes
drm: realign sosme radeon code with drm git tree
drm: realign via driver with drm git tree
drm: remove hash tables on drm exit
drm: cleanups
drm: i810_dma.c: fix pointer arithmetic for 64-bit target
drm: avoid kernel oops in some error paths calling drm_lastclose
drm: allow detection of new VIA chipsets
drm: fix i965 build bug
drm: remove FALSE/TRUE that snuck in with simple memory manager changes.
drm: Add support for Intel i965G chipsets.
drm: add better explanation for i830/i915
...
42 files changed, 1878 insertions, 1772 deletions
diff --git a/drivers/char/drm/Kconfig b/drivers/char/drm/Kconfig index 5278c388d3e7..ef833a1c27eb 100644 --- a/drivers/char/drm/Kconfig +++ b/drivers/char/drm/Kconfig | |||
| @@ -60,7 +60,9 @@ config DRM_I830 | |||
| 60 | Choose this option if you have a system that has Intel 830M, 845G, | 60 | Choose this option if you have a system that has Intel 830M, 845G, |
| 61 | 852GM, 855GM or 865G integrated graphics. If M is selected, the | 61 | 852GM, 855GM or 865G integrated graphics. If M is selected, the |
| 62 | module will be called i830. AGP support is required for this driver | 62 | module will be called i830. AGP support is required for this driver |
| 63 | to work. This driver will eventually be replaced by the i915 one. | 63 | to work. This driver is used by the older X releases X.org 6.7 and |
| 64 | XFree86 4.3. If unsure, build this and i915 as modules and the X server | ||
| 65 | will load the correct one. | ||
| 64 | 66 | ||
| 65 | config DRM_I915 | 67 | config DRM_I915 |
| 66 | tristate "i915 driver" | 68 | tristate "i915 driver" |
| @@ -68,8 +70,9 @@ config DRM_I915 | |||
| 68 | Choose this option if you have a system that has Intel 830M, 845G, | 70 | Choose this option if you have a system that has Intel 830M, 845G, |
| 69 | 852GM, 855GM 865G or 915G integrated graphics. If M is selected, the | 71 | 852GM, 855GM 865G or 915G integrated graphics. If M is selected, the |
| 70 | module will be called i915. AGP support is required for this driver | 72 | module will be called i915. AGP support is required for this driver |
| 71 | to work. This driver will eventually replace the I830 driver, when | 73 | to work. This driver is used by the Intel driver in X.org 6.8 and |
| 72 | later release of X start to use the new DDX and DRI. | 74 | XFree86 4.4 and above. If unsure, build this and i830 as modules and |
| 75 | the X server will load the correct one. | ||
| 73 | 76 | ||
| 74 | endchoice | 77 | endchoice |
| 75 | 78 | ||
diff --git a/drivers/char/drm/Makefile b/drivers/char/drm/Makefile index 9d180c42816c..3ad0f648c6b2 100644 --- a/drivers/char/drm/Makefile +++ b/drivers/char/drm/Makefile | |||
| @@ -6,7 +6,7 @@ drm-objs := drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \ | |||
| 6 | drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \ | 6 | drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \ |
| 7 | drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ | 7 | drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ |
| 8 | drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ | 8 | drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \ |
| 9 | drm_sysfs.o | 9 | drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o |
| 10 | 10 | ||
| 11 | tdfx-objs := tdfx_drv.o | 11 | tdfx-objs := tdfx_drv.o |
| 12 | r128-objs := r128_drv.o r128_cce.o r128_state.o r128_irq.o | 12 | r128-objs := r128_drv.o r128_cce.o r128_state.o r128_irq.o |
| @@ -16,9 +16,9 @@ i830-objs := i830_drv.o i830_dma.o i830_irq.o | |||
| 16 | i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o | 16 | i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o |
| 17 | radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o r300_cmdbuf.o | 17 | radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o r300_cmdbuf.o |
| 18 | ffb-objs := ffb_drv.o ffb_context.o | 18 | ffb-objs := ffb_drv.o ffb_context.o |
| 19 | sis-objs := sis_drv.o sis_ds.o sis_mm.o | 19 | sis-objs := sis_drv.o sis_mm.o |
| 20 | savage-objs := savage_drv.o savage_bci.o savage_state.o | 20 | savage-objs := savage_drv.o savage_bci.o savage_state.o |
| 21 | via-objs := via_irq.o via_drv.o via_ds.o via_map.o via_mm.o via_dma.o via_verifier.o via_video.o via_dmablit.o | 21 | via-objs := via_irq.o via_drv.o via_map.o via_mm.o via_dma.o via_verifier.o via_video.o via_dmablit.o |
| 22 | 22 | ||
| 23 | ifeq ($(CONFIG_COMPAT),y) | 23 | ifeq ($(CONFIG_COMPAT),y) |
| 24 | drm-objs += drm_ioc32.o | 24 | drm-objs += drm_ioc32.o |
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index d2a56182bc35..7690a59ace04 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h | |||
| @@ -79,6 +79,7 @@ | |||
| 79 | #define __OS_HAS_MTRR (defined(CONFIG_MTRR)) | 79 | #define __OS_HAS_MTRR (defined(CONFIG_MTRR)) |
| 80 | 80 | ||
| 81 | #include "drm_os_linux.h" | 81 | #include "drm_os_linux.h" |
| 82 | #include "drm_hashtab.h" | ||
| 82 | 83 | ||
| 83 | /***********************************************************************/ | 84 | /***********************************************************************/ |
| 84 | /** \name DRM template customization defaults */ | 85 | /** \name DRM template customization defaults */ |
| @@ -104,7 +105,7 @@ | |||
| 104 | #define DRM_DEBUG_CODE 2 /**< Include debugging code if > 1, then | 105 | #define DRM_DEBUG_CODE 2 /**< Include debugging code if > 1, then |
| 105 | also include looping detection. */ | 106 | also include looping detection. */ |
| 106 | 107 | ||
| 107 | #define DRM_HASH_SIZE 16 /**< Size of key hash table. Must be power of 2. */ | 108 | #define DRM_MAGIC_HASH_ORDER 4 /**< Size of key hash table. Must be power of 2. */ |
| 108 | #define DRM_KERNEL_CONTEXT 0 /**< Change drm_resctx if changed */ | 109 | #define DRM_KERNEL_CONTEXT 0 /**< Change drm_resctx if changed */ |
| 109 | #define DRM_RESERVED_CONTEXTS 1 /**< Change drm_resctx if changed */ | 110 | #define DRM_RESERVED_CONTEXTS 1 /**< Change drm_resctx if changed */ |
| 110 | #define DRM_LOOPING_LIMIT 5000000 | 111 | #define DRM_LOOPING_LIMIT 5000000 |
| @@ -134,19 +135,12 @@ | |||
| 134 | #define DRM_MEM_CTXBITMAP 18 | 135 | #define DRM_MEM_CTXBITMAP 18 |
| 135 | #define DRM_MEM_STUB 19 | 136 | #define DRM_MEM_STUB 19 |
| 136 | #define DRM_MEM_SGLISTS 20 | 137 | #define DRM_MEM_SGLISTS 20 |
| 137 | #define DRM_MEM_CTXLIST 21 | 138 | #define DRM_MEM_CTXLIST 21 |
| 139 | #define DRM_MEM_MM 22 | ||
| 140 | #define DRM_MEM_HASHTAB 23 | ||
| 138 | 141 | ||
| 139 | #define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8) | 142 | #define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8) |
| 140 | 143 | #define DRM_MAP_HASH_OFFSET 0x10000000 | |
| 141 | /*@}*/ | ||
| 142 | |||
| 143 | /***********************************************************************/ | ||
| 144 | /** \name Backward compatibility section */ | ||
| 145 | /*@{*/ | ||
| 146 | |||
| 147 | #define DRM_RPR_ARG(vma) vma, | ||
| 148 | |||
| 149 | #define VM_OFFSET(vma) ((vma)->vm_pgoff << PAGE_SHIFT) | ||
| 150 | 144 | ||
| 151 | /*@}*/ | 145 | /*@}*/ |
| 152 | 146 | ||
| @@ -211,8 +205,6 @@ | |||
| 211 | /*@{*/ | 205 | /*@{*/ |
| 212 | 206 | ||
| 213 | #define DRM_ARRAY_SIZE(x) ARRAY_SIZE(x) | 207 | #define DRM_ARRAY_SIZE(x) ARRAY_SIZE(x) |
| 214 | #define DRM_MIN(a,b) min(a,b) | ||
| 215 | #define DRM_MAX(a,b) max(a,b) | ||
| 216 | 208 | ||
| 217 | #define DRM_LEFTCOUNT(x) (((x)->rp + (x)->count - (x)->wp) % ((x)->count + 1)) | 209 | #define DRM_LEFTCOUNT(x) (((x)->rp + (x)->count - (x)->wp) % ((x)->count + 1)) |
| 218 | #define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x)) | 210 | #define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x)) |
| @@ -286,7 +278,8 @@ typedef struct drm_devstate { | |||
| 286 | } drm_devstate_t; | 278 | } drm_devstate_t; |
| 287 | 279 | ||
