/* SPDX-License-Identifier: GPL-2.0-or-later */ /* Hisilicon Hibmc SoC drm driver * * Based on the bochs drm driver. * * Copyright (c) 2016 Huawei Limited. * * Author: * Rongrong Zou * Rongrong Zou * Jianhua Li */ #ifndef HIBMC_DRM_DRV_H #define HIBMC_DRM_DRV_H #include #include struct drm_device; struct hibmc_drm_private { /* hw */ void __iomem *mmio; void __iomem *fb_map; unsigned long fb_base; unsigned long fb_size; /* drm */ struct drm_device *dev; struct drm_plane primary_plane; struct drm_crtc crtc; struct drm_encoder encoder; struct drm_connector connector; bool mode_config_initialized; }; void hibmc_set_power_mode(struct hibmc_drm_private *priv, unsigned int power_mode); void hibmc_set_current_gate(struct hibmc_drm_private *priv, unsigned int gate); int hibmc_de_init(struct hibmc_drm_private *priv); int hibmc_vdac_init(struct hibmc_drm_private *priv); int hibmc_mm_init(struct hibmc_drm_private *hibmc); void hibmc_mm_fini(struct hibmc_drm_private *hibmc); int hibmc_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args); extern const struct drm_mode_config_funcs hibmc_mode_funcs; #endif