From 38ed67196f4ba891568c5ff66e67ced341696eb9 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Fri, 15 Dec 2006 12:37:24 +0100 Subject: Remove the memory caches for fence objects and memory manager nodes, since the support for memory caches has gone from 2.6.20. --- linux-core/drmP.h | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index d02184c7..13f97eee 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -755,17 +755,6 @@ typedef struct drm_head { struct class_device *dev_class; } drm_head_t; -typedef struct drm_cache { - - /* - * Memory caches - */ - - kmem_cache_t *mm; - kmem_cache_t *fence_object; -} drm_cache_t; - - typedef struct drm_fence_driver{ int no_types; @@ -1318,7 +1307,6 @@ extern int drm_put_head(drm_head_t * head); extern unsigned int drm_debug; /* 1 to enable debug output */ extern unsigned int drm_cards_limit; extern drm_head_t **drm_heads; -extern drm_cache_t drm_cache; extern struct drm_sysfs_class *drm_class; extern struct proc_dir_entry *drm_proc_root; @@ -1581,25 +1569,6 @@ static inline void drm_ctl_free(void *pt, size_t size, int area) drm_free_memctl(size); } -static inline void *drm_ctl_cache_alloc(kmem_cache_t *cache, size_t size, - int flags) -{ - void *ret; - if (drm_alloc_memctl(size)) - return NULL; - ret = kmem_cache_alloc(cache, flags); - if (!ret) - drm_free_memctl(size); - return ret; -} - -static inline void drm_ctl_cache_free(kmem_cache_t *cache, size_t size, - void *obj) -{ - kmem_cache_free(cache, obj); - drm_free_memctl(size); -} - /*@}*/ #endif /* __KERNEL__ */ -- cgit v1.2.3 From b3c88d31e1e83458c6125a02b80f2e57ebcf750d Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Fri, 15 Dec 2006 14:24:24 +0100 Subject: drm/linux-core: drmP.h compilation fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I need the following patch to fix compilation of latest drm/linux-core on my ppc64 machine. /home/mb/develop/git/drm/linux-core/savage_bci.c: In function ‘savage_driver_firstopen’: /home/mb/develop/git/drm/linux-core/savage_bci.c:587: error: ‘DRM_MTRR_WC’ undeclared (first use in this function) /home/mb/develop/git/drm/linux-core/savage_bci.c:587: error: (Each undeclared identifier is reported only once /home/mb/develop/git/drm/linux-core/savage_bci.c:587: error: for each function it appears in.) /home/mb/develop/git/drm/linux-core/savage_bci.c: In function ‘savage_driver_lastclose’: /home/mb/develop/git/drm/linux-core/savage_bci.c:664: error: ‘DRM_MTRR_WC’ undeclared (first use in this function) I looked at in-kernel drmP.h and it actually has the same fix in it. Signed-off-by: Michael Buesch --- linux-core/drmP.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 13f97eee..5827efba 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -1083,6 +1083,7 @@ static inline int drm_mtrr_del(int handle, unsigned long offset, } #define drm_core_has_MTRR(dev) (0) +#define DRM_MTRR_WC 0 #endif -- cgit v1.2.3 From 86ff2aeb9bfea357d5748b3587ab224e813b37b6 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 19 Dec 2006 20:29:03 +1100 Subject: drm: remove all 2.4 support for drm development tree. Bye bye 2.4 you served us well.. --- linux-core/drmP.h | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 5827efba..c19b6afb 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -70,16 +70,7 @@ #include #include #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41) -#define HAS_WORKQUEUE 0 -#else -#define HAS_WORKQUEUE 1 -#endif -#if !HAS_WORKQUEUE -#include -#else #include -#endif #include #include #include "drm.h" @@ -897,11 +888,8 @@ typedef struct drm_device { unsigned long last_switch; /**< jiffies at last context switch */ /*@} */ -#if !HAS_WORKQUEUE - struct tq_struct tq; -#else struct work_struct work; -#endif + /** \name VBLANK IRQ support */ /*@{ */ @@ -929,11 +917,7 @@ typedef struct drm_device { int pci_vendor; /**< PCI vendor id */ int pci_device; /**< PCI device id */ #ifdef __alpha__ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3) - struct pci_controler *hose; -#else struct pci_controller *hose; -#endif #endif drm_sg_mem_t *sg; /**< Scatter gather memory */ unsigned long *ctx_bitmap; /**< context bitmap */ -- cgit v1.2.3 From 6333bfdb58b300494b2ec6f7b5a3ea5b392a210a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 19 Dec 2006 21:37:50 +1100 Subject: fixup inclusion of agp.h --- linux-core/drmP.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index c19b6afb..2b364f7c 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -67,6 +67,7 @@ #include #endif #if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) +#include #include #include #endif -- cgit v1.2.3 From 9acd4a13f2355e8f550669702a5c6db16cc14b0f Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Wed, 20 Dec 2006 19:33:50 +0100 Subject: Remove the stupid root_node field from the core memory manager. --- linux-core/drmP.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 2b364f7c..77212d1c 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -545,7 +545,8 @@ typedef struct drm_mm_node { } drm_mm_node_t; typedef struct drm_mm { - drm_mm_node_t root_node; + struct list_head fl_entry; + struct list_head ml_entry; } drm_mm_t; -- cgit v1.2.3 From 2dcbf6a59918761cffb27e027b1235c551ed03dd Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 1 Jan 2007 11:30:38 +1100 Subject: make build against 2.6.20 hopefully --- linux-core/drmP.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 77212d1c..ecb03181 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -794,7 +794,11 @@ typedef struct drm_buffer_manager{ struct list_head pinned[DRM_BO_MEM_TYPES]; struct list_head unfenced; struct list_head ddestroy; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) struct work_struct wq; +#else + struct delayed_work wq; +#endif uint32_t fence_type; unsigned long cur_pages; atomic_t count; -- cgit v1.2.3 From b147c3926352e4dcb9dbf53b8b12baae8ce34254 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 8 Jan 2007 10:55:49 +1100 Subject: drm: remove drm_follow_page, and drm_ioremap and ioremapfree This comes from the Re: [patch] paravirt: isolate module ops on lkml It needs some testing, please report any regressions caused. Signed-off-by: Dave Airlie --- linux-core/drmP.h | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index ecb03181..af8a544d 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -1457,26 +1457,8 @@ extern int drm_fence_buffer_objects(drm_file_t * priv, drm_fence_object_t *fence, drm_fence_object_t **used_fence); - -/* Inline replacements for DRM_IOREMAP macros */ -static __inline__ void drm_core_ioremap(struct drm_map *map, - struct drm_device *dev) -{ - map->handle = drm_ioremap(map->offset, map->size, dev); -} - -static __inline__ void drm_core_ioremap_nocache(struct drm_map *map, - struct drm_device *dev) -{ - map->handle = drm_ioremap_nocache(map->offset, map->size, dev); -} - -static __inline__ void drm_core_ioremapfree(struct drm_map *map, - struct drm_device *dev) -{ - if (map->handle && map->size) - drm_ioremapfree(map->handle, map->size, dev); -} +extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev); +extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev); static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, unsigned int token) -- cgit v1.2.3