Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
0004  * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
0005  */
0006 
0007 #ifndef __TIDSS_CRTC_H__
0008 #define __TIDSS_CRTC_H__
0009 
0010 #include <linux/completion.h>
0011 #include <linux/wait.h>
0012 
0013 #include <drm/drm_crtc.h>
0014 
0015 #define to_tidss_crtc(c) container_of((c), struct tidss_crtc, crtc)
0016 
0017 struct tidss_device;
0018 
0019 struct tidss_crtc {
0020     struct drm_crtc crtc;
0021 
0022     u32 hw_videoport;
0023 
0024     struct drm_pending_vblank_event *event;
0025 
0026     struct completion framedone_completion;
0027 };
0028 
0029 #define to_tidss_crtc_state(x) container_of(x, struct tidss_crtc_state, base)
0030 
0031 struct tidss_crtc_state {
0032     /* Must be first. */
0033     struct drm_crtc_state base;
0034 
0035     bool plane_pos_changed;
0036 
0037     u32 bus_format;
0038     u32 bus_flags;
0039 };
0040 
0041 void tidss_crtc_vblank_irq(struct drm_crtc *crtc);
0042 void tidss_crtc_framedone_irq(struct drm_crtc *crtc);
0043 void tidss_crtc_error_irq(struct drm_crtc *crtc, u64 irqstatus);
0044 
0045 struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss,
0046                      u32 hw_videoport,
0047                      struct drm_plane *primary);
0048 #endif