#include <linux/firmware.h>
#include <linux/module.h>
#include <drm/drm.h>
#include "radeon.h"
#include "radeon_ucode.h"
#include "r600d.h"
#define UVD_IDLE_TIMEOUT_MS …
#define FIRMWARE_R600 …
#define FIRMWARE_RS780 …
#define FIRMWARE_RV770 …
#define FIRMWARE_RV710 …
#define FIRMWARE_CYPRESS …
#define FIRMWARE_SUMO …
#define FIRMWARE_TAHITI …
#define FIRMWARE_BONAIRE_LEGACY …
#define FIRMWARE_BONAIRE …
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
static void radeon_uvd_idle_work_handler(struct work_struct *work);
int radeon_uvd_init(struct radeon_device *rdev)
{ … }
void radeon_uvd_fini(struct radeon_device *rdev)
{ … }
int radeon_uvd_suspend(struct radeon_device *rdev)
{ … }
int radeon_uvd_resume(struct radeon_device *rdev)
{ … }
void radeon_uvd_force_into_uvd_segment(struct radeon_bo *rbo,
uint32_t allowed_domains)
{ … }
void radeon_uvd_free_handles(struct radeon_device *rdev, struct drm_file *filp)
{ … }
static int radeon_uvd_cs_msg_decode(uint32_t *msg, unsigned buf_sizes[])
{ … }
static int radeon_uvd_validate_codec(struct radeon_cs_parser *p,
unsigned stream_type)
{ … }
static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
unsigned offset, unsigned buf_sizes[])
{ … }
static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p,
int data0, int data1,
unsigned buf_sizes[], bool *has_msg_cmd)
{ … }
static int radeon_uvd_cs_reg(struct radeon_cs_parser *p,
struct radeon_cs_packet *pkt,
int *data0, int *data1,
unsigned buf_sizes[],
bool *has_msg_cmd)
{ … }
int radeon_uvd_cs_parse(struct radeon_cs_parser *p)
{ … }
static int radeon_uvd_send_msg(struct radeon_device *rdev,
int ring, uint64_t addr,
struct radeon_fence **fence)
{ … }
int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
uint32_t handle, struct radeon_fence **fence)
{ … }
int radeon_uvd_get_destroy_msg(struct radeon_device *rdev, int ring,
uint32_t handle, struct radeon_fence **fence)
{ … }
static void radeon_uvd_count_handles(struct radeon_device *rdev,
unsigned *sd, unsigned *hd)
{ … }
static void radeon_uvd_idle_work_handler(struct work_struct *work)
{ … }
void radeon_uvd_note_usage(struct radeon_device *rdev)
{ … }
static unsigned radeon_uvd_calc_upll_post_div(unsigned vco_freq,
unsigned target_freq,
unsigned pd_min,
unsigned pd_even)
{ … }
int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
unsigned vclk, unsigned dclk,
unsigned vco_min, unsigned vco_max,
unsigned fb_factor, unsigned fb_mask,
unsigned pd_min, unsigned pd_max,
unsigned pd_even,
unsigned *optimal_fb_div,
unsigned *optimal_vclk_div,
unsigned *optimal_dclk_div)
{ … }
int radeon_uvd_send_upll_ctlreq(struct radeon_device *rdev,
unsigned cg_upll_func_cntl)
{ … }