2 * Copyright (c) 2010-2011 by Luc Verhaegen <libv@codethink.co.uk>
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.
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.
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
20 #include "services_headers.h"
21 #include "pvr_pdump.h"
22 #include "pvr_pdumpfs.h"
25 PDUMPFS_MODE_DISABLED,
26 PDUMPFS_MODE_STANDARD,
30 static enum pdumpfs_mode pdumpfs_mode = PDUMPFS_MODE_DISABLED;
31 static u32 pdumpfs_frame_number;
34 pdumpfs_frame_set(u32 frame)
36 pdumpfs_frame_number = frame;
40 pdumpfs_capture_enabled(void)
42 if (pdumpfs_mode == PDUMPFS_MODE_FULL)
49 pdumpfs_flags_check(u32 flags)
51 if (flags & PDUMP_FLAGS_NEVER)
53 else if (pdumpfs_mode == PDUMPFS_MODE_FULL)
55 else if ((pdumpfs_mode == PDUMPFS_MODE_STANDARD) &&
56 (flags & PDUMP_FLAGS_CONTINUOUS))
63 pdumpfs_write_data(void *buffer, size_t size, bool from_user)
69 pdumpfs_write_string(char *string)