intel: Add a function for the new register read ioctl.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>main
parent
934ea3b321
commit
2607dad20b
|
@ -241,6 +241,9 @@ void drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
|
||||||
void drm_intel_decode_set_output_file(struct drm_intel_decode *ctx, FILE *out);
|
void drm_intel_decode_set_output_file(struct drm_intel_decode *ctx, FILE *out);
|
||||||
void drm_intel_decode(struct drm_intel_decode *ctx);
|
void drm_intel_decode(struct drm_intel_decode *ctx);
|
||||||
|
|
||||||
|
int drm_intel_reg_read(drm_intel_bufmgr *bufmgr,
|
||||||
|
uint32_t offset,
|
||||||
|
uint64_t *result);
|
||||||
|
|
||||||
/** @{ Compatibility defines to keep old code building despite the symbol rename
|
/** @{ Compatibility defines to keep old code building despite the symbol rename
|
||||||
* from dri_* to drm_intel_*
|
* from dri_* to drm_intel_*
|
||||||
|
|
|
@ -2947,6 +2947,24 @@ drm_intel_gem_context_destroy(drm_intel_context *ctx)
|
||||||
free(ctx);
|
free(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
drm_intel_reg_read(drm_intel_bufmgr *bufmgr,
|
||||||
|
uint32_t offset,
|
||||||
|
uint64_t *result)
|
||||||
|
{
|
||||||
|
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
|
||||||
|
struct drm_i915_reg_read reg_read;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
VG_CLEAR(reg_read);
|
||||||
|
reg_read.offset = offset;
|
||||||
|
|
||||||
|
ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_REG_READ, ®_read);
|
||||||
|
|
||||||
|
*result = reg_read.val;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotate the given bo for use in aub dumping.
|
* Annotate the given bo for use in aub dumping.
|
||||||
|
|
Loading…
Reference in New Issue