intel: Share code to read render timestamp

Timestamp read is not in any hot path so there is no down-sides in
share the same function between iris, crocus, anv and hasvk.

Also while at it also dropping the functions to read MMIO from kernel,
the only use is read render timestamp so we don't need it.

v2:
- fix compilaton of ds

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18920>
This commit is contained in:
José Roberto de Souza
2022-09-30 10:18:13 -07:00
parent 3047195c62
commit 1e87834980
19 changed files with 49 additions and 108 deletions

View File

@@ -385,19 +385,6 @@ anv_gem_fd_to_handle(struct anv_device *device, int fd)
return args.handle;
}
int
anv_gem_reg_read(int fd, uint32_t offset, uint64_t *result)
{
struct drm_i915_reg_read args = {
.offset = offset
};
int ret = intel_ioctl(fd, DRM_IOCTL_I915_REG_READ, &args);
*result = args.val;
return ret;
}
struct drm_i915_query_engine_info *
anv_gem_get_engine_info(int fd)
{