blob: fb2886c570203547036c0d2d6eebd63f56af5f31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __ADRENO_IB_PARSER__
#define __ADRENO_IB_PARSER__
/*
* struct adreno_ib_object - Structure containing information about an
* address range found in an IB
* @gpuaddr: The starting gpuaddress of the range
* @size: Size of the range
* @snapshot_obj_type - Type of range used in snapshot
* @entry: The memory entry in which this range is found
*/
struct adreno_ib_object {
unsigned int gpuaddr;
unsigned int size;
int snapshot_obj_type;
struct kgsl_mem_entry *entry;
};
/*
* struct adreno_ib_object_list - List of address ranges found in IB
* @obj_list: The address range list
* @num_objs: Number of objects in list
*/
struct adreno_ib_object_list {
struct adreno_ib_object *obj_list;
int num_objs;
};
/*
* adreno_ib_init_ib_obj() - Create an ib object structure and initialize it
* with gpuaddress and size
* @gpuaddr: gpuaddr with which to initialize the object with
* @size: Size in bytes with which the object is initialized
* @ib_type: The IB type used by snapshot
*
* Returns the object pointer on success else error code in the pointer
*/
static inline void adreno_ib_init_ib_obj(unsigned int gpuaddr,
unsigned int size, int obj_type,
struct kgsl_mem_entry *entry,
struct adreno_ib_object *ib_obj)
{
ib_obj->gpuaddr = gpuaddr;
ib_obj->size = size;
ib_obj->snapshot_obj_type = obj_type;
ib_obj->entry = entry;
}
int adreno_ib_create_object_list(
struct kgsl_device *device, phys_addr_t ptbase,
unsigned int gpuaddr, unsigned int dwords,
struct adreno_ib_object_list **out_ib_obj_list);
void adreno_ib_destroy_obj_list(struct adreno_ib_object_list *ib_obj_list);
#endif
|