xref: /linux/drivers/gpu/drm/xlnx/zynqmp_kms.h (revision d189835fffed7fed4aec15a41eaa27190ad4e04d)
176c8eeb7SLaurent Pinchart /* SPDX-License-Identifier: GPL-2.0 */
276c8eeb7SLaurent Pinchart /*
376c8eeb7SLaurent Pinchart  * ZynqMP DisplayPort Subsystem - KMS API
476c8eeb7SLaurent Pinchart  *
576c8eeb7SLaurent Pinchart  * Copyright (C) 2017 - 2021 Xilinx, Inc.
676c8eeb7SLaurent Pinchart  *
776c8eeb7SLaurent Pinchart  * Authors:
876c8eeb7SLaurent Pinchart  * - Hyun Woo Kwon <hyun.kwon@xilinx.com>
976c8eeb7SLaurent Pinchart  * - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1076c8eeb7SLaurent Pinchart  */
1176c8eeb7SLaurent Pinchart 
1276c8eeb7SLaurent Pinchart #ifndef _ZYNQMP_KMS_H_
1376c8eeb7SLaurent Pinchart #define _ZYNQMP_KMS_H_
1476c8eeb7SLaurent Pinchart 
15*d189835fSLaurent Pinchart #include <drm/drm_crtc.h>
16*d189835fSLaurent Pinchart #include <drm/drm_device.h>
17*d189835fSLaurent Pinchart #include <drm/drm_encoder.h>
18*d189835fSLaurent Pinchart #include <drm/drm_plane.h>
19*d189835fSLaurent Pinchart 
20*d189835fSLaurent Pinchart #include "zynqmp_dpsub.h"
21*d189835fSLaurent Pinchart 
2276c8eeb7SLaurent Pinchart struct zynqmp_dpsub;
2376c8eeb7SLaurent Pinchart 
24*d189835fSLaurent Pinchart /**
25*d189835fSLaurent Pinchart  * struct zynqmp_dpsub - ZynqMP DisplayPort Subsystem DRM/KMS data
26*d189835fSLaurent Pinchart  * @dpsub: Backpointer to the DisplayPort subsystem
27*d189835fSLaurent Pinchart  * @drm: The DRM/KMS device
28*d189835fSLaurent Pinchart  * @planes: The DRM planes
29*d189835fSLaurent Pinchart  * @crtc: The DRM CRTC
30*d189835fSLaurent Pinchart  * @encoder: The dummy DRM encoder
31*d189835fSLaurent Pinchart  */
32*d189835fSLaurent Pinchart struct zynqmp_dpsub_drm {
33*d189835fSLaurent Pinchart 	struct zynqmp_dpsub *dpsub;
34*d189835fSLaurent Pinchart 
35*d189835fSLaurent Pinchart 	struct drm_device dev;
36*d189835fSLaurent Pinchart 	struct drm_plane planes[ZYNQMP_DPSUB_NUM_LAYERS];
37*d189835fSLaurent Pinchart 	struct drm_crtc crtc;
38*d189835fSLaurent Pinchart 	struct drm_encoder encoder;
39*d189835fSLaurent Pinchart };
40074ef0ceSLaurent Pinchart 
4183a956d3SLaurent Pinchart void zynqmp_dpsub_handle_vblank(struct zynqmp_dpsub *dpsub);
4283a956d3SLaurent Pinchart 
43074ef0ceSLaurent Pinchart int zynqmp_dpsub_drm_init(struct zynqmp_dpsub *dpsub);
44074ef0ceSLaurent Pinchart void zynqmp_dpsub_drm_cleanup(struct zynqmp_dpsub *dpsub);
4576c8eeb7SLaurent Pinchart 
4676c8eeb7SLaurent Pinchart #endif /* _ZYNQMP_KMS_H_ */
47