2
*-----------------------------------------------------------------------------
3
* Filename: emgd_shared.h
5
*-----------------------------------------------------------------------------
6
* Copyright © 2002-2010, Intel Corporation.
8
* This program is free software; you can redistribute it and/or modify it
9
* under the terms and conditions of the GNU General Public License,
10
* version 2, as published by the Free Software Foundation.
12
* This program is distributed in the hope it will be useful, but WITHOUT
13
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17
* You should have received a copy of the GNU General Public License along with
18
* this program; if not, write to the Free Software Foundation, Inc.,
19
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21
*-----------------------------------------------------------------------------
23
* This include file contains information that is shared between the various
24
* EMGD driver components.
25
*-----------------------------------------------------------------------------
28
#ifndef _EMGD_SHARED_H
29
#define _EMGD_SHARED_H
32
* Module name is the name of the drm kernel module. This is used by
33
* user space components to open a connection to the module. A typical
34
* call would look like -- drmOpen(EMGD_MODULE_NAME, NULL);
36
#define EMGD_MODULE_NAME "emgd"
38
#define EMGD_DRIVER_NAME "emgd"
41
* EMGD-specific numbering of the PVR DRM ioctls. The EMGD DRM module is in
42
* charge, and includes the PVR DRM code. As such, the PVR ioctls are included
43
* in with the EMGD ioctls ("emgd_drm.h"), and must be kept in sync. Both sets
44
* of these ioctls are mapped to the device specific range between 0x40 and
47
* Client driver must use these values!
49
#define DRM_PVR_RESERVED1 0x12
50
#define DRM_PVR_RESERVED2 0x13
51
#define DRM_PVR_RESERVED3 0x14
52
#define DRM_PVR_RESERVED4 0x15
53
#define DRM_PVR_RESERVED5 0x16
54
#define DRM_PVR_RESERVED6 0x1E
58
* The following typedefs support the ability of non-HAL software to have a
59
* function called when a VBlank interrupt occurs.
63
* A pointer to a non-HAL-provided function that processes a VBlank interrupt.
65
typedef int (*emgd_process_vblank_interrupt_t)(void *priv);
68
* This structure allows the HAL to track a non-HAL callback (and its
69
* parameter) to call when a VBlank interrupt occurs for a given port. An
70
* opaque pointer to this structure serves as a unique identifier for the
71
* callback/port combination.
73
typedef struct _emgd_vblank_callback {
74
/** Non-HAL callback function to process a VBlank interrupt. */
75
emgd_process_vblank_interrupt_t callback;
76
/** An opaque pointer to a non-HAL data structure (passed to callback). */
78
/** Which HAL port number is associated with this interrupt callback. */
79
unsigned long port_number;
80
} emgd_vblank_callback_t;
83
* An opaque pointer to a emgd_vblank_callback_t. This pointer serves as a
84
* unique identifier for the callback/port combination.
86
typedef void *emgd_vblank_callback_h;
89
* A special value of a emgd_vblank_callback_h, meaning ALL devices/displays.
91
#define ALL_PORT_CALLBACKS ((void *) 1001)