omap_drv.h 2.3 KB
Newer Older
1
/*
2
 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
 * Author: Rob Clark <rob@ti.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */

18 19
#ifndef __OMAPDRM_DRV_H__
#define __OMAPDRM_DRV_H__
20 21 22

#include <linux/module.h>
#include <linux/types.h>
23
#include <linux/workqueue.h>
24

25
#include <drm/drmP.h>
26
#include <drm/drm_crtc_helper.h>
D
Daniel Vetter 已提交
27
#include <drm/drm_gem.h>
28
#include <drm/omap_drm.h>
29

30 31
#include "dss/omapdss.h"

32 33 34 35 36 37 38 39 40
#include "omap_connector.h"
#include "omap_crtc.h"
#include "omap_encoder.h"
#include "omap_fb.h"
#include "omap_fbdev.h"
#include "omap_gem.h"
#include "omap_irq.h"
#include "omap_plane.h"

41 42 43 44 45
#define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
#define VERB(fmt, ...) if (0) DRM_DEBUG(fmt, ##__VA_ARGS__) /* verbose debug */

#define MODULE_NAME     "omapdrm"

46 47
struct omap_drm_usergart;

48
struct omap_drm_private {
49
	u32 omaprev;
50

T
Tomi Valkeinen 已提交
51 52
	const struct dispc_ops *dispc_ops;

53 54
	unsigned int num_crtcs;
	struct drm_crtc *crtcs[8];
55

56 57
	unsigned int num_planes;
	struct drm_plane *planes[8];
58

59 60
	unsigned int num_encoders;
	struct drm_encoder *encoders[8];
61

62 63 64 65
	unsigned int num_connectors;
	struct drm_connector *connectors[8];

	struct drm_fb_helper *fbdev;
66

R
Rob Clark 已提交
67 68
	struct workqueue_struct *wq;

69 70 71
	/* lock for obj_list below */
	spinlock_t list_lock;

72
	/* list of GEM objects: */
73 74
	struct list_head obj_list;

75
	struct omap_drm_usergart *usergart;
76
	bool has_dmm;
77 78

	/* properties: */
79
	struct drm_property *zorder_prop;
80 81

	/* irq handling: */
82 83
	spinlock_t wait_lock;		/* protects the wait_list */
	struct list_head wait_list;	/* list of omap_irq_wait */
84
	u32 irq_mask;			/* enabled irqs in addition to wait_list */
85 86 87

	/* memory bandwidth limit if it is needed on the platform */
	unsigned int max_bandwidth;
88 89 90
};


91
int omap_debugfs_init(struct drm_minor *minor);
92 93

#endif /* __OMAPDRM_DRV_H__ */