gpu: pvr: pdump: move empty back-end into pvr_pdumpfs.[ch]
[sgx.git] / pvr / pvr_pdumpfs.c
1 /*
2  * Copyright (c) 2010-2011 by Luc Verhaegen <libv@codethink.co.uk>
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */
18
19 #include "img_defs.h"
20 #include "services_headers.h"
21 #include "pvr_pdump.h"
22 #include "pvr_pdumpfs.h"
23
24 enum pdumpfs_mode {
25         PDUMPFS_MODE_DISABLED,
26         PDUMPFS_MODE_STANDARD,
27         PDUMPFS_MODE_FULL,
28 };
29
30 static enum pdumpfs_mode pdumpfs_mode = PDUMPFS_MODE_DISABLED;
31 static u32 pdumpfs_frame_number;
32
33 void
34 pdumpfs_frame_set(u32 frame)
35 {
36         pdumpfs_frame_number = frame;
37 }
38
39 bool
40 pdumpfs_capture_enabled(void)
41 {
42         if (pdumpfs_mode == PDUMPFS_MODE_FULL)
43                 return true;
44         else
45                 return false;
46 }
47
48 bool
49 pdumpfs_flags_check(u32 flags)
50 {
51         if (flags & PDUMP_FLAGS_NEVER)
52                 return false;
53         else if (pdumpfs_mode == PDUMPFS_MODE_FULL)
54                 return true;
55         else if ((pdumpfs_mode == PDUMPFS_MODE_STANDARD) &&
56                  (flags & PDUMP_FLAGS_CONTINUOUS))
57                 return true;
58         else
59                 return false;
60 }
61
62 enum PVRSRV_ERROR
63 pdumpfs_write_data(void *buffer, size_t size, bool from_user)
64 {
65         return PVRSRV_OK;
66 }
67
68 void
69 pdumpfs_write_string(char *string)
70 {
71
72 }