2 * (C) COPYRIGHT 2016 ARM Limited. All rights reserved.
5 * This program is free software and is provided to you under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation, and any use by you of this program is subject to the terms
10 * ARM Mali DP500/DP550/DP650 KMS/DRM driver structures
13 #ifndef __MALIDP_DRV_H__
14 #define __MALIDP_DRV_H__
16 #include <linux/mutex.h>
17 #include <linux/wait.h>
18 #include "malidp_hw.h"
21 struct malidp_hw_device *dev;
22 struct drm_fbdev_cma *fbdev;
23 struct list_head event_list;
26 atomic_t config_valid;
29 #define crtc_to_malidp_device(x) container_of(x, struct malidp_drm, crtc)
32 struct drm_plane base;
33 struct malidp_hw_device *hwdev;
34 const struct malidp_layer *layer;
37 struct malidp_plane_state {
38 struct drm_plane_state base;
40 /* size of the required rotation memory if plane is rotated */
44 #define to_malidp_plane(x) container_of(x, struct malidp_plane, base)
45 #define to_malidp_plane_state(x) container_of(x, struct malidp_plane_state, base)
47 int malidp_de_planes_init(struct drm_device *drm);
48 void malidp_de_planes_destroy(struct drm_device *drm);
49 int malidp_crtc_init(struct drm_device *drm);
51 /* often used combination of rotational bits */
52 #define MALIDP_ROTATED_MASK (DRM_ROTATE_90 | DRM_ROTATE_270)
54 #endif /* __MALIDP_DRV_H__ */