From: Kenneth Graunke Date: Mon, 15 Jul 2019 18:51:14 +0000 (-0700) Subject: iris: Drop copy and pasted iris_timebase_scale X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d5ee315536d4563714b35004d9efc1bd6621f53;p=mesa.git 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. --- 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;