1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Hisilicon Hibmc SoC drm driver
4 * Based on the bochs drm driver.
6 * Copyright (c) 2016 Huawei Limited.
9 * Rongrong Zou <zourongrong@huawei.com>
10 * Rongrong Zou <zourongrong@gmail.com>
11 * Jianhua Li <lijianhua@huawei.com>
14 #ifndef HIBMC_DRM_DRV_H
15 #define HIBMC_DRM_DRV_H
17 #include <drm/drm_fb_helper.h>
18 #include <drm/drm_framebuffer.h>
22 struct hibmc_drm_private
{
26 unsigned long fb_base
;
27 unsigned long fb_size
;
31 struct drm_device
*dev
;
32 bool mode_config_initialized
;
35 void hibmc_set_power_mode(struct hibmc_drm_private
*priv
,
36 unsigned int power_mode
);
37 void hibmc_set_current_gate(struct hibmc_drm_private
*priv
,
40 int hibmc_de_init(struct hibmc_drm_private
*priv
);
41 int hibmc_vdac_init(struct hibmc_drm_private
*priv
);
43 int hibmc_mm_init(struct hibmc_drm_private
*hibmc
);
44 void hibmc_mm_fini(struct hibmc_drm_private
*hibmc
);
45 int hibmc_dumb_create(struct drm_file
*file
, struct drm_device
*dev
,
46 struct drm_mode_create_dumb
*args
);
48 extern const struct drm_mode_config_funcs hibmc_mode_funcs
;