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.
This commit is contained in:
Kenneth Graunke 2019-07-15 11:51:14 -07:00
parent 6fb685fe4b
commit 1d5ee31553
3 changed files with 3 additions and 12 deletions

View file

@ -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 */

View file

@ -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:

View file

@ -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;