<div dir="ltr"><div>Except for patch 3, the series is:</div><div><br></div><div><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><div><br></div><div>Marek</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 6, 2018 at 9:01 AM Nicolai Hähnle <<a href="mailto:nhaehnle@gmail.com">nhaehnle@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com" target="_blank">nicolai.haehnle@amd.com</a>><br>
<br>
---<br>
src/gallium/drivers/radeonsi/si_perfcounter.c | 2 +-<br>
src/gallium/drivers/radeonsi/si_query.c | 6 +++---<br>
src/gallium/drivers/radeonsi/si_query.h | 2 +-<br>
3 files changed, 5 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/gallium/drivers/radeonsi/si_perfcounter.c b/src/gallium/drivers/radeonsi/si_perfcounter.c<br>
index 65197c0daa4..fc2c58854bc 100644<br>
--- a/src/gallium/drivers/radeonsi/si_perfcounter.c<br>
+++ b/src/gallium/drivers/radeonsi/si_perfcounter.c<br>
@@ -908,21 +908,21 @@ static bool si_pc_query_get_result(struct si_context *sctx, struct si_query *rqu<br>
<br>
while (results_base != qbuf->results_end) {<br>
si_pc_query_add_result(query, map + results_base, result);<br>
results_base += query->result_size;<br>
}<br>
}<br>
<br>
return true;<br>
}<br>
<br>
-static struct si_query_ops batch_query_ops = {<br>
+static const struct si_query_ops batch_query_ops = {<br>
.destroy = si_pc_query_destroy,<br>
.begin = si_pc_query_begin,<br>
.end = si_pc_query_end,<br>
.get_result = si_pc_query_get_result,<br>
<br>
.suspend = si_pc_query_suspend,<br>
.resume = si_pc_query_resume,<br>
};<br>
<br>
static struct si_query_group *get_group_state(struct si_screen *screen,<br>
diff --git a/src/gallium/drivers/radeonsi/si_query.c b/src/gallium/drivers/radeonsi/si_query.c<br>
index 5b0fba0ed92..093643bf684 100644<br>
--- a/src/gallium/drivers/radeonsi/si_query.c<br>
+++ b/src/gallium/drivers/radeonsi/si_query.c<br>
@@ -27,21 +27,21 @@<br>
#include "si_pipe.h"<br>
#include "si_query.h"<br>
#include "util/u_memory.h"<br>
#include "util/u_upload_mgr.h"<br>
#include "util/os_time.h"<br>
#include "util/u_suballoc.h"<br>
#include "amd/common/sid.h"<br>
<br>
#define SI_MAX_STREAMS 4<br>
<br>
-static struct si_query_ops query_hw_ops;<br>
+static const struct si_query_ops query_hw_ops;<br>
<br>
struct si_hw_query_params {<br>
unsigned start_offset;<br>
unsigned end_offset;<br>
unsigned fence_offset;<br>
unsigned pair_stride;<br>
unsigned pair_count;<br>
};<br>
<br>
/* Queries without buffer handling or suspend/resume. */<br>
@@ -492,21 +492,21 @@ static bool si_query_sw_get_result(struct si_context *sctx,<br>
case SI_QUERY_CURRENT_GPU_SCLK:<br>
case SI_QUERY_CURRENT_GPU_MCLK:<br>
result->u64 *= 1000000;<br>
break;<br>
}<br>
<br>
return true;<br>
}<br>
<br>
<br>
-static struct si_query_ops sw_query_ops = {<br>
+static const struct si_query_ops sw_query_ops = {<br>
.destroy = si_query_sw_destroy,<br>
.begin = si_query_sw_begin,<br>
.end = si_query_sw_end,<br>
.get_result = si_query_sw_get_result,<br>
.get_result_resource = NULL<br>
};<br>
<br>
static struct pipe_query *si_query_sw_create(unsigned query_type)<br>
{<br>
struct si_query_sw *query;<br>
@@ -1336,21 +1336,21 @@ static void si_query_hw_add_result(struct si_screen *sscreen,<br>
void si_query_hw_suspend(struct si_context *sctx, struct si_query *query)<br>
{<br>
si_query_hw_emit_stop(sctx, (struct si_query_hw *)query);<br>
}<br>
<br>
void si_query_hw_resume(struct si_context *sctx, struct si_query *query)<br>
{<br>
si_query_hw_emit_start(sctx, (struct si_query_hw *)query);<br>
}<br>
<br>
-static struct si_query_ops query_hw_ops = {<br>
+static const struct si_query_ops query_hw_ops = {<br>
.destroy = si_query_hw_destroy,<br>
.begin = si_query_hw_begin,<br>
.end = si_query_hw_end,<br>
.get_result = si_query_hw_get_result,<br>
.get_result_resource = si_query_hw_get_result_resource,<br>
<br>
.suspend = si_query_hw_suspend,<br>
.resume = si_query_hw_resume,<br>
};<br>
<br>
diff --git a/src/gallium/drivers/radeonsi/si_query.h b/src/gallium/drivers/radeonsi/si_query.h<br>
index 63af760a271..0bc1d56f78a 100644<br>
--- a/src/gallium/drivers/radeonsi/si_query.h<br>
+++ b/src/gallium/drivers/radeonsi/si_query.h<br>
@@ -134,21 +134,21 @@ struct si_query_ops {<br>
int index,<br>
struct pipe_resource *resource,<br>
unsigned offset);<br>
<br>
void (*suspend)(struct si_context *, struct si_query *);<br>
void (*resume)(struct si_context *, struct si_query *);<br>
};<br>
<br>
struct si_query {<br>
struct threaded_query b;<br>
- struct si_query_ops *ops;<br>
+ const struct si_query_ops *ops;<br>
<br>
/* The PIPE_QUERY_xxx type of query */<br>
unsigned type;<br>
<br>
/* The number of dwords for suspend. */<br>
unsigned num_cs_dw_suspend;<br>
<br>
/* Linked list of queries that must be suspended at end of CS. */<br>
struct list_head active_list;<br>
};<br>
-- <br>
2.19.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>