1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
4 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 #ifndef __TIDSS_CRTC_H__
8 #define __TIDSS_CRTC_H__
10 #include <linux/completion.h>
11 #include <linux/wait.h>
13 #include <drm/drm_crtc.h>
15 #define to_tidss_crtc(c) container_of((c), struct tidss_crtc, crtc)
24 struct drm_pending_vblank_event *event;
26 struct completion framedone_completion;
29 #define to_tidss_crtc_state(x) container_of(x, struct tidss_crtc_state, base)
31 struct tidss_crtc_state {
33 struct drm_crtc_state base;
35 bool plane_pos_changed;
41 void tidss_crtc_vblank_irq(struct drm_crtc *crtc);
42 void tidss_crtc_framedone_irq(struct drm_crtc *crtc);
43 void tidss_crtc_error_irq(struct drm_crtc *crtc, u64 irqstatus);
45 struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss,
47 struct drm_plane *primary);