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

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

#ifndef _XE_GUC_FWIF_H
#define _XE_GUC_FWIF_H

#include <linux/bits.h>

#include "abi/guc_klvs_abi.h"

#define G2H_LEN_DW_SCHED_CONTEXT_MODE_SET
#define G2H_LEN_DW_DEREGISTER_CONTEXT
#define G2H_LEN_DW_TLB_INVALIDATE

#define GUC_ID_MAX

#define GUC_CONTEXT_DISABLE
#define GUC_CONTEXT_ENABLE

#define GUC_CLIENT_PRIORITY_KMD_HIGH
#define GUC_CLIENT_PRIORITY_HIGH
#define GUC_CLIENT_PRIORITY_KMD_NORMAL
#define GUC_CLIENT_PRIORITY_NORMAL
#define GUC_CLIENT_PRIORITY_NUM

#define GUC_RENDER_ENGINE
#define GUC_VIDEO_ENGINE
#define GUC_BLITTER_ENGINE
#define GUC_VIDEOENHANCE_ENGINE
#define GUC_VIDEO_ENGINE2
#define GUC_MAX_ENGINES_NUM

#define GUC_RENDER_CLASS
#define GUC_VIDEO_CLASS
#define GUC_VIDEOENHANCE_CLASS
#define GUC_BLITTER_CLASS
#define GUC_COMPUTE_CLASS
#define GUC_GSC_OTHER_CLASS
#define GUC_LAST_ENGINE_CLASS
#define GUC_MAX_ENGINE_CLASSES
#define GUC_MAX_INSTANCES_PER_CLASS

/* Helper for context registration H2G */
struct guc_ctxt_registration_info {};
#define CONTEXT_REGISTRATION_FLAG_KMD

/* 32-bit KLV structure as used by policy updates and others */
struct guc_klv_generic_dw_t {} __packed;

/* Format of the UPDATE_CONTEXT_POLICIES H2G data packet */
struct guc_update_exec_queue_policy_header {} __packed;

struct guc_update_exec_queue_policy {} __packed;

/* GUC_CTL_* - Parameters for loading the GuC */
#define GUC_CTL_LOG_PARAMS
#define GUC_LOG_VALID
#define GUC_LOG_NOTIFY_ON_HALF_FULL
#define GUC_LOG_CAPTURE_ALLOC_UNITS
#define GUC_LOG_LOG_ALLOC_UNITS
#define GUC_LOG_CRASH_SHIFT
#define GUC_LOG_CRASH_MASK
#define GUC_LOG_DEBUG_SHIFT
#define GUC_LOG_DEBUG_MASK
#define GUC_LOG_CAPTURE_SHIFT
#define GUC_LOG_CAPTURE_MASK
#define GUC_LOG_BUF_ADDR_SHIFT

#define GUC_CTL_WA
#define GUC_WA_GAM_CREDITS
#define GUC_WA_DUAL_QUEUE
#define GUC_WA_RCS_RESET_BEFORE_RC6
#define GUC_WA_CONTEXT_ISOLATION
#define GUC_WA_PRE_PARSER
#define GUC_WA_HOLD_CCS_SWITCHOUT
#define GUC_WA_POLLCS
#define GUC_WA_RENDER_RST_RC6_EXIT
#define GUC_WA_RCS_REGS_IN_CCS_REGS_LIST
#define GUC_WA_ENABLE_TSC_CHECK_ON_RC6

#define GUC_CTL_FEATURE
#define GUC_CTL_ENABLE_SLPC
#define GUC_CTL_DISABLE_SCHEDULER

#define GUC_CTL_DEBUG
#define GUC_LOG_VERBOSITY_SHIFT
#define GUC_LOG_VERBOSITY_LOW
#define GUC_LOG_VERBOSITY_MED
#define GUC_LOG_VERBOSITY_HIGH
#define GUC_LOG_VERBOSITY_ULTRA
#define GUC_LOG_VERBOSITY_MIN
#define GUC_LOG_VERBOSITY_MAX
#define GUC_LOG_VERBOSITY_MASK
#define GUC_LOG_DESTINATION_MASK
#define GUC_LOG_DISABLED
#define GUC_PROFILE_ENABLED

#define GUC_CTL_ADS
#define GUC_ADS_ADDR_SHIFT
#define GUC_ADS_ADDR_MASK

#define GUC_CTL_DEVID

#define GUC_CTL_MAX_DWORDS

/* Scheduling policy settings */

#define GLOBAL_POLICY_MAX_NUM_WI

/* Don't reset an engine upon preemption failure */
#define GLOBAL_POLICY_DISABLE_ENGINE_RESET

#define GLOBAL_POLICY_DEFAULT_DPC_PROMOTE_TIME_US

struct guc_policies {} __packed;

/* GuC MMIO reg state struct */
struct guc_mmio_reg {} __packed;

/* GuC register sets */
struct guc_mmio_reg_set {} __packed;

/* Generic GT SysInfo data types */
#define GUC_GENERIC_GT_SYSINFO_SLICE_ENABLED
#define GUC_GENERIC_GT_SYSINFO_VDBOX_SFC_SUPPORT_MASK
#define GUC_GENERIC_GT_SYSINFO_DOORBELL_COUNT_PER_SQIDI
#define GUC_GENERIC_GT_SYSINFO_MAX

/* HW info */
struct guc_gt_system_info {} __packed;

enum {};

/* GuC Additional Data Struct */
struct guc_ads {} __packed;

/* Engine usage stats */
struct guc_engine_usage_record {} __packed;

struct guc_engine_usage {} __packed;

/* This action will be programmed in C1BC - SOFT_SCRATCH_15_REG */
enum xe_guc_recv_message {};

/* Page fault structures */
struct access_counter_desc {} __packed;

enum guc_um_queue_type {};

struct guc_um_queue_params {} __packed;

struct guc_um_init_params {} __packed;

enum xe_guc_fault_reply_type {};

enum xe_guc_response_desc_type {};

struct xe_guc_pagefault_desc {} __packed;

struct xe_guc_pagefault_reply {} __packed;

struct xe_guc_acc_desc {} __packed;

#endif