linux/drivers/accel/drm_accel.c

// SPDX-License-Identifier: GPL-2.0

/*
 * Copyright 2022 HabanaLabs, Ltd.
 * All Rights Reserved.
 *
 */

#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/xarray.h>

#include <drm/drm_accel.h>
#include <drm/drm_auth.h>
#include <drm/drm_debugfs.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
#include <drm/drm_ioctl.h>
#include <drm/drm_print.h>

DEFINE_XARRAY_ALLOC();

static struct dentry *accel_debugfs_root;

static const struct device_type accel_sysfs_device_minor =;

static char *accel_devnode(const struct device *dev, umode_t *mode)
{}

static const struct class accel_class =;

static int accel_sysfs_init(void)
{}

static void accel_sysfs_destroy(void)
{}

static int accel_name_info(struct seq_file *m, void *data)
{}

static const struct drm_info_list accel_debugfs_list[] =;
#define ACCEL_DEBUGFS_ENTRIES

/**
 * accel_debugfs_init() - Initialize debugfs for device
 * @dev: Pointer to the device instance.
 *
 * This function creates a root directory for the device in debugfs.
 */
void accel_debugfs_init(struct drm_device *dev)
{}

/**
 * accel_debugfs_register() - Register debugfs for device
 * @dev: Pointer to the device instance.
 *
 * Creates common files for accelerators.
 */
void accel_debugfs_register(struct drm_device *dev)
{}

/**
 * accel_set_device_instance_params() - Set some device parameters for accel device
 * @kdev: Pointer to the device instance.
 * @index: The minor's index
 *
 * This function creates the dev_t of the device using the accel major and
 * the device's minor number. In addition, it sets the class and type of the
 * device instance to the accel sysfs class and device type, respectively.
 */
void accel_set_device_instance_params(struct device *kdev, int index)
{}

/**
 * accel_open - open method for ACCEL file
 * @inode: device inode
 * @filp: file pointer.
 *
 * This function must be used by drivers as their &file_operations.open method.
 * It looks up the correct ACCEL device and instantiates all the per-file
 * resources for it. It also calls the &drm_driver.open driver callback.
 *
 * Return: 0 on success or negative errno value on failure.
 */
int accel_open(struct inode *inode, struct file *filp)
{}
EXPORT_SYMBOL_GPL();

static int accel_stub_open(struct inode *inode, struct file *filp)
{}

static const struct file_operations accel_stub_fops =;

void accel_core_exit(void)
{}

int __init accel_core_init(void)
{}