linux/drivers/gpu/drm/xe/xe_uc_fw.h

/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2022 Intel Corporation
 */

#ifndef _XE_UC_FW_H_
#define _XE_UC_FW_H_

#include <linux/errno.h>

#include "xe_macros.h"
#include "xe_uc_fw_abi.h"
#include "xe_uc_fw_types.h"

struct drm_printer;

int xe_uc_fw_init(struct xe_uc_fw *uc_fw);
size_t xe_uc_fw_copy_rsa(struct xe_uc_fw *uc_fw, void *dst, u32 max_len);
int xe_uc_fw_upload(struct xe_uc_fw *uc_fw, u32 offset, u32 dma_flags);
int xe_uc_fw_check_version_requirements(struct xe_uc_fw *uc_fw);
void xe_uc_fw_print(struct xe_uc_fw *uc_fw, struct drm_printer *p);

static inline u32 xe_uc_fw_rsa_offset(struct xe_uc_fw *uc_fw)
{}

static inline void xe_uc_fw_change_status(struct xe_uc_fw *uc_fw,
					  enum xe_uc_fw_status status)
{}

static inline
const char *xe_uc_fw_status_repr(enum xe_uc_fw_status status)
{}

static inline int xe_uc_fw_status_to_error(enum xe_uc_fw_status status)
{}

static inline const char *xe_uc_fw_type_repr(enum xe_uc_fw_type type)
{}

static inline enum xe_uc_fw_status
__xe_uc_fw_status(struct xe_uc_fw *uc_fw)
{}

static inline bool xe_uc_fw_is_supported(struct xe_uc_fw *uc_fw)
{}

static inline bool xe_uc_fw_is_enabled(struct xe_uc_fw *uc_fw)
{}

static inline bool xe_uc_fw_is_disabled(struct xe_uc_fw *uc_fw)
{}

static inline bool xe_uc_fw_is_available(struct xe_uc_fw *uc_fw)
{}

static inline bool xe_uc_fw_is_loadable(struct xe_uc_fw *uc_fw)
{}

static inline bool xe_uc_fw_is_loaded(struct xe_uc_fw *uc_fw)
{}

static inline bool xe_uc_fw_is_running(struct xe_uc_fw *uc_fw)
{}

static inline bool xe_uc_fw_is_overridden(const struct xe_uc_fw *uc_fw)
{}

static inline void xe_uc_fw_sanitize(struct xe_uc_fw *uc_fw)
{}

static inline u32 __xe_uc_fw_get_upload_size(struct xe_uc_fw *uc_fw)
{}

/**
 * xe_uc_fw_get_upload_size() - Get size of firmware needed to be uploaded.
 * @uc_fw: uC firmware.
 *
 * Get the size of the firmware and header that will be uploaded to WOPCM.
 *
 * Return: Upload firmware size, or zero on firmware fetch failure.
 */
static inline u32 xe_uc_fw_get_upload_size(struct xe_uc_fw *uc_fw)
{}

#define XE_UC_FIRMWARE_URL

#endif