WIP FPC-III support
[linux/fpc-iii.git] / drivers / gpu / drm / tidss / tidss_crtc.h
blob040d1205496b2aae65c739ab423cf13752e03026
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
4 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
5 */
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)
17 struct tidss_device;
19 struct tidss_crtc {
20 struct drm_crtc crtc;
22 u32 hw_videoport;
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 {
32 /* Must be first. */
33 struct drm_crtc_state base;
35 bool plane_pos_changed;
37 u32 bus_format;
38 u32 bus_flags;
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,
46 u32 hw_videoport,
47 struct drm_plane *primary);
48 #endif