Commit 6bb9e4bf authored by David Howells's avatar David Howells Committed by Dave Airlie

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: default avatarDavid Howells <dhowells@redhat.com>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ddb7f4cb
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#define AGP_TYPE 1 #define AGP_TYPE 1
#if defined(CONFIG_FB_SIS) #if defined(CONFIG_FB_SIS) || defined(CONFIG_FB_SIS_MODULE)
/* fb management via fb device */ /* fb management via fb device */
#define SIS_MM_ALIGN_SHIFT 0 #define SIS_MM_ALIGN_SHIFT 0
...@@ -75,12 +75,12 @@ static unsigned long sis_sman_mm_offset(void *private, void *ref) ...@@ -75,12 +75,12 @@ static unsigned long sis_sman_mm_offset(void *private, void *ref)
return ~((unsigned long)ref); return ~((unsigned long)ref);
} }
#else /* CONFIG_FB_SIS */ #else /* CONFIG_FB_SIS[_MODULE] */
#define SIS_MM_ALIGN_SHIFT 4 #define SIS_MM_ALIGN_SHIFT 4
#define SIS_MM_ALIGN_MASK ( (1 << SIS_MM_ALIGN_SHIFT) - 1) #define SIS_MM_ALIGN_MASK ( (1 << SIS_MM_ALIGN_SHIFT) - 1)
#endif /* CONFIG_FB_SIS */ #endif /* CONFIG_FB_SIS[_MODULE] */
static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file_priv) static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file_priv)
{ {
...@@ -89,7 +89,7 @@ static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file ...@@ -89,7 +89,7 @@ static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file
int ret; int ret;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
#if defined(CONFIG_FB_SIS) #if defined(CONFIG_FB_SIS) || defined(CONFIG_FB_SIS_MODULE)
{ {
struct drm_sman_mm sman_mm; struct drm_sman_mm sman_mm;
sman_mm.private = (void *)0xFFFFFFFF; sman_mm.private = (void *)0xFFFFFFFF;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment