linux/drivers/accel/qaic/qaic_drv.c

// SPDX-License-Identifier: GPL-2.0-only

/* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. */

#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/idr.h>
#include <linux/interrupt.h>
#include <linux/list.h>
#include <linux/kobject.h>
#include <linux/kref.h>
#include <linux/mhi.h>
#include <linux/module.h>
#include <linux/msi.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <linux/wait.h>
#include <drm/drm_accel.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
#include <drm/drm_gem.h>
#include <drm/drm_ioctl.h>
#include <drm/drm_managed.h>
#include <uapi/drm/qaic_accel.h>

#include "mhi_controller.h"
#include "qaic.h"
#include "qaic_debugfs.h"
#include "qaic_timesync.h"
#include "sahara.h"

MODULE_IMPORT_NS();

#define PCI_DEV_AIC100
#define QAIC_NAME
#define QAIC_DESC
#define CNTL_MAJOR
#define CNTL_MINOR

bool datapath_polling;
module_param(datapath_polling, bool, 0400);
MODULE_PARM_DESC();
static bool link_up;
static DEFINE_IDA(qaic_usrs);

static void qaicm_wq_release(struct drm_device *dev, void *res)
{}

static struct workqueue_struct *qaicm_wq_init(struct drm_device *dev, const char *fmt)
{}

static void qaicm_srcu_release(struct drm_device *dev, void *res)
{}

static int qaicm_srcu_init(struct drm_device *dev, struct srcu_struct *lock)
{}

static void qaicm_pci_release(struct drm_device *dev, void *res)
{}

static void free_usr(struct kref *kref)
{}

static int qaic_open(struct drm_device *dev, struct drm_file *file)
{}

static void qaic_postclose(struct drm_device *dev, struct drm_file *file)
{}

DEFINE_DRM_ACCEL_FOPS(qaic_accel_fops);

static const struct drm_ioctl_desc qaic_drm_ioctls[] =;

static const struct drm_driver qaic_accel_driver =;

static int qaic_create_drm_device(struct qaic_device *qdev, s32 partition_id)
{}

static void qaic_destroy_drm_device(struct qaic_device *qdev, s32 partition_id)
{}

static int qaic_mhi_probe(struct mhi_device *mhi_dev, const struct mhi_device_id *id)
{}

static void qaic_mhi_remove(struct mhi_device *mhi_dev)
{}

static void qaic_notify_reset(struct qaic_device *qdev)
{}

void qaic_dev_reset_clean_local_state(struct qaic_device *qdev)
{}

static struct qaic_device *create_qdev(struct pci_dev *pdev, const struct pci_device_id *id)
{}

static int init_pci(struct qaic_device *qdev, struct pci_dev *pdev)
{}

static int init_msi(struct qaic_device *qdev, struct pci_dev *pdev)
{}

static int qaic_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{}

static void qaic_pci_remove(struct pci_dev *pdev)
{}

static void qaic_pci_shutdown(struct pci_dev *pdev)
{}

static pci_ers_result_t qaic_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t error)
{}

static void qaic_pci_reset_prepare(struct pci_dev *pdev)
{}

static void qaic_pci_reset_done(struct pci_dev *pdev)
{}

static const struct mhi_device_id qaic_mhi_match_table[] =;

static struct mhi_driver qaic_mhi_driver =;

static const struct pci_device_id qaic_ids[] =;
MODULE_DEVICE_TABLE(pci, qaic_ids);

static const struct pci_error_handlers qaic_pci_err_handler =;

static struct pci_driver qaic_pci_driver =;

static int __init qaic_init(void)
{}

static void __exit qaic_exit(void)
{}

module_init();
module_exit(qaic_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();