Commit 478f6213 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/fbdev: Include <linux/vmalloc.h>

Include <linux/vmalloc.h> in fbdev emulation to get vzalloc() and
vfree() on MIPS. The error messages are shown below and bug reports
are at [1] and [2].

  drivers/gpu/drm/drm_fbdev_generic.c: In function 'drm_fbdev_cleanup':
  drivers/gpu/drm/drm_fbdev_generic.c:63:17: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
     63 |                 vfree(shadow);
        |                 ^~~~~
        |                 kvfree
  drivers/gpu/drm/drm_fbdev_generic.c: In function 'drm_fbdev_fb_probe':
  drivers/gpu/drm/drm_fbdev_generic.c:219:38: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
    219 |                 fbi->screen_buffer = vzalloc(fbi->screen_size);
        |                                      ^~~~~~~
        |                                      kvzalloc
  drivers/gpu/drm/drm_fbdev_generic.c:219:36: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    219 |                 fbi->screen_buffer = vzalloc(fbi->screen_size);
Reported-by: default avatarkernel test robot <lkp@intel.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Fixes: 8ab59da2 ("drm/fb-helper: Move generic fbdev emulation into separate source file")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Link: https://lore.kernel.org/dri-devel/202211060911.5U76gMtE-lkp@intel.com/T/#u # [1]
Link: https://lore.kernel.org/dri-devel/202211060331.1SoD1tAR-lkp@intel.com/T/#u # [2]
Link: https://patchwork.freedesktop.org/patch/msgid/20221107125329.12842-2-tzimmermann@suse.de
parent 408e42ae
// SPDX-License-Identifier: MIT
#include <linux/moduleparam.h>
#include <linux/vmalloc.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_drv.h>
......
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