Skip to content

Commit a882485

Browse files
author
Thomas Zimmermann
committed
drm/hisilicon/hibmc: Switch to generic fbdev emulation
There's nothing special about hibmc's fbdev emulation that is not provided by the generic implementation. Switch over and remove the driver's code. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0eee615 commit a882485

File tree

4 files changed

+3
-255
lines changed

4 files changed

+3
-255
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
hibmc-drm-y := hibmc_drm_drv.o hibmc_drm_de.o hibmc_drm_vdac.o hibmc_drm_fbdev.o hibmc_ttm.o
2+
hibmc-drm-y := hibmc_drm_drv.o hibmc_drm_de.o hibmc_drm_vdac.o hibmc_ttm.o
33

44
obj-$(CONFIG_DRM_HISI_HIBMC) += hibmc-drm.o

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include <drm/drm_atomic_helper.h>
1919
#include <drm/drm_drv.h>
20+
#include <drm/drm_fb_helper.h>
2021
#include <drm/drm_gem_vram_helper.h>
2122
#include <drm/drm_irq.h>
2223
#include <drm/drm_print.h>
@@ -247,8 +248,6 @@ static int hibmc_unload(struct drm_device *dev)
247248
{
248249
struct hibmc_drm_private *priv = dev->dev_private;
249250

250-
hibmc_fbdev_fini(priv);
251-
252251
drm_atomic_helper_shutdown(dev);
253252

254253
if (dev->irq_enabled)
@@ -307,7 +306,7 @@ static int hibmc_load(struct drm_device *dev)
307306
/* reset all the states of crtc/plane/encoder/connector */
308307
drm_mode_config_reset(dev);
309308

310-
ret = hibmc_fbdev_init(priv);
309+
ret = drm_fbdev_generic_setup(dev, 16);
311310
if (ret) {
312311
DRM_ERROR("failed to initialize fbdev: %d\n", ret);
313312
goto err;

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ struct hibmc_framebuffer {
2525
struct drm_gem_object *obj;
2626
};
2727

28-
struct hibmc_fbdev {
29-
struct drm_fb_helper helper; /* must be first */
30-
struct hibmc_framebuffer *fb;
31-
int size;
32-
};
33-
3428
struct hibmc_drm_private {
3529
/* hw */
3630
void __iomem *mmio;
@@ -42,9 +36,6 @@ struct hibmc_drm_private {
4236
/* drm */
4337
struct drm_device *dev;
4438
bool mode_config_initialized;
45-
46-
/* fbdev */
47-
struct hibmc_fbdev *fbdev;
4839
};
4940

5041
#define to_hibmc_framebuffer(x) container_of(x, struct hibmc_framebuffer, fb)
@@ -56,8 +47,6 @@ void hibmc_set_current_gate(struct hibmc_drm_private *priv,
5647

5748
int hibmc_de_init(struct hibmc_drm_private *priv);
5849
int hibmc_vdac_init(struct hibmc_drm_private *priv);
59-
int hibmc_fbdev_init(struct hibmc_drm_private *priv);
60-
void hibmc_fbdev_fini(struct hibmc_drm_private *priv);
6150

6251
int hibmc_gem_create(struct drm_device *dev, u32 size, bool iskernel,
6352
struct drm_gem_object **obj);

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c

Lines changed: 0 additions & 240 deletions
This file was deleted.

0 commit comments

Comments
 (0)