linux/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

// SPDX-License-Identifier: MIT
/*
 * Copyright © 2023 Intel Corporation
 */

#include <drm/drm_managed.h>
#include <linux/kobject.h>
#include <linux/sysfs.h>

#include "xe_device.h"
#include "xe_gt.h"
#include "xe_hw_engine_class_sysfs.h"
#include "xe_pm.h"

#define MAX_ENGINE_CLASS_NAME_LEN
static int xe_add_hw_engine_class_defaults(struct xe_device *xe,
					   struct kobject *parent);

/**
 * xe_hw_engine_timeout_in_range - Helper to check if timeout is in range
 * @timeout: timeout to validate
 * @min: min value of valid range
 * @max: max value of valid range
 *
 * This helper helps to validate if timeout is in min-max range of HW engine
 * scheduler.
 *
 * Returns: Returns false value for failure and true for success.
 */
bool xe_hw_engine_timeout_in_range(u64 timeout, u64 min, u64 max)
{}

static void kobj_xe_hw_engine_release(struct kobject *kobj)
{}

static const struct kobj_type kobj_xe_hw_engine_type =;

static ssize_t job_timeout_max_store(struct kobject *kobj,
				     struct kobj_attribute *attr,
				     const char *buf, size_t count)
{}

static ssize_t job_timeout_max_show(struct kobject *kobj,
				    struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute job_timeout_max_attr =;

static ssize_t job_timeout_min_store(struct kobject *kobj,
				     struct kobj_attribute *attr,
				     const char *buf, size_t count)
{}

static ssize_t job_timeout_min_show(struct kobject *kobj,
				    struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute job_timeout_min_attr =;

static ssize_t job_timeout_store(struct kobject *kobj,
				 struct kobj_attribute *attr,
				 const char *buf, size_t count)
{}

static ssize_t job_timeout_show(struct kobject *kobj,
				struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute job_timeout_attr =;

static ssize_t job_timeout_default(struct kobject *kobj,
				   struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute job_timeout_def =;

static ssize_t job_timeout_min_default(struct kobject *kobj,
				       struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute job_timeout_min_def =;

static ssize_t job_timeout_max_default(struct kobject *kobj,
				       struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute job_timeout_max_def =;

static ssize_t timeslice_duration_store(struct kobject *kobj,
					struct kobj_attribute *attr,
					const char *buf, size_t count)
{}

static ssize_t timeslice_duration_max_store(struct kobject *kobj,
					    struct kobj_attribute *attr,
					    const char *buf, size_t count)
{}

static ssize_t timeslice_duration_max_show(struct kobject *kobj,
					   struct kobj_attribute *attr,
					   char *buf)
{}

static const struct kobj_attribute timeslice_duration_max_attr =;

static ssize_t timeslice_duration_min_store(struct kobject *kobj,
					    struct kobj_attribute *attr,
					    const char *buf, size_t count)
{}

static ssize_t timeslice_duration_min_show(struct kobject *kobj,
					   struct kobj_attribute *attr,
					   char *buf)
{}

static const struct kobj_attribute timeslice_duration_min_attr =;

static ssize_t timeslice_duration_show(struct kobject *kobj,
				       struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute timeslice_duration_attr =;

static ssize_t timeslice_default(struct kobject *kobj,
				 struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute timeslice_duration_def =;

static ssize_t timeslice_min_default(struct kobject *kobj,
				     struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute timeslice_duration_min_def =;

static ssize_t timeslice_max_default(struct kobject *kobj,
				     struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute timeslice_duration_max_def =;

static ssize_t preempt_timeout_store(struct kobject *kobj,
				     struct kobj_attribute *attr,
				     const char *buf, size_t count)
{}

static ssize_t preempt_timeout_show(struct kobject *kobj,
				    struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute preempt_timeout_attr =;

static ssize_t preempt_timeout_default(struct kobject *kobj,
				       struct kobj_attribute *attr,
				       char *buf)
{}

static const struct kobj_attribute preempt_timeout_def =;

static ssize_t preempt_timeout_min_default(struct kobject *kobj,
					   struct kobj_attribute *attr,
					   char *buf)
{}

static const struct kobj_attribute preempt_timeout_min_def =;

static ssize_t preempt_timeout_max_default(struct kobject *kobj,
					   struct kobj_attribute *attr,
					   char *buf)
{}

static const struct kobj_attribute preempt_timeout_max_def =;

static ssize_t preempt_timeout_max_store(struct kobject *kobj,
					 struct kobj_attribute *attr,
					 const char *buf, size_t count)
{}

static ssize_t preempt_timeout_max_show(struct kobject *kobj,
					struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute preempt_timeout_max_attr =;

static ssize_t preempt_timeout_min_store(struct kobject *kobj,
					 struct kobj_attribute *attr,
					 const char *buf, size_t count)
{}

static ssize_t preempt_timeout_min_show(struct kobject *kobj,
					struct kobj_attribute *attr, char *buf)
{}

static const struct kobj_attribute preempt_timeout_min_attr =;

static const struct attribute *defaults[] =;

static const struct attribute * const files[] =;

static void kobj_xe_hw_engine_class_fini(void *arg)
{}

static struct kobj_eclass *
kobj_xe_hw_engine_class(struct xe_device *xe, struct kobject *parent, const char *name)
{}

static void hw_engine_class_defaults_fini(void *arg)
{}

static int xe_add_hw_engine_class_defaults(struct xe_device *xe,
					   struct kobject *parent)
{}

static void xe_hw_engine_sysfs_kobj_release(struct kobject *kobj)
{}

static ssize_t xe_hw_engine_class_sysfs_attr_show(struct kobject *kobj,
						  struct attribute *attr,
						  char *buf)
{}

static ssize_t xe_hw_engine_class_sysfs_attr_store(struct kobject *kobj,
						   struct attribute *attr,
						   const char *buf,
						   size_t count)
{}

static const struct sysfs_ops xe_hw_engine_class_sysfs_ops =;

static const struct kobj_type xe_hw_engine_sysfs_kobj_type =;

static void hw_engine_class_sysfs_fini(void *arg)
{}

/**
 * xe_hw_engine_class_sysfs_init - Init HW engine classes on GT.
 * @gt: Xe GT.
 *
 * This routine creates sysfs for HW engine classes and adds methods
 * to get/set different scheduling properties for HW engines class.
 *
 * Returns: Returns error value for failure and 0 for success.
 */
int xe_hw_engine_class_sysfs_init(struct xe_gt *gt)
{}