static struct ctl_table_header *sysctl_header;
+#ifdef notyet
static enum hrtimer_restart oa_poll_check_timer_cb(struct hrtimer *hrtimer);
+#endif
void i915_oa_config_release(struct kref *ref)
{
return oa_config;
}
+#ifdef notyet
+
static void free_oa_config_bo(struct i915_oa_config_bo *oa_bo)
{
i915_oa_config_put(oa_bo->oa_config);
kfree(oa_bo);
}
+#endif
+
static u32 gen12_oa_hw_tail_read(struct i915_perf_stream *stream)
{
struct intel_uncore *uncore = stream->uncore;
return oastatus1 & GEN7_OASTATUS1_TAIL_MASK;
}
+#ifdef notyet
+
/**
* oa_buffer_check_unlocked - check for data and update tail ptr state
* @stream: i915 stream instance
*/
static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream)
{
- STUB();
- return false;
-#ifdef notyet
u32 gtt_offset = i915_ggtt_offset(stream->oa_buffer.vma);
int report_size = stream->oa_buffer.format_size;
unsigned long flags;
spin_unlock_irqrestore(&stream->oa_buffer.ptr_lock, flags);
return pollin;
-#endif
}
+#endif
+
/**
* append_oa_status - Appends a status record to a userspace read() buffer.
* @stream: An i915-perf stream opened for OA metrics
return gen7_append_oa_reports(stream, buf, count, offset);
}
+#ifdef notyet
+
/**
* i915_oa_wait_unlocked - handles blocking IO until OA data available
* @stream: An i915-perf stream opened for OA metrics
oa_buffer_check_unlocked(stream));
}
-#ifdef notyet
/**
* i915_oa_poll_wait - call poll_wait() for an OA stream poll()
* @stream: An i915-perf stream opened for OA metrics
{
poll_wait(file, &stream->poll_wq, wait);
}
-#endif
/**
* i915_oa_read - just calls through to &i915_oa_ops->read
static void i915_oa_stream_destroy(struct i915_perf_stream *stream)
{
- STUB();
-#ifdef notyet
struct i915_perf *perf = stream->perf;
BUG_ON(stream != perf->exclusive_stream);
DRM_NOTE("%d spurious OA report notices suppressed due to ratelimiting\n",
perf->spurious_report_rs.missed);
}
-#endif
}
+#endif
+
static void gen7_init_oa_buffer(struct i915_perf_stream *stream)
{
struct intel_uncore *uncore = stream->uncore;
stream->oa_buffer.vma->size);
}
+#ifdef notyet
+
static int alloc_oa_buffer(struct i915_perf_stream *stream)
{
struct drm_i915_private *i915 = stream->perf->i915;
return ret;
}
+#endif
+
static u32 *write_cs_mi_lri(u32 *cs,
const struct i915_oa_reg *reg_data,
u32 n_regs)
GEN12_OAG_OACONTROL_OA_COUNTER_ENABLE);
}
+#ifdef notyet
+
/**
* i915_oa_stream_enable - handle `I915_PERF_IOCTL_ENABLE` for OA stream
* @stream: An i915 perf stream opened for OA metrics
*/
static void i915_oa_stream_enable(struct i915_perf_stream *stream)
{
- STUB();
-#ifdef notyet
stream->pollin = false;
stream->perf->ops.oa_enable(stream);
hrtimer_start(&stream->poll_check_timer,
ns_to_ktime(stream->poll_oa_period),
HRTIMER_MODE_REL_PINNED);
-#endif
}
+#endif
+
static void gen7_oa_disable(struct i915_perf_stream *stream)
{
struct intel_uncore *uncore = stream->uncore;
"wait for OA tlb invalidate timed out\n");
}
+#ifdef notyet
+
/**
* i915_oa_stream_disable - handle `I915_PERF_IOCTL_DISABLE` for OA stream
* @stream: An i915 perf stream opened for OA metrics
*/
static void i915_oa_stream_disable(struct i915_perf_stream *stream)
{
- STUB();
-#ifdef notyet
stream->perf->ops.oa_disable(stream);
if (stream->sample_flags & SAMPLE_OA_REPORT)
hrtimer_cancel(&stream->poll_check_timer);
-#endif
}
-#ifdef notyet
static const struct i915_perf_stream_ops i915_oa_stream_ops = {
.destroy = i915_oa_stream_destroy,
.enable = i915_oa_stream_enable,
.poll_wait = i915_oa_poll_wait,
.read = i915_oa_read,
};
-#endif
static int i915_perf_stream_enable_sync(struct i915_perf_stream *stream)
{
}
}
+#endif
+
static int
get_sseu_config(struct intel_sseu *out_sseu,
struct intel_engine_cs *engine,
return i915_gem_user_to_context_sseu(engine->gt, drm_sseu, out_sseu);
}
+#ifdef notyet
+
/**
* i915_oa_stream_init - validate combined props for OA stream and init
* @stream: An i915 perf stream
struct drm_i915_perf_open_param *param,
struct perf_open_properties *props)
{
- STUB();
- return -ENOSYS;
-#ifdef notyet
struct drm_i915_private *i915 = stream->perf->i915;
struct i915_perf *perf = stream->perf;
int format_size;
oa_put_render_ctx_id(stream);
return ret;
-#endif
}
+#endif
+
void i915_oa_init_reg_state(const struct intel_context *ce,
const struct intel_engine_cs *engine)
{
gen8_update_reg_state_unlocked(ce, stream);
}
+#ifdef notyet
+
/**
* i915_perf_read - handles read() FOP for i915 perf stream FDs
* @file: An i915 perf stream file
size_t count,
loff_t *ppos)
{
- STUB();
- return -ENOSYS;
-#ifdef notyet
struct i915_perf_stream *stream = file->private_data;
struct i915_perf *perf = stream->perf;
size_t offset = 0;
/* Possible values for ret are 0, -EFAULT, -ENOSPC, -EIO, ... */
return offset ?: (ret ?: -EAGAIN);
-#endif
}
static enum hrtimer_restart oa_poll_check_timer_cb(struct hrtimer *hrtimer)
{
- STUB();
- return 0;
-#ifdef notyet
struct i915_perf_stream *stream =
container_of(hrtimer, typeof(*stream), poll_check_timer);
ns_to_ktime(stream->poll_oa_period));
return HRTIMER_RESTART;
-#endif
}
-#ifdef notyet
-
/**
* i915_perf_poll_locked - poll_wait() with a suitable wait queue for stream
* @stream: An i915 perf stream
return ret;
}
-#endif /* notyet */
-
/**
* i915_perf_enable_locked - handle `I915_PERF_IOCTL_ENABLE` ioctl
* @stream: A disabled i915 perf stream
unsigned int cmd,
unsigned long arg)
{
- STUB();
- return -ENOSYS;
-#ifdef notyet
struct i915_perf_stream *stream = file->private_data;
struct i915_perf *perf = stream->perf;
long ret;
mutex_unlock(&perf->lock);
return ret;
-#endif
}
/**
kfree(stream);
}
-#ifdef notyet
-
/**
* i915_perf_release - handles userspace close() of a stream file
* @inode: anonymous inode associated with file
REG_IN_RANGE(addr, NOA_CONFIG(0), NOA_CONFIG(8));
}
+#ifdef notyet
+
static u32 mask_reg_value(u32 reg, u32 val)
{
/* HALF_SLICE_CHICKEN2 is programmed with a the
struct device_attribute *attr,
char *buf)
{
- STUB();
- return -ENOSYS;
-#ifdef notyet
struct i915_oa_config *oa_config =
container_of(attr, typeof(*oa_config), sysfs_metric_id);
return sprintf(buf, "%d\n", oa_config->id);
-#endif
}
static int create_dynamic_oa_sysfs_entry(struct i915_perf *perf,
struct i915_oa_config *oa_config)
{
- STUB();
- return -ENOSYS;
-#ifdef notyet
sysfs_attr_init(&oa_config->sysfs_metric_id.attr);
oa_config->sysfs_metric_id.attr.name = "id";
oa_config->sysfs_metric_id.attr.mode = S_IRUGO;
return sysfs_create_group(perf->metrics_kobj,
&oa_config->sysfs_metric);
-#endif
}
+#endif
+
/**
* i915_perf_add_config_ioctl - DRM ioctl() for userspace to add a new OA config
* @dev: drm device