Commit 9bd9be66 authored by Lionel Landwerlin's avatar Lionel Landwerlin

drm/i915/perf: add more debug message on perf open & configs

This will make it easier to spot issues related to config
creation/usage.
Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180326090831.22686-9-lionel.g.landwerlin@intel.com
parent b82ed43d
...@@ -2096,13 +2096,17 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream, ...@@ -2096,13 +2096,17 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
if (stream->ctx) { if (stream->ctx) {
ret = oa_get_render_ctx_id(stream); ret = oa_get_render_ctx_id(stream);
if (ret) if (ret) {
DRM_DEBUG("Invalid context id to filter with\n");
return ret; return ret;
} }
}
ret = get_oa_config(dev_priv, props->metrics_set, &stream->oa_config); ret = get_oa_config(dev_priv, props->metrics_set, &stream->oa_config);
if (ret) if (ret) {
DRM_DEBUG("Invalid OA config id=%i\n", props->metrics_set);
goto err_config; goto err_config;
}
/* PRM - observability performance counters: /* PRM - observability performance counters:
* *
...@@ -2129,8 +2133,10 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream, ...@@ -2129,8 +2133,10 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
ret = dev_priv->perf.oa.ops.enable_metric_set(dev_priv, ret = dev_priv->perf.oa.ops.enable_metric_set(dev_priv,
stream->oa_config); stream->oa_config);
if (ret) if (ret) {
DRM_DEBUG("Unable to enable metric set\n");
goto err_enable; goto err_enable;
}
stream->ops = &i915_oa_stream_ops; stream->ops = &i915_oa_stream_ops;
...@@ -3292,6 +3298,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data, ...@@ -3292,6 +3298,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
mutex_unlock(&dev_priv->perf.metrics_lock); mutex_unlock(&dev_priv->perf.metrics_lock);
DRM_DEBUG("Added config %s id=%i\n", oa_config->uuid, oa_config->id);
return oa_config->id; return oa_config->id;
sysfs_err: sysfs_err:
...@@ -3348,6 +3356,9 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data, ...@@ -3348,6 +3356,9 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
&oa_config->sysfs_metric); &oa_config->sysfs_metric);
idr_remove(&dev_priv->perf.metrics_idr, *arg); idr_remove(&dev_priv->perf.metrics_idr, *arg);
DRM_DEBUG("Removed config %s id=%i\n", oa_config->uuid, oa_config->id);
put_oa_config(dev_priv, oa_config); put_oa_config(dev_priv, oa_config);
config_err: config_err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment