Skip to content

Commit

Permalink
SiS DRM: fix the memory allocator if the SIS FB is built as a module
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Howells authored and Dave Airlie committed Oct 17, 2008
1 parent ddb7f4c commit 6bb9e4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/sis/sis_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#define AGP_TYPE 1


#if defined(CONFIG_FB_SIS)
#if defined(CONFIG_FB_SIS) || defined(CONFIG_FB_SIS_MODULE)
/* fb management via fb device */

#define SIS_MM_ALIGN_SHIFT 0
Expand Down Expand Up @@ -75,12 +75,12 @@ static unsigned long sis_sman_mm_offset(void *private, void *ref)
return ~((unsigned long)ref);
}

#else /* CONFIG_FB_SIS */
#else /* CONFIG_FB_SIS[_MODULE] */

#define SIS_MM_ALIGN_SHIFT 4
#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)
{
Expand All @@ -89,7 +89,7 @@ static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file
int ret;

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;
sman_mm.private = (void *)0xFFFFFFFF;
Expand Down

0 comments on commit 6bb9e4b

Please sign in to comment.