anv: pass the fd directly to anv_gem_reg_read()
This allows its use without the need for an anv_device. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2797>
This commit is contained in:

committed by
Marge Bot

parent
6bf40c28c9
commit
e27f311c85
@@ -436,13 +436,13 @@ anv_gem_fd_to_handle(struct anv_device *device, int fd)
|
||||
}
|
||||
|
||||
int
|
||||
anv_gem_reg_read(struct anv_device *device, uint32_t offset, uint64_t *result)
|
||||
anv_gem_reg_read(int fd, uint32_t offset, uint64_t *result)
|
||||
{
|
||||
struct drm_i915_reg_read args = {
|
||||
.offset = offset
|
||||
};
|
||||
|
||||
int ret = gen_ioctl(device->fd, DRM_IOCTL_I915_REG_READ, &args);
|
||||
int ret = gen_ioctl(fd, DRM_IOCTL_I915_REG_READ, &args);
|
||||
|
||||
*result = args.val;
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user