1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * ZynqMP DisplayPort Subsystem - KMS API 4 * 5 * Copyright (C) 2017 - 2021 Xilinx, Inc. 6 * 7 * Authors: 8 * - Hyun Woo Kwon <hyun.kwon@xilinx.com> 9 * - Laurent Pinchart <laurent.pinchart@ideasonboard.com> 10 */ 11 12 #ifndef _ZYNQMP_KMS_H_ 13 #define _ZYNQMP_KMS_H_ 14 15 #include <drm/drm_crtc.h> 16 #include <drm/drm_device.h> 17 #include <drm/drm_encoder.h> 18 #include <drm/drm_plane.h> 19 20 #include "zynqmp_dpsub.h" 21 22 struct zynqmp_dpsub; 23 24 /** 25 * struct zynqmp_dpsub - ZynqMP DisplayPort Subsystem DRM/KMS data 26 * @dpsub: Backpointer to the DisplayPort subsystem 27 * @drm: The DRM/KMS device 28 * @planes: The DRM planes 29 * @crtc: The DRM CRTC 30 * @encoder: The dummy DRM encoder 31 */ 32 struct zynqmp_dpsub_drm { 33 struct zynqmp_dpsub *dpsub; 34 35 struct drm_device dev; 36 struct drm_plane planes[ZYNQMP_DPSUB_NUM_LAYERS]; 37 struct drm_crtc crtc; 38 struct drm_encoder encoder; 39 }; 40 41 void zynqmp_dpsub_drm_handle_vblank(struct zynqmp_dpsub *dpsub); 42 43 int zynqmp_dpsub_drm_init(struct zynqmp_dpsub *dpsub); 44 void zynqmp_dpsub_drm_cleanup(struct zynqmp_dpsub *dpsub); 45 46 #endif /* _ZYNQMP_KMS_H_ */ 47