aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/proc.h
diff options
context:
space:
mode:
authorHemant Hariyani <hemanthariyani@ti.com>2011-08-25 02:57:15 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:18:33 -0400
commit6e90775f610ab87bd86a79f189aca993e44b3bdf (patch)
tree3b44756d6a8e69dea6c0dbeb2244482b31d32ffc /drivers/gpu/pvr/proc.h
parent1d63da95fb8e073f94c3c63d82f91c49bb2bd08a (diff)
SGX-KM Initial SGX driver integration for 2.6.35 kernel.
This is the first version of SGX driver integration to ensure UI boot-up. Power management and hwmod modifications will be added as patches. Change-Id: If71e6cd651a53f4809e7b978b693cb7d1a89178d Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Diffstat (limited to 'drivers/gpu/pvr/proc.h')
-rw-r--r--drivers/gpu/pvr/proc.h108
1 files changed, 108 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/proc.h b/drivers/gpu/pvr/proc.h
new file mode 100644
index 00000000000..823b666176b
--- /dev/null
+++ b/drivers/gpu/pvr/proc.h
@@ -0,0 +1,108 @@
1/**********************************************************************
2 *
3 * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful but, except
10 * as otherwise stated in writing, without any warranty; without even the
11 * implied warranty of merchantability or fitness for a particular purpose.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * The full GNU General Public License is included in this distribution in
19 * the file called "COPYING".
20 *
21 * Contact Information:
22 * Imagination Technologies Ltd. <gpl-support@imgtec.com>
23 * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
24 *
25 ******************************************************************************/
26
27#ifndef __SERVICES_PROC_H__
28#define __SERVICES_PROC_H__
29
30#include <asm/system.h>
31#include <linux/proc_fs.h>
32#include <linux/seq_file.h>
33
34#define END_OF_FILE (off_t) -1
35
36typedef off_t (pvr_read_proc_t)(IMG_CHAR *, size_t, off_t);
37
38
39#define PVR_PROC_SEQ_START_TOKEN (void*)1
40typedef void* (pvr_next_proc_seq_t)(struct seq_file *,void*,loff_t);
41typedef void* (pvr_off2element_proc_seq_t)(struct seq_file *, loff_t);
42typedef void (pvr_show_proc_seq_t)(struct seq_file *,void*);
43typedef void (pvr_startstop_proc_seq_t)(struct seq_file *, IMG_BOOL start);
44
45typedef struct _PVR_PROC_SEQ_HANDLERS_ {
46 pvr_next_proc_seq_t *next;
47 pvr_show_proc_seq_t *show;
48 pvr_off2element_proc_seq_t *off2element;
49 pvr_startstop_proc_seq_t *startstop;
50 IMG_VOID *data;
51} PVR_PROC_SEQ_HANDLERS;
52
53
54void* ProcSeq1ElementOff2Element(struct seq_file *sfile, loff_t off);
55
56void* ProcSeq1ElementHeaderOff2Element(struct seq_file *sfile, loff_t off);
57
58off_t printAppend(IMG_CHAR * buffer, size_t size, off_t off, const IMG_CHAR * format, ...)
59 __attribute__((format(printf, 4, 5)));
60
61IMG_INT CreateProcEntries(IMG_VOID);
62
63IMG_INT CreateProcReadEntry (const IMG_CHAR * name, pvr_read_proc_t handler);
64
65IMG_INT CreateProcEntry(const IMG_CHAR * name, read_proc_t rhandler, write_proc_t whandler, IMG_VOID *data);
66
67IMG_INT CreatePerProcessProcEntry(const IMG_CHAR * name, read_proc_t rhandler, write_proc_t whandler, IMG_VOID *data);
68
69IMG_VOID RemoveProcEntry(const IMG_CHAR * name);
70
71IMG_VOID RemovePerProcessProcEntry(const IMG_CHAR * name);
72
73IMG_VOID RemoveProcEntries(IMG_VOID);
74
75struct proc_dir_entry* CreateProcReadEntrySeq (
76 const IMG_CHAR* name,
77 IMG_VOID* data,
78 pvr_next_proc_seq_t next_handler,
79 pvr_show_proc_seq_t show_handler,
80 pvr_off2element_proc_seq_t off2element_handler,
81 pvr_startstop_proc_seq_t startstop_handler
82 );
83
84struct proc_dir_entry* CreateProcEntrySeq (
85 const IMG_CHAR* name,
86 IMG_VOID* data,
87 pvr_next_proc_seq_t next_handler,
88 pvr_show_proc_seq_t show_handler,
89 pvr_off2element_proc_seq_t off2element_handler,
90 pvr_startstop_proc_seq_t startstop_handler,
91 write_proc_t whandler
92 );
93
94struct proc_dir_entry* CreatePerProcessProcEntrySeq (
95 const IMG_CHAR* name,
96 IMG_VOID* data,
97 pvr_next_proc_seq_t next_handler,
98 pvr_show_proc_seq_t show_handler,
99 pvr_off2element_proc_seq_t off2element_handler,
100 pvr_startstop_proc_seq_t startstop_handler,
101 write_proc_t whandler
102 );
103
104
105IMG_VOID RemoveProcEntrySeq(struct proc_dir_entry* proc_entry);
106IMG_VOID RemovePerProcessProcEntrySeq(struct proc_dir_entry* proc_entry);
107
108#endif