1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2016 Linaro Limited.
4 * Copyright (c) 2014-2016 Hisilicon Limited.
7 #ifndef __KIRIN_DRM_DRV_H__
8 #define __KIRIN_DRM_DRV_H__
10 #define to_kirin_crtc(crtc) \
11 container_of(crtc, struct kirin_crtc, base)
13 #define to_kirin_plane(plane) \
14 container_of(plane, struct kirin_plane, base)
16 /* kirin-format translate table */
29 struct drm_plane base
;
34 /* display controller init/cleanup ops */
35 struct kirin_drm_data
{
36 const u32
*channel_formats
;
37 u32 channel_formats_cnt
;
39 int config_max_height
;
40 bool register_connects
;
44 struct drm_driver
*driver
;
45 const struct drm_crtc_helper_funcs
*crtc_helper_funcs
;
46 const struct drm_crtc_funcs
*crtc_funcs
;
47 const struct drm_plane_helper_funcs
*plane_helper_funcs
;
48 const struct drm_plane_funcs
*plane_funcs
;
49 const struct drm_mode_config_funcs
*mode_config_funcs
;
51 void *(*alloc_hw_ctx
)(struct platform_device
*pdev
,
52 struct drm_crtc
*crtc
);
53 void (*cleanup_hw_ctx
)(void *hw_ctx
);
56 extern struct kirin_drm_data ade_driver_data
;
58 #endif /* __KIRIN_DRM_DRV_H__ */