mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
intel: Add and use intel_engines_class_to_string()
Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18975>
This commit is contained in:
parent
772dfd60ad
commit
86c9aa6bfe
4 changed files with 22 additions and 36 deletions
|
|
@ -106,3 +106,22 @@ intel_engines_count(const struct intel_query_engine_info *info,
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
intel_engines_class_to_string(enum intel_engine_class engine_class)
|
||||||
|
{
|
||||||
|
switch (engine_class) {
|
||||||
|
case INTEL_ENGINE_CLASS_RENDER:
|
||||||
|
return "render";
|
||||||
|
case INTEL_ENGINE_CLASS_COPY:
|
||||||
|
return "copy";
|
||||||
|
case INTEL_ENGINE_CLASS_VIDEO:
|
||||||
|
return "video";
|
||||||
|
case INTEL_ENGINE_CLASS_VIDEO_ENHANCE:
|
||||||
|
return "video-enh";
|
||||||
|
case INTEL_ENGINE_CLASS_COMPUTE:
|
||||||
|
return "compute";
|
||||||
|
default:
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,3 +52,4 @@ enum drm_i915_gem_engine_class intel_engine_class_to_i915(enum intel_engine_clas
|
||||||
struct intel_query_engine_info *intel_engine_get_info(int fd);
|
struct intel_query_engine_info *intel_engine_get_info(int fd);
|
||||||
int intel_engines_count(const struct intel_query_engine_info *info,
|
int intel_engines_count(const struct intel_query_engine_info *info,
|
||||||
enum intel_engine_class engine_class);
|
enum intel_engine_class engine_class);
|
||||||
|
const char *intel_engines_class_to_string(enum intel_engine_class engine_class);
|
||||||
|
|
|
||||||
|
|
@ -263,23 +263,6 @@ anv_utrace_read_ts(struct u_trace_context *utctx,
|
||||||
return intel_device_info_timebase_scale(device->info, ts[idx]);
|
return intel_device_info_timebase_scale(device->info, ts[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
|
||||||
queue_family_to_name(const struct anv_queue_family *family)
|
|
||||||
{
|
|
||||||
switch (family->engine_class) {
|
|
||||||
case INTEL_ENGINE_CLASS_RENDER:
|
|
||||||
return "render";
|
|
||||||
case INTEL_ENGINE_CLASS_COPY:
|
|
||||||
return "copy";
|
|
||||||
case INTEL_ENGINE_CLASS_VIDEO:
|
|
||||||
return "video";
|
|
||||||
case INTEL_ENGINE_CLASS_VIDEO_ENHANCE:
|
|
||||||
return "video-enh";
|
|
||||||
default:
|
|
||||||
return "unknown";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
anv_device_utrace_init(struct anv_device *device)
|
anv_device_utrace_init(struct anv_device *device)
|
||||||
{
|
{
|
||||||
|
|
@ -300,7 +283,7 @@ anv_device_utrace_init(struct anv_device *device)
|
||||||
|
|
||||||
queue->ds =
|
queue->ds =
|
||||||
intel_ds_device_add_queue(&device->ds, "%s%u",
|
intel_ds_device_add_queue(&device->ds, "%s%u",
|
||||||
queue_family_to_name(queue->family),
|
intel_engines_class_to_string(queue->family->engine_class),
|
||||||
queue->index_in_family);
|
queue->index_in_family);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -263,23 +263,6 @@ anv_utrace_read_ts(struct u_trace_context *utctx,
|
||||||
return intel_device_info_timebase_scale(device->info, ts[idx]);
|
return intel_device_info_timebase_scale(device->info, ts[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
|
||||||
queue_family_to_name(const struct anv_queue_family *family)
|
|
||||||
{
|
|
||||||
switch (family->engine_class) {
|
|
||||||
case INTEL_ENGINE_CLASS_RENDER:
|
|
||||||
return "render";
|
|
||||||
case INTEL_ENGINE_CLASS_COPY:
|
|
||||||
return "copy";
|
|
||||||
case INTEL_ENGINE_CLASS_VIDEO:
|
|
||||||
return "video";
|
|
||||||
case INTEL_ENGINE_CLASS_VIDEO_ENHANCE:
|
|
||||||
return "video-enh";
|
|
||||||
default:
|
|
||||||
return "unknown";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
anv_device_utrace_init(struct anv_device *device)
|
anv_device_utrace_init(struct anv_device *device)
|
||||||
{
|
{
|
||||||
|
|
@ -300,7 +283,7 @@ anv_device_utrace_init(struct anv_device *device)
|
||||||
|
|
||||||
queue->ds =
|
queue->ds =
|
||||||
intel_ds_device_add_queue(&device->ds, "%s%u",
|
intel_ds_device_add_queue(&device->ds, "%s%u",
|
||||||
queue_family_to_name(queue->family),
|
intel_engines_class_to_string(queue->family->engine_class),
|
||||||
queue->index_in_family);
|
queue->index_in_family);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue