summaryrefslogtreecommitdiff
path: root/freedreno
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-08-15 17:17:52 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-09-04 21:39:06 +0100
commit6a6d668fad9833350deaddc61e917de3dcb38262 (patch)
tree5a565cb5bc235a729f8daf698d203e81abe3f9b3 /freedreno
parentec2b105492cae093cc78003239e9b6816d1a7384 (diff)
freedreno: annotate the device/bo/pipe/ringbuffer funcs as const data
Cc: freedreno@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'freedreno')
-rw-r--r--freedreno/freedreno_priv.h6
-rw-r--r--freedreno/freedreno_ringbuffer.h2
-rw-r--r--freedreno/kgsl/kgsl_bo.c2
-rw-r--r--freedreno/kgsl/kgsl_device.c2
-rw-r--r--freedreno/kgsl/kgsl_pipe.c2
-rw-r--r--freedreno/kgsl/kgsl_ringbuffer.c2
-rw-r--r--freedreno/msm/msm_bo.c2
-rw-r--r--freedreno/msm/msm_device.c2
-rw-r--r--freedreno/msm/msm_pipe.c2
-rw-r--r--freedreno/msm/msm_ringbuffer.c2
10 files changed, 12 insertions, 12 deletions
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h
index 1dddcc39..4e442e42 100644
--- a/freedreno/freedreno_priv.h
+++ b/freedreno/freedreno_priv.h
@@ -83,7 +83,7 @@ struct fd_device {
*/
void *handle_table, *name_table;
- struct fd_device_funcs *funcs;
+ const struct fd_device_funcs *funcs;
struct fd_bo_bucket cache_bucket[14 * 4];
int num_buckets;
@@ -107,7 +107,7 @@ struct fd_pipe_funcs {
struct fd_pipe {
struct fd_device *dev;
enum fd_pipe_id id;
- struct fd_pipe_funcs *funcs;
+ const struct fd_pipe_funcs *funcs;
};
struct fd_ringmarker {
@@ -141,7 +141,7 @@ struct fd_bo {
int fd; /* dmabuf handle */
void *map;
atomic_t refcnt;
- struct fd_bo_funcs *funcs;
+ const struct fd_bo_funcs *funcs;
int bo_reuse;
struct list_head list; /* bucket-list entry */
diff --git a/freedreno/freedreno_ringbuffer.h b/freedreno/freedreno_ringbuffer.h
index a5e1d032..578cdb24 100644
--- a/freedreno/freedreno_ringbuffer.h
+++ b/freedreno/freedreno_ringbuffer.h
@@ -44,7 +44,7 @@ struct fd_ringbuffer {
int size;
uint32_t *cur, *end, *start, *last_start;
struct fd_pipe *pipe;
- struct fd_ringbuffer_funcs *funcs;
+ const struct fd_ringbuffer_funcs *funcs;
uint32_t last_timestamp;
struct fd_ringbuffer *parent;
};
diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c
index 3407c769..b8ac1026 100644
--- a/freedreno/kgsl/kgsl_bo.c
+++ b/freedreno/kgsl/kgsl_bo.c
@@ -123,7 +123,7 @@ static void kgsl_bo_destroy(struct fd_bo *bo)
}
-static struct fd_bo_funcs funcs = {
+static const struct fd_bo_funcs funcs = {
.offset = kgsl_bo_offset,
.cpu_prep = kgsl_bo_cpu_prep,
.cpu_fini = kgsl_bo_cpu_fini,
diff --git a/freedreno/kgsl/kgsl_device.c b/freedreno/kgsl/kgsl_device.c
index 8352d605..175e8378 100644
--- a/freedreno/kgsl/kgsl_device.c
+++ b/freedreno/kgsl/kgsl_device.c
@@ -42,7 +42,7 @@ static void kgsl_device_destroy(struct fd_device *dev)
free(kgsl_dev);
}
-static struct fd_device_funcs funcs = {
+static const struct fd_device_funcs funcs = {
.bo_new_handle = kgsl_bo_new_handle,
.bo_from_handle = kgsl_bo_from_handle,
.pipe_new = kgsl_pipe_new,
diff --git a/freedreno/kgsl/kgsl_pipe.c b/freedreno/kgsl/kgsl_pipe.c
index e2fd65c0..58b3b4d5 100644
--- a/freedreno/kgsl/kgsl_pipe.c
+++ b/freedreno/kgsl/kgsl_pipe.c
@@ -108,7 +108,7 @@ static void kgsl_pipe_destroy(struct fd_pipe *pipe)
free(kgsl_pipe);
}
-static struct fd_pipe_funcs funcs = {
+static const struct fd_pipe_funcs funcs = {
.ringbuffer_new = kgsl_ringbuffer_new,
.get_param = kgsl_pipe_get_param,
.wait = kgsl_pipe_wait,
diff --git a/freedreno/kgsl/kgsl_ringbuffer.c b/freedreno/kgsl/kgsl_ringbuffer.c
index f0133078..6f68f2f3 100644
--- a/freedreno/kgsl/kgsl_ringbuffer.c
+++ b/freedreno/kgsl/kgsl_ringbuffer.c
@@ -191,7 +191,7 @@ static void kgsl_ringbuffer_destroy(struct fd_ringbuffer *ring)
free(kgsl_ring);
}
-static struct fd_ringbuffer_funcs funcs = {
+static const struct fd_ringbuffer_funcs funcs = {
.hostptr = kgsl_ringbuffer_hostptr,
.flush = kgsl_ringbuffer_flush,
.emit_reloc = kgsl_ringbuffer_emit_reloc,
diff --git a/freedreno/msm/msm_bo.c b/freedreno/msm/msm_bo.c
index fd944131..ee668aba 100644
--- a/freedreno/msm/msm_bo.c
+++ b/freedreno/msm/msm_bo.c
@@ -96,7 +96,7 @@ static void msm_bo_destroy(struct fd_bo *bo)
}
-static struct fd_bo_funcs funcs = {
+static const struct fd_bo_funcs funcs = {
.offset = msm_bo_offset,
.cpu_prep = msm_bo_cpu_prep,
.cpu_fini = msm_bo_cpu_fini,
diff --git a/freedreno/msm/msm_device.c b/freedreno/msm/msm_device.c
index 81077e1a..25c097c2 100644
--- a/freedreno/msm/msm_device.c
+++ b/freedreno/msm/msm_device.c
@@ -42,7 +42,7 @@ static void msm_device_destroy(struct fd_device *dev)
free(msm_dev);
}
-static struct fd_device_funcs funcs = {
+static const struct fd_device_funcs funcs = {
.bo_new_handle = msm_bo_new_handle,
.bo_from_handle = msm_bo_from_handle,
.pipe_new = msm_pipe_new,
diff --git a/freedreno/msm/msm_pipe.c b/freedreno/msm/msm_pipe.c
index e1edffea..aa0866b4 100644
--- a/freedreno/msm/msm_pipe.c
+++ b/freedreno/msm/msm_pipe.c
@@ -80,7 +80,7 @@ static void msm_pipe_destroy(struct fd_pipe *pipe)
free(msm_pipe);
}
-static struct fd_pipe_funcs funcs = {
+static const struct fd_pipe_funcs funcs = {
.ringbuffer_new = msm_ringbuffer_new,
.get_param = msm_pipe_get_param,
.wait = msm_pipe_wait,
diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c
index 5ddea574..ee6af0ba 100644
--- a/freedreno/msm/msm_ringbuffer.c
+++ b/freedreno/msm/msm_ringbuffer.c
@@ -356,7 +356,7 @@ static void msm_ringbuffer_destroy(struct fd_ringbuffer *ring)
free(msm_ring);
}
-static struct fd_ringbuffer_funcs funcs = {
+static const struct fd_ringbuffer_funcs funcs = {
.hostptr = msm_ringbuffer_hostptr,
.flush = msm_ringbuffer_flush,
.reset = msm_ringbuffer_reset,