#include <linux/firmware.h>
#include <linux/module.h>
#include <drm/drm.h>
#include <drm/drm_drv.h>
#include "amdgpu.h"
#include "amdgpu_pm.h"
#include "amdgpu_uvd.h"
#include "amdgpu_cs.h"
#include "cikd.h"
#include "uvd/uvd_4_2_d.h"
#include "amdgpu_ras.h"
#define UVD_IDLE_TIMEOUT …
#define FW_1_65_10 …
#define FW_1_87_11 …
#define FW_1_87_12 …
#define FW_1_37_15 …
#define FW_1_66_16 …
#ifdef CONFIG_DRM_AMDGPU_SI
#define FIRMWARE_TAHITI …
#define FIRMWARE_VERDE …
#define FIRMWARE_PITCAIRN …
#define FIRMWARE_OLAND …
#endif
#ifdef CONFIG_DRM_AMDGPU_CIK
#define FIRMWARE_BONAIRE …
#define FIRMWARE_KABINI …
#define FIRMWARE_KAVERI …
#define FIRMWARE_HAWAII …
#define FIRMWARE_MULLINS …
#endif
#define FIRMWARE_TONGA …
#define FIRMWARE_CARRIZO …
#define FIRMWARE_FIJI …
#define FIRMWARE_STONEY …
#define FIRMWARE_POLARIS10 …
#define FIRMWARE_POLARIS11 …
#define FIRMWARE_POLARIS12 …
#define FIRMWARE_VEGAM …
#define FIRMWARE_VEGA10 …
#define FIRMWARE_VEGA12 …
#define FIRMWARE_VEGA20 …
#define UVD_GPCOM_VCPU_CMD …
#define UVD_GPCOM_VCPU_DATA0 …
#define UVD_GPCOM_VCPU_DATA1 …
#define UVD_NO_OP …
#define UVD_BASE_SI …
struct amdgpu_uvd_cs_ctx { … };
#ifdef CONFIG_DRM_AMDGPU_SI
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
#endif
#ifdef CONFIG_DRM_AMDGPU_CIK
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
#endif
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
static void amdgpu_uvd_idle_work_handler(struct work_struct *work);
static void amdgpu_uvd_force_into_uvd_segment(struct amdgpu_bo *abo);
static int amdgpu_uvd_create_msg_bo_helper(struct amdgpu_device *adev,
uint32_t size,
struct amdgpu_bo **bo_ptr)
{ … }
int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
{ … }
int amdgpu_uvd_sw_fini(struct amdgpu_device *adev)
{ … }
int amdgpu_uvd_entity_init(struct amdgpu_device *adev, struct amdgpu_ring *ring)
{ … }
int amdgpu_uvd_prepare_suspend(struct amdgpu_device *adev)
{ … }
int amdgpu_uvd_suspend(struct amdgpu_device *adev)
{ … }
int amdgpu_uvd_resume(struct amdgpu_device *adev)
{ … }
void amdgpu_uvd_free_handles(struct amdgpu_device *adev, struct drm_file *filp)
{ … }
static void amdgpu_uvd_force_into_uvd_segment(struct amdgpu_bo *abo)
{ … }
static u64 amdgpu_uvd_get_addr_from_ctx(struct amdgpu_uvd_cs_ctx *ctx)
{ … }
static int amdgpu_uvd_cs_pass1(struct amdgpu_uvd_cs_ctx *ctx)
{ … }
static int amdgpu_uvd_cs_msg_decode(struct amdgpu_device *adev, uint32_t *msg,
unsigned int buf_sizes[])
{ … }
static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
struct amdgpu_bo *bo, unsigned int offset)
{ … }
static int amdgpu_uvd_cs_pass2(struct amdgpu_uvd_cs_ctx *ctx)
{ … }
static int amdgpu_uvd_cs_reg(struct amdgpu_uvd_cs_ctx *ctx,
int (*cb)(struct amdgpu_uvd_cs_ctx *ctx))
{ … }
static int amdgpu_uvd_cs_packets(struct amdgpu_uvd_cs_ctx *ctx,
int (*cb)(struct amdgpu_uvd_cs_ctx *ctx))
{ … }
int amdgpu_uvd_ring_parse_cs(struct amdgpu_cs_parser *parser,
struct amdgpu_job *job,
struct amdgpu_ib *ib)
{ … }
static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo,
bool direct, struct dma_fence **fence)
{ … }
int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
struct dma_fence **fence)
{ … }
int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
bool direct, struct dma_fence **fence)
{ … }
static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
{ … }
void amdgpu_uvd_ring_begin_use(struct amdgpu_ring *ring)
{ … }
void amdgpu_uvd_ring_end_use(struct amdgpu_ring *ring)
{ … }
int amdgpu_uvd_ring_test_ib(struct amdgpu_ring *ring, long timeout)
{ … }
uint32_t amdgpu_uvd_used_handles(struct amdgpu_device *adev)
{ … }