0001
0002
0003
0004
0005
0006
0007 #ifndef __TIDSS_DRV_H__
0008 #define __TIDSS_DRV_H__
0009
0010 #include <linux/spinlock.h>
0011
0012 #define TIDSS_MAX_PORTS 4
0013 #define TIDSS_MAX_PLANES 4
0014
0015 typedef u32 dispc_irq_t;
0016
0017 struct tidss_device {
0018 struct drm_device ddev;
0019 struct device *dev;
0020
0021 const struct dispc_features *feat;
0022 struct dispc_device *dispc;
0023
0024 unsigned int num_crtcs;
0025 struct drm_crtc *crtcs[TIDSS_MAX_PORTS];
0026
0027 unsigned int num_planes;
0028 struct drm_plane *planes[TIDSS_MAX_PLANES];
0029
0030 unsigned int irq;
0031
0032 spinlock_t wait_lock;
0033 dispc_irq_t irq_mask;
0034 };
0035
0036 #define to_tidss(__dev) container_of(__dev, struct tidss_device, ddev)
0037
0038 int tidss_runtime_get(struct tidss_device *tidss);
0039 void tidss_runtime_put(struct tidss_device *tidss);
0040
0041 #endif