~gma500/+junk/emgd152-natty

« back to all changes in this revision

Viewing changes to emgd-dkms-1.5.15.3082/include/emgd_shared.h

  • Committer: Luca Forina
  • Date: 2011-02-06 15:11:54 UTC
  • Revision ID: luca.forina@gmail.com-20110206151154-9dzn5ugxjub9qenb
Upload Emgd 1.5.2 for Natty (override Maverick)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- pse-c -*-
 
2
 *-----------------------------------------------------------------------------
 
3
 * Filename: emgd_shared.h
 
4
 * $Revision: 1.11 $
 
5
 *-----------------------------------------------------------------------------
 
6
 * Copyright © 2002-2010, Intel Corporation.
 
7
 *
 
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.
 
11
 *
 
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
 
15
 * more details.
 
16
 *
 
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.
 
20
 *
 
21
 *-----------------------------------------------------------------------------
 
22
 * Description:
 
23
 *  This include file contains information that is shared between the various
 
24
 *  EMGD driver components.
 
25
 *-----------------------------------------------------------------------------
 
26
 */
 
27
 
 
28
#ifndef _EMGD_SHARED_H
 
29
#define _EMGD_SHARED_H
 
30
 
 
31
/*
 
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);
 
35
 */
 
36
#define EMGD_MODULE_NAME "emgd"
 
37
 
 
38
#define EMGD_DRIVER_NAME "emgd"
 
39
 
 
40
/*
 
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
 
45
 * 0x79.
 
46
 *
 
47
 * Client driver must use these values!
 
48
 */
 
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
 
55
 
 
56
 
 
57
/*
 
58
 * The following typedefs support the ability of non-HAL software to have a
 
59
 * function called when a VBlank interrupt occurs.
 
60
 */
 
61
 
 
62
/**
 
63
 * A pointer to a non-HAL-provided function that processes a VBlank interrupt.
 
64
 */
 
65
typedef int (*emgd_process_vblank_interrupt_t)(void *priv);
 
66
 
 
67
/**
 
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.
 
72
 */
 
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). */
 
77
        void *priv;
 
78
        /** Which HAL port number is associated with this interrupt callback. */
 
79
        unsigned long port_number;
 
80
} emgd_vblank_callback_t;
 
81
 
 
82
/**
 
83
 * An opaque pointer to a emgd_vblank_callback_t.  This pointer serves as a
 
84
 * unique identifier for the callback/port combination.
 
85
 */
 
86
typedef void *emgd_vblank_callback_h;
 
87
 
 
88
/**
 
89
 * A special value of a emgd_vblank_callback_h, meaning ALL devices/displays.
 
90
 */
 
91
#define ALL_PORT_CALLBACKS      ((void *) 1001)
 
92
 
 
93
#endif