Reading TIMESTAMP register may fail, depending on both kernel and hardware.
bool has_llc;
bool has_gen7_sol_reset;
bool has_address_swizzling;
+ bool has_timestamp;
int gen;
int gt;
/* imposed by OWord (Dual) Block Read */
return 16;
case PIPE_CAP_START_INSTANCE:
- case PIPE_CAP_QUERY_TIMESTAMP:
return true;
+ case PIPE_CAP_QUERY_TIMESTAMP:
+ return is->dev.has_timestamp;
case PIPE_CAP_TEXTURE_MULTISAMPLE:
return false; /* TODO */
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
dev->has_llc = info->has_llc;
dev->has_gen7_sol_reset = info->has_gen7_sol_reset;
dev->has_address_swizzling = info->has_address_swizzling;
+ dev->has_timestamp = info->has_timestamp;
/*
* From the Sandy Bridge PRM, volume 4 part 2, page 18:
return (swizzle != I915_BIT_6_SWIZZLE_NONE);
}
+static bool
+test_reg_read(struct intel_winsys *winsys, uint32_t reg)
+{
+ uint64_t dummy;
+
+ return !drm_intel_reg_read(winsys->bufmgr, reg, &dummy);
+}
+
static bool
init_info(struct intel_winsys *winsys)
{
get_param(winsys, I915_PARAM_HAS_LLC, &val);
info->has_llc = val;
+ /* test TIMESTAMP read */
+ info->has_timestamp = test_reg_read(winsys, 0x2358);
+
get_param(winsys, I915_PARAM_HAS_GEN7_SOL_RESET, &val);
info->has_gen7_sol_reset = val;
struct intel_winsys_info {
int devid;
+
bool has_llc;
bool has_gen7_sol_reset;
bool has_address_swizzling;
+
+ /* valid registers for intel_winsys_read_reg() */
+ bool has_timestamp;
};
struct intel_winsys *