packaging: update the changelog
[profile/ivi/intel-emgd-kmod.git] / drivers / emgd / state / reg / cmn / reg_dispatch.h
1 /*
2  *-----------------------------------------------------------------------------
3  * Filename: reg_dispatch.h
4  * $Revision: 1.7 $
5  *-----------------------------------------------------------------------------
6  * Copyright (c) 2002-2010, Intel Corporation.
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a copy
9  * of this software and associated documentation files (the "Software"), to deal
10  * in the Software without restriction, including without limitation the rights
11  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12  * copies of the Software, and to permit persons to whom the Software is
13  * furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included in
16  * all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24  * THE SOFTWARE.
25  *
26  *-----------------------------------------------------------------------------
27  * Description:
28  *  This is the implementation file for the register module's main API's called
29  *  by external devices.
30  *-----------------------------------------------------------------------------
31  */
32
33 #ifndef _REG_DISPATCH_H
34 #define _REG_DISPATCH_H
35
36 #include <context.h>
37 #include <drm_emgd_private.h>
38
39 typedef struct _reg_buffer {
40         unsigned long flags;
41         module_state_h mode_buffer;
42         void *platform_buffer;
43 }reg_buffer_t;
44
45 /*
46  * This needs to be available for inter-module use so that the
47  * mode module can save state during it's init which happens after
48  * the reg module init.
49  */
50 typedef struct _reg_dispatch {
51         reg_buffer_t *(*reg_alloc)(igd_context_t *context, unsigned long flags,
52                 void *_platform_context);
53         void (*reg_free)(igd_context_t *context, reg_buffer_t *reg_set,
54                 void *_platform_context);
55         int (*reg_save)(igd_context_t *context, reg_buffer_t *reg_set,
56                 void *_platform_context);
57         int (*reg_restore)(igd_context_t *context, reg_buffer_t *reg_set,
58                 void *_platform_context);
59         void (*reg_crtc_lut_get)(igd_context_t *context, emgd_crtc_t *emgd_crtc);
60         void (*reg_crtc_lut_set)(igd_context_t *context, emgd_crtc_t *emgd_crtc);
61         void *platform_context;
62 } reg_dispatch_t;
63
64 /*
65  * Reg dispatch data structure is in reg.h because it and the reg context
66  * needs to be available for initial reg save during mode module init.
67  */
68
69
70 extern reg_dispatch_t reg_dispatch_plb;
71 extern reg_dispatch_t reg_dispatch_tnc;
72
73 #endif