treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / gpu / drm / hisilicon / hibmc / hibmc_drm_drv.h
blob50a0c1f9d21138c3defd0fcbe00ca97877e32be0
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.
8 * Author:
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>
20 struct drm_device;
22 struct hibmc_drm_private {
23 /* hw */
24 void __iomem *mmio;
25 void __iomem *fb_map;
26 unsigned long fb_base;
27 unsigned long fb_size;
28 bool msi_enabled;
30 /* drm */
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,
38 unsigned int gate);
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;
50 #endif