/* * The class goes in bits [0..2] of the GuC ID, the instance in bits [3..6]. * Bit 7 can be used for operations that apply to all engine classes&instances.
*/ #define GUC_ENGINE_CLASS_SHIFT 0 #define GUC_ENGINE_CLASS_MASK (0x7 << GUC_ENGINE_CLASS_SHIFT) #define GUC_ENGINE_INSTANCE_SHIFT 3 #define GUC_ENGINE_INSTANCE_MASK (0xf << GUC_ENGINE_INSTANCE_SHIFT) #define GUC_ENGINE_ALL_INSTANCES BIT(7)
/* Work item for submitting workloads into work queue of GuC. */ struct guc_wq_item {
u32 header;
u32 context_desc;
u32 submit_element_info;
u32 fence_id;
} __packed;
/* Preempt to idle on quantum expiry */ #define CONTEXT_POLICY_FLAG_PREEMPT_TO_IDLE_V69 BIT(0)
/* * GuC Context registration descriptor. * FIXME: This is only required to exist during context registration. * The current 1:1 between guc_lrc_desc and LRCs for the lifetime of the LRC * is not required.
*/ struct guc_lrc_desc_v69 {
u32 hw_context_desc;
u32 slpm_perf_mode_hint; /* SPLC v1 only */
u32 slpm_freq_hint;
u32 engine_submit_mask; /* In logical space */
u8 engine_class;
u8 reserved0[3];
u32 priority;
u32 process_desc;
u32 wq_addr;
u32 wq_size;
u32 context_flags; /* CONTEXT_REGISTRATION_* */ /* Time for one workload to execute. (in micro seconds) */
u32 execution_quantum; /* Time to wait for a preemption request to complete before issuing a * reset. (in micro seconds).
*/
u32 preemption_timeout;
u32 policy_flags; /* CONTEXT_POLICY_* */
u32 reserved1[19];
} __packed;
/* 32-bit KLV structure as used by policy updates and others */ struct guc_klv_generic_dw_t {
u32 kl;
u32 value;
} __packed;
/* Format of the UPDATE_CONTEXT_POLICIES H2G data packet */ struct guc_update_context_policy_header {
u32 action;
u32 ctx_id;
} __packed;
/* Format of the UPDATE_SCHEDULING_POLICIES H2G data packet */ struct guc_update_scheduling_policy_header {
u32 action;
} __packed;
/* * Can't dynamically allocate memory for the scheduling policy KLV because * it will be sent from within the reset path. Need a fixed size lump on * the stack instead :(. * * Currently, there is only one KLV defined, which has 1 word of KL + 2 words of V.
*/ #define MAX_SCHEDULING_POLICY_SIZE 3
/* * GuC converts the timeout to clock ticks internally. Different platforms have * different GuC clocks. Thus, the maximum value before overflow is platform * dependent. Current worst case scenario is about 110s. So, the spec says to * limit to 100s to be safe.
*/ #define GUC_POLICY_MAX_EXEC_QUANTUM_US (100 * 1000 * 1000UL) #define GUC_POLICY_MAX_PREEMPT_TIMEOUT_US (100 * 1000 * 1000UL)
struct guc_policies {
u32 submission_queue_depth[GUC_MAX_ENGINE_CLASSES]; /* In micro seconds. How much time to allow before DPC processing is * called back via interrupt (to prevent DPC queue drain starving).
* Typically 1000s of micro seconds (example only, not granularity). */
u32 dpc_promote_time;
/* Must be set to take these new values. */
u32 is_valid;
/* Max number of WIs to process per call. A large value may keep CS
* idle. */
u32 max_num_work_items;
/* * struct guc_log_buffer_state - GuC log buffer state * * Below state structure is used for coordination of retrieval of GuC firmware * logs. Separate state is maintained for each log buffer type. * read_ptr points to the location where i915 read last in log buffer and * is read only for GuC firmware. write_ptr is incremented by GuC with number * of bytes written for each log entry and is read only for i915. * When any type of log buffer becomes half full, GuC sends a flush interrupt. * GuC firmware expects that while it is writing to 2nd half of the buffer, * first half would get consumed by Host and then get a flush completed * acknowledgment from Host, so that it does not end up doing any overwrite * causing loss of logs. So when buffer gets half filled & i915 has requested * for interrupt, GuC will set flush_to_file field, set the sampled_write_ptr * to the value of write_ptr and raise the interrupt. * On receiving the interrupt i915 should read the buffer, clear flush_to_file * field and also update read_ptr with the value of sample_write_ptr, before * sending an acknowledgment to GuC. marker & version fields are for internal * usage of GuC and opaque to i915. buffer_full_cnt field is incremented every * time GuC detects the log buffer overflow.
*/ struct guc_log_buffer_state {
u32 marker[2];
u32 read_ptr;
u32 write_ptr;
u32 size;
u32 sampled_write_ptr;
u32 wrap_offset; union { struct {
u32 flush_to_file:1;
u32 buffer_full_cnt:4;
u32 reserved:27;
};
u32 flags;
};
u32 version;
} __packed;
/* This action will be programmed in C1BC - SOFT_SCRATCH_15_REG */ enum intel_guc_recv_message {
INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED = BIT(1),
INTEL_GUC_RECV_MSG_EXCEPTION = BIT(30),
};
#endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.