drm/fb-helper: Build fixes for cleanup
Subsystems (3)
Thomas Zimmermann
maintainercover drm/fb-helper: Build fixes for cleanup
Cleaning up the fbdev code produced a number of simple build errors. Fix them.
Thomas Zimmermann (3):
drm/fbdev: Include <linux/vmalloc.h> drm/hisilicon/hibmc: Include <linux/io.h> for readl() and writel() drm/fb-helper: Document struct drm_fb_helper.hint_leak_smem_start
drivers/gpu/drm/drm_fbdev_generic.c | 1 + drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 ++ include/drm/drm_fb_helper.h | 7 +++++++ 3 files changed, 10 insertions(+)
Signature · 1 line
2.38.0
Thomas Zimmermann
maintainerPATCH 1/3 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);--- drivers/gpu/drm/drm_fbdev_generic.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_fbdev_generic.c +1 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: MIT #include <linux/moduleparam.h> +#include <linux/vmalloc.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_drv.h>
Signature · 1 line
2.38.0
Thomas Zimmermann
maintainerPATCH 2/3 drm/hisilicon/hibmc: Include <linux/io.h> for readl() and writel()
In reply to Thomas ZimmermannInclude <linux/io.h> to get readl() and writel() on S390. The error message is shown below and a bug report is at [1].
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c:75:15: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration]
75 | reg = readl(priv->mmio + HIBMC_DISPLAY_CONTROL_HISILE);
| ^~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c:80:9: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration]
80 | writel(reg, priv->mmio + HIBMC_DISPLAY_CONTROL_HISILE);
| ^~~~~~--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c +2 -0
@@ -11,6 +11,8 @@* Jianhua Li <[email protected]> */ +#include <linux/io.h> +#include <drm/drm_atomic_helper.h> #include <drm/drm_probe_helper.h> #include <drm/drm_print.h>
Signature · 1 line
2.38.0
Thomas Zimmermann
maintainerPATCH 3/3 drm/fb-helper: Document struct drm_fb_helper.hint_leak_smem_start
In reply to Thomas ZimmermannDocument the new field smem_start in struct drm_fb_helper and avoid a compile-time warning. An error message is shown below and the bug report is at [1].
include/drm/drm_fb_helper.h:204: warning: Function parameter or member 'hint_leak_smem_start' not described in 'drm_fb_helper'
--- include/drm/drm_fb_helper.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/drm/drm_fb_helper.h +7 -0
@@ -200,6 +200,13 @@ struct drm_fb_helper {*/ int preferred_bpp; +/** +* @hint_leak_smem_start: +* +* Hint to the fbdev emulation to store the framebuffer's physical +* address in struct &fb_info.fix.smem_start. If the hint is unset, +* the smem_start field should always be cleared to zero. +*/ bool hint_leak_smem_start; };
Signature · 1 line
2.38.0
Thomas Zimmermann
maintainera-b: danvet via irc
Am 07.11.22 um 13:53 schrieb Thomas Zimmermann:
Quoted 13 lines
Cleaning up the fbdev code produced a number of simple build errors. Fix them.
Thomas Zimmermann (3):
drm/fbdev: Include <linux/vmalloc.h> drm/hisilicon/hibmc: Include <linux/io.h> forreadl()andwritel()drm/fb-helper: Document struct drm_fb_helper.hint_leak_smem_startdrivers/gpu/drm/drm_fbdev_generic.c | 1 + drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 ++ include/drm/drm_fb_helper.h | 7 +++++++ 3 files changed, 10 insertions(+)
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev