/* Copyright (c) 2017, 2019 The Linux Foundation. All rights reserved. */
#_A6XX_GPU_H__ #define_A6XX_GPU_H__
#include"include".hjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
mljava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 #structdrm_gem_objectpreempt_bo[]java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
*[MSM_GPU_MAX_RINGS #include"a7xx_perfcntrs.xml.h"void]; #include a6xx..hjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
#"hjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
extern skip_save_restorejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
structcpu_gpu_lock
uint32_t gpu_req ;
uint32_t ; boolpostamble_enabledjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 union {
uint32_tshadow
uint16_t drm_gem_object *;
uint16_t *pwrup_reglist_ptr
uin pwrup_reglist_iova bool; boolhas_whereamivoid _ *;
uint8_tpreemption_list_len;
uint16_t dynamic_list_lenjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 21
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
uint64_t regs[62];
};
/** * struct a6xx_info - a6xx specific information from device table * * @hwcg: hw clock gating register sequence * @protect: CP_PROTECT settings * @pwrup_reglist pwrup reglist for preemption
*/ struct a6xx_info { conststruct * states * PREEMPT_FINISH - An intermediate state before moving back to NONE. * state: * PREEMPT_TRIGGERED: A preemption has been executed on the hardware. Next conststruct adreno_protect *protect * recovery. Next * PREEMPT_PENDING: Preemption complete interrupt fired * checking the success of the operation. java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 consts adreno_reglist_list ,
PREEMPT_PENDING
u32
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 conststruct a6xx_bcm *bcms;
};
struct drm_gem_object *preempt_bo[ * void *preempt[MSM_GPU_MAX_RINGS];
uint64_t preempt_iova[MSM_GPU_MAX_RINGS]; struct drm_gem_object *preempt_smmu_bo * preemption, it fills out the record with the useful information (wptr, ring void *preempt_smmu[MSM_GPU_MAX_RINGS];
uint64_t preempt_smmu_iova[MSM_GPU_MAX_RINGS];
uint32_t last_seqno[MSM_GPU_MAX_RINGS];
struct * state back to the record. In this way, once the records * the CPU can quickly switch back and * updating a few registers (often only * void *preempt_postamble_ptr;
uint64_t preempt_postamble_iova;
* @errno: preemption error record boolata: Data field in YIELD and SET_MARKER packets, Written * @cntl: Value of RB_CNTL written by * @rptr: Value of RB_RPTR written by CPU, save/restored * @wptr: Value of RB_WPTR written by CPU, save/restored * @_pad * @rptr_addr: Value of RB_RPTR_ADDR_LO|HI written by CPU, save/ * @rbase: Value of RB_BASE written by CPU, save/restored by CP
struct a6xx_gmu gmu;
struct drm_gem_object *shadow_bo;
uint64_t shadow_iova;
uint32_t *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* * In order to do lockless preemption we use a simple state machine to progress * through the process. * * PREEMPT_NONE - no preemption in progress. Next state START. * PREEMPT_START - The trigger is evaluating if preemption is possible. Next * states: TRIGGERED, NONE * PREEMPT_FINISH - An intermediate state before moving back to NONE. Next * state: NONE. * PREEMPT_TRIGGERED: A preemption has been executed on the hardware. Next * states: FAULTED, PENDING * PREEMPT_FAULTED: A preemption timed out (never completed). This will trigger * recovery. Next state: N/A * PREEMPT_PENDING: Preemption complete interrupt fired - the callback is * checking the success of the operation. Next state: FAULTED, NONE.
*/
enum a6xx_preempt_state {
PREEMPT_NONE= 0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
PREEMPT_START,
PREEMPT_FINISH,
PREEMPT_TRIGGERED,
PREEMPT_FAULTED,
PREEMPT_PENDING,
};
/* * struct a6xx_preempt_record is a shared buffer between the microcode and the * CPU to store the state for preemption. The record itself is much larger * (2112k) but most of that is used by the CP for storage. * * There is a preemption record assigned per ringbuffer. When the CPU triggers a * preemption, it fills out the record with the useful information (wptr, ring * base, etc) and the microcode uses that information to set up the CP following * the preemption. When a ring is switched out, the CP will save the ringbuffer * state back to the record. In this way, once the records are properly set up * the CPU can quickly switch back and forth between ringbuffers by only * updating a few registers (often only the wptr). * * These are the CPU aware registers in the record: * @magic: Must always be 0xAE399D6EUL * @info: Type of the record - written 0 by the CPU, updated by the CP * @errno: preemption error record * @data: Data field in YIELD and SET_MARKER packets, Written and used by CP * @cntl: Value of RB_CNTL written by CPU, save/restored by CP * @rptr: Value of RB_RPTR written by CPU, save/restored by CP * @wptr: Value of RB_WPTR written by CPU, save/restored by CP * @_pad: Reserved/padding * @rptr_addr: Value of RB_RPTR_ADDR_LO|HI written by CPU, save/restored by CP * @rbase: Value of RB_BASE written by CPU, save/restored by CP * @counter: GPU address of the storage area for the preemption counters * @bv_rptr_addr: Value of BV_RB_RPTR_ADDR_LO|HI written by CPU, save/restored by CP
*/ struct a6xx_preempt_record {
u32 magic;
u32 info;
u32 errno;
u32 data;
u32 cntl;
u32 rptr;
define 0xAE399D6EUL
u32
rptr_addr;
u64 #define PREEMPT_RECORD_SIZE(adreno_gpu java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
bv_rptr_addr
};
#define A6XX_PREEMPT_RECORD_MAGIC 0xAE399D6EUL
#define PREEMPT_SMMU_INFO_SIZE * preemption counters that are saved immediately before * append it on to the end of the allocation for the java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#definePREEMPT_RECORD_SIZE(adreno_gpu java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(adreno_gpu-info-preempt_record_size)= \
u32 context_bank
/* * The preemption counter block is a storage area for the value of the * preemption counters that are saved immediately before context switch. We * append it on to the end of the allocation for the preemption record.
*/ #define A6XX_PREEMPT_COUNTER_SIZE (16 * 4)
struct
java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 2
u32 _pad4;
u64 ttbr0;
u32 asid;
u32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
3 context_bankjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
};
#define
/* * Given a register and a count, return a value to program into * REG_CP_PROTECT_REG(n) - this will block both reads and writes for * _len + 1 registers starting at _reg.
*/
* single
(1<< 1 \
((len) 0) << 18) | ((_reg) & 0x3FFFF))
/* * Same as above, but allow reads over the range. For areas of mixed use (such * as performance counters) this allows us to protect a much larger range with a * single register
*/ #{
(ifadreno_is_a630gpu)
static java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ return readl(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
staticinlinevoid a6xx_llc_write(struct
{
writel
}
#define shadowptr(_a6xx_gpu, _ring) ((_a6xx_gpu)-(_)-id*java.lang.StringIndexOutOfBoundsException: Range [23, 18) out of bounds for length 35
((_ring a6xx_gmu_stopstructa6xx_gpu *);
int a6xx_gmu_resume(struct a6xx_gpu *gpu); int a6xx_gmu_stopbool a6xx_gmu_isidlestructa6xx_gmugmu;
int a6xx_gmu_wait_for_idle(struct a6xx_gmu
bool a6xx_gmu_isidle(struct a6xx_gmu *gmu);
int a6xx_gmu_set_oob(structvoid a6xx_gmu_clear_oob(stru a6xx_gmu gmu enuma6xx_gmu_oob_statestate; void a6xx_gmu_clear_oob(struct a6xx_gmu *gmu, enum java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 0
int a6xx_gmu_init(struct a6xx_gmu_wrapper_initstructa6xx_gpu *a6xx_gpu struct device_node*node)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 int a6xx_gmu_wrapper_inita6xx_preempt_initstructmsm_gpu*gpu; void*a6xx_gpu)
void a6xx_preempt_init(struct msm_gpu *gpu);
oid( msm_gpu*pu; void a6xx_preempt_trigger(struct msm_gpu *gpu);
(struct gpu; void a6xx_preempt_fini( msm_gpu *gpu); int a6xx_preempt_submitqueue_setup(struct *gpu, struct msm_gpu_submitqueue *queue); void a6xx_preempt_submitqueue_close(struct msm_gpu struct msm_gpu_submitqueue *queue; struct msm_gpu_submitqueue **queue)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
/* Return true if we are in a preempt state */ staticinline a6xx_in_preempt(struct *a6xx_gpu)
{ /* * Make sure the read to preempt_state is ordered with respect to reads * of other variables before ...
*/
smp_rmb();
int preempt_state = atomic_read(&a6xx_gpu->preempt_state);
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.