Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cris-mirror.git] / drivers / gpu / drm / omapdrm / omap_drv.h
blob0ac97fe09f9b9049ed7ff3e5fda1b8892fab1631
1 /*
2 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
3 * Author: Rob Clark <rob@ti.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef __OMAPDRM_DRV_H__
19 #define __OMAPDRM_DRV_H__
21 #include <linux/module.h>
22 #include <linux/types.h>
23 #include <linux/workqueue.h>
25 #include <drm/drmP.h>
26 #include <drm/drm_crtc_helper.h>
27 #include <drm/drm_gem.h>
28 #include <drm/omap_drm.h>
30 #include "dss/omapdss.h"
32 #include "omap_connector.h"
33 #include "omap_crtc.h"
34 #include "omap_encoder.h"
35 #include "omap_fb.h"
36 #include "omap_fbdev.h"
37 #include "omap_gem.h"
38 #include "omap_irq.h"
39 #include "omap_plane.h"
41 #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
42 #define VERB(fmt, ...) if (0) DRM_DEBUG(fmt, ##__VA_ARGS__) /* verbose debug */
44 #define MODULE_NAME "omapdrm"
46 struct omap_drm_usergart;
48 struct omap_drm_private {
49 uint32_t omaprev;
51 const struct dispc_ops *dispc_ops;
53 unsigned int num_crtcs;
54 struct drm_crtc *crtcs[8];
56 unsigned int num_planes;
57 struct drm_plane *planes[8];
59 unsigned int num_encoders;
60 struct drm_encoder *encoders[8];
62 unsigned int num_connectors;
63 struct drm_connector *connectors[8];
65 struct drm_fb_helper *fbdev;
67 struct workqueue_struct *wq;
69 /* lock for obj_list below */
70 spinlock_t list_lock;
72 /* list of GEM objects: */
73 struct list_head obj_list;
75 struct omap_drm_usergart *usergart;
76 bool has_dmm;
78 /* properties: */
79 struct drm_property *zorder_prop;
81 /* irq handling: */
82 spinlock_t wait_lock; /* protects the wait_list */
83 struct list_head wait_list; /* list of omap_irq_wait */
84 uint32_t irq_mask; /* enabled irqs in addition to wait_list */
86 /* memory bandwidth limit if it is needed on the platform */
87 unsigned int max_bandwidth;
91 int omap_debugfs_init(struct drm_minor *minor);
93 #endif /* __OMAPDRM_DRV_H__ */