diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2019-07-15 11:51:14 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2019-07-16 17:22:48 -0700 |
commit | 1d5ee315536d4563714b35004d9efc1bd6621f53 (patch) | |
tree | 0b01801e67eb4ba1e04522f3414731940efae2cd /src | |
parent | 6fb685fe4b762c8030f86895707516e2481e9ece (diff) |
iris: Drop copy and pasted iris_timebase_scale
Lionel moved brw_timebase_scale to gen_device_info_timebase_scale a few
months ago, so we should just use that, and not our own copy in iris.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_query.c | 11 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_screen.c | 2 |
3 files changed, 3 insertions, 12 deletions
diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index a1cdb75a732..5d7991d6c20 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -890,8 +890,6 @@ void iris_math_add32_gpr0(struct iris_context *ice, struct iris_batch *batch, uint32_t x); -uint64_t iris_timebase_scale(const struct gen_device_info *devinfo, - uint64_t gpu_timestamp); void iris_resolve_conditional_render(struct iris_context *ice); /* iris_resolve.c */ diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c index eb7bc4da133..8109d49c2f7 100644 --- a/src/gallium/drivers/iris/iris_query.c +++ b/src/gallium/drivers/iris/iris_query.c @@ -282,13 +282,6 @@ write_overflow_values(struct iris_context *ice, struct iris_query *q, bool end) } } -uint64_t -iris_timebase_scale(const struct gen_device_info *devinfo, - uint64_t gpu_timestamp) -{ - return (1000000000ull * gpu_timestamp) / devinfo->timestamp_frequency; -} - static uint64_t iris_raw_timestamp_delta(uint64_t time0, uint64_t time1) { @@ -319,12 +312,12 @@ calculate_result_on_cpu(const struct gen_device_info *devinfo, case PIPE_QUERY_TIMESTAMP: case PIPE_QUERY_TIMESTAMP_DISJOINT: /* The timestamp is the single starting snapshot. */ - q->result = iris_timebase_scale(devinfo, q->map->start); + q->result = gen_device_info_timebase_scale(devinfo, q->map->start); q->result &= (1ull << TIMESTAMP_BITS) - 1; break; case PIPE_QUERY_TIME_ELAPSED: q->result = iris_raw_timestamp_delta(q->map->start, q->map->end); - q->result = iris_timebase_scale(devinfo, q->result); + q->result = gen_device_info_timebase_scale(devinfo, q->result); q->result &= (1ull << TIMESTAMP_BITS) - 1; break; case PIPE_QUERY_SO_OVERFLOW_PREDICATE: diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index bfb70dfdba0..2a1a95a2414 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -504,7 +504,7 @@ iris_get_timestamp(struct pipe_screen *pscreen) iris_reg_read(screen->bufmgr, TIMESTAMP | 1, &result); - result = iris_timebase_scale(&screen->devinfo, result); + result = gen_device_info_timebase_scale(&screen->devinfo, result); result &= (1ull << TIMESTAMP_BITS) - 1; return result; |