linux/drivers/gpu/drm/tegra/nvdec.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2022, NVIDIA Corporation.
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/host1x.h>
#include <linux/iommu.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>

#include <soc/tegra/mc.h>

#include "drm.h"
#include "falcon.h"
#include "riscv.h"
#include "vic.h"

#define NVDEC_FALCON_DEBUGINFO
#define NVDEC_TFBIF_TRANSCFG

struct nvdec_config {};

struct nvdec {};

static inline struct nvdec *to_nvdec(struct tegra_drm_client *client)
{}

static inline void nvdec_writel(struct nvdec *nvdec, u32 value,
				unsigned int offset)
{}

static int nvdec_boot_falcon(struct nvdec *nvdec)
{}

static int nvdec_wait_debuginfo(struct nvdec *nvdec, const char *phase)
{}

static int nvdec_boot_riscv(struct nvdec *nvdec)
{}

static int nvdec_init(struct host1x_client *client)
{}

static int nvdec_exit(struct host1x_client *client)
{}

static const struct host1x_client_ops nvdec_client_ops =;

static int nvdec_load_falcon_firmware(struct nvdec *nvdec)
{}

static __maybe_unused int nvdec_runtime_resume(struct device *dev)
{}

static __maybe_unused int nvdec_runtime_suspend(struct device *dev)
{}

static int nvdec_open_channel(struct tegra_drm_client *client,
			    struct tegra_drm_context *context)
{}

static void nvdec_close_channel(struct tegra_drm_context *context)
{}

static int nvdec_can_use_memory_ctx(struct tegra_drm_client *client, bool *supported)
{}

static const struct tegra_drm_client_ops nvdec_ops =;

#define NVIDIA_TEGRA_210_NVDEC_FIRMWARE

static const struct nvdec_config nvdec_t210_config =;

#define NVIDIA_TEGRA_186_NVDEC_FIRMWARE

static const struct nvdec_config nvdec_t186_config =;

#define NVIDIA_TEGRA_194_NVDEC_FIRMWARE

static const struct nvdec_config nvdec_t194_config =;

static const struct nvdec_config nvdec_t234_config =;

static const struct of_device_id tegra_nvdec_of_match[] =;
MODULE_DEVICE_TABLE(of, tegra_nvdec_of_match);

static int nvdec_probe(struct platform_device *pdev)
{}

static void nvdec_remove(struct platform_device *pdev)
{}

static const struct dev_pm_ops nvdec_pm_ops =;

struct platform_driver tegra_nvdec_driver =;

#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
MODULE_FIRMWARE(NVIDIA_TEGRA_210_NVDEC_FIRMWARE);
#endif
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
MODULE_FIRMWARE(NVIDIA_TEGRA_186_NVDEC_FIRMWARE);
#endif
#if IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
MODULE_FIRMWARE(NVIDIA_TEGRA_194_NVDEC_FIRMWARE);
#endif