drm/msm: Move module parameter 'fbdev' to fbdev code

Define the module's parameter 'fbdev' in fbdev code. No other code
uses it. No functional changes, but simplifies the later conversion
to struct drm_client.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/530555/
Link: https://lore.kernel.org/r/20230403124538.8497-7-tzimmermann@suse.de
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
Thomas Zimmermann
2023-04-03 14:45:36 +02:00
committed by Dmitry Baryshkov
parent e13446341f
commit 6479f5b4e5
2 changed files with 9 additions and 8 deletions
+2 -8
View File
@@ -67,12 +67,6 @@ static const struct drm_mode_config_helper_funcs mode_config_helper_funcs = {
.atomic_commit_tail = msm_atomic_commit_tail,
};
#ifdef CONFIG_DRM_FBDEV_EMULATION
static bool fbdev = true;
MODULE_PARM_DESC(fbdev, "Enable fbdev compat layer");
module_param(fbdev, bool, 0600);
#endif
static char *vram = "16m";
MODULE_PARM_DESC(vram, "Configure VRAM size (for devices without IOMMU/GPUMMU)");
module_param(vram, charp, 0);
@@ -243,7 +237,7 @@ static int msm_drm_uninit(struct device *dev)
msm_rd_debugfs_cleanup(priv);
#ifdef CONFIG_DRM_FBDEV_EMULATION
if (fbdev && ddev->fb_helper)
if (ddev->fb_helper)
msm_fbdev_free(ddev);
#endif
@@ -550,7 +544,7 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
drm_mode_config_reset(ddev);
#ifdef CONFIG_DRM_FBDEV_EMULATION
if (kms && fbdev)
if (kms)
msm_fbdev_init(ddev);
#endif
+7
View File
@@ -14,6 +14,10 @@
#include "msm_gem.h"
#include "msm_kms.h"
static bool fbdev = true;
MODULE_PARM_DESC(fbdev, "Enable fbdev compat layer");
module_param(fbdev, bool, 0600);
/*
* fbdev funcs, to implement legacy fbdev interface on top of drm driver
*/
@@ -125,6 +129,9 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
struct drm_fb_helper *helper;
int ret;
if (!fbdev)
return NULL;
helper = kzalloc(sizeof(*helper), GFP_KERNEL);
if (!helper)
return NULL;