[PATCH 3/5] drm/exynos: Remove fb_helper from struct exynos_drm_private
Thomas Zimmermann
tzimmermann at suse.de
Thu Mar 30 07:36:33 UTC 2023
The DRM device stores a pointer to the fbdev helper. Remove struct
exynos_drm_private.fb_helper, which contains the same value. No
functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
drivers/gpu/drm/exynos/exynos_drm_drv.h | 2 --
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 15 +++++----------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 6ae9056e7a18..81d501efd013 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -197,8 +197,6 @@ struct drm_exynos_file_private {
* @wait: wait an atomic commit to finish
*/
struct exynos_drm_private {
- struct drm_fb_helper *fb_helper;
-
struct device *g2d_dev;
struct device *dma_dev;
void *mapping;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index e7059850baa2..81f909cb5c9b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -137,7 +137,6 @@ static const struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = {
int exynos_drm_fbdev_init(struct drm_device *dev)
{
- struct exynos_drm_private *private = dev->dev_private;
struct drm_fb_helper *helper;
int ret;
@@ -148,8 +147,6 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
if (!helper)
return -ENOMEM;
- private->fb_helper = helper;
-
drm_fb_helper_prepare(dev, helper, PREFERRED_BPP, &exynos_drm_fb_helper_funcs);
ret = drm_fb_helper_init(dev, helper);
@@ -172,7 +169,6 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
drm_fb_helper_fini(helper);
err_init:
drm_fb_helper_unprepare(helper);
- private->fb_helper = NULL;
kfree(helper);
return ret;
@@ -197,14 +193,13 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,
void exynos_drm_fbdev_fini(struct drm_device *dev)
{
- struct exynos_drm_private *private = dev->dev_private;
+ struct drm_fb_helper *fb_helper = dev->fb_helper;
- if (!private || !private->fb_helper)
+ if (!fb_helper)
return;
- exynos_drm_fbdev_destroy(dev, private->fb_helper);
- drm_fb_helper_unprepare(private->fb_helper);
- kfree(private->fb_helper);
- private->fb_helper = NULL;
+ exynos_drm_fbdev_destroy(dev, fb_helper);
+ drm_fb_helper_unprepare(fb_helper);
+ kfree(fb_helper);
}
--
2.40.0
More information about the dri-devel
mailing list