aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-07-30 15:29:37 -0400
committerDave Airlie <airlied@linux.ie>2008-10-17 17:10:09 -0400
commit6bb9e4bff5c6fd908d907222108ef5650d77972f (patch)
tree9b4712baaa55e585deeb37ac27172d549cd80f8c /drivers/gpu
parentddb7f4cb819fb6b9df261ce4c80b3c6f4852620d (diff)
SiS DRM: fix the memory allocator if the SIS FB is built as a module
Fix the SIS DRM memory allocator if the SIS FB built as a module. The SIS DRM code initialises the mm allocation hooks, but _only_ if the SIS FB is not built as a module because it depends on CONFIG_FB_SIS, and that's unset if the SIS FB is not built in. It must check CONFIG_FB_SIS_MODULE as well. Signed-off-by: David Howells <dhowells@redhat.com> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/sis/sis_mm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/sis/sis_mm.c b/drivers/gpu/drm/sis/sis_mm.c
index b3878770fce1..c4debfdc1aaa 100644
--- a/drivers/gpu/drm/sis/sis_mm.c
+++ b/drivers/gpu/drm/sis/sis_mm.c
@@ -41,7 +41,7 @@
41#define AGP_TYPE 1 41#define AGP_TYPE 1
42 42
43 43
44#if defined(CONFIG_FB_SIS) 44#if defined(CONFIG_FB_SIS) || defined(CONFIG_FB_SIS_MODULE)
45/* fb management via fb device */ 45/* fb management via fb device */
46 46
47#define SIS_MM_ALIGN_SHIFT 0 47#define SIS_MM_ALIGN_SHIFT 0
@@ -75,12 +75,12 @@ static unsigned long sis_sman_mm_offset(void *private, void *ref)
75 return ~((unsigned long)ref); 75 return ~((unsigned long)ref);
76} 76}
77 77
78#else /* CONFIG_FB_SIS */ 78#else /* CONFIG_FB_SIS[_MODULE] */
79 79
80#define SIS_MM_ALIGN_SHIFT 4 80#define SIS_MM_ALIGN_SHIFT 4
81#define SIS_MM_ALIGN_MASK ( (1 << SIS_MM_ALIGN_SHIFT) - 1) 81#define SIS_MM_ALIGN_MASK ( (1 << SIS_MM_ALIGN_SHIFT) - 1)
82 82
83#endif /* CONFIG_FB_SIS */ 83#endif /* CONFIG_FB_SIS[_MODULE] */
84 84
85static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file_priv) 85static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file_priv)
86{ 86{
@@ -89,7 +89,7 @@ static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file
89 int ret; 89 int ret;
90 90
91 mutex_lock(&dev->struct_mutex); 91 mutex_lock(&dev->struct_mutex);
92#if defined(CONFIG_FB_SIS) 92#if defined(CONFIG_FB_SIS) || defined(CONFIG_FB_SIS_MODULE)
93 { 93 {
94 struct drm_sman_mm sman_mm; 94 struct drm_sman_mm sman_mm;
95 sman_mm.private = (void *)0xFFFFFFFF; 95 sman_mm.private = (void *)0xFFFFFFFF;