diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h index da808633732b..de490f183af2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h @@ -29,10 +29,12 @@ struct drm_device;  struct drm_file;  struct amdgpu_fpriv; +#define AMDGPU_MAX_ENTITY_NUM 4 +  struct amdgpu_ctx_entity {  	uint64_t		sequence; -	struct dma_fence	**fences;  	struct drm_sched_entity	entity; +	struct dma_fence	*fences[];  };  struct amdgpu_ctx { @@ -42,8 +44,7 @@ struct amdgpu_ctx {  	unsigned			reset_counter_query;  	uint32_t			vram_lost_counter;  	spinlock_t			ring_lock; -	struct dma_fence		**fences; -	struct amdgpu_ctx_entity	*entities[AMDGPU_HW_IP_NUM]; +	struct amdgpu_ctx_entity	*entities[AMDGPU_HW_IP_NUM][AMDGPU_MAX_ENTITY_NUM];  	bool				preamble_presented;  	enum drm_sched_priority		init_priority;  	enum drm_sched_priority		override_priority; @@ -87,4 +88,7 @@ void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr);  long amdgpu_ctx_mgr_entity_flush(struct amdgpu_ctx_mgr *mgr, long timeout);  void amdgpu_ctx_mgr_fini(struct amdgpu_ctx_mgr *mgr); +void amdgpu_ctx_init_sched(struct amdgpu_device *adev); + +  #endif |