forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/sun4i/sun4i_framebuffer.c
....@@ -1,21 +1,14 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2015 Free Electrons
34 * Copyright (C) 2015 NextThing Co
45 *
56 * Maxime Ripard <maxime.ripard@free-electrons.com>
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License as
9
- * published by the Free Software Foundation; either version 2 of
10
- * the License, or (at your option) any later version.
117 */
128
139 #include <drm/drm_atomic.h>
1410 #include <drm/drm_atomic_helper.h>
15
-#include <drm/drm_fb_helper.h>
16
-#include <drm/drm_fb_cma_helper.h>
1711 #include <drm/drm_gem_framebuffer_helper.h>
18
-#include <drm/drmP.h>
1912
2013 #include "sun4i_drv.h"
2114 #include "sun4i_framebuffer.h"
....@@ -37,17 +30,16 @@
3730 }
3831
3932 static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = {
40
- .output_poll_changed = drm_fb_helper_output_poll_changed,
4133 .atomic_check = sun4i_de_atomic_check,
4234 .atomic_commit = drm_atomic_helper_commit,
4335 .fb_create = drm_gem_fb_create,
4436 };
4537
46
-static struct drm_mode_config_helper_funcs sun4i_de_mode_config_helpers = {
38
+static const struct drm_mode_config_helper_funcs sun4i_de_mode_config_helpers = {
4739 .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
4840 };
4941
50
-int sun4i_framebuffer_init(struct drm_device *drm)
42
+void sun4i_framebuffer_init(struct drm_device *drm)
5143 {
5244 drm_mode_config_reset(drm);
5345
....@@ -56,11 +48,4 @@
5648
5749 drm->mode_config.funcs = &sun4i_de_mode_config_funcs;
5850 drm->mode_config.helper_private = &sun4i_de_mode_config_helpers;
59
-
60
- return drm_fb_cma_fbdev_init(drm, 32, 0);
61
-}
62
-
63
-void sun4i_framebuffer_free(struct drm_device *drm)
64
-{
65
- drm_fb_cma_fbdev_fini(drm);
6651 }